CMS 3D CMS Logo

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

#include <CmsDetConstruction.h>

Inheritance diagram for CmsDetConstruction:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

Public Member Functions

void buildComponent (DDFilteredView &, GeometricDet *, std::string) override
 
- 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 buildDets (DDFilteredView &, GeometricDet *, std::string)
 
void buildSmallDetsforGlued (DDFilteredView &, GeometricDet *, const std::string &)
 
void buildSmallDetsforStack (DDFilteredView &, GeometricDet *, const std::string &)
 

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

Adds GeometricDets representing final modules to the previous level

Definition at line 9 of file CmsDetConstruction.h.

Member Function Documentation

void CmsDetConstruction::buildComponent ( DDFilteredView fv,
GeometricDet mother,
std::string  attribute 
)
overridevirtual

Implements CmsTrackerLevelBuilder.

Definition at line 5 of file CmsDetConstruction.cc.

References GeometricDet::addComponent(), buildSmallDetsforGlued(), buildSmallDetsforStack(), DDFilteredView::firstChild(), ExtractStringFromDDD::getString(), GeometricDet::mergedDet, DDFilteredView::nextSibling(), GeometricDet::OTPhase2Stack, DDFilteredView::parent(), CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, and CmsTrackerStringToEnum::type().

Referenced by CmsTrackerOTRingBuilder::buildComponent(), CmsTrackerStringBuilder::buildComponent(), CmsTrackerRodBuilder::buildComponent(), CmsTrackerRingBuilder::buildComponent(), CmsTrackerPixelPhase2RingBuilder::buildComponent(), CmsTrackerPanelBuilder::buildComponent(), and CmsTrackerLadderBuilder::buildComponent().

7  {
8 
9  //
10  // at this level I check whether it is a merged detector or not
11  //
12 
14 
15  //Phase1 mergedDet: searching for sensors
17 
18  // I have to go one step lower ...
19  bool dodets = fv.firstChild(); // descend to the first Layer
20  while (dodets) {
21  buildSmallDetsforGlued(fv,det,attribute);
22  dodets = fv.nextSibling(); // go to next layer
23  /*
24  Add algo to sort the merged DET
25  */
26  }
27  fv.parent();
28 
29  }
30 
31  //Phase2 stackDet: same procedure, different nomenclature
33 
34  bool dodets = fv.firstChild();
35  while (dodets) {
36  buildSmallDetsforStack(fv,det,attribute);
37  dodets = fv.nextSibling();
38  }
39  fv.parent();
40  }
41 
42  mother->addComponent(det);
43 
44 }
static std::string getString(std::string const &, DDFilteredView *)
bool parent()
set the current node to the parent node ...
void addComponent(GeometricDet *)
bool nextSibling()
set the current node to the next sibling ...
void buildSmallDetsforGlued(DDFilteredView &, GeometricDet *, const std::string &)
void buildSmallDetsforStack(DDFilteredView &, GeometricDet *, const std::string &)
bool firstChild()
set the current node to the first child ...
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
void CmsDetConstruction::buildDets ( DDFilteredView ,
GeometricDet ,
std::string   
)
private
void CmsDetConstruction::buildSmallDetsforGlued ( DDFilteredView fv,
GeometricDet mother,
const std::string &  attribute 
)
private

Definition at line 46 of file CmsDetConstruction.cc.

References GeometricDet::addComponent(), ExtractStringFromDDD::getString(), GeometricDet::setGeographicalID(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, and CmsTrackerStringToEnum::type().

Referenced by buildComponent().

48  {
49 
51  static const std::string stereo = "TrackerStereoDetectors";
52 
53  if (ExtractStringFromDDD::getString(stereo,&fv) == "true"){
54  uint32_t temp = 1;
55  det->setGeographicalID(DetId(temp));
56  }else{
57  uint32_t temp = 2;
58  det->setGeographicalID(DetId(temp));
59  }
60 
61  mother->addComponent(det);
62 }
static std::string getString(std::string const &, DDFilteredView *)
void addComponent(GeometricDet *)
void setGeographicalID(DetId id)
Definition: GeometricDet.h:82
Definition: DetId.h:18
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum
void CmsDetConstruction::buildSmallDetsforStack ( DDFilteredView fv,
GeometricDet mother,
const std::string &  attribute 
)
private

Definition at line 64 of file CmsDetConstruction.cc.

References GeometricDet::addComponent(), ExtractStringFromDDD::getString(), GeometricDet::setGeographicalID(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, CmsTrackerLevelBuilder::theCmsTrackerStringToEnum, and CmsTrackerStringToEnum::type().

Referenced by buildComponent().

66  {
67 
69  static const std::string isLower = "TrackerLowerDetectors";
70  static const std::string isUpper = "TrackerUpperDetectors";
71 
72  if (ExtractStringFromDDD::getString(isLower,&fv) == "true"){
73  uint32_t temp = 1;
74  det->setGeographicalID(DetId(temp));
75  } else if (ExtractStringFromDDD::getString(isUpper,&fv) == "true"){
76  uint32_t temp = 2;
77  det->setGeographicalID(DetId(temp));
78  } else {
79  edm::LogError("DetConstruction") << " module defined in a Stack but not upper either lower!? ";
80  }
81  mother->addComponent(det);
82 }
static std::string getString(std::string const &, DDFilteredView *)
void addComponent(GeometricDet *)
void setGeographicalID(DetId id)
Definition: GeometricDet.h:82
Definition: DetId.h:18
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum