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))
 
 GeometricSearchTrackerBuilder ()
 
 ~GeometricSearchTrackerBuilder ()
 

Detailed Description

GeometricSearchTrackerBuilder implementation

Definition at line 14 of file GeometricSearchTrackerBuilder.h.

Constructor & Destructor Documentation

◆ GeometricSearchTrackerBuilder()

GeometricSearchTrackerBuilder::GeometricSearchTrackerBuilder ( )
inline

Definition at line 16 of file GeometricSearchTrackerBuilder.h.

16 {}

◆ ~GeometricSearchTrackerBuilder()

GeometricSearchTrackerBuilder::~GeometricSearchTrackerBuilder ( )
inline

Definition at line 17 of file GeometricSearchTrackerBuilder.h.

17 {}

Member Function Documentation

◆ build()

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

Definition at line 22 of file GeometricSearchTrackerBuilder.cc.

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

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 TrackerRecoGeometryESProducer_cfi::usePhase2Stacks.

Referenced by TrackerRecoGeometryESProducer::produce().

TIBLayerBuilder::build
TIBLayer * build(const GeometricDet *aTIBLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: TIBLayerBuilder.cc:10
GeometricDet::PixelEndCap
Definition: GeometricDet.h:52
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
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:149
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
PixelBarrelLayerBuilder
Definition: PixelBarrelLayerBuilder.h:14
GeometricDet::OTPhase2Barrel
Definition: GeometricDet.h:72
GeometricDet::PixelPhase1EndCap
Definition: GeometricDet.h:69
GeometricDet::PixelPhase2Barrel
Definition: GeometricDet.h:75
TIBLayerBuilder
Definition: TIBLayerBuilder.h:14
TrackerRecoGeometryESProducer_cfi.usePhase2Stacks
usePhase2Stacks
Definition: TrackerRecoGeometryESProducer_cfi.py:4
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
TIDLayerBuilder
Definition: TIDLayerBuilder.h:14
GeometricDet::PixelPhase2FullDisk
Definition: GeometricDet.h:78
GeometricDet::TOB
Definition: GeometricDet.h:55
GeometricSearchTracker
Definition: GeometricSearchTracker.h:14
TECLayerBuilder
Definition: TECLayerBuilder.h:14
TIDLayerBuilder::build
TIDLayer * build(const GeometricDet *aTIDLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: TIDLayerBuilder.cc:7
TOBLayerBuilder
Definition: TOBLayerBuilder.h:14
Phase2OTBarrelLayerBuilder
Definition: Phase2OTBarrelLayerBuilder.h:14
GeometricDet::TEC
Definition: GeometricDet.h:56