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 Attributes
GeometricSearchTracker Class Reference

#include <GeometricSearchTracker.h>

Inheritance diagram for GeometricSearchTracker:
DetLayerGeometry

Public Member Functions

std::vector< DetLayer const * >
const & 
allLayers () const
 
std::vector< BarrelDetLayer
const * > const & 
barrelLayers () const
 
const DetLayerdetLayer (const DetId &id) const
 obsolete method. Use idToLayer() instead. More...
 
std::vector< ForwardDetLayer
const * > const & 
forwardLayers () const
 
 GeometricSearchTracker (const std::vector< BarrelDetLayer const * > &pxlBar, const std::vector< BarrelDetLayer const * > &tib, const std::vector< BarrelDetLayer const * > &tob, const std::vector< ForwardDetLayer const * > &negPxlFwd, const std::vector< ForwardDetLayer const * > &negTid, const std::vector< ForwardDetLayer const * > &negTec, const std::vector< ForwardDetLayer const * > &posPxlFwd, const std::vector< ForwardDetLayer const * > &posTid, const std::vector< ForwardDetLayer const * > &posTec) __attribute__((cold))
 
virtual const DetLayeridToLayer (const DetId &detId) const
 Give the DetId of a module, returns the pointer to the corresponding DetLayer. More...
 
std::vector< ForwardDetLayer
const * > const & 
negForwardLayers () const
 
std::vector< ForwardDetLayer
const * > const & 
negPixelForwardLayers () const
 
std::vector< ForwardDetLayer
const * > const & 
negTecLayers () const
 
std::vector< ForwardDetLayer
const * > const & 
negTidLayers () const
 
std::vector< BarrelDetLayer
const * > const & 
pixelBarrelLayers () const
 
std::vector< ForwardDetLayer
const * > const & 
posForwardLayers () const
 
std::vector< ForwardDetLayer
const * > const & 
posPixelForwardLayers () const
 
std::vector< ForwardDetLayer
const * > const & 
posTecLayers () const
 
std::vector< ForwardDetLayer
const * > const & 
posTidLayers () const
 
std::vector< BarrelDetLayer
const * > const & 
tibLayers () const
 
std::vector< BarrelDetLayer
const * > const & 
tobLayers () const
 
virtual ~GeometricSearchTracker () __attribute__((cold))
 
- Public Member Functions inherited from DetLayerGeometry
 DetLayerGeometry ()
 
virtual ~DetLayerGeometry ()
 

Private Attributes

std::vector< DetLayer const * > theAllLayers
 
std::vector< BarrelDetLayer
const * > 
theBarrelLayers
 
std::vector< ForwardDetLayer
const * > 
theForwardLayers
 
std::vector< ForwardDetLayer
const * > 
theNegForwardLayers
 
std::vector< ForwardDetLayer
const * > 
theNegPixelForwardLayers
 
std::vector< ForwardDetLayer
const * > 
theNegTecLayers
 
std::vector< ForwardDetLayer
const * > 
theNegTidLayers
 
std::vector< BarrelDetLayer
const * > 
thePixelBarrelLayers
 
std::vector< ForwardDetLayer
const * > 
thePosForwardLayers
 
std::vector< ForwardDetLayer
const * > 
thePosPixelForwardLayers
 
std::vector< ForwardDetLayer
const * > 
thePosTecLayers
 
std::vector< ForwardDetLayer
const * > 
thePosTidLayers
 
std::vector< BarrelDetLayer
const * > 
theTibLayers
 
std::vector< BarrelDetLayer
const * > 
theTobLayers
 

Detailed Description

GeometricSearchTracker implementation

Definition at line 13 of file GeometricSearchTracker.h.

Constructor & Destructor Documentation

GeometricSearchTracker::GeometricSearchTracker ( const std::vector< BarrelDetLayer const * > &  pxlBar,
const std::vector< BarrelDetLayer const * > &  tib,
const std::vector< BarrelDetLayer const * > &  tob,
const std::vector< ForwardDetLayer const * > &  negPxlFwd,
const std::vector< ForwardDetLayer const * > &  negTid,
const std::vector< ForwardDetLayer const * > &  negTec,
const std::vector< ForwardDetLayer const * > &  posPxlFwd,
const std::vector< ForwardDetLayer const * > &  posTid,
const std::vector< ForwardDetLayer const * > &  posTec 
)

Definition at line 6 of file GeometricSearchTracker.cc.

References barrelLayers(), prof2calltree::l, negForwardLayers(), negPixelForwardLayers(), negTecLayers(), negTidLayers(), pixelBarrelLayers(), posForwardLayers(), posPixelForwardLayers(), posTecLayers(), posTidLayers(), DetLayer::setSeqNum(), theAllLayers, theBarrelLayers, theForwardLayers, theNegForwardLayers, theNegPixelForwardLayers, theNegTecLayers, theNegTidLayers, thePixelBarrelLayers, thePosForwardLayers, thePosPixelForwardLayers, thePosTecLayers, thePosTidLayers, theTibLayers, theTobLayers, tibLayers(), and tobLayers().

