14 LogTrace(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder::build";
15 vector<const GeometricDet*> theGeometricDets = aPhase2OTBarrelLayer->
components();
16 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder with #Components: " << theGeometricDets.size() << std::endl;
17 vector<const GeometricDet*> theGeometricDetRods;
18 vector<const GeometricDet*> theGeometricDetRings;
20 for (vector<const GeometricDet*>::const_iterator it = theGeometricDets.begin(); it != theGeometricDets.end(); it++) {
22 theGeometricDetRods.push_back(*it);
24 theGeometricDetRings.push_back(*it);
26 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder with no Rods and no Rings! ";
30 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder with #Rods: " << theGeometricDetRods.size() << std::endl;
34 vector<const Phase2OTBarrelRod*> theInnerRods;
35 vector<const Phase2OTBarrelRod*> theOuterRods;
40 for (
unsigned int index = 0;
index != theGeometricDetRods.size();
index++)
41 meanR += theGeometricDetRods[
index]->positionBounds().perp();
42 if (!theGeometricDetRods.empty())
43 meanR /= (
double)theGeometricDetRods.size();
45 for (
unsigned int index = 0;
index != theGeometricDetRods.size();
index++) {
46 if (theGeometricDetRods[
index]->positionBounds().perp() < meanR)
47 theInnerRods.push_back(myPhase2OTBarrelRodBuilder.
build(theGeometricDetRods[
index], theGeomDetGeometry));
49 if (theGeometricDetRods[index]->positionBounds().perp() > meanR)
50 theOuterRods.push_back(myPhase2OTBarrelRodBuilder.
build(theGeometricDetRods[index], theGeomDetGeometry));
53 if (theGeometricDetRings.empty())
56 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelLayerBuilder with #Rings: " << theGeometricDetRings.size() << std::endl;
60 vector<const Phase2EndcapRing*> theNegativeRings;
61 vector<const Phase2EndcapRing*> thePositiveRings;
64 double centralZ = 0.0;
66 for (vector<const GeometricDet*>::const_iterator it = theGeometricDetRings.begin(); it != theGeometricDetRings.end();
68 if ((*it)->positionBounds().z() < centralZ)
69 theNegativeRings.push_back(myPhase2EndcapRingBuilder.
build(*it, theGeomDetGeometry,
true));
70 if ((*it)->positionBounds().z() > centralZ)
71 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))