MapsSensor Class Reference

#include <MapsSensor.hh>

List of all members.


Detailed Description

MapsSensor.hh

Jamie Ballin, Imperial College London February 2008

A MapsSensor object knows its id, position in z, its clockwise angle of rotation relative to a world system, and its alignment relative to the world system. The sign convention of alignments is equal to that found from the sensor's residuals. i.e. positive residual => set positive alignment.

Sensors should be told when they confirm or deny a hit in a track by calling the appropriate methods.

Description of global geometry: physical coordiates (as opposed to pixel coordinates) enter and leave this class in a global coordinate basis UNLESS otherwise specified by the member method. On receipt of a global physical coordinate, this class will subtract its alignment and then rotate the coordinate by -1.0 * phi. Hits leaving this class are rotated by phi, and then have the alignment added before being returned.

Definition at line 37 of file MapsSensor.hh.

Public Types

typedef std::pair< int, int > coord
typedef std::pair< double,
double > 
physXY

Public Member Functions

 MapsSensor (unsigned id, double zpos, double phi=0)
 MapsSensor (unsigned id, double zpos, physXY alignment, double phi=0)
MapsSensor::physXY getAlignment () const
void setAlignment (MapsSensor::physXY alignment)
void setPhi (const double phi)
void setZPosition (const double zpos)
unsigned id ()
double zPosition () const
double phi ()
virtual ~MapsSensor ()
void registerTrackConfirm (unsigned threshold, coord place, unsigned bx)
void registerTrackConfirm (unsigned threshold, coord place, unsigned bx, physXY fourthHitResid)
void registerTrackMiss (unsigned threshold, coord predicted, unsigned bx)
void registerTrackMiss (unsigned threshold, physXY predicted, unsigned bx)
void registerGeneralHit (unsigned threshold, coord place, unsigned bx)
void getInefficiencyXYPlot (TH2F &plot, bool physicalXY=false)
void getEfficiencyXYPlot (TH2F &plot)
void getFourthHitResidualPlot (TH2F &plot)
void setResidual (physXY resid)
void getEfficiencyTimestamps (TH1F &plot)
void getInefficiencyTimestamps (TH1F &plot)
double getEfficiency (unsigned threshold, bool withShapers=true, bool withSamplers=true)
void getEfficiencyCurve (TH1F &, int bins, int low, int high, bool withShapers=true, bool withSamplers=true)
void getEfficiencyByGroup (TH2F &, unsigned threshold=0)
void getResidualXYPlot (TH2F &) const
bool isDeadArea (const physXY) const
void convertHitToPhysical (const coord &, physXY &) const
void convertPhysicalToHit (const physXY &, coord &) const throw (MapsException)
void printEfficiencies (std::ostream &)
unsigned decodeRegion (const coord &) const
unsigned decodeRegion (const physXY &) const throw (MapsException)

Static Public Member Functions

static void mutualSensorMask (const std::vector< MapsSensor * > &, TH2F &)

Protected Member Functions

MapsSensoroperator= (MapsSensor &ms)

Friends

std::ostream & operator<< (std::ostream &s, const MapsSensor &ms)


Member Typedef Documentation

typedef std::pair<int, int> MapsSensor::coord

Definition at line 40 of file MapsSensor.hh.

typedef std::pair<double, double> MapsSensor::physXY

Definition at line 42 of file MapsSensor.hh.


Constructor & Destructor Documentation

MapsSensor::MapsSensor ( unsigned  id,
double  zpos,
double  phi = 0 
) [inline]

MapsSensor constructors

Definition at line 47 of file MapsSensor.hh.

MapsSensor::MapsSensor ( unsigned  id,
double  zpos,
physXY  alignment,
double  phi = 0 
) [inline]

Definition at line 52 of file MapsSensor.hh.

MapsSensor::~MapsSensor (  )  [virtual]

Definition at line 20 of file MapsSensor.cc.


Member Function Documentation

MapsSensor::physXY MapsSensor::getAlignment (  )  const

Definition at line 23 of file MapsSensor.cc.

void MapsSensor::setAlignment ( MapsSensor::physXY  alignment  ) 

All units in mm please.

Definition at line 27 of file MapsSensor.cc.

void MapsSensor::setPhi ( const double  phi  )  [inline]

Clockwise angle relative to world system, in radians.

Definition at line 68 of file MapsSensor.hh.

void MapsSensor::setZPosition ( const double  zpos  )  [inline]

z position in mm

Definition at line 75 of file MapsSensor.hh.

unsigned MapsSensor::id (  )  [inline]

Returns the sensor id

Definition at line 82 of file MapsSensor.hh.

Referenced by MapsTrackManager::addSensor(), isDead(), and main().

double MapsSensor::zPosition (  )  const [inline]

Returns the z position of this sensor

Definition at line 90 of file MapsSensor.hh.

Referenced by MapsTrack::getFourthHitResidual(), MapsTrack::leftExtrapPoint(), main(), MapsTrack::rightExtrapPoint(), and MapsTrack::simpleResidual().

double MapsSensor::phi (  )  [inline]

Returns the global polar angle of the sensor

Definition at line 98 of file MapsSensor.hh.

void MapsSensor::registerTrackConfirm ( unsigned  threshold,
coord  place,
unsigned  bx 
)

Call this when the sensor should confirm a track

Definition at line 31 of file MapsSensor.cc.

Referenced by main(), and registerTrackConfirm().

void MapsSensor::registerTrackConfirm ( unsigned  threshold,
coord  place,
unsigned  bx,
physXY  fourthHitResid 
)

Call this when the sensor should confirm a track

Definition at line 71 of file MapsSensor.cc.

References registerTrackConfirm().

void MapsSensor::registerTrackMiss ( unsigned  threshold,
coord  predicted,
unsigned  bx 
)