14  :
15  thePixelBarrelLayers(pxlBar.begin(),pxlBar.end()),
16  theTibLayers(tib.begin(),tib.end()),
17  theTobLayers(tob.begin(),tob.end()),
18  theNegPixelForwardLayers(negPxlFwd.begin(),negPxlFwd.end()),
19  theNegTidLayers(negTid.begin(),negTid.end()),
20  theNegTecLayers(negTec.begin(),negTec.end()),
21  thePosPixelForwardLayers(posPxlFwd.begin(),posPxlFwd.end()),
22  thePosTidLayers(posTid.begin(),posTid.end()),
23  thePosTecLayers(posTec.begin(),posTec.end())
24 {
26  theBarrelLayers.insert(theBarrelLayers.end(),theTibLayers.begin(),theTibLayers.end());
27  theBarrelLayers.insert(theBarrelLayers.end(),theTobLayers.begin(),theTobLayers.end());
28 
32 
36 
37 
40  theAllLayers.assign(theBarrelLayers.begin(),theBarrelLayers.end());
41  theAllLayers.insert(theAllLayers.end(),
42  theForwardLayers.begin(),
43  theForwardLayers.end());
44 
45  // number the layers
46  int sq=0;
47  for (auto l : theAllLayers)
48  const_cast<DetLayer&>(*l).setSeqNum(sq++);
49 
50  edm::LogInfo("TkDetLayers")
51  << "------ GeometricSearchTracker constructed with: ------" << "\n"
52  << "n pxlBarLayers: " << this->pixelBarrelLayers().size() << "\n"
53  << "n tibLayers: " << this->tibLayers().size() << "\n"
54  << "n tobLayers: " << this->tobLayers().size() << "\n"
55  << "n negPxlFwdLayers: " << this->negPixelForwardLayers().size() << "\n"
56  << "n posPxlFwdLayers: " << this->posPixelForwardLayers().size() << "\n"
57  << "n negTidLayers: " << this->negTidLayers().size() << "\n"
58  << "n posTidLayers: " << this->posTidLayers().size() << "\n"
59  << "n negTecLayers: " << this->negTecLayers().size() << "\n"
60  << "n posTecLayers: " << this->posTecLayers().size() << "\n"
61 
62  << "n barreLayers: " << this->barrelLayers().size() << "\n"
63  << "n negforwardLayers: " << this->negForwardLayers().size() << "\n"
64  << "n posForwardLayers: " << this->posForwardLayers().size()
65  << "\nn Total : " << theAllLayers.size() << " " << sq
66  << std::endl;
67 
68  for (auto l : theAllLayers)
69  edm::LogInfo("TkDetLayers") << (*l).seqNum()<< ": " << (*l).subDetector() << ", ";
70  edm::LogInfo("TkDetLayers") << std::endl;
71 
72 }
std::vector< BarrelDetLayer const * > theBarrelLayers
std::vector< ForwardDetLayer const * > theNegTidLayers
std::vector< ForwardDetLayer const * > theForwardLayers
void setSeqNum(int sq)
Definition: DetLayer.h:37
std::vector< ForwardDetLayer const * > const & posForwardLayers() const
std::vector< ForwardDetLayer const * > const & posPixelForwardLayers() const
std::vector< ForwardDetLayer const * > thePosTidLayers
std::vector< BarrelDetLayer const * > const & tobLayers() const
std::vector< DetLayer const * > theAllLayers
std::vector< ForwardDetLayer const * > const & negPixelForwardLayers() const
std::vector< ForwardDetLayer const * > thePosPixelForwardLayers
std::vector< BarrelDetLayer const * > thePixelBarrelLayers
std::vector< ForwardDetLayer const * > const & negForwardLayers() const
std::vector< BarrelDetLayer const * > theTibLayers
std::vector< BarrelDetLayer const * > const & pixelBarrelLayers() const
std::vector< ForwardDetLayer const * > theNegForwardLayers
std::vector< ForwardDetLayer const * > thePosTecLayers
std::vector< BarrelDetLayer const * > const & tibLayers() const
std::vector< ForwardDetLayer const * > const & posTecLayers() const
std::vector< ForwardDetLayer const * > const & negTidLayers() const
std::vector< ForwardDetLayer const * > const & posTidLayers() const
std::vector< ForwardDetLayer const * > theNegPixelForwardLayers
std::vector< ForwardDetLayer const * > const & negTecLayers() const
std::vector< BarrelDetLayer const * > theTobLayers
std::vector< BarrelDetLayer const * > const & barrelLayers() const
std::vector< ForwardDetLayer const * > theNegTecLayers
std::vector< ForwardDetLayer const * > thePosForwardLayers
GeometricSearchTracker::~GeometricSearchTracker ( )
virtual

