CMS 3D CMS Logo

CmsDetConstruction.cc
Go to the documentation of this file.
6 
7 template <class FilteredView>
9  GeometricDet* mother,
10  const std::string& attribute) {
11  GeometricDet* det = new GeometricDet(&fv,
14  static const std::string stereo = "TrackerStereoDetectors";
15 
16  if (ExtractStringFromDDD<FilteredView>::getString(stereo, &fv) == "true") {
17  uint32_t temp = 1;
18  det->setGeographicalID(DetId(temp));
19  } else {
20  uint32_t temp = 2;
21  det->setGeographicalID(DetId(temp));
22  }
23 
24  mother->addComponent(det);
25 }
26 
27 template <class FilteredView>
29  GeometricDet* mother,
30  const std::string& attribute) {
31  GeometricDet* det = new GeometricDet(&fv,
34  static const std::string isLower = "TrackerLowerDetectors";
35  static const std::string isUpper = "TrackerUpperDetectors";
36 
37  if (ExtractStringFromDDD<FilteredView>::getString(isLower, &fv) == "true") {
38  uint32_t temp = 1;
39  det->setGeographicalID(DetId(temp));
40  } else if (ExtractStringFromDDD<FilteredView>::getString(isUpper, &fv) == "true") {
41  uint32_t temp = 2;
42  det->setGeographicalID(DetId(temp));
43  } else {
44  edm::LogError("DetConstruction") << " module defined in a Stack but not upper either lower!? ";
45  }
46  mother->addComponent(det);
47 }
48 
49 template <class FilteredView>
51  GeometricDet* mother,
52  const std::string& attribute) {
53  //
54  // at this level I check whether it is a merged detector or not
55  //
56 
57  GeometricDet* det = new GeometricDet(&fv,
60 
61  //Phase1 mergedDet: searching for sensors
64  // I have to go one step lower ...
65  bool dodets = fv.firstChild(); // descend to the first Layer
66  while (dodets) {
67  buildSmallDetsforGlued(fv, det, attribute);
68  dodets = fv.nextSibling(); // go to next layer
69  /*
70  Add algo to sort the merged DET
71  */
72  }
73  fv.parent();
74 
75  }
76 
77  //Phase2 stackDet: same procedure, different nomenclature
80  bool dodets = fv.firstChild();
81  while (dodets) {
82  buildSmallDetsforStack(fv, det, attribute);
83  dodets = fv.nextSibling();
84  }
85  fv.parent();
86  }
87 
88  mother->addComponent(det);
89 }
90 
type
Definition: HCALResponse.h:21
void addComponent(GeometricDet *)
void setGeographicalID(DetId id)
Definition: GeometricDet.h:97
void buildSmallDetsforStack(FilteredView &, GeometricDet *, const std::string &)
void buildSmallDetsforGlued(FilteredView &, GeometricDet *, const std::string &)
Definition: DetId.h:17
void buildComponent(FilteredView &, GeometricDet *, const std::string &) override