CMS 3D CMS Logo

List of all members | Public Member Functions
GeometricSearchTrackerBuilder Class Reference

#include <GeometricSearchTrackerBuilder.h>

Public Member Functions

GeometricSearchTrackerbuild (const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo, const bool usePhase2Stacks=false) __attribute__((cold))
 
GeometricSearchTrackerbuild (const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo, const MTDGeometry *mtd, const MTDTopology *mTopo, const bool usePhase2Stacks=false) __attribute__((cold))
 
 GeometricSearchTrackerBuilder ()
 
 ~GeometricSearchTrackerBuilder ()
 

Detailed Description

GeometricSearchTrackerBuilder implementation

Definition at line 15 of file GeometricSearchTrackerBuilder.h.

Constructor & Destructor Documentation

◆ GeometricSearchTrackerBuilder()

GeometricSearchTrackerBuilder::GeometricSearchTrackerBuilder ( )
inline

Definition at line 17 of file GeometricSearchTrackerBuilder.h.

17 {}

◆ ~GeometricSearchTrackerBuilder()

GeometricSearchTrackerBuilder::~GeometricSearchTrackerBuilder ( )
inline

Definition at line 18 of file GeometricSearchTrackerBuilder.h.

18 {}

Member Function Documentation

◆ build() [1/2]

GeometricSearchTracker * GeometricSearchTrackerBuilder::build ( const GeometricDet theGeometricTracker,
const TrackerGeometry theGeomDetGeometry,
const TrackerTopology tTopo,
const bool  usePhase2Stacks = false 
)

Definition at line 19 of file GeometricSearchTrackerBuilder.cc.

22  {
23  PixelBarrelLayerBuilder aPixelBarrelLayerBuilder;
24  Phase2OTBarrelLayerBuilder aPhase2OTBarrelLayerBuilder;
27  Phase2EndcapLayerBuilder aPhase2EndcapLayerBuilder;
28  TIBLayerBuilder aTIBLayerBuilder;
29  TOBLayerBuilder aTOBLayerBuilder;
30  TIDLayerBuilder aTIDLayerBuilder;
31  TECLayerBuilder aTECLayerBuilder;
32 
33  vector<BarrelDetLayer const *> thePxlBarLayers;
34  vector<BarrelDetLayer const *> theTIBLayers;
35  vector<BarrelDetLayer const *> theTOBLayers;
36  vector<ForwardDetLayer const *> theNegPxlFwdLayers;
37  vector<ForwardDetLayer const *> thePosPxlFwdLayers;
38  vector<ForwardDetLayer const *> theNegTIDLayers;
39  vector<ForwardDetLayer const *> thePosTIDLayers;
40  vector<ForwardDetLayer const *> theNegTECLayers;
41  vector<ForwardDetLayer const *> thePosTECLayers;
42  bool useBrothers = !usePhase2Stacks;
43 
44  auto const &theGeometricDetLayers = theGeometricTracker->components();
45  for (auto const &theGeomDetLayer : theGeometricDetLayers) {
46  if (theGeomDetLayer->type() == GeometricDet::PixelBarrel) {
47  auto const &thePxlBarGeometricDetLayers = theGeomDetLayer->components();
48  for (auto const &thisGeomDet : thePxlBarGeometricDetLayers) {
49  thePxlBarLayers.push_back(aPixelBarrelLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
50  }
51  }
52 
53  if (theGeomDetLayer->type() == GeometricDet::PixelPhase1Barrel) {
54  auto const &thePxlBarGeometricDetLayers = theGeomDetLayer->components();
55  for (auto const &thisGeomDet : thePxlBarGeometricDetLayers) {
56  thePxlBarLayers.push_back(aPixelBarrelLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
57  }
58  }
59 
60  if (theGeomDetLayer->type() == GeometricDet::PixelPhase2Barrel) {
61  auto const &thePxlBarGeometricDetLayers = theGeomDetLayer->components();
62  for (auto const &thisGeomDet : thePxlBarGeometricDetLayers) {
63  thePxlBarLayers.push_back(aPixelBarrelLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
64  }
65  }
66 
67  if (theGeomDetLayer->type() == GeometricDet::TIB) {
68  auto const &theTIBGeometricDetLayers = theGeomDetLayer->components();
69  for (auto const &thisGeomDet : theTIBGeometricDetLayers) {
70  theTIBLayers.push_back(aTIBLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
71  }
72  }
73 
74  if (theGeomDetLayer->type() == GeometricDet::TOB) {
75  auto const &theTOBGeometricDetLayers = theGeomDetLayer->components();
76  for (auto const &thisGeomDet : theTOBGeometricDetLayers) {
77  theTOBLayers.push_back(aTOBLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
78  }
79  }
80 
81  if (theGeomDetLayer->type() == GeometricDet::OTPhase2Barrel) {
82  auto const &theTOBGeometricDetLayers = theGeomDetLayer->components();
83  for (auto const &thisGeomDet : theTOBGeometricDetLayers) {
84  theTOBLayers.push_back(aPhase2OTBarrelLayerBuilder.build(thisGeomDet, theGeomDetGeometry, useBrothers));
85  }
86  }
87 
88  if (theGeomDetLayer->type() == GeometricDet::PixelEndCap) {
89  auto const &thePxlFwdGeometricDetLayers = theGeomDetLayer->components();
90  for (auto const &thisGeomDet : thePxlFwdGeometricDetLayers) {
91  if (thisGeomDet->positionBounds().z() < 0)
92  theNegPxlFwdLayers.push_back(aPixelForwardLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
93  else
94  thePosPxlFwdLayers.push_back(aPixelForwardLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
95  }
96  }
97 
98  if (theGeomDetLayer->type() == GeometricDet::PixelPhase1EndCap) {
99  auto const &thePxlFwdGeometricDetLayers = theGeomDetLayer->components();
100  for (auto const &thisGeomDet : thePxlFwdGeometricDetLayers) {
101  if (thisGeomDet->positionBounds().z() < 0)
102  theNegPxlFwdLayers.push_back(aPhase1PixelForwardLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
103  else
104  thePosPxlFwdLayers.push_back(aPhase1PixelForwardLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
105  }
106  }
107 
108  if (theGeomDetLayer->type() == GeometricDet::PixelPhase2EndCap) {
109  auto const &thePxlFwdGeometricDetLayers = theGeomDetLayer->components();
110  for (auto const &thisGeomDet : thePxlFwdGeometricDetLayers) {
111  //FIXME: this is just to keep the compatibility with the PixelPhase1 extension layout
112  //hopefully we can get rid of it soon
113  if (thisGeomDet->positionBounds().z() < 0) {
114  if (thisGeomDet->type() == GeometricDet::PixelPhase2FullDisk ||
115  thisGeomDet->type() == GeometricDet::PixelPhase2ReducedDisk)
116  theNegPxlFwdLayers.push_back(aPhase1PixelForwardLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
117  else if (thisGeomDet->type() == GeometricDet::PixelPhase2TDRDisk)
118  theNegPxlFwdLayers.push_back(aPhase2EndcapLayerBuilder.build(thisGeomDet, theGeomDetGeometry, false));
119  } else if (thisGeomDet->positionBounds().z() > 0) {
120  if (thisGeomDet->type() == GeometricDet::PixelPhase2FullDisk ||
121  thisGeomDet->type() == GeometricDet::PixelPhase2ReducedDisk)
122  thePosPxlFwdLayers.push_back(aPhase1PixelForwardLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
123  else if (thisGeomDet->type() == GeometricDet::PixelPhase2TDRDisk)
124  thePosPxlFwdLayers.push_back(aPhase2EndcapLayerBuilder.build(thisGeomDet, theGeomDetGeometry, false));
125  } else {
126  edm::LogError("TkDetLayers") << "In PixelPhase2EndCap the disks are neither PixelPhase2FullDisk nor "
127  "PixelPhase2ReducedDisk nor PixelPhase2TDRDisk...";
128  }
129  }
130  }
131 
132  if (theGeomDetLayer->type() == GeometricDet::TID) {
133  auto const &theTIDGeometricDetLayers = theGeomDetLayer->components();
134  for (auto const &thisGeomDet : theTIDGeometricDetLayers) {
135  if (thisGeomDet->positionBounds().z() < 0)
136  theNegTIDLayers.push_back(aTIDLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
137  else
138  thePosTIDLayers.push_back(aTIDLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
139  }
140  }
141 
142  if (theGeomDetLayer->type() == GeometricDet::OTPhase2EndCap) {
143  auto const &theTIDGeometricDetLayers = theGeomDetLayer->components();
144  for (auto const &thisGeomDet : theTIDGeometricDetLayers) {
145  if (thisGeomDet->positionBounds().z() < 0)
146  theNegTIDLayers.push_back(aPhase2EndcapLayerBuilder.build(thisGeomDet, theGeomDetGeometry, useBrothers));
147  else
148  thePosTIDLayers.push_back(aPhase2EndcapLayerBuilder.build(thisGeomDet, theGeomDetGeometry, useBrothers));
149  }
150  }
151 
152  if (theGeomDetLayer->type() == GeometricDet::TEC) {
153  auto const &theTECGeometricDetLayers = theGeomDetLayer->components();
154  for (auto const &thisGeomDet : theTECGeometricDetLayers) {
155  if (thisGeomDet->positionBounds().z() < 0)
156  theNegTECLayers.push_back(aTECLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
157  else
158  thePosTECLayers.push_back(aTECLayerBuilder.build(thisGeomDet, theGeomDetGeometry));
159  }
160  }
161  }
162 
163  return new GeometricSearchTracker(thePxlBarLayers,
164  theTIBLayers,
165  theTOBLayers,
166  theNegPxlFwdLayers,
167  theNegTIDLayers,
168  theNegTECLayers,
169  thePosPxlFwdLayers,
170  thePosTIDLayers,
171  thePosTECLayers,
172  tTopo);
173 }

References PixelBarrelLayerBuilder::build(), TIBLayerBuilder::build(), TOBLayerBuilder::build(), Phase2EndcapLayerBuilder::build(), TIDLayerBuilder::build(), Phase2OTBarrelLayerBuilder::build(), TECLayerBuilder::build(), PixelForwardLayerBuilder< T1, T2 >::build(), GeometricDet::components(), GeometricDet::OTPhase2Barrel, GeometricDet::OTPhase2EndCap, GeometricDet::PixelBarrel, GeometricDet::PixelEndCap, GeometricDet::PixelPhase1Barrel, GeometricDet::PixelPhase1EndCap, GeometricDet::PixelPhase2Barrel, GeometricDet::PixelPhase2EndCap, GeometricDet::PixelPhase2FullDisk, GeometricDet::PixelPhase2ReducedDisk, GeometricDet::PixelPhase2TDRDisk, GeometricDet::TEC, GeometricDet::TIB, GeometricDet::TID, GeometricDet::TOB, and TrackerMTDRecoGeometryESProducer_cfi::usePhase2Stacks.

Referenced by TrackerRecoGeometryESProducer::produce(), and TrackerMTDRecoGeometryESProducer::produce().

◆ build() [2/2]

GeometricSearchTracker * GeometricSearchTrackerBuilder::build ( const GeometricDet theGeometricTracker,
const TrackerGeometry theGeomDetGeometry,
const TrackerTopology tTopo,
const MTDGeometry mtd,
const MTDTopology mTopo,
const bool  usePhase2Stacks = false 
)

Definition at line 175 of file GeometricSearchTrackerBuilder.cc.

180  {
181  //Tracker part
182  GeometricSearchTracker *theSearchTrack = this->build(theGeometricTracker, theGeomDetGeometry, tTopo, usePhase2Stacks);
183 
184  theSearchTrack->addDetLayerGeometry();
185  theSearchTrack->mtdDetLayerGeometry->buildLayers(mtd, mTopo);
186  theSearchTrack->mtdDetLayerGeometry->sortLayers();
187 
188  std::vector<const BarrelDetLayer *> barrel;
189  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allBarrelLayers()) {
190  auto p = dynamic_cast<const BarrelDetLayer *>(e);
191  if (p) {
192  barrel.push_back(p);
193  }
194  }
195  std::vector<const ForwardDetLayer *> backward;
196  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allBackwardLayers()) {
197  auto p = dynamic_cast<const ForwardDetLayer *>(e);
198  if (p) {
199  backward.push_back(p);
200  }
201  }
202  std::vector<const ForwardDetLayer *> forward;
203  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allForwardLayers()) {
204  auto p = dynamic_cast<const ForwardDetLayer *>(e);
205  if (p) {
206  forward.push_back(p);
207  }
208  }
209  //Include the MTD layers in the TrackerSearchGeometry
210  theSearchTrack->addMTDLayers(barrel, backward, forward);
211  return theSearchTrack;
212 }

References GeometricSearchTracker::addDetLayerGeometry(), GeometricSearchTracker::addMTDLayers(), MTDDetLayerGeometry::allBackwardLayers(), MTDDetLayerGeometry::allBarrelLayers(), MTDDetLayerGeometry::allForwardLayers(), Reference_intrackfit_cff::barrel, newFWLiteAna::build, MTDDetLayerGeometry::buildLayers(), MillePedeFileConverter_cfg::e, GeometricSearchTracker::mtdDetLayerGeometry, AlCaHLTBitMon_ParallelJobs::p, MTDDetLayerGeometry::sortLayers(), and TrackerMTDRecoGeometryESProducer_cfi::usePhase2Stacks.

MTDDetLayerGeometry::sortLayers
void sortLayers()
Definition: MTDDetLayerGeometry.cc:130
TIBLayerBuilder::build
TIBLayer * build(const GeometricDet *aTIBLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: TIBLayerBuilder.cc:10
GeometricDet::PixelEndCap
Definition: GeometricDet.h:52
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
Phase2EndcapLayerBuilder
Definition: Phase2EndcapLayerBuilder.h:14
GeometricDet::PixelPhase2ReducedDisk
Definition: GeometricDet.h:79
Phase2OTBarrelLayerBuilder::build
Phase2OTBarrelLayer * build(const GeometricDet *aPhase2OTBarrelLayer, const TrackerGeometry *theGeomDetGeometry, const bool useBrothers=true) __attribute__((cold))
Definition: Phase2OTBarrelLayerBuilder.cc:9
GeometricSearchTracker::mtdDetLayerGeometry
MTDDetLayerGeometry * mtdDetLayerGeometry
Definition: GeometricSearchTracker.h:60
GeometricSearchTracker::addDetLayerGeometry
void addDetLayerGeometry()
Definition: GeometricSearchTracker.cc:132
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:150
GeometricDet::TID
Definition: GeometricDet.h:54
PixelBarrelLayerBuilder::build
PixelBarrelLayer * build(const GeometricDet *aPixelBarrelLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: PixelBarrelLayerBuilder.cc:7
PixelForwardLayerBuilder::build
ForwardDetLayer * build(const GeometricDet *aPixelForwardLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: PixelForwardLayerBuilder.h:28
GeometricDet::PixelBarrel
Definition: GeometricDet.h:51
MTDDetLayerGeometry::buildLayers
void buildLayers(const MTDGeometry *geo, const MTDTopology *mtopo)
Definition: MTDDetLayerGeometry.cc:30
PixelBarrelLayerBuilder
Definition: PixelBarrelLayerBuilder.h:14
GeometricDet::OTPhase2Barrel
Definition: GeometricDet.h:72
MTDDetLayerGeometry::allBarrelLayers
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
Definition: MTDDetLayerGeometry.cc:81
GeometricDet::PixelPhase1EndCap
Definition: GeometricDet.h:69
GeometricDet::PixelPhase2Barrel
Definition: GeometricDet.h:75
TIBLayerBuilder
Definition: TIBLayerBuilder.h:14
PixelForwardLayerBuilder
Definition: PixelForwardLayerBuilder.h:20
GeometricDet::PixelPhase2TDRDisk
Definition: GeometricDet.h:80
Phase2EndcapLayerBuilder::build
Phase2EndcapLayer * build(const GeometricDet *aPhase2EndcapLayer, const TrackerGeometry *theGeomDetGeometry, const bool useBrothers) __attribute__((cold))
Definition: Phase2EndcapLayerBuilder.cc:7
GeometricDet::PixelPhase2EndCap
Definition: GeometricDet.h:76
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
TECLayerBuilder::build
TECLayer * build(const GeometricDet *aTECLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: TECLayerBuilder.cc:7
GeometricDet::PixelPhase1Barrel
Definition: GeometricDet.h:68
GeometricDet::OTPhase2EndCap
Definition: GeometricDet.h:71
GeometricDet::TIB
Definition: GeometricDet.h:53
TOBLayerBuilder::build
TOBLayer * build(const GeometricDet *aTOBLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: TOBLayerBuilder.cc:10
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
TrackerMTDRecoGeometryESProducer_cfi.usePhase2Stacks
usePhase2Stacks
Definition: TrackerMTDRecoGeometryESProducer_cfi.py:4
MTDDetLayerGeometry::allBackwardLayers
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
Definition: MTDDetLayerGeometry.cc:87
TIDLayerBuilder
Definition: TIDLayerBuilder.h:14
GeometricSearchTrackerBuilder::build
GeometricSearchTracker * build(const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo, const bool usePhase2Stacks=false) __attribute__((cold))
Definition: GeometricSearchTrackerBuilder.cc:19
GeometricDet::PixelPhase2FullDisk
Definition: GeometricDet.h:78
GeometricDet::TOB
Definition: GeometricDet.h:55
GeometricSearchTracker::addMTDLayers
void addMTDLayers(const std::vector< BarrelDetLayer const * > &btl, const std::vector< ForwardDetLayer const * > &negEtl, const std::vector< ForwardDetLayer const * > &posEtl)
Definition: GeometricSearchTracker.cc:134
GeometricSearchTracker
Definition: GeometricSearchTracker.h:15
MTDDetLayerGeometry::allForwardLayers
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
Definition: MTDDetLayerGeometry.cc:85
TECLayerBuilder
Definition: TECLayerBuilder.h:14
TIDLayerBuilder::build
TIDLayer * build(const GeometricDet *aTIDLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: TIDLayerBuilder.cc:7
mtd_digitizer
Definition: MTDDigitizer.h:34
TOBLayerBuilder
Definition: TOBLayerBuilder.h:14
Phase2OTBarrelLayerBuilder
Definition: Phase2OTBarrelLayerBuilder.h:14
GeometricDet::TEC
Definition: GeometricDet.h:56
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37