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 
8 TECPetal* TECPetalBuilder::build(const GeometricDet* aTECPetal, const TrackerGeometry* theGeomDetGeometry) {
9  vector<const GeometricDet*> theGeometricWedges = aTECPetal->components();
10  //edm::LogInfo(TkDetLayers) << "theGeometricWedges.size(): " << theGeometricWedges.size() ;
11 
12  vector<const TECWedge*> theInnerWedges;
13  vector<const TECWedge*> theOuterWedges;
14 
15  double meanZ = (theGeometricWedges[0]->positionBounds().z() + theGeometricWedges[1]->positionBounds().z()) / 2;
16 
17  TECWedgeBuilder myWedgeBuilder;
18 
19  for (vector<const GeometricDet*>::const_iterator it = theGeometricWedges.begin(); it != theGeometricWedges.end();
20  it++) {
21  if (std::abs((*it)->positionBounds().z()) < std::abs(meanZ))
22  theInnerWedges.push_back(myWedgeBuilder.build(*it, theGeomDetGeometry));
23 
24  if (std::abs((*it)->positionBounds().z()) > std::abs(meanZ))
25  theOuterWedges.push_back(myWedgeBuilder.build(*it, theGeomDetGeometry));
26  }
27 
28  //edm::LogInfo(TkDetLayers) << "theInnerWededges.size(): " << theInnerWedges.size() ;
29  //edm::LogInfo(TkDetLayers) << "theOuterWededges.size(): " << theOuterWedges.size() ;
30 
31  return new CompositeTECPetal(theInnerWedges, theOuterWedges);
32 }
CompositeTECPetal
Definition: CompositeTECPetal.h:18
edm
HLT enums.
Definition: AlignableModifier.h:19
GeometricDet::components
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:150
TECWedgeBuilder::build
TECWedge * build(const GeometricDet *aTECWedge, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: TECWedgeBuilder.cc:8
CompositeTECPetal.h
TECWedgeBuilder.h
TECPetalBuilder::build
TECPetal * build(const GeometricDet *aTECPetal, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
Definition: TECPetalBuilder.cc:8
GeometricDet
Definition: GeometricDet.h:31
TECPetalBuilder.h
TECWedgeBuilder
Definition: TECWedgeBuilder.h:14
std
Definition: JetResolutionObject.h:76
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
TrackerGeometry
Definition: TrackerGeometry.h:14