CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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( fabs((*it)->positionBounds().z()) < fabs(meanZ) )
26  theInnerWedges.push_back(myWedgeBuilder.build(*it,theGeomDetGeometry));
27 
28  if( fabs((*it)->positionBounds().z()) > fabs(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)
TECPetal * build(const GeometricDet *aTECPetal, const TrackerGeometry *theGeomDetGeometry)
GeometricDetContainer & components()
Definition: GeometricDet.h:163