CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
DirectTrackerNavigation Class Reference

#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 More...
 
 DirectTrackerNavigation (const edm::ESHandle< GeometricSearchTracker > &, bool outOnly=true)
 constructor More...
 

Private Member Functions

float calculateEta (float r, float z) const
 
bool checkCompatible (const FreeTrajectoryState &, const BarrelDetLayer *) const
 
bool checkCompatible (const FreeTrajectoryState &, const ForwardDetLayer *) 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< GeometricSearchTrackertheGeometricSearchTracker
 
bool theOutLayerOnlyFlag
 

Detailed Description

Definition at line 26 of file DirectTrackerNavigation.h.

Constructor & Destructor Documentation

◆ DirectTrackerNavigation()

DirectTrackerNavigation::DirectTrackerNavigation ( const edm::ESHandle< GeometricSearchTracker > &  tkLayout,
bool  outOnly = true 
)

constructor

Definition at line 32 of file DirectTrackerNavigation.cc.

33  : theGeometricSearchTracker(tkLayout), theOutLayerOnlyFlag(outOnly), theEpsilon(-0.01) {}

Member Function Documentation

◆ calculateEta()

float DirectTrackerNavigation::calculateEta ( float  r,
float  z 
) const
private

Definition at line 219 of file DirectTrackerNavigation.cc.

219  {
220  if (z > 0)
221  return -log((tan(atan(r / z) / 2.)));
222  return log(-(tan(atan(r / z) / 2.)));
223 }

References dqm-mbProfile::log, alignCSCRings::r, funct::tan(), and z.

Referenced by checkCompatible().

◆ checkCompatible() [1/2]

bool DirectTrackerNavigation::checkCompatible ( const FreeTrajectoryState fts,
const BarrelDetLayer dl 
) const
private

Definition at line 176 of file DirectTrackerNavigation.cc.

176  {
177  float eta0 = fts.position().eta();
178 
179  const BoundCylinder& bc = dl->specificSurface();
180  float radius = bc.radius();
181  float length = bc.bounds().length() / 2.;
182 
183  float eta = calculateEta(radius, length);
184 
185  return (fabs(eta0) <= (fabs(eta) + theEpsilon));
186 }

References calculateEta(), PVValHelper::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().

◆ checkCompatible() [2/2]

bool DirectTrackerNavigation::checkCompatible ( const FreeTrajectoryState fts,
const ForwardDetLayer dl 
) const
private

Definition at line 191 of file DirectTrackerNavigation.cc.

191  {
192  float eta0 = fts.position().eta();
193 
194  const BoundDisk& bd = dl->specificSurface();
195 
196  float outRadius = bd.outerRadius();
197  float inRadius = bd.innerRadius();
198  float z = bd.position().z();
199 
200  float etaOut = calculateEta(outRadius, z);
201  float etaIn = calculateEta(inRadius, z);
202 
203  if (eta0 > 0)
204  return (eta0 > (etaOut - theEpsilon) && eta0 < (etaIn + theEpsilon));
205  else
206  return (eta0 < (etaOut + theEpsilon) && eta0 > (etaIn - theEpsilon));
207 }

References calculateEta(), PV3DBase< T, PVType, FrameType >::eta(), FreeTrajectoryState::position(), ForwardDetLayer::specificSurface(), theEpsilon, and z.

◆ compatibleLayers()

vector< const DetLayer * > DirectTrackerNavigation::compatibleLayers ( const FreeTrajectoryState fts,
PropagationDirection  timeDirection 
) const

find compatible layers for a given trajectory state

Definition at line 38 of file DirectTrackerNavigation.cc.

39  {
40  bool inOut = outward(fts);
41  double eta0 = fts.position().eta();
42 
43  vector<const DetLayer*> output;
44 
45  // check eta of DetLayers for compatibility
46 
47  if (inOut) {
48  if (!theOutLayerOnlyFlag) {
49  inOutPx(fts, output);
50 
51  if (eta0 > 1.55)
52  inOutFPx(fts, output);
53  else if (eta0 < -1.55)
54  inOutBPx(fts, output);
55 
56  if (fabs(eta0) < 1.67)
57  inOutTIB(fts, output);
58 
59  if (eta0 > 1.17)
60  inOutFTID(fts, output);
61  else if (eta0 < -1.17)
62  inOutBTID(fts, output);
63  }
64 
65  if (fabs(eta0) < 1.35)
66  inOutTOB(fts, output);
67 
68  if (eta0 > 0.97)
69  inOutFTEC(fts, output);
70  else if (eta0 < -0.97)
71  inOutBTEC(fts, output);
72 
73  } else {
74  LogTrace("Muon|RecoMuon|DirectionTrackerNavigation") << "No implementation for inward state at this moment. ";
75  }
76 
77  if (dir == oppositeToMomentum)
78  std::reverse(output.begin(), output.end());
79 
80  return output;
81 }

