10 vector<const GeometricDet*> theNegativeGeometricDets;
11 if (negTOBRod !=
nullptr)
12 theNegativeGeometricDets = negTOBRod->
components();
13 vector<const GeometricDet*> thePositiveGeometricDets;
14 if (posTOBRod !=
nullptr)
15 thePositiveGeometricDets = posTOBRod->
components();
17 vector<const GeometricDet*> allGeometricDets = theNegativeGeometricDets;
18 allGeometricDets.insert(allGeometricDets.end(), thePositiveGeometricDets.begin(), thePositiveGeometricDets.end());
20 vector<const GeomDet*> innerGeomDets;
21 vector<const GeomDet*> outerGeomDets;
23 double meanR = (allGeometricDets[0]->positionBounds().perp() + allGeometricDets[1]->positionBounds().perp()) / 2;
24 for (vector<const GeometricDet*>::iterator it = allGeometricDets.begin(); it != allGeometricDets.end(); it++) {
25 const GeomDet* theGeomDet = theGeomDetGeometry->
idToDet((*it)->geographicalId());
27 if ((*it)->positionBounds().perp() < meanR)
28 innerGeomDets.push_back(theGeomDet);
30 if ((*it)->positionBounds().perp() > meanR)
31 outerGeomDets.push_back(theGeomDet);
36 return new TOBRod(innerGeomDets, outerGeomDets);
TOBRod * build(const GeometricDet *negTOBRod, const GeometricDet *posTOBRod, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
ConstGeometricDetContainer & components()
const TrackerGeomDet * idToDet(DetId) const override