![]() |
![]() |
#include <RecoTracker/TkDetLayers/interface/TECWedgeBuilder.h>
Public Member Functions | |
TECWedge * | build (const GeometricDet *aTECWedge, const TrackerGeometry *theGeomDetGeometry) |
TECWedgeBuilder () |
Definition at line 14 of file TECWedgeBuilder.h.
TECWedgeBuilder::TECWedgeBuilder | ( | ) | [inline] |
TECWedge * TECWedgeBuilder::build | ( | const GeometricDet * | aTECWedge, | |
const TrackerGeometry * | theGeomDetGeometry | |||
) |
Definition at line 8 of file TECWedgeBuilder.cc.
References GeometricDet::components(), TrackerGeometry::idToDet(), and it.
Referenced by TECPetalBuilder::build().
00010 { 00011 vector<const GeometricDet*> theGeometricDets = aTECWedge->components(); 00012 //edm::LogInfo(TkDetLayers) << "theGeometricDets.size(): " << theGeometricDets.size() ; 00013 00014 if(theGeometricDets.size() == 1 ) { 00015 const GeomDet* theGeomDet = 00016 theGeomDetGeometry->idToDet( theGeometricDets.front()->geographicalID() ); 00017 return new SimpleTECWedge(theGeomDet); 00018 } 00019 00020 vector<const GeomDet*> innerGeomDets; 00021 vector<const GeomDet*> outerGeomDets; 00022 00023 //---- to evaluate meanZ 00024 double meanZ = 0; 00025 for(vector<const GeometricDet*>::const_iterator it=theGeometricDets.begin(); 00026 it!=theGeometricDets.end();it++){ 00027 meanZ = meanZ + (*it)->positionBounds().z(); 00028 } 00029 00030 meanZ = meanZ/theGeometricDets.size(); 00031 //edm::LogInfo(TkDetLayers) << "meanZ: " << meanZ ; 00032 //---- 00033 00034 for(vector<const GeometricDet*>::const_iterator it=theGeometricDets.begin(); 00035 it!=theGeometricDets.end();it++){ 00036 //double theGeometricDetRposition = (*it)->positionBounds().perp(); 00037 const GeomDet* theGeomDet = theGeomDetGeometry->idToDet( (*it)->geographicalID() ); 00038 //double theGeomDetRposition = theGeomDet->surface().position().perp(); 00039 00040 if( fabs( (*it)->positionBounds().z() ) < fabs(meanZ)) 00041 innerGeomDets.push_back(theGeomDet); 00042 00043 if( fabs( (*it)->positionBounds().z() ) > fabs(meanZ)) 00044 outerGeomDets.push_back(theGeomDet); 00045 } 00046 00047 //edm::LogInfo(TkDetLayers) << "innerGeomDets.size(): " << innerGeomDets.size() ; 00048 //edm::LogInfo(TkDetLayers) << "outerGeomDets.size(): " << outerGeomDets.size() ; 00049 00050 return new CompositeTECWedge(innerGeomDets,outerGeomDets); 00051 }