References DeadROC_duringRun::dir, PV3DBase< T, PVType, FrameType >::eta(), inOutBPx(), inOutBTEC(), inOutBTID(), inOutFPx(), inOutFTEC(), inOutFTID(), inOutPx(), inOutTIB(), inOutTOB(), LogTrace, oppositeToMomentum, convertSQLitetoXML_cfg::output, outward(), FreeTrajectoryState::position(), groupFilesInBlocks::reverse, and theOutLayerOnlyFlag.

Referenced by TSGFromPropagation::trackerSeeds().

◆ inOutBPx()

void DirectTrackerNavigation::inOutBPx ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 146 of file DirectTrackerNavigation.cc.

146  {
147  for (const auto i : theGeometricSearchTracker->negPixelForwardLayers()) {
148  if (checkCompatible(fts, i))
149  output.push_back(i);
150  }
151 }

References checkCompatible(), mps_fire::i, GeometricSearchTracker::negPixelForwardLayers(), convertSQLitetoXML_cfg::output, and theGeometricSearchTracker.

Referenced by compatibleLayers().

◆ inOutBTEC()

void DirectTrackerNavigation::inOutBTEC ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 166 of file DirectTrackerNavigation.cc.

166  {
167  for (const auto i : theGeometricSearchTracker->negTecLayers()) {
168  if (checkCompatible(fts, i))
169  output.push_back(i);
170  }
171 }

References checkCompatible(), mps_fire::i, GeometricSearchTracker::negTecLayers(), convertSQLitetoXML_cfg::output, and theGeometricSearchTracker.

Referenced by compatibleLayers().

◆ inOutBTID()

void DirectTrackerNavigation::inOutBTID ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 156 of file DirectTrackerNavigation.cc.

156  {
157  for (const auto i : theGeometricSearchTracker->negTidLayers()) {
158  if (checkCompatible(fts, i))
159  output.push_back(i);
160  }
161 }

References checkCompatible(), mps_fire::i, GeometricSearchTracker::negTidLayers(), convertSQLitetoXML_cfg::output, and theGeometricSearchTracker.

Referenced by compatibleLayers().

◆ inOutFPx()

void DirectTrackerNavigation::inOutFPx ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 116 of file DirectTrackerNavigation.cc.

116  {
117  for (const auto i : theGeometricSearchTracker->posPixelForwardLayers()) {
118  if (checkCompatible(fts, i))
119  output.push_back(i);
120  }
121 }

