#include <DirectTrackerNavigation.h>
Public Member Functions | |
std::vector< const DetLayer * > | compatibleLayers (const FreeTrajectoryState &fts, PropagationDirection timeDirection) const |
find compatible layers for a given trajectory state | |
DirectTrackerNavigation (const edm::ESHandle< GeometricSearchTracker > &, bool outOnly=true) | |
constructor | |
Private Member Functions | |
float | calculateEta (float r, float z) const |
bool | checkCompatible (const FreeTrajectoryState &, const ForwardDetLayer *) const |
bool | checkCompatible (const FreeTrajectoryState &, const BarrelDetLayer *) const |
void | inOutBPx (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
void | inOutBTEC (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
void | inOutBTID (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
void | inOutFPx (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
void | inOutFTEC (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
void | inOutFTID (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
void | inOutPx (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
void | inOutTIB (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
void | inOutTOB (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const |
bool | outward (const FreeTrajectoryState &) const |
Private Attributes | |
float | theEpsilon |
edm::ESHandle < GeometricSearchTracker > | theGeometricSearchTracker |
bool | theOutLayerOnlyFlag |
Definition at line 28 of file DirectTrackerNavigation.h.
DirectTrackerNavigation::DirectTrackerNavigation | ( | const edm::ESHandle< GeometricSearchTracker > & | tkLayout, |
bool | outOnly = true |
||
) |
constructor
Definition at line 34 of file DirectTrackerNavigation.cc.
: theGeometricSearchTracker(tkLayout), theOutLayerOnlyFlag(outOnly), theEpsilon(-0.01) { }
float DirectTrackerNavigation::calculateEta | ( | float | r, |
float | z | ||
) | const [private] |
Definition at line 264 of file DirectTrackerNavigation.cc.
References create_public_lumi_plots::log, and funct::tan().
Referenced by checkCompatible().
bool DirectTrackerNavigation::checkCompatible | ( | const FreeTrajectoryState & | fts, |
const BarrelDetLayer * | dl | ||
) | const [private] |
Definition at line 214 of file DirectTrackerNavigation.cc.
References calculateEta(), eta(), PV3DBase< T, PVType, FrameType >::eta(), FreeTrajectoryState::position(), CosmicsPD_Skims::radius, BarrelDetLayer::specificSurface(), and theEpsilon.
Referenced by inOutBPx(), inOutBTEC(), inOutBTID(), inOutFPx(), inOutFTEC(), inOutFTID(), inOutPx(), inOutTIB(), and inOutTOB().
{ float eta0 = fts.position().eta(); const BoundCylinder& bc = dl->specificSurface(); float radius = bc.radius(); float length = bc.bounds().length()/2.; float eta = calculateEta(radius, length); return ( fabs(eta0) <= (fabs(eta) + theEpsilon) ); }
bool DirectTrackerNavigation::checkCompatible | ( | const FreeTrajectoryState & | fts, |
const ForwardDetLayer * | dl | ||
) | const [private] |
Definition at line 232 of file DirectTrackerNavigation.cc.
References calculateEta(), PV3DBase< T, PVType, FrameType >::eta(), FreeTrajectoryState::position(), ForwardDetLayer::specificSurface(), theEpsilon, and z.
{ float eta0 = fts.position().eta(); const BoundDisk& bd = dl->specificSurface(); float outRadius = bd.outerRadius(); float inRadius = bd.innerRadius(); float z = bd.position().z(); float etaOut = calculateEta(outRadius, z); float etaIn = calculateEta(inRadius, z); if ( eta0 > 0 ) return ( eta0 > ( etaOut - theEpsilon) && eta0 < (etaIn + theEpsilon) ); else return ( eta0 < (etaOut + theEpsilon ) && eta0 > ( etaIn - theEpsilon ) ); }
vector< const DetLayer * > DirectTrackerNavigation::compatibleLayers | ( | const FreeTrajectoryState & | fts, |
PropagationDirection | timeDirection | ||
) | const |
find compatible layers for a given trajectory state
Definition at line 45 of file DirectTrackerNavigation.cc.
References PV3DBase< T, PVType, FrameType >::eta(), inOutBPx(), inOutBTEC(), inOutBTID(), inOutFPx(), inOutFTEC(), inOutFTID(), inOutPx(), inOutTIB(), inOutTOB(), LogTrace, oppositeToMomentum, convertSQLitetoXML_cfg::output, outward(), FreeTrajectoryState::position(), and theOutLayerOnlyFlag.
Referenced by FastTSGFromPropagation::trackerSeeds(), and TSGFromPropagation::trackerSeeds().
{ bool inOut = outward(fts); double eta0 = fts.position().eta(); vector<const DetLayer*> output; // check eta of DetLayers for compatibility if (inOut) { if ( !theOutLayerOnlyFlag ) { inOutPx(fts,output); if ( eta0 > 1.55) inOutFPx(fts,output); else if ( eta0 < -1.55 ) inOutBPx(fts,output); if ( fabs(eta0) < 1.67 ) inOutTIB(fts,output); if ( eta0 > 1.17 ) inOutFTID(fts,output); else if ( eta0 < -1.17 ) inOutBTID(fts,output); } if ( fabs(eta0) < 1.35 ) inOutTOB(fts,output); if ( eta0 > 0.97 ) inOutFTEC(fts,output); else if ( eta0 < -0.97 ) inOutBTEC(fts,output); } else { LogTrace("Muon|RecoMuon|DirectionTrackerNavigation")<<"No implementation for inward state at this moment. "; } if ( dir == oppositeToMomentum ) std::reverse(output.begin(),output.end()); return output; }
void DirectTrackerNavigation::inOutBPx | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 172 of file DirectTrackerNavigation.cc.
References checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->negPixelForwardLayers(); for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) { if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E)); } }
void DirectTrackerNavigation::inOutBTEC | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 200 of file DirectTrackerNavigation.cc.
References checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->negTecLayers(); for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) { if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E)); } }
void DirectTrackerNavigation::inOutBTID | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 186 of file DirectTrackerNavigation.cc.
References checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->negTidLayers(); for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) { if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E)); } }
void DirectTrackerNavigation::inOutFPx | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 130 of file DirectTrackerNavigation.cc.
References checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->posPixelForwardLayers(); for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) { if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E)); } }
void DirectTrackerNavigation::inOutFTEC | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 158 of file DirectTrackerNavigation.cc.
References checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->posTecLayers(); for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) { if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E)); } }
void DirectTrackerNavigation::inOutFTID | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 144 of file DirectTrackerNavigation.cc.
References checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->posTidLayers(); for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) { if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E)); } }
void DirectTrackerNavigation::inOutPx | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 88 of file DirectTrackerNavigation.cc.
References Reference_intrackfit_cff::barrel, checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<BarrelDetLayer*>& barrel = theGeometricSearchTracker->pixelBarrelLayers(); for (vector<BarrelDetLayer*>::const_iterator iter_B = barrel.begin(); iter_B != barrel.end(); iter_B++) { if ( checkCompatible(fts,(*iter_B)) ) output.push_back((*iter_B)); } }
void DirectTrackerNavigation::inOutTIB | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 102 of file DirectTrackerNavigation.cc.
References Reference_intrackfit_cff::barrel, checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<BarrelDetLayer*>& barrel = theGeometricSearchTracker->tibLayers(); for (vector<BarrelDetLayer*>::const_iterator iter_B = barrel.begin(); iter_B != barrel.end(); iter_B++) { if ( checkCompatible(fts,(*iter_B)) ) output.push_back((*iter_B)); } }
void DirectTrackerNavigation::inOutTOB | ( | const FreeTrajectoryState & | , |
std::vector< const DetLayer * > & | |||
) | const [private] |
Definition at line 116 of file DirectTrackerNavigation.cc.
References Reference_intrackfit_cff::barrel, checkCompatible(), and theGeometricSearchTracker.
Referenced by compatibleLayers().
{ const vector<BarrelDetLayer*>& barrel = theGeometricSearchTracker->tobLayers(); for (vector<BarrelDetLayer*>::const_iterator iter_B = barrel.begin(); iter_B != barrel.end(); iter_B++) { if ( checkCompatible(fts,(*iter_B)) ) output.push_back((*iter_B)); } }
bool DirectTrackerNavigation::outward | ( | const FreeTrajectoryState & | fts | ) | const [private] |
Definition at line 254 of file DirectTrackerNavigation.cc.
References PV3DBase< T, PVType, FrameType >::basicVector(), FreeTrajectoryState::momentum(), and FreeTrajectoryState::position().
Referenced by compatibleLayers().
{ return (fts.position().basicVector().dot(fts.momentum().basicVector()) > 0); }
float DirectTrackerNavigation::theEpsilon [private] |
Definition at line 77 of file DirectTrackerNavigation.h.
Referenced by checkCompatible().
Definition at line 73 of file DirectTrackerNavigation.h.
Referenced by inOutBPx(), inOutBTEC(), inOutBTID(), inOutFPx(), inOutFTEC(), inOutFTID(), inOutPx(), inOutTIB(), and inOutTOB().
bool DirectTrackerNavigation::theOutLayerOnlyFlag [private] |
Definition at line 75 of file DirectTrackerNavigation.h.
Referenced by compatibleLayers().