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

Detailed Description

GeometricSearchTrackerBuilder implementation

Definition at line 15 of file GeometricSearchTrackerBuilder.h.

Constructor & Destructor Documentation

GeometricSearchTrackerBuilder::GeometricSearchTrackerBuilder ( )
inline

Definition at line 18 of file GeometricSearchTrackerBuilder.h.

18 {}
GeometricSearchTrackerBuilder::~GeometricSearchTrackerBuilder ( )
inline

Definition at line 19 of file GeometricSearchTrackerBuilder.h.

References build().

19 {}

Member Function Documentation

GeometricSearchTracker * GeometricSearchTrackerBuilder::build ( const GeometricDet theGeometricTracker,
const TrackerGeometry theGeomDetGeometry,
const TrackerTopology tTopo 
)

Definition at line 25 of file GeometricSearchTrackerBuilder.cc.

References PixelBarrelLayerBuilder::build(), TOBLayerBuilder::build(), Phase2EndcapLayerBuilder::build(), Phase2OTBarrelLayerBuilder::build(), TIDLayerBuilder::build(), TIBLayerBuilder::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, and GeometricDet::TOB.

Referenced by TrackerRecoGeometryESProducer::produce(), and ~GeometricSearchTrackerBuilder().

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