11 vector<const GeometricDet*> theNegativeGeometricDets;
12 if (negTOBRod !=
nullptr) theNegativeGeometricDets = negTOBRod->
components();
13 vector<const GeometricDet*> thePositiveGeometricDets;
14 if (posTOBRod !=
nullptr) thePositiveGeometricDets = posTOBRod->
components();
16 vector<const GeometricDet*> allGeometricDets = theNegativeGeometricDets;
17 allGeometricDets.insert(allGeometricDets.end(),thePositiveGeometricDets.begin(),
18 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();
25 it!=allGeometricDets.end(); it++){
26 const GeomDet* theGeomDet = theGeomDetGeometry->
idToDet( (*it)->geographicalID() );
28 if( (*it)->positionBounds().perp() < meanR)
29 innerGeomDets.push_back(theGeomDet);
31 if( (*it)->positionBounds().perp() > meanR)
32 outerGeomDets.push_back(theGeomDet);
38 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