CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< GeometricSearchTracker
theGeometricSearchTracker
 
bool theOutLayerOnlyFlag
 

Detailed Description

Definition at line 26 of file DirectTrackerNavigation.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 32 of file DirectTrackerNavigation.cc.

33  :
34  theGeometricSearchTracker(tkLayout), theOutLayerOnlyFlag(outOnly), theEpsilon(-0.01) {
35 
36 }
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker

Member Function Documentation

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

Definition at line 244 of file DirectTrackerNavigation.cc.

References fff_deleter::log, and funct::tan().

Referenced by checkCompatible().

244  {
245 
246  if ( z > 0 ) return -log((tan(atan(r/z)/2.)));
247  return log(-(tan(atan(r/z)/2.)));
248 
249 }
float float float z
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
bool DirectTrackerNavigation::checkCompatible ( const FreeTrajectoryState fts,
const BarrelDetLayer dl 
) const
private

Definition at line 194 of file DirectTrackerNavigation.cc.

References calculateEta(), PV3DBase< T, PVType, FrameType >::eta(), eta(), FreeTrajectoryState::position(), CosmicsPD_Skims::radius, BarrelDetLayer::specificSurface(), and theEpsilon.

Referenced by inOutBPx(), inOutBTEC(), inOutBTID(), inOutFPx(), inOutFTEC(), inOutFTID(), inOutPx(), inOutTIB(), and inOutTOB().

194  {
195 
196  float eta0 = fts.position().eta();
197 
198  const BoundCylinder& bc = dl->specificSurface();
199  float radius = bc.radius();
200  float length = bc.bounds().length()/2.;
201 
202  float eta = calculateEta(radius, length);
203 
204  return ( fabs(eta0) <= (fabs(eta) + theEpsilon) );
205 
206 }
T eta() const
GlobalPoint position() const
float calculateEta(float r, float z) const
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
T eta() const
Definition: PV3DBase.h:76
bool DirectTrackerNavigation::checkCompatible ( const FreeTrajectoryState fts,
const ForwardDetLayer dl 
) const
private

Definition at line 212 of file DirectTrackerNavigation.cc.

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

212  {
213 
214  float eta0 = fts.position().eta();
215 
216  const BoundDisk& bd = dl->specificSurface();
217 
218  float outRadius = bd.outerRadius();
219  float inRadius = bd.innerRadius();
220  float z = bd.position().z();
221 
222  float etaOut = calculateEta(outRadius, z);
223  float etaIn = calculateEta(inRadius, z);
224 
225  if ( eta0 > 0 ) return ( eta0 > ( etaOut - theEpsilon) && eta0 < (etaIn + theEpsilon) );
226  else return ( eta0 < (etaOut + theEpsilon ) && eta0 > ( etaIn - theEpsilon ) );
227 
228 }
float float float z
virtual const BoundDisk & specificSurface() const
GlobalPoint position() const
float calculateEta(float r, float z) const
T eta() const
Definition: PV3DBase.h:76
vector< const DetLayer * > DirectTrackerNavigation::compatibleLayers ( const FreeTrajectoryState fts,
PropagationDirection  timeDirection 
) const

find compatible layers for a given trajectory state

Definition at line 43 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 TSGFromPropagation::trackerSeeds(), and FastTSGFromPropagation::trackerSeeds().

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

Definition at line 158 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

158  {
159 
160  for(const auto i: theGeometricSearchTracker->negPixelForwardLayers()) {
161  if ( checkCompatible(fts,i) ) output.push_back(i);
162  }
163 
164 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
void DirectTrackerNavigation::inOutBTEC ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 182 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

182  {
183 
184  for(const auto i: theGeometricSearchTracker->negTecLayers()) {
185  if ( checkCompatible(fts,i) ) output.push_back(i);
186  }
187 
188 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
void DirectTrackerNavigation::inOutBTID ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 170 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

170  {
171 
172  for(const auto i: theGeometricSearchTracker->negTidLayers()) {
173  if ( checkCompatible(fts,i) ) output.push_back(i);
174  }
175 
176 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
void DirectTrackerNavigation::inOutFPx ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 122 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

122  {
123 
124  for(const auto i : theGeometricSearchTracker->posPixelForwardLayers()) {
125  if ( checkCompatible(fts,i) ) output.push_back(i);
126  }
127 
128 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
void DirectTrackerNavigation::inOutFTEC ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 146 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

146  {
147 
148  for(const auto i : theGeometricSearchTracker->posTecLayers()) {
149  if ( checkCompatible(fts,i) ) output.push_back(i);
150  }
151 
152 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
void DirectTrackerNavigation::inOutFTID ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 134 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

134  {
135 
136  for(const auto i: theGeometricSearchTracker->posTidLayers()) {
137  if ( checkCompatible(fts,i) ) output.push_back(i);
138  }
139 
140 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
void DirectTrackerNavigation::inOutPx ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 86 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

86  {
87 
88  for (const auto i : theGeometricSearchTracker->pixelBarrelLayers()) {
89  if ( checkCompatible(fts,i) ) output.push_back(i);
90  }
91 
92 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
void DirectTrackerNavigation::inOutTIB ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 98 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

98  {
99 
100  for(const auto i : theGeometricSearchTracker->tibLayers() ) {
101  if ( checkCompatible(fts,i) ) output.push_back(i);
102  }
103 
104 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
void DirectTrackerNavigation::inOutTOB ( const FreeTrajectoryState fts,
std::vector< const DetLayer * > &  output 
) const
private

Definition at line 110 of file DirectTrackerNavigation.cc.

References checkCompatible(), i, and theGeometricSearchTracker.

Referenced by compatibleLayers().

110  {
111 
112  for( const auto i : theGeometricSearchTracker->tobLayers()) {
113  if ( checkCompatible(fts,i) ) output.push_back(i);
114  }
115 
116 }
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< GeometricSearchTracker > theGeometricSearchTracker
bool checkCompatible(const FreeTrajectoryState &, const BarrelDetLayer *) const
bool DirectTrackerNavigation::outward ( const FreeTrajectoryState fts) const
private

Definition at line 234 of file DirectTrackerNavigation.cc.

References PV3DBase< T, PVType, FrameType >::basicVector(), Basic3DVector< T >::dot(), FreeTrajectoryState::momentum(), and FreeTrajectoryState::position().

Referenced by compatibleLayers().

234  {
235 
236  return (fts.position().basicVector().dot(fts.momentum().basicVector()) > 0);
237 
238 }
GlobalVector momentum() const
GlobalPoint position() const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
T dot(const Basic3DVector &rh) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.

Member Data Documentation

float DirectTrackerNavigation::theEpsilon
private

Definition at line 75 of file DirectTrackerNavigation.h.

Referenced by checkCompatible().

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

Definition at line 73 of file DirectTrackerNavigation.h.

Referenced by compatibleLayers().