CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
CmsTrackerBuilder Class Reference

#include <CmsTrackerBuilder.h>

Inheritance diagram for CmsTrackerBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

Public Member Functions

 CmsTrackerBuilder ()
 
- Public Member Functions inherited from CmsTrackerLevelBuilder
void build (DDFilteredView &, GeometricDet *, std::string) override
 
 ~CmsTrackerLevelBuilder () override
 
- Public Member Functions inherited from CmsTrackerAbstractConstruction
virtual ~CmsTrackerAbstractConstruction ()=default
 

Private Member Functions

void buildComponent (DDFilteredView &, GeometricDet *, std::string) override
 
void sortNS (DDFilteredView &, GeometricDet *) override
 

Additional Inherited Members

- Static Public Member Functions inherited from CmsTrackerLevelBuilder
static double getPhi (const GeometricDet *a)
 
static double getPhiGluedModule (const GeometricDet *a)
 
static double getPhiGluedModuleMirror (const GeometricDet *a)
 
static double getPhiMirror (const GeometricDet *a)
 
static double getPhiModule (const GeometricDet *a)
 
static double getPhiModuleMirror (const GeometricDet *a)
 
static bool isLessModZ (const GeometricDet *a, const GeometricDet *b)
 
static bool isLessR (const GeometricDet *a, const GeometricDet *b)
 
static bool isLessRModule (const GeometricDet *a, const GeometricDet *b)
 
static bool isLessZ (const GeometricDet *a, const GeometricDet *b)
 
static bool phiSortNP (const GeometricDet *a, const GeometricDet *b)
 
static bool subDetByType (const GeometricDet *a, const GeometricDet *b)
 
- Protected Attributes inherited from CmsTrackerLevelBuilder
CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Detailed Description

Abstract Class to construct a Level in the hierarchy

Definition at line 11 of file CmsTrackerBuilder.h.

Constructor & Destructor Documentation

CmsTrackerBuilder::CmsTrackerBuilder ( )

Definition at line 14 of file CmsTrackerBuilder.cc.

15 {}

Member Function Documentation

void CmsTrackerBuilder::buildComponent ( DDFilteredView fv,
GeometricDet g,
std::string  s 
)
overrideprivatevirtual

Implements CmsTrackerLevelBuilder.

Definition at line 18 of file CmsTrackerBuilder.cc.

References GeometricDet::addComponent(), CmsTrackerLevelBuilder::build(), ExtractStringFromDDD::getString(), GeometricDet::OTPhase2Barrel, GeometricDet::OTPhase2EndCap, GeometricDet::PixelBarrel, GeometricDet::PixelEndCap, GeometricDet::PixelPhase1Barrel, GeometricDet::PixelPhase1EndCap, GeometricDet::PixelPhase2Barrel, GeometricDet::PixelPhase2EndCap, GeometricDet::TEC, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, GeometricDet::TIB, GeometricDet::TID, GeometricDet::TOB, and CmsTrackerStringToEnum::type().

19 {
20  CmsTrackerSubStrctBuilder theCmsTrackerSubStrctBuilder;
21  CmsTrackerPixelPhase1EndcapBuilder theCmsTrackerPixelPhase1EndcapBuilder;
22  CmsTrackerPixelPhase2EndcapBuilder theCmsTrackerPixelPhase2EndcapBuilder;
23 
26  {
28  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
29  break;
31  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
32  break;
34  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
35  break;
37  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
38  break;
40  theCmsTrackerPixelPhase1EndcapBuilder.build( fv, subdet, s );
41  break;
43  theCmsTrackerPixelPhase2EndcapBuilder.build( fv, subdet, s );
44  break;
46  theCmsTrackerPixelPhase2EndcapBuilder.build( fv, subdet, s );
47  break;
48  case GeometricDet::TIB:
49  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
50  break;
51  case GeometricDet::TOB:
52  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
53  break;
55  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
56  break;
57  case GeometricDet::TEC:
58  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
59  break;
60  case GeometricDet::TID:
61  theCmsTrackerSubStrctBuilder.build( fv, subdet, s );
62  break;
63  default:
64  edm::LogError( "CmsTrackerBuilder" ) << " ERROR - I was expecting a SubDet, I got a " << ExtractStringFromDDD::getString( s, &fv );
65  }
66 
67  g->addComponent( subdet );
68 }
void addComponent(GeometricDet *)
void build(DDFilteredView &, GeometricDet *, std::string) override
static std::string getString(std::string const &, DDFilteredView *)
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
void CmsTrackerBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
)
overrideprivatevirtual

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 71 of file CmsTrackerBuilder.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), mps_fire::i, GeometricDet::setGeographicalID(), CmsTrackerLevelBuilder::subDetByType(), and groupFilesInBlocks::temp.

72 {
74  std::stable_sort( comp.begin(), comp.end(), subDetByType);
75 
76  for( uint32_t i = 0; i < comp.size(); i++ )
77  {
78  uint32_t temp= comp[i]->type();
79  det->component(i)->setGeographicalID(temp%100); // it relies on the fact that the GeometricDet::GDEnumType enumerators used to identify the subdetectors in the upgrade geometries are equal to the ones of the present detector + n*100
80  }
81 }
void setGeographicalID(DetId id)
Definition: GeometricDet.h:82
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:176
GeometricDet * component(size_t index)
Definition: GeometricDet.h:114
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36
static bool subDetByType(const GeometricDet *a, const GeometricDet *b)