CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CmsDetConstruction.cc
Go to the documentation of this file.
4 
6  DDFilteredView& fv,
7  GeometricDet *mother,
8  std::string attribute){
9 
10  //
11  // at this level I check whether it is a merged detector or not
12  //
13 
16  //
17  // I have to go one step lower ...
18  //
19  bool dodets = fv.firstChild(); // descend to the first Layer
20  while (dodets) {
21  buildSmallDets(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  mother->addComponent(det);
31 }
32 
34  DDFilteredView& fv,
35  GeometricDet *mother,
36  std::string attribute){
37 
38  GeometricDet * det =
39  new GeometricDet(&fv,
41  static const std::string stereo = "TrackerStereoDetectors";
42  if (ExtractStringFromDDD::getString(stereo,&fv) == "true"){
43  uint32_t temp = 1;
44  det->setGeographicalID(DetId(temp));
45  }else{
46  uint32_t temp = 2;
47  det->setGeographicalID(DetId(temp));
48  }
49 
50  mother->addComponent(det);
51 }
52 
static std::string getString(std::string const &, DDFilteredView *)
bool parent()
set the current node to the parent node ...
void buildSmallDets(DDFilteredView &, GeometricDet *, std::string)
void setGeographicalID(DetId id) const
Definition: GeometricDet.h:74
void addComponent(GeometricDet *)
bool nextSibling()
set the current node to the next sibling ...
void buildComponent(DDFilteredView &, GeometricDet *, std::string)
Definition: DetId.h:20
bool firstChild()
set the current node to the first child ...
GeometricDet::GeometricEnumType type(std::string const &) const
CmsTrackerStringToEnum theCmsTrackerStringToEnum