CMS 3D CMS Logo

TECPetalBuilder.cc
Go to the documentation of this file.
1 #include "TECPetalBuilder.h"
2 #include "TECWedgeBuilder.h"
3 #include "CompositeTECPetal.h"
4 
5 using namespace edm;
6 using namespace std;
7 
9  const TrackerGeometry* theGeomDetGeometry)
10 {
11  vector<const GeometricDet*> theGeometricWedges = aTECPetal->components();
12  //edm::LogInfo(TkDetLayers) << "theGeometricWedges.size(): " << theGeometricWedges.size() ;
13 
14  vector<const TECWedge*> theInnerWedges;
15  vector<const TECWedge*> theOuterWedges;
16 
17  double meanZ = ( theGeometricWedges[0]->positionBounds().z() +
18  theGeometricWedges[1]->positionBounds().z() )/2;
19 
20  TECWedgeBuilder myWedgeBuilder;
21 
22 
23  for(vector<const GeometricDet*>::const_iterator it=theGeometricWedges.begin();
24  it!=theGeometricWedges.end();it++){
25  if( std::abs((*it)->positionBounds().z()) < std::abs(meanZ) )
26  theInnerWedges.push_back(myWedgeBuilder.build(*it,theGeomDetGeometry));
27 
28  if( std::abs((*it)->positionBounds().z()) > std::abs(meanZ) )
29  theOuterWedges.push_back(myWedgeBuilder.build(*it,theGeomDetGeometry));
30  }
31 
32  //edm::LogInfo(TkDetLayers) << "theInnerWededges.size(): " << theInnerWedges.size() ;
33  //edm::LogInfo(TkDetLayers) << "theOuterWededges.size(): " << theOuterWedges.size() ;
34 
35  return new CompositeTECPetal(theInnerWedges,theOuterWedges);
36 }
TECWedge * build(const GeometricDet *aTECWedge, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:176
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HLT enums.
TECPetal * build(const GeometricDet *aTECPetal, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))