#include <TOBRodBuilder.h>
A concrete builder for TOBRod
Definition at line 14 of file TOBRodBuilder.h.
◆ TOBRodBuilder()
TOBRodBuilder::TOBRodBuilder |
( |
| ) |
|
|
inline |
◆ build()
Definition at line 7 of file TOBRodBuilder.cc.
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);
References GeometricDet::components(), TrackerGeometry::idToDet(), and align::TOBRod.
Referenced by TOBLayerBuilder::build().