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

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

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

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

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

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.

187  {
188  //Tracker part
189  GeometricSearchTracker *theSearchTrack = this->build(theGeometricTracker, theGeomDetGeometry, tTopo, usePhase2Stacks);
190 
191  theSearchTrack->addDetLayerGeometry();
192  theSearchTrack->mtdDetLayerGeometry->buildLayers(mtd, mTopo);
193  theSearchTrack->mtdDetLayerGeometry->sortLayers();
194 
195  std::vector<const BarrelDetLayer *> barrel;
196  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allBarrelLayers()) {
197  auto p = dynamic_cast<const BarrelDetLayer *>(e);
198  if (p) {
199  barrel.push_back(p);
200  }
201  }
202  std::vector<const ForwardDetLayer *> backward;
203  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allBackwardLayers()) {
204  auto p = dynamic_cast<const ForwardDetLayer *>(e);
205  if (p) {
206  backward.push_back(p);
207  }
208  }
209  std::vector<const ForwardDetLayer *> forward;
210  for (auto &&e : theSearchTrack->mtdDetLayerGeometry->allForwardLayers()) {
211  auto p = dynamic_cast<const ForwardDetLayer *>(e);
212  if (p) {
213  forward.push_back(p);
214  }
215  }
216  //Include the MTD layers in the TrackerSearchGeometry
217  theSearchTrack->addMTDLayers(barrel, backward, forward);
218  return theSearchTrack;
219 }
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
MTDDetLayerGeometry * mtdDetLayerGeometry
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
void buildLayers(const MTDGeometry *geo, const MTDTopology *mtopo)
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
GeometricSearchTracker * build(const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo, const bool usePhase2Stacks=false) __attribute__((cold))
void addMTDLayers(const std::vector< BarrelDetLayer const *> &btl, const std::vector< ForwardDetLayer const *> &negEtl, const std::vector< ForwardDetLayer const *> &posEtl)