CMS 3D CMS Logo

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, const TrackerTopology *tTopo) __attribute__((cold))
 
const DetLayeridToLayer (const DetId &detId) const override
 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
 
 ~GeometricSearchTracker () override __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
 
const TrackerTopologytheTrkTopo
 

Detailed Description

GeometricSearchTracker implementation

Definition at line 14 of file GeometricSearchTracker.h.

Constructor & Destructor Documentation

◆ GeometricSearchTracker()

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,
const TrackerTopology tTopo 
)

Definition at line 8 of file GeometricSearchTracker.cc.

18  : thePixelBarrelLayers(pxlBar.begin(), pxlBar.end()),
19  theTibLayers(tib.begin(), tib.end()),
20  theTobLayers(tob.begin(), tob.end()),
21  theNegPixelForwardLayers(negPxlFwd.begin(), negPxlFwd.end()),
22  theNegTidLayers(negTid.begin(), negTid.end()),
23  theNegTecLayers(negTec.begin(), negTec.end()),
24  thePosPixelForwardLayers(posPxlFwd.begin(), posPxlFwd.end()),
25  thePosTidLayers(posTid.begin(), posTid.end()),
26  thePosTecLayers(posTec.begin(), posTec.end()),
27  theTrkTopo(tTopo) {
29  theBarrelLayers.insert(theBarrelLayers.end(), theTibLayers.begin(), theTibLayers.end());
30  theBarrelLayers.insert(theBarrelLayers.end(), theTobLayers.begin(), theTobLayers.end());
31 
35 
39 
42  theAllLayers.assign(theBarrelLayers.begin(), theBarrelLayers.end());
43  theAllLayers.insert(theAllLayers.end(), theForwardLayers.begin(), 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") << "------ GeometricSearchTracker constructed with: ------"
51  << "\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 << std::endl;
66 
67  for (auto l : theAllLayers)
68  edm::LogInfo("TkDetLayers") << (*l).seqNum() << ": " << (*l).subDetector() << ", ";
69  edm::LogInfo("TkDetLayers") << std::endl;
70 }

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

◆ ~GeometricSearchTracker()

GeometricSearchTracker::~GeometricSearchTracker ( )
override

Definition at line 72 of file GeometricSearchTracker.cc.

72  {
73  for (auto l : theAllLayers)
74  delete const_cast<DetLayer*>(l);
75 }

References cmsLHEtoEOSManager::l, and theAllLayers.

Member Function Documentation

◆ allLayers()

std::vector<DetLayer const*> const& GeometricSearchTracker::allLayers ( ) const
inline

◆ barrelLayers()

std::vector<BarrelDetLayer const*> const& GeometricSearchTracker::barrelLayers ( ) const
inline

◆ detLayer()

const DetLayer* GeometricSearchTracker::detLayer ( const DetId id) const
inline

◆ forwardLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::forwardLayers ( ) const
inline

Definition at line 33 of file GeometricSearchTracker.h.

33 { return theForwardLayers; }

References theForwardLayers.

◆ idToLayer()

const DetLayer * GeometricSearchTracker::idToLayer ( const DetId detId) const
overridevirtual

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

Reimplemented from DetLayerGeometry.

Definition at line 80 of file GeometricSearchTracker.cc.

80  {
81  switch (id.subdetId()) {
83  return theTibLayers[theTrkTopo->tibLayer(id) - 1];
84  break;
85 
87  return theTobLayers[theTrkTopo->tobLayer(id) - 1];
88  break;
89 
91  if (theTrkTopo->tidSide(id) == 1) {
92  return theNegTidLayers[theTrkTopo->tidWheel(id) - 1];
93  } else if (theTrkTopo->tidSide(id) == 2) {
94  return thePosTidLayers[theTrkTopo->tidWheel(id) - 1];
95  }
96  break;
97 
99  if (theTrkTopo->tecSide(id) == 1) {
100  return theNegTecLayers[theTrkTopo->tecWheel(id) - 1];
101  } else if (theTrkTopo->tecSide(id) == 2) {
102  return thePosTecLayers[theTrkTopo->tecWheel(id) - 1];
103  }
104  break;
105 
107  return thePixelBarrelLayers[theTrkTopo->pxbLayer(id) - 1];
108  break;
109 
111  if (theTrkTopo->pxfSide(id) == 1) {
113  } else if (theTrkTopo->pxfSide(id) == 2) {
115  }
116  break;
117 
118  default:
119  edm::LogError("TkDetLayers") << "ERROR:layer not found!";
120  // throw(something);
121  }
122  return nullptr; //just to avoid compile warnings
123 }

References PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), StripSubdetector::TEC, TrackerTopology::tecSide(), TrackerTopology::tecWheel(), theNegPixelForwardLayers, theNegTecLayers, theNegTidLayers, thePixelBarrelLayers, thePosPixelForwardLayers, thePosTecLayers, thePosTidLayers, theTibLayers, theTobLayers, theTrkTopo, StripSubdetector::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerTopology::tidSide(), TrackerTopology::tidWheel(), StripSubdetector::TOB, and TrackerTopology::tobLayer().