Call this when it apparently misses a hit, with the predicted pixel coordinate

Definition at line 101 of file MapsSensor.cc.

References convertHitToPhysical().

Referenced by main(), testArea::operator()(), and registerTrackMiss().

void MapsSensor::registerTrackMiss ( unsigned  threshold,
physXY  predicted,
unsigned  bx 
)

Call when the sensor misses a hit, with the predicted physical coordinate

Definition at line 123 of file MapsSensor.cc.

References convertPhysicalToHit(), isDeadArea(), and registerTrackMiss().

void MapsSensor::registerGeneralHit ( unsigned  threshold,
coord  place,
unsigned  bx 
)

A general purpose hit storage mechanism, not currently in use.

Definition at line 147 of file MapsSensor.cc.

void MapsSensor::getInefficiencyXYPlot ( TH2F &  plot,
bool  physicalXY = false 
)

An xy plot of where inefficiencies were found using predicted hits

Definition at line 173 of file MapsSensor.cc.

References toString().

Referenced by main().

void MapsSensor::getEfficiencyXYPlot ( TH2F &  plot  ) 

An xy plot of where the sensor was efficient

Definition at line 198 of file MapsSensor.cc.

References toString().

Referenced by main().

void MapsSensor::getFourthHitResidualPlot ( TH2F &  plot  ) 

Plots the difference between the extrapolated 3 hit track's position with the fourth sensor, and the actual hit in the fourth sensor when this fourth sensor was judged efficient.

Definition at line 211 of file MapsSensor.cc.

References toString().

void MapsSensor::setResidual ( physXY  resid  ) 

Adds a residual to the list (a residual = predicted hit - actual hit)

Definition at line 364 of file MapsSensor.cc.

Referenced by main().

void MapsSensor::getEfficiencyTimestamps ( TH1F &  plot  ) 

Efficiency as a function of bunch crossing.

Definition at line 227 of file MapsSensor.cc.

References toString().

Referenced by main().

void MapsSensor::getInefficiencyTimestamps ( TH1F &  plot  ) 

Inefficiency as a function of bunch crossing.

Definition at line 242 of file MapsSensor.cc.

References toString().

Referenced by main().

double MapsSensor::getEfficiency ( unsigned  threshold,
bool  withShapers = true,
bool  withSamplers = true 
)

Returns the efficiency, optionally excluding shapers or samplers.

Definition at line 154 of file MapsSensor.cc.

Referenced by getEfficiencyCurve(), main(), and printEfficiencies().

void MapsSensor::getEfficiencyCurve ( TH1F &  ,
int  bins,
int  low,
int  high,
bool  withShapers = true,
bool  withSamplers = true 
)

Returns the efficiency, optionally excluding shapers or samplers.

Definition at line 269 of file MapsSensor.cc.

References getEfficiency(), and toString().

Referenced by main().

void MapsSensor::getEfficiencyByGroup ( TH2F &  ,
unsigned  threshold = 0 
)

Plots the efficiency by pixel group. If the threshold is not specified, a summation over all thresholds is given. Otherwise, only selected thresholds are presented.

Definition at line 291 of file MapsSensor.cc.

References toString(), and MapsException::what().

void MapsSensor::getResidualXYPlot ( TH2F &   )  const

Plots the resdiuals as a function of local physical coordindates

Definition at line 257 of file MapsSensor.cc.

References toString().

Referenced by main().

bool MapsSensor::isDeadArea ( const   physXY  )  const

Returns true if the specified coordinate falls in a dead area of the sensor

Definition at line 387 of file MapsSensor.cc.

Referenced by convertHitToPhysical(), convertPhysicalToHit(), isDead(), main(), testArea::operator()(), IlEstMort::operator()(), and registerTrackMiss().

void MapsSensor::convertHitToPhysical ( const coord ,
physXY  
) const

Converts a pixel x,y to a physical xy in the global coordinate system

Definition at line 417 of file MapsSensor.cc.

References isDeadArea().

Referenced by main(), and registerTrackMiss().

void MapsSensor::convertPhysicalToHit ( const physXY ,
coord  
) const throw (MapsException)

Converts a physical xy to a pixel hit where possible.

Throws a MapsException if the hit falls in a dead area; application code should check for this first with isDeadArea(physXY).

Definition at line 440 of file MapsSensor.cc.

References c, isDeadArea(), and toString().

Referenced by decodeRegion(), main(), and registerTrackMiss().

void MapsSensor::printEfficiencies ( std::ostream &   ) 

Prints all sort of information about this sensor's efficiency as a function of threshold

Definition at line 509 of file MapsSensor.cc.

References getEfficiency().

void MapsSensor::mutualSensorMask ( const std::vector< MapsSensor * > &  ,
TH2F &   
) [static]

Finds mutually dead areas as projected in the z direction for the supplied sensors.

Definition at line 540 of file MapsSensor.cc.

Referenced by main().

unsigned MapsSensor::decodeRegion ( const coord  )  const

Convenience method to decode the region for a given hit.

Definition at line 473 of file MapsSensor.cc.

Referenced by decodeRegion().

unsigned MapsSensor::decodeRegion ( const physXY  )  const throw (MapsException)

Convenient method to decode the region from a given physical hit, if possible.

Definition at line 477 of file MapsSensor.cc.

References c, convertPhysicalToHit(), and decodeRegion().

MapsSensor& MapsSensor::operator= ( MapsSensor ms  )  [inline, protected]

Definition at line 227 of file MapsSensor.hh.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const MapsSensor ms 
) [friend]

Definition at line 565 of file MapsSensor.cc.


The documentation for this class was generated from the following files:
Generated on Wed Mar 19 17:47:58 2008 for MapsTracks by  doxygen 1.5.2