22 const bool usePhase2Stacks) {
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;
44 auto const &theGeometricDetLayers = theGeometricTracker->
components();
45 for (
auto const &theGeomDetLayer : theGeometricDetLayers) {
47 auto const &thePxlBarGeometricDetLayers = theGeomDetLayer->components();
48 for (
auto const &thisGeomDet : thePxlBarGeometricDetLayers) {
49 thePxlBarLayers.push_back(aPixelBarrelLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
54 auto const &thePxlBarGeometricDetLayers = theGeomDetLayer->components();
55 for (
auto const &thisGeomDet : thePxlBarGeometricDetLayers) {
56 thePxlBarLayers.push_back(aPixelBarrelLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
61 auto const &thePxlBarGeometricDetLayers = theGeomDetLayer->components();
62 for (
auto const &thisGeomDet : thePxlBarGeometricDetLayers) {
63 thePxlBarLayers.push_back(aPixelBarrelLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
68 auto const &theTIBGeometricDetLayers = theGeomDetLayer->components();
69 for (
auto const &thisGeomDet : theTIBGeometricDetLayers) {
70 theTIBLayers.push_back(aTIBLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
75 auto const &theTOBGeometricDetLayers = theGeomDetLayer->components();
76 for (
auto const &thisGeomDet : theTOBGeometricDetLayers) {
77 theTOBLayers.push_back(aTOBLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
82 auto const &theTOBGeometricDetLayers = theGeomDetLayer->components();
83 for (
auto const &thisGeomDet : theTOBGeometricDetLayers) {
84 theTOBLayers.push_back(aPhase2OTBarrelLayerBuilder.
build(thisGeomDet, theGeomDetGeometry, useBrothers));
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));
94 thePosPxlFwdLayers.push_back(aPixelForwardLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
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));
104 thePosPxlFwdLayers.push_back(aPhase1PixelForwardLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
109 auto const &thePxlFwdGeometricDetLayers = theGeomDetLayer->components();
110 for (
auto const &thisGeomDet : thePxlFwdGeometricDetLayers) {
113 if (thisGeomDet->positionBounds().z() < 0) {
116 theNegPxlFwdLayers.push_back(aPhase1PixelForwardLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
118 theNegPxlFwdLayers.push_back(aPhase2EndcapLayerBuilder.
build(thisGeomDet, theGeomDetGeometry,
false));
119 }
else if (thisGeomDet->positionBounds().z() > 0) {
122 thePosPxlFwdLayers.push_back(aPhase1PixelForwardLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
124 thePosPxlFwdLayers.push_back(aPhase2EndcapLayerBuilder.
build(thisGeomDet, theGeomDetGeometry,
false));
126 edm::LogError(
"TkDetLayers") <<
"In PixelPhase2EndCap the disks are neither PixelPhase2FullDisk nor "
127 "PixelPhase2ReducedDisk nor PixelPhase2TDRDisk...";
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));
138 thePosTIDLayers.push_back(aTIDLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
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));
148 thePosTIDLayers.push_back(aPhase2EndcapLayerBuilder.
build(thisGeomDet, theGeomDetGeometry, useBrothers));
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));
158 thePosTECLayers.push_back(aTECLayerBuilder.
build(thisGeomDet, theGeomDetGeometry));
180 const bool usePhase2Stacks) {
188 std::vector<const BarrelDetLayer *>
barrel;
195 std::vector<const ForwardDetLayer *> backward;
199 backward.push_back(
p);
202 std::vector<const ForwardDetLayer *> forward;
206 forward.push_back(
p);
210 theSearchTrack->
addMTDLayers(barrel, backward, forward);
211 return theSearchTrack;
void addMTDLayers(const std::vector< BarrelDetLayer const * > &btl, const std::vector< ForwardDetLayer const * > &negEtl, const std::vector< ForwardDetLayer const * > &posEtl)
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))
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
const std::vector< const DetLayer * > & allBackwardLayers() const
return all endcap layers
ConstGeometricDetContainer & components()
MTDDetLayerGeometry * mtdDetLayerGeometry
void buildLayers(const MTDGeometry *geo, const MTDTopology *mtopo)
GeometricSearchTracker * build(const GeometricDet *theGeometricTracker, const TrackerGeometry *theGeomDetGeometry, const TrackerTopology *tTopo, const bool usePhase2Stacks=false) __attribute__((cold))
void addDetLayerGeometry()
const std::vector< const DetLayer * > & allForwardLayers() const
return all endcap layers
const std::vector< const DetLayer * > & allBarrelLayers() const
return all barrel layers
ForwardDetLayer * build(const GeometricDet *aPixelForwardLayer, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Phase2OTBarrelLayer * build(const GeometricDet *aPhase2OTBarrelLayer, const TrackerGeometry *theGeomDetGeometry, const bool useBrothers=true) __attribute__((cold))