CMS 3D CMS Logo

List of all members | Public Member Functions
TECPetalBuilder Class Reference

#include <TECPetalBuilder.h>

Public Member Functions

TECPetalbuild (const GeometricDet *aTECPetal, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
 
 TECPetalBuilder ()
 

Detailed Description

A concrete builder for TECPetal

Definition at line 15 of file TECPetalBuilder.h.

Constructor & Destructor Documentation

TECPetalBuilder::TECPetalBuilder ( )
inline

Definition at line 17 of file TECPetalBuilder.h.

References build().

17 {};

Member Function Documentation

TECPetal * TECPetalBuilder::build ( const GeometricDet aTECPetal,
const TrackerGeometry theGeomDetGeometry 
)

Definition at line 8 of file TECPetalBuilder.cc.

References funct::abs(), TECWedgeBuilder::build(), and GeometricDet::components().

Referenced by TECLayerBuilder::build(), and TECPetalBuilder().

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