TimeOfFlight
1.32.00
|
Utility functions that are used by the TOFEstimators processor. More...
Functions | |
dd4hep::rec::Vector3D | getHelixMomAtTrackState (const EVENT::TrackState &ts, double bField) |
Get track momentum at the track state. More... | |
double | getTPCOuterR () |
Returns TPC outer radius from the DD4hep detector geometry. More... | |
EVENT::TrackerHit * | getSETHit (EVENT::Track *track, double tpcOuterR) |
Returns SET hit. More... | |
std::vector < EVENT::CalorimeterHit * > | selectFrankEcalHits (EVENT::Cluster *cluster, EVENT::Track *track, int maxEcalLayer, double bField) |
Get a subset of the cluster calorimeter hits. More... | |
double | getTofClosest (EVENT::Cluster *cluster, EVENT::Track *track, double timeResolution) |
Get the time-of-flight using the closest ECal hit. More... | |
double | getTofFrankAvg (std::vector< EVENT::CalorimeterHit * > selectedHits, EVENT::Track *track, double timeResolution) |
Get the time-of-flight using average of the Frank ECal hits. More... | |
double | getTofFrankFit (std::vector< EVENT::CalorimeterHit * > selectedHits, EVENT::Track *track, double timeResolution) |
Get the time-of-flight using fit of the Frank ECal hits. More... | |
Utility functions that are used by the TOFEstimators processor.
dd4hep::rec::Vector3D TOFUtils::getHelixMomAtTrackState | ( | const EVENT::TrackState & | ts, |
double | bField | ||
) |
Get track momentum at the track state.
Returns momentum Vector3D from the given track state.
Definition at line 32 of file TOFUtils.cc.
Referenced by selectFrankEcalHits().
EVENT::TrackerHit * TOFUtils::getSETHit | ( | EVENT::Track * | track, |
double | tpcOuterR | ||
) |
Returns SET hit.
Checks the of the tracker hit. If
then it is the SET hit.
Definition at line 53 of file TOFUtils.cc.
References std::vector< T >::back().
Referenced by TOFEstimators::processEvent().
double TOFUtils::getTofClosest | ( | EVENT::Cluster * | cluster, |
EVENT::Track * | track, | ||
double | timeResolution | ||
) |
Get the time-of-flight using the closest ECal hit.
Returns time measured by the closest ECal hit to the extrapolated track position at the ECal surface.
If no ECal hits are found returns 0.0
.
Definition at line 90 of file TOFUtils.cc.
Referenced by TOFEstimators::processEvent().
double TOFUtils::getTofFrankAvg | ( | std::vector< EVENT::CalorimeterHit * > | selectedHits, |
EVENT::Track * | track, | ||
double | timeResolution | ||
) |
Get the time-of-flight using average of the Frank ECal hits.
Returns the time-of-flight as an average of the Frank hits time corrected for the distance to the extrapolated track position at the ECal surface assuming speed of flight is the speed of light.
If no ECal hits are found within selectedHits, then returns 0.0
.
Definition at line 114 of file TOFUtils.cc.
References std::vector< T >::size().
Referenced by TOFEstimators::processEvent().
double TOFUtils::getTofFrankFit | ( | std::vector< EVENT::CalorimeterHit * > | selectedHits, |
EVENT::Track * | track, | ||
double | timeResolution | ||
) |
Get the time-of-flight using fit of the Frank ECal hits.
Returns the time-of-flight as an extrapolated time at the extrapolated track position at the ECal surface by using a linear fit of the Frank hits time as a function of the distance to the extrapolated track position at the ECal surface.
If no ECal hits are found within selectedHits, then returns 0.0
. If only one ECal hit is found, which is not enough to perform the linear fit, then returns the same as getTofClosest() and getTofFrankAvg().
Definition at line 131 of file TOFUtils.cc.
References std::vector< T >::data(), std::vector< T >::push_back(), and std::vector< T >::size().
Referenced by TOFEstimators::processEvent().
double TOFUtils::getTPCOuterR | ( | ) |
Returns TPC outer radius from the DD4hep detector geometry.
Definition at line 45 of file TOFUtils.cc.
Referenced by TOFEstimators::init().
std::vector< EVENT::CalorimeterHit * > TOFUtils::selectFrankEcalHits | ( | EVENT::Cluster * | cluster, |
EVENT::Track * | track, | ||
int | maxEcalLayer, | ||
double | bField | ||
) |
Get a subset of the cluster calorimeter hits.
Returns the subset of the cluster calorimeter hits which we call "Frank" by historical reasons as these hits were used to calculate time-of-flight as a default method for the IDR production.
"Frank" hits are the closest ECal hits to the linearly extrapolated track line inside the ECal in each of the first maxEcalLayer ECal layers.
Definition at line 63 of file TOFUtils.cc.
References std::vector< T >::begin(), std::vector< T >::end(), std::vector< T >::erase(), getHelixMomAtTrackState(), and std::remove_if().
Referenced by TOFEstimators::processEvent().