CMS 3D CMS Logo

TOBRodBuilder Class Reference

A concrete builder for TOBRod. More...

#include <RecoTracker/TkDetLayers/interface/TOBRodBuilder.h>

List of all members.

Public Member Functions

TOBRodbuild (const GeometricDet *negTOBRod, const GeometricDet *posTOBRod, const TrackerGeometry *theGeomDetGeometry)
 TOBRodBuilder ()


Detailed Description

A concrete builder for TOBRod.

Definition at line 14 of file TOBRodBuilder.h.


Constructor & Destructor Documentation

TOBRodBuilder::TOBRodBuilder (  )  [inline]

Definition at line 16 of file TOBRodBuilder.h.

00016 {};


Member Function Documentation

TOBRod * TOBRodBuilder::build ( const GeometricDet negTOBRod,
const GeometricDet posTOBRod,
const TrackerGeometry theGeomDetGeometry 
)

Definition at line 7 of file TOBRodBuilder.cc.

References GeometricDet::components(), TrackerGeometry::idToDet(), it, and align::TOBRod.

Referenced by TOBLayerBuilder::build().

00010 {  
00011   vector<const GeometricDet*>  theNegativeGeometricDets;
00012   if (negTOBRod != 0) theNegativeGeometricDets = negTOBRod->components();
00013   vector<const GeometricDet*>  thePositiveGeometricDets;
00014   if (posTOBRod != 0) thePositiveGeometricDets = posTOBRod->components();
00015 
00016   vector<const GeometricDet*> allGeometricDets = theNegativeGeometricDets;
00017   allGeometricDets.insert(allGeometricDets.end(),thePositiveGeometricDets.begin(),
00018                           thePositiveGeometricDets.end());
00019 
00020   vector<const GeomDet*> innerGeomDets;
00021   vector<const GeomDet*> outerGeomDets;
00022 
00023   double meanR = (allGeometricDets[0]->positionBounds().perp()+allGeometricDets[1]->positionBounds().perp())/2;
00024   for(vector<const GeometricDet*>::iterator it=allGeometricDets.begin();
00025       it!=allGeometricDets.end(); it++){
00026     const GeomDet* theGeomDet = theGeomDetGeometry->idToDet( (*it)->geographicalID() );
00027 
00028     if( (*it)->positionBounds().perp() < meanR) 
00029       innerGeomDets.push_back(theGeomDet);
00030     
00031     if( (*it)->positionBounds().perp() > meanR) 
00032       outerGeomDets.push_back(theGeomDet);
00033     
00034   }
00035   
00036   //LogDebug("TkDetLayers") << "innerGeomDets.size(): " << innerGeomDets.size() ;
00037   //LogDebug("TkDetLayers") << "outerGeomDets.size(): " << outerGeomDets.size() ;
00038   return new TOBRod(innerGeomDets,outerGeomDets);
00039 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:33:40 2009 for CMSSW by  doxygen 1.5.4