15 LogTrace(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder::build";
16 vector<const GeometricDet*> theGeometricDets = aPhase2OTBarrelLayer->
components();
17 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder with #Components: " << theGeometricDets.size() << std::endl;
18 vector<const GeometricDet*> theGeometricDetRods;
19 vector<const GeometricDet*> theGeometricDetRings;
21 for(vector<const GeometricDet*>::const_iterator it = theGeometricDets.begin();
22 it!=theGeometricDets.end(); it++){
25 theGeometricDetRods.push_back(*it);
27 theGeometricDetRings.push_back(*it);
29 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder with no Rods and no Rings! ";
33 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder with #Rods: " << theGeometricDetRods.size() << std::endl;
37 vector<const Phase2OTBarrelRod*> theInnerRods;
38 vector<const Phase2OTBarrelRod*> theOuterRods;
43 for (
unsigned int index=0;
index!=theGeometricDetRods.size();
index++) meanR+=theGeometricDetRods[
index]->positionBounds().perp();
44 if (theGeometricDetRods.size()!=0)
45 meanR/=(
double) theGeometricDetRods.size();
48 if(theGeometricDetRods[
index]->positionBounds().perp() < meanR)
49 theInnerRods.push_back(myPhase2OTBarrelRodBuilder.
build(theGeometricDetRods[
index],
50 theGeomDetGeometry) );
52 if(theGeometricDetRods[index]->positionBounds().perp() > meanR)
53 theOuterRods.push_back(myPhase2OTBarrelRodBuilder.
build(theGeometricDetRods[index],
54 theGeomDetGeometry) );
60 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder with #Rings: " << theGeometricDetRings.size() << std::endl;
64 vector<const Phase2EndcapRing*> theNegativeRings;
65 vector<const Phase2EndcapRing*> thePositiveRings;
68 double centralZ = 0.0;
70 for(vector<const GeometricDet*>::const_iterator it=theGeometricDetRings.begin();
71 it!=theGeometricDetRings.end();it++){
72 if((*it)->positionBounds().z() < centralZ)
73 theNegativeRings.push_back(myPhase2EndcapRingBuilder.
build( *it,theGeomDetGeometry,
true ));
74 if((*it)->positionBounds().z() > centralZ)
75 thePositiveRings.push_back(myPhase2EndcapRingBuilder.
build( *it,theGeomDetGeometry,
true ));
TBPLayer Phase2OTBarrelLayer
Phase2OTBarrelRod * build(const GeometricDet *thePhase2OTBarrelRod, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
ConstGeometricDetContainer & components()
Phase2EndcapRing * build(const GeometricDet *aPhase2EndcapRing, const TrackerGeometry *theGeomDetGeometry, const bool useBrothers=true) __attribute__((cold))