References checkCompatible(), mps_fire::i, convertSQLitetoXML_cfg::output, GeometricSearchTracker::posPixelForwardLayers(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

◆ inOutFTEC()

void DirectTrackerNavigation::inOutFTEC ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 136 of file DirectTrackerNavigation.cc.

136  {
137  for (const auto i : theGeometricSearchTracker->posTecLayers()) {
138  if (checkCompatible(fts, i))
139  output.push_back(i);
140  }
141 }

References checkCompatible(), mps_fire::i, convertSQLitetoXML_cfg::output, GeometricSearchTracker::posTecLayers(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

◆ inOutFTID()

void DirectTrackerNavigation::inOutFTID ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 126 of file DirectTrackerNavigation.cc.

126  {
127  for (const auto i : theGeometricSearchTracker->posTidLayers()) {
128  if (checkCompatible(fts, i))
129  output.push_back(i);
130  }
131 }

References checkCompatible(), mps_fire::i, convertSQLitetoXML_cfg::output, GeometricSearchTracker::posTidLayers(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

◆ inOutPx()

void DirectTrackerNavigation::inOutPx ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 86 of file DirectTrackerNavigation.cc.

86  {
87  for (const auto i : theGeometricSearchTracker->pixelBarrelLayers()) {
88  if (checkCompatible(fts, i))
89  output.push_back(i);
90  }
91 }

References checkCompatible(), mps_fire::i, convertSQLitetoXML_cfg::output, GeometricSearchTracker::pixelBarrelLayers(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

◆ inOutTIB()

void DirectTrackerNavigation::inOutTIB ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 96 of file DirectTrackerNavigation.cc.

96  {
97  for (const auto i : theGeometricSearchTracker->tibLayers()) {
98  if (checkCompatible(fts, i))
99  output.push_back(i);
100  }
101 }

References checkCompatible(), mps_fire::i, convertSQLitetoXML_cfg::output, theGeometricSearchTracker, and GeometricSearchTracker::tibLayers().

Referenced by compatibleLayers().

◆ inOutTOB()

void DirectTrackerNavigation::inOutTOB ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 106 of file DirectTrackerNavigation.cc.

106  {
107  for (const auto i : theGeometricSearchTracker->tobLayers()) {
108  if (checkCompatible(fts, i))
109  output.push_back(i);
110  }
111 }

References checkCompatible(), mps_fire::i, convertSQLitetoXML_cfg::output, theGeometricSearchTracker, and GeometricSearchTracker::tobLayers().

Referenced by compatibleLayers().

◆ outward()

bool DirectTrackerNavigation::outward ( const FreeTrajectoryState fts) const
private

Member Data Documentation

◆ theEpsilon

float DirectTrackerNavigation::theEpsilon
private

Definition at line 67 of file DirectTrackerNavigation.h.

Referenced by checkCompatible().

◆ theGeometricSearchTracker

edm::ESHandle<GeometricSearchTracker> DirectTrackerNavigation::theGeometricSearchTracker
private

◆ theOutLayerOnlyFlag

bool DirectTrackerNavigation::theOutLayerOnlyFlag
private

Definition at line 65 of file DirectTrackerNavigation.h.

Referenced by compatibleLayers().

FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
mps_fire.i
i
Definition: mps_fire.py:355
GeometricSearchTracker::tobLayers
std::vector< BarrelDetLayer const * > const & tobLayers() const
Definition: GeometricSearchTracker.h:39
GeometricSearchTracker::tibLayers
std::vector< BarrelDetLayer const * > const & tibLayers() const
Definition: GeometricSearchTracker.h:38
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
DirectTrackerNavigation::inOutBPx
void inOutBPx(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:146
DirectTrackerNavigation::calculateEta
float calculateEta(float r, float z) const
Definition: DirectTrackerNavigation.cc:219
deep_tau::DeepTauBase::BasicDiscriminator
BasicDiscriminator
Definition: DeepTauBase.h:115
oppositeToMomentum
Definition: PropagationDirection.h:4
DirectTrackerNavigation::theEpsilon
float theEpsilon
Definition: DirectTrackerNavigation.h:67
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
BoundDisk
DirectTrackerNavigation::inOutFPx
void inOutFPx(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:116
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
DirectTrackerNavigation::inOutBTEC
void inOutBTEC(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:166
DirectTrackerNavigation::theGeometricSearchTracker
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
Definition: DirectTrackerNavigation.h:63
DirectTrackerNavigation::checkCompatible
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
Definition: DirectTrackerNavigation.cc:176
GeometricSearchTracker::posTecLayers
std::vector< ForwardDetLayer const * > const & posTecLayers() const
Definition: GeometricSearchTracker.h:47
PVValHelper::eta
Definition: PVValidationHelpers.h:69
DDAxes::z
GeometricSearchTracker::posTidLayers
std::vector< ForwardDetLayer const * > const & posTidLayers() const
Definition: GeometricSearchTracker.h:46
Basic3DVector::dot
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.
Definition: extBasic3DVector.h:189
DirectTrackerNavigation::theOutLayerOnlyFlag
bool theOutLayerOnlyFlag
Definition: DirectTrackerNavigation.h:65
DirectTrackerNavigation::inOutFTID
void inOutFTID(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:126
DirectTrackerNavigation::inOutFTEC
void inOutFTEC(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:136
DirectTrackerNavigation::outward
bool outward(const FreeTrajectoryState &) const
Definition: DirectTrackerNavigation.cc:212
GeometricSearchTracker::negTecLayers
std::vector< ForwardDetLayer const * > const & negTecLayers() const
Definition: GeometricSearchTracker.h:43
GeometricSearchTracker::posPixelForwardLayers
std::vector< ForwardDetLayer const * > const & posPixelForwardLayers() const
Definition: GeometricSearchTracker.h:45
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DirectTrackerNavigation::inOutTOB
void inOutTOB(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:106
DirectTrackerNavigation::inOutTIB
void inOutTIB(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:96
GeometricSearchTracker::negPixelForwardLayers
std::vector< ForwardDetLayer const * > const & negPixelForwardLayers() const
Definition: GeometricSearchTracker.h:41
DirectTrackerNavigation::inOutPx
void inOutPx(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:86
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
BoundCylinder
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
DirectTrackerNavigation::inOutBTID
void inOutBTID(const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
Definition: DirectTrackerNavigation.cc:156
BarrelDetLayer::specificSurface
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
Definition: BarrelDetLayer.h:39
GeometricSearchTracker::negTidLayers
std::vector< ForwardDetLayer const * > const & negTidLayers() const
Definition: GeometricSearchTracker.h:42
ForwardDetLayer::specificSurface
virtual const BoundDisk & specificSurface() const final
Definition: ForwardDetLayer.h:39
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
GeometricSearchTracker::pixelBarrelLayers
std::vector< BarrelDetLayer const * > const & pixelBarrelLayers() const
Definition: GeometricSearchTracker.h:37