CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
TIDRingBuilder Class Reference

#include <TIDRingBuilder.h>

Public Member Functions

TIDRingbuild (const GeometricDet *aTIDRing, const TrackerGeometry *theGeomDetGeometry) __attribute__((cold))
 
 TIDRingBuilder ()
 

Detailed Description

A concrete builder for TIDRing

Definition at line 15 of file TIDRingBuilder.h.

Constructor & Destructor Documentation

TIDRingBuilder::TIDRingBuilder ( )
inline

Definition at line 17 of file TIDRingBuilder.h.

17 {};

Member Function Documentation

TIDRing * TIDRingBuilder::build ( const GeometricDet aTIDRing,
const TrackerGeometry theGeomDetGeometry 
)

Definition at line 6 of file TIDRingBuilder.cc.

References funct::abs(), GeometricDet::components(), TrackerGeometry::idToDet(), and align::TIDRing.

Referenced by TIDLayerBuilder::build().

8 {
9  vector<const GeometricDet*> theGeometricDets = aTIDRing->components();
10  //edm::LogInfo(TkDetLayers) << "theGeometricDets.size(): " << theGeometricDets.size() ;
11 
12 
13  vector<const GeomDet*> innerGeomDets;
14  vector<const GeomDet*> outerGeomDets;
15 
16  //---- to evaluate meanZ
17  double meanZ = 0;
18  for(vector<const GeometricDet*>::const_iterator it=theGeometricDets.begin();
19  it!=theGeometricDets.end();it++){
20  meanZ = meanZ + (*it)->positionBounds().z();
21  }
22  meanZ = meanZ/theGeometricDets.size();
23  //----
24 
25  for(vector<const GeometricDet*>::const_iterator it=theGeometricDets.begin();
26  it!=theGeometricDets.end();it++){
27 
28  const GeomDet* theGeomDet = theGeomDetGeometry->idToDet( (*it)->geographicalID() );
29 
30  if( std::abs( (*it)->positionBounds().z() ) < std::abs(meanZ))
31  innerGeomDets.push_back(theGeomDet);
32 
33  if( std::abs( (*it)->positionBounds().z() ) > std::abs(meanZ))
34  outerGeomDets.push_back(theGeomDet);
35  }
36 
37  //edm::LogInfo(TkDetLayers) << "innerGeomDets.size(): " << innerGeomDets.size() ;
38  //edm::LogInfo(TkDetLayers) << "outerGeomDets.size(): " << outerGeomDets.size() ;
39 
40  return new TIDRing(innerGeomDets,outerGeomDets);
41 }
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:169
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual const TrackerGeomDet * idToDet(DetId) const