CMS 3D CMS Logo

CmsDetConstruction.cc
Go to the documentation of this file.
4 
6  GeometricDet *mother,
7  std::string attribute){
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 }
45 
47  GeometricDet *mother,
48  std::string attribute){
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 }
63 
65  GeometricDet *mother,
66  std::string attribute){
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 *)
bool parent()
set the current node to the parent node ...
void addComponent(GeometricDet *)
bool nextSibling()
set the current node to the next sibling ...
void setGeographicalID(DetId id)
Definition: GeometricDet.h:82
void buildComponent(DDFilteredView &, GeometricDet *, std::string)
void buildSmallDetsforGlued(DDFilteredView &, GeometricDet *, std::string)
Definition: DetId.h:18
void buildSmallDetsforStack(DDFilteredView &, GeometricDet *, std::string)
bool firstChild()
set the current node to the first child ...
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum