#include <RecoTracker/TkDetLayers/interface/TIDRingBuilder.h>
Public Member Functions | |
TIDRing * | build (const GeometricDet *aTIDRing, const TrackerGeometry *theGeomDetGeometry) |
TIDRingBuilder () |
Definition at line 14 of file TIDRingBuilder.h.
TIDRingBuilder::TIDRingBuilder | ( | ) | [inline] |
TIDRing * TIDRingBuilder::build | ( | const GeometricDet * | aTIDRing, | |
const TrackerGeometry * | theGeomDetGeometry | |||
) |
Definition at line 6 of file TIDRingBuilder.cc.
References GeometricDet::components(), TrackerGeometry::idToDet(), it, and align::TIDRing.
Referenced by TIDLayerBuilder::build().
00008 { 00009 vector<const GeometricDet*> theGeometricDets = aTIDRing->components(); 00010 //edm::LogInfo(TkDetLayers) << "theGeometricDets.size(): " << theGeometricDets.size() ; 00011 00012 00013 vector<const GeomDet*> innerGeomDets; 00014 vector<const GeomDet*> outerGeomDets; 00015 00016 //---- to evaluate meanZ 00017 double meanZ = 0; 00018 for(vector<const GeometricDet*>::const_iterator it=theGeometricDets.begin(); 00019 it!=theGeometricDets.end();it++){ 00020 meanZ = meanZ + (*it)->positionBounds().z(); 00021 } 00022 meanZ = meanZ/theGeometricDets.size(); 00023 //---- 00024 00025 for(vector<const GeometricDet*>::const_iterator it=theGeometricDets.begin(); 00026 it!=theGeometricDets.end();it++){ 00027 00028 const GeomDet* theGeomDet = theGeomDetGeometry->idToDet( (*it)->geographicalID() ); 00029 00030 if( fabs( (*it)->positionBounds().z() ) < fabs(meanZ)) 00031 innerGeomDets.push_back(theGeomDet); 00032 00033 if( fabs( (*it)->positionBounds().z() ) > fabs(meanZ)) 00034 outerGeomDets.push_back(theGeomDet); 00035 } 00036 00037 //edm::LogInfo(TkDetLayers) << "innerGeomDets.size(): " << innerGeomDets.size() ; 00038 //edm::LogInfo(TkDetLayers) << "outerGeomDets.size(): " << outerGeomDets.size() ; 00039 00040 return new TIDRing(innerGeomDets,outerGeomDets); 00041 }