Referenced by GlobalDetLayerGeometry::idToLayer().

◆ negForwardLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::negForwardLayers ( ) const
inline

◆ negPixelForwardLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::negPixelForwardLayers ( ) const
inline

◆ negTecLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::negTecLayers ( ) const
inline

◆ negTidLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::negTidLayers ( ) const
inline

◆ pixelBarrelLayers()

std::vector<BarrelDetLayer const*> const& GeometricSearchTracker::pixelBarrelLayers ( ) const
inline

◆ posForwardLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::posForwardLayers ( ) const
inline

◆ posPixelForwardLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::posPixelForwardLayers ( ) const
inline

◆ posTecLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::posTecLayers ( ) const
inline

◆ posTidLayers()

std::vector<ForwardDetLayer const*> const& GeometricSearchTracker::posTidLayers ( ) const
inline

◆ tibLayers()

std::vector<BarrelDetLayer const*> const& GeometricSearchTracker::tibLayers ( ) const
inline

◆ tobLayers()

std::vector<BarrelDetLayer const*> const& GeometricSearchTracker::tobLayers ( ) const
inline

Member Data Documentation

◆ theAllLayers

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

◆ theBarrelLayers

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

Definition at line 57 of file GeometricSearchTracker.h.

Referenced by barrelLayers(), and GeometricSearchTracker().

◆ theForwardLayers

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

Definition at line 58 of file GeometricSearchTracker.h.

Referenced by forwardLayers(), and GeometricSearchTracker().

◆ theNegForwardLayers

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

Definition at line 59 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), and negForwardLayers().

◆ theNegPixelForwardLayers

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

◆ theNegTecLayers

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

Definition at line 68 of file GeometricSearchTracker.h.

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

◆ theNegTidLayers

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

Definition at line 67 of file GeometricSearchTracker.h.

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

◆ thePixelBarrelLayers

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

Definition at line 62 of file GeometricSearchTracker.h.

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

◆ thePosForwardLayers

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

Definition at line 60 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), and posForwardLayers().

◆ thePosPixelForwardLayers

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

◆ thePosTecLayers

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

Definition at line 71 of file GeometricSearchTracker.h.

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

◆ thePosTidLayers

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

Definition at line 70 of file GeometricSearchTracker.h.

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

◆ theTibLayers

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

Definition at line 63 of file GeometricSearchTracker.h.

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

◆ theTobLayers

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

Definition at line 64 of file GeometricSearchTracker.h.

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

◆ theTrkTopo

const TrackerTopology* GeometricSearchTracker::theTrkTopo
private

Definition at line 73 of file GeometricSearchTracker.h.

Referenced by idToLayer().

PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
GeometricSearchTracker::tobLayers
std::vector< BarrelDetLayer const * > const & tobLayers() const
Definition: GeometricSearchTracker.h:39
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
GeometricSearchTracker::tibLayers
std::vector< BarrelDetLayer const * > const & tibLayers() const
Definition: GeometricSearchTracker.h:38
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
GeometricSearchTracker::theTrkTopo
const TrackerTopology * theTrkTopo
Definition: GeometricSearchTracker.h:73
GeometricSearchTracker::thePosPixelForwardLayers
std::vector< ForwardDetLayer const * > thePosPixelForwardLayers
Definition: GeometricSearchTracker.h:69
GeometricSearchTracker::theTobLayers
std::vector< BarrelDetLayer const * > theTobLayers
Definition: GeometricSearchTracker.h:64
GeometricSearchTracker::thePixelBarrelLayers
std::vector< BarrelDetLayer const * > thePixelBarrelLayers
Definition: GeometricSearchTracker.h:62
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
GeometricSearchTracker::thePosTecLayers
std::vector< ForwardDetLayer const * > thePosTecLayers
Definition: GeometricSearchTracker.h:71
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
GeometricSearchTracker::theNegTecLayers
std::vector< ForwardDetLayer const * > theNegTecLayers
Definition: GeometricSearchTracker.h:68
GeometricSearchTracker::thePosForwardLayers
std::vector< ForwardDetLayer const * > thePosForwardLayers
Definition: GeometricSearchTracker.h:60
GeometricSearchTracker::posTecLayers
std::vector< ForwardDetLayer const * > const & posTecLayers() const
Definition: GeometricSearchTracker.h:47
GeometricSearchTracker::theNegTidLayers
std::vector< ForwardDetLayer const * > theNegTidLayers
Definition: GeometricSearchTracker.h:67
GeometricSearchTracker::posTidLayers
std::vector< ForwardDetLayer const * > const & posTidLayers() const
Definition: GeometricSearchTracker.h:46
GeometricSearchTracker::barrelLayers
std::vector< BarrelDetLayer const * > const & barrelLayers() const
Definition: GeometricSearchTracker.h:31
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
GeometricSearchTracker::theNegPixelForwardLayers
std::vector< ForwardDetLayer const * > theNegPixelForwardLayers
Definition: GeometricSearchTracker.h:66
GeometricSearchTracker::thePosTidLayers
std::vector< ForwardDetLayer const * > thePosTidLayers
Definition: GeometricSearchTracker.h:70
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
GeometricSearchTracker::theAllLayers
std::vector< DetLayer const * > theAllLayers
Definition: GeometricSearchTracker.h:53
TrackerTopology::tidSide
unsigned int tidSide(const DetId &id) const
Definition: TrackerTopology.h:190
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
GeometricSearchTracker::theBarrelLayers
std::vector< BarrelDetLayer const * > theBarrelLayers
Definition: GeometricSearchTracker.h:57
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
GeometricSearchTracker::idToLayer
const DetLayer * idToLayer(const DetId &detId) const override
Give the DetId of a module, returns the pointer to the corresponding DetLayer.
Definition: GeometricSearchTracker.cc:80
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
GeometricSearchTracker::negForwardLayers
std::vector< ForwardDetLayer const * > const & negForwardLayers() const
Definition: GeometricSearchTracker.h:34
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
GeometricSearchTracker::theTibLayers
std::vector< BarrelDetLayer const * > theTibLayers
Definition: GeometricSearchTracker.h:63
GeometricSearchTracker::negPixelForwardLayers
std::vector< ForwardDetLayer const * > const & negPixelForwardLayers() const
Definition: GeometricSearchTracker.h:41
GeometricSearchTracker::posForwardLayers
std::vector< ForwardDetLayer const * > const & posForwardLayers() const
Definition: GeometricSearchTracker.h:35
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
GeometricSearchTracker::theForwardLayers
std::vector< ForwardDetLayer const * > theForwardLayers
Definition: GeometricSearchTracker.h:58
GeometricSearchTracker::theNegForwardLayers
std::vector< ForwardDetLayer const * > theNegForwardLayers
Definition: GeometricSearchTracker.h:59
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
GeometricSearchTracker::negTidLayers
std::vector< ForwardDetLayer const * > const & negTidLayers() const
Definition: GeometricSearchTracker.h:42
GeometricSearchTracker::pixelBarrelLayers
std::vector< BarrelDetLayer const * > const & pixelBarrelLayers() const
Definition: GeometricSearchTracker.h:37
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150
TrackerTopology::tecSide
unsigned int tecSide(const DetId &id) const
Definition: TrackerTopology.h:184