Definition at line 75 of file GeometricSearchTracker.cc.

References prof2calltree::l, and theAllLayers.

75  {
76  for (auto l : theAllLayers)
77  delete const_cast<DetLayer*>(l);
78 
79 }
std::vector< DetLayer const * > theAllLayers

Member Function Documentation

std::vector<DetLayer const*> const& GeometricSearchTracker::allLayers ( ) const
inline
std::vector<BarrelDetLayer const*> const& GeometricSearchTracker::barrelLayers ( ) const
inline
const DetLayer* GeometricSearchTracker::detLayer ( const DetId id) const
inline

obsolete method. Use idToLayer() instead.

Definition at line 53 of file GeometricSearchTracker.h.

Referenced by CkfDebugger::analyseRecHitNotFound(), MuonCkfTrajectoryBuilder::findCompatibleMeasurements(), NuclearInteractionFinder::findMeasurementsFromTSOS(), BaseCkfTrajectoryBuilder::findStateAndLayers(), and BaseCkfTrajectoryBuilder::seedMeasurements().

53 {return idToLayer(id);};
virtual const DetLayer * idToLayer(const DetId &detId) const
Give the DetId of a module, returns the pointer to the corresponding DetLayer.
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::forwardLayers ( ) const
inline

Definition at line 32 of file GeometricSearchTracker.h.

References theForwardLayers.

Referenced by SimpleNavigationSchool::SimpleNavigationSchool().

32 {return theForwardLayers;}
std::vector< ForwardDetLayer const * > theForwardLayers
const DetLayer * GeometricSearchTracker::idToLayer ( const DetId detId) const
virtual

Give the DetId of a module, returns the pointer to the corresponding DetLayer.

Reimplemented from DetLayerGeometry.

Definition at line 92 of file GeometricSearchTracker.cc.

References PXFDetId::disk(), PXBDetId::layer(), TOBDetId::layer(), TIBDetId::layer(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, StripSubdetector::TEC, theNegPixelForwardLayers, theNegTecLayers, theNegTidLayers, thePixelBarrelLayers, thePosPixelForwardLayers, thePosTecLayers, thePosTidLayers, theTibLayers, theTobLayers, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, TIDDetId::wheel(), and TECDetId::wheel().

Referenced by GlobalDetLayerGeometry::idToLayer().

93 {
94  switch(id.subdetId()) {
96  //edm::LogInfo(TkDetLayers) << "TIB layer n: " << TIBDetId(id).layer() ;
97  return theTibLayers[TIBDetId(id).layer()-1];
98  break;
99 
101  //edm::LogInfo(TkDetLayers) << "TOB layer n: " << TOBDetId(id).layer() ;
102  return theTobLayers[TOBDetId(id).layer()-1];
103  break;
104 
106  //edm::LogInfo(TkDetLayers) << "TID wheel n: " << TIDDetId(id).wheel() ;
107  if(TIDDetId(id).side() ==1 ) {
108  return theNegTidLayers[TIDDetId(id).wheel()-1];
109  }else if( TIDDetId(id).side() == 2 ) {
110  return thePosTidLayers[TIDDetId(id).wheel()-1];
111  }
112  break;
113 
115  //edm::LogInfo(TkDetLayers) << "TEC wheel n: " << TECDetId(id).wheel() ;
116  if(TECDetId(id).side() ==1 ) {
117  return theNegTecLayers[TECDetId(id).wheel()-1];
118  }else if( TECDetId(id).side() == 2 ) {
119  return thePosTecLayers[TECDetId(id).wheel()-1];
120  }
121  break;
122 
124  //edm::LogInfo(TkDetLayers) << "PixelBarrel layer n: " << PXBDetId(id).layer() ;
125  return thePixelBarrelLayers[PXBDetId(id).layer()-1];
126  break;
127 
129  //edm::LogInfo(TkDetLayers) << "PixelEndcap disk n: " << PXFDetId(id).disk() ;
130  if(PXFDetId(id).side() ==1 ) {
131  return theNegPixelForwardLayers[PXFDetId(id).disk()-1];
132  }else if( PXFDetId(id).side() == 2 ) {
133  return thePosPixelForwardLayers[PXFDetId(id).disk()-1];
134  }
135  break;
136 
137  default:
138  edm::LogError("TkDetLayers") << "ERROR:layer not found!" ;
139  // throw(something);
140  }
141  return 0; //just to avoid compile warnings
142 }
std::vector< ForwardDetLayer const * > theNegTidLayers
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
std::vector< ForwardDetLayer const * > thePosTidLayers
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
std::vector< ForwardDetLayer const * > thePosPixelForwardLayers
std::vector< BarrelDetLayer const * > thePixelBarrelLayers
std::vector< BarrelDetLayer const * > theTibLayers
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
std::vector< ForwardDetLayer const * > thePosTecLayers
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
std::vector< ForwardDetLayer const * > theNegPixelForwardLayers
std::vector< BarrelDetLayer const * > theTobLayers
std::vector< ForwardDetLayer const * > theNegTecLayers
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::negForwardLayers ( ) const
inline
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::negPixelForwardLayers ( ) const
inline
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::negTecLayers ( ) const
inline

Definition at line 42 of file GeometricSearchTracker.h.

References theNegTecLayers.

Referenced by GeometricSearchTracker(), and SeedingLayerSetsBuilder::updateEventSetup().

42 {return theNegTecLayers;}
std::vector< ForwardDetLayer const * > theNegTecLayers
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::negTidLayers ( ) const
inline

Definition at line 41 of file GeometricSearchTracker.h.

References theNegTidLayers.

Referenced by GeometricSearchTracker(), and SeedingLayerSetsBuilder::updateEventSetup().

41 {return theNegTidLayers;}
std::vector< ForwardDetLayer const * > theNegTidLayers
std::vector<BarrelDetLayer const*> const& GeometricSearchTracker::pixelBarrelLayers ( ) const
inline
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::posForwardLayers ( ) const
inline
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::posPixelForwardLayers ( ) const
inline
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::posTecLayers ( ) const
inline

Definition at line 46 of file GeometricSearchTracker.h.

References thePosTecLayers.

Referenced by GeometricSearchTracker(), and SeedingLayerSetsBuilder::updateEventSetup().

46 {return thePosTecLayers;}
std::vector< ForwardDetLayer const * > thePosTecLayers
std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::posTidLayers ( ) const
inline

Definition at line 45 of file GeometricSearchTracker.h.

References thePosTidLayers.

Referenced by GeometricSearchTracker(), and SeedingLayerSetsBuilder::updateEventSetup().

45 {return thePosTidLayers;}
std::vector< ForwardDetLayer const * > thePosTidLayers
std::vector<BarrelDetLayer const*> const& GeometricSearchTracker::tibLayers ( ) const
inline
std::vector<BarrelDetLayer const*> const& GeometricSearchTracker::tobLayers ( ) const
inline

Definition at line 38 of file GeometricSearchTracker.h.

References theTobLayers.

Referenced by CosmicNavigationSchool::build(), GeometricSearchTracker(), and SeedingLayerSetsBuilder::updateEventSetup().

38 {return theTobLayers;}
std::vector< BarrelDetLayer const * > theTobLayers

Member Data Documentation

std::vector<DetLayer const*> GeometricSearchTracker::theAllLayers
private
std::vector<BarrelDetLayer const*> GeometricSearchTracker::theBarrelLayers
private

Definition at line 57 of file GeometricSearchTracker.h.

Referenced by barrelLayers(), and GeometricSearchTracker().

std::vector<ForwardDetLayer const*> GeometricSearchTracker::theForwardLayers
private

Definition at line 58 of file GeometricSearchTracker.h.

Referenced by forwardLayers(), and GeometricSearchTracker().

std::vector<ForwardDetLayer const*> GeometricSearchTracker::theNegForwardLayers
private

Definition at line 59 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), and negForwardLayers().

std::vector<ForwardDetLayer const*> GeometricSearchTracker::theNegPixelForwardLayers
private
std::vector<ForwardDetLayer const*> GeometricSearchTracker::theNegTecLayers
private

Definition at line 68 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and negTecLayers().

std::vector<ForwardDetLayer const*> GeometricSearchTracker::theNegTidLayers
private

Definition at line 67 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and negTidLayers().

std::vector<BarrelDetLayer const*> GeometricSearchTracker::thePixelBarrelLayers
private

Definition at line 62 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and pixelBarrelLayers().

std::vector<ForwardDetLayer const*> GeometricSearchTracker::thePosForwardLayers
private

Definition at line 60 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), and posForwardLayers().

std::vector<ForwardDetLayer const*> GeometricSearchTracker::thePosPixelForwardLayers
private
std::vector<ForwardDetLayer const*> GeometricSearchTracker::thePosTecLayers
private

Definition at line 71 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and posTecLayers().

std::vector<ForwardDetLayer const*> GeometricSearchTracker::thePosTidLayers
private

Definition at line 70 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and posTidLayers().

std::vector<BarrelDetLayer const*> GeometricSearchTracker::theTibLayers
private

Definition at line 63 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and tibLayers().

std::vector<BarrelDetLayer const*> GeometricSearchTracker::theTobLayers
private

Definition at line 64 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and tobLayers().