10 vector<const GeometricDet*> allGeometricDets = thePhase2OTBarrelRod->
components();
11 vector<const GeometricDet*> compGeometricDets;
12 LogDebug(
"TkDetLayers") <<
"Phase2OTBarrelRodBuilder with #Modules: " << allGeometricDets.size() << std::endl;
14 vector<const GeomDet*> innerGeomDets;
15 vector<const GeomDet*> outerGeomDets;
16 vector<const GeomDet*> innerGeomDetBrothers;
17 vector<const GeomDet*> outerGeomDetBrothers;
20 double meanRBrothers = 0;
21 for(vector<const GeometricDet*>::const_iterator it=allGeometricDets.begin(); it!=allGeometricDets.end();it++){
22 compGeometricDets = (*it)->components();
23 if (compGeometricDets.size() != 2){
24 LogDebug(
"TkDetLayers") <<
" Stack not with two components but with " << compGeometricDets.size() << std::endl;
28 meanR = meanR + compGeometricDets[0]->positionBounds().perp();
29 meanRBrothers = meanRBrothers + compGeometricDets[1]->positionBounds().perp();
33 meanR = meanR/allGeometricDets.size();
34 meanRBrothers = meanRBrothers/allGeometricDets.size();
35 LogDebug(
"TkDetLayers") <<
" meanR Lower " << meanR << std::endl;
36 LogDebug(
"TkDetLayers") <<
" meanR Upper " << meanRBrothers << std::endl;
38 for(vector<const GeometricDet*>::iterator it=allGeometricDets.begin(); it!=allGeometricDets.end(); it++){
39 compGeometricDets = (*it)->components();
40 const GeomDet* theGeomDet = theGeomDetGeometry->
idToDet( compGeometricDets[0]->geographicalID() );
41 LogTrace(
"TkDetLayers") <<
" inserisco " << compGeometricDets[0]->geographicalID().rawId() << std::endl;
43 if( compGeometricDets[0]->positionBounds().
perp() < meanR)
44 innerGeomDets.push_back(theGeomDet);
46 if( compGeometricDets[0]->positionBounds().
perp() > meanR)
47 outerGeomDets.push_back(theGeomDet);
49 const GeomDet* theGeomDetBrother = theGeomDetGeometry->
idToDet( compGeometricDets[1]->geographicalID() );
50 LogTrace(
"TkDetLayers") <<
" inserisco " << compGeometricDets[1]->geographicalID().rawId() << std::endl;
51 if( compGeometricDets[1]->positionBounds().
perp() < meanRBrothers)
52 innerGeomDetBrothers.push_back(theGeomDetBrother);
54 if( compGeometricDets[1]->positionBounds().
perp() > meanRBrothers)
55 outerGeomDetBrothers.push_back(theGeomDetBrother);
58 LogDebug(
"TkDetLayers") <<
"innerGeomDets.size(): " << innerGeomDets.size() ;
59 LogDebug(
"TkDetLayers") <<
"outerGeomDets.size(): " << outerGeomDets.size() ;
60 LogDebug(
"TkDetLayers") <<
"innerGeomDetsBro.size(): " << innerGeomDetBrothers.size() ;
61 LogDebug(
"TkDetLayers") <<
"outerGeomDetsBro.size(): " << outerGeomDetBrothers.size() ;
63 return new Phase2OTBarrelRod(innerGeomDets,outerGeomDets,innerGeomDetBrothers,outerGeomDetBrothers);
ConstGeometricDetContainer & components()
T perp() const
Magnitude of transverse component.
virtual const TrackerGeomDet * idToDet(DetId) const