#include <RecoTracker/TkDetLayers/interface/TOBRodBuilder.h>
Public Member Functions | |
TOBRod * | build (const GeometricDet *negTOBRod, const GeometricDet *posTOBRod, const TrackerGeometry *theGeomDetGeometry) |
TOBRodBuilder () |
Definition at line 14 of file TOBRodBuilder.h.
TOBRodBuilder::TOBRodBuilder | ( | ) | [inline] |
TOBRod * TOBRodBuilder::build | ( | const GeometricDet * | negTOBRod, | |
const GeometricDet * | posTOBRod, | |||
const TrackerGeometry * | theGeomDetGeometry | |||
) |
Definition at line 7 of file TOBRodBuilder.cc.
References GeometricDet::components(), TrackerGeometry::idToDet(), it, and align::TOBRod.
Referenced by TOBLayerBuilder::build().
00010 { 00011 vector<const GeometricDet*> theNegativeGeometricDets; 00012 if (negTOBRod != 0) theNegativeGeometricDets = negTOBRod->components(); 00013 vector<const GeometricDet*> thePositiveGeometricDets; 00014 if (posTOBRod != 0) thePositiveGeometricDets = posTOBRod->components(); 00015 00016 vector<const GeometricDet*> allGeometricDets = theNegativeGeometricDets; 00017 allGeometricDets.insert(allGeometricDets.end(),thePositiveGeometricDets.begin(), 00018 thePositiveGeometricDets.end()); 00019 00020 vector<const GeomDet*> innerGeomDets; 00021 vector<const GeomDet*> outerGeomDets; 00022 00023 double meanR = (allGeometricDets[0]->positionBounds().perp()+allGeometricDets[1]->positionBounds().perp())/2; 00024 for(vector<const GeometricDet*>::iterator it=allGeometricDets.begin(); 00025 it!=allGeometricDets.end(); it++){ 00026 const GeomDet* theGeomDet = theGeomDetGeometry->idToDet( (*it)->geographicalID() ); 00027 00028 if( (*it)->positionBounds().perp() < meanR) 00029 innerGeomDets.push_back(theGeomDet); 00030 00031 if( (*it)->positionBounds().perp() > meanR) 00032 outerGeomDets.push_back(theGeomDet); 00033 00034 } 00035 00036 //LogDebug("TkDetLayers") << "innerGeomDets.size(): " << innerGeomDets.size() ; 00037 //LogDebug("TkDetLayers") << "outerGeomDets.size(): " << outerGeomDets.size() ; 00038 return new TOBRod(innerGeomDets,outerGeomDets); 00039 }