MarlinTPC  1.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
marlintpc::HitCandidate Class Reference

A helper class for hit parameter calculation. More...

#include <HitCandidate.h>

Public Member Functions

 HitCandidate (const gear::TPCParameters &tpcParams, double vDrift, EVENT::TrackerPulse *pulse=0)
 The constructor needs a reference to TPCParameters and the dirft velocity Optionally the first pulse can be given. More...
 
void addPulse (EVENT::TrackerPulse *)
 Add a pulse to the hit.
 
void addDeadPad ()
 
void setBoundaryFlag ()
 Manually turn on the boundary flag.
 
const EVENT::TrackerPulse * getMaximumPulse () const
 Return the highest pulse in this hit.
 
double getCharge ()
 Get the overall charge in the hit.
 
double getMaxPulseHeight () const
 Get the maximal pulse heigt in this hit.
 
const std::vector
< EVENT::TrackerPulse * > & 
getPulses () const
 Get a vector with the pulses contributing to this hits candidate.
 
unsigned int getWidth () const
 Return the number of pulses contributing to this hits candidate. More...
 
bool isAtBoundary () const
 Return whether the hit contains pulses on the boundary pads of a module. More...
 
double getLocalFixedCoordinate ()
 Get the middle of the pad row (y or r)
 
double getLocalFreeCoordinate ()
 Get the coordinate along the pad row (x or phi)
 
double getZCoordinate ()
 Get the z coordinate.
 
double getLocalFixedVariance ()
 Get the variance (estimated error) perpendicular to the pad row (y or r)
 
double getLocalFreeVariance ()
 Get the variance (estimated error) along the pad row (in x or phi)
 
double getLocalSkewness ()
 Get the skewness along the pad row.
 
double getZVariance ()
 Get the variance (estimated error) in z.
 
lcio::DoubleVec getLocalCoordinates ()
 Get the local coordinates (polar or cartesian, depending on the pad plane). More...
 
lcio::DoubleVec getGlobalCoordinates ()
 Get the global coordinates (polar or cartesian, depending on the coordinate system). More...
 
lcio::DoubleVec getGlobalCartesianCoordinates ()
 Get the global coordinates in cartesian format (in lcio it is always cartesian). More...
 
lcio::FloatVec getGlobalCovarianceMatrix ()
 Get the covariance matrix in global coordinates (polar or cartesian, depending on the coordinate system). More...
 
lcio::FloatVec getGlobalCartecianCovarianceMatrix ()
 Get the global covariance matrix in cartesian coordinates. More...
 
IMPL::TrackerHitImpl * createTrackerHit ()
 Convenience function that allocates a new TrackerHitImpl in memory, sets all parameters and adds the pulses in this HitCandidate.
 

Protected Member Functions

void calculateHitProperties ()
 (re)calculate the properties of this hit candidate More...
 

Protected Attributes

std::vector
< EVENT::TrackerPulse * > 
_thePulses
 
EVENT::TrackerPulse * _maxPulse
 
double _maxPulseCharge
 
int _numberOfDeadPads
 
bool _isAtBoundary
 
double _vDrift
 
double _zAnode
 
const gear::TPCParameters & _tpcParameters
 
const gear::TPCModule * _tpcModule
 
lcio::DoubleVec _localCoordinates
 
lcio::DoubleVec _globalCoordinates
 
lcio::FloatVec _globalCovariance
 
double _charge
 
double _localFixedVariance
 
double _localFreeVariance
 
double _localSkewness
 The skewness in local coordinates.
 
double _zVariance
 
bool _hitParametersAreValid
 

Detailed Description

A helper class for hit parameter calculation.

It contains a vector of pulses and functions to calculate coordinates and errors. This functionality is needed at several places, so it has been decoupled from the processors to avoid code duplication.

Todo:
FIXME: Calculation of covariance matrix is missing, currently is unity. It should be the estimated error of the coordinates, not the varianve of the charge distribution.

Constructor & Destructor Documentation

marlintpc::HitCandidate::HitCandidate ( const gear::TPCParameters &  tpcParams,
double  vDrift,
EVENT::TrackerPulse *  pulse = 0 
)

The constructor needs a reference to TPCParameters and the dirft velocity Optionally the first pulse can be given.

Member Function Documentation

void marlintpc::HitCandidate::calculateHitProperties ( )
protected
lcio::FloatVec marlintpc::HitCandidate::getGlobalCartecianCovarianceMatrix ( )

Get the global covariance matrix in cartesian coordinates.

This is what will be in the lcio hit

lcio::DoubleVec marlintpc::HitCandidate::getGlobalCartesianCoordinates ( )

Get the global coordinates in cartesian format (in lcio it is always cartesian).

lcio::DoubleVec marlintpc::HitCandidate::getGlobalCoordinates ( )

Get the global coordinates (polar or cartesian, depending on the coordinate system).

References calculateHitProperties().

lcio::FloatVec marlintpc::HitCandidate::getGlobalCovarianceMatrix ( )

Get the covariance matrix in global coordinates (polar or cartesian, depending on the coordinate system).

References calculateHitProperties().

lcio::DoubleVec marlintpc::HitCandidate::getLocalCoordinates ( )

Get the local coordinates (polar or cartesian, depending on the pad plane).

References calculateHitProperties().

unsigned int marlintpc::HitCandidate::getWidth ( ) const

Return the number of pulses contributing to this hits candidate.

This might not be the real width if there are multiple pulses per channel.

bool marlintpc::HitCandidate::isAtBoundary ( ) const
inline

Return whether the hit contains pulses on the boundary pads of a module.

Currently this flag has to be set manually

Todo:
FIXME: Calculation of boudary condition should be done automatically when adding a pulse

The documentation for this class was generated from the following files: