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 23 of file GeometricSearchTrackerBuilder.cc.

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

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 208 of file GeometricSearchTrackerBuilder.cc.

213  {
214  //Tracker part
215  GeometricSearchTracker *theSearchTrack = this->build(theGeometricTracker, theGeomDetGeometry, tTopo, usePhase2Stacks);
216 
217  theSearchTrack->addDetLayerGeometry();
218  theSearchTrack->mtdDetLayerGeometry->buildLayers(mtd, mTopo);
219  theSearchTrack->mtdDetLayerGeometry->sortLayers();
220 
221  std::vector<const BarrelDetLayer *> barrel;
222  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allBarrelLayers()) {
223  auto p = dynamic_cast<const BarrelDetLayer *>(e);
224  if (p) {
225  barrel.push_back(p);
226  }
227  }
228  std::vector<const ForwardDetLayer *> backward;
229  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allBackwardLayers()) {
230  auto p = dynamic_cast<const ForwardDetLayer *>(e);
231  if (p) {
232  backward.push_back(p);
233  }
234  }
235  std::vector<const ForwardDetLayer *> forward;
236  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allForwardLayers()) {
237  auto p = dynamic_cast<const ForwardDetLayer *>(e);
238  if (p) {
239  forward.push_back(p);
240  }
241  }
242  //Include the MTD layers in the TrackerSearchGeometry
243  theSearchTrack->addMTDLayers(barrel, backward, forward);
244  return theSearchTrack;
245 }

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:149
GeometricDet::TID
Definition: GeometricDet.h:54
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
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
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:23
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