CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Private Member Functions
CmsTrackerRingBuilder Class Reference

#include <CmsTrackerRingBuilder.h>

Inheritance diagram for CmsTrackerRingBuilder:
CmsTrackerLevelBuilder CmsTrackerAbstractConstruction

Private Member Functions

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

Additional Inherited Members

- Public Member Functions inherited from CmsTrackerLevelBuilder
virtual void build (DDFilteredView &, GeometricDet *, std::string)
 
virtual ~CmsTrackerLevelBuilder ()
 
- Protected Attributes inherited from CmsTrackerLevelBuilder
CmsTrackerStringToEnum theCmsTrackerStringToEnum
 

Detailed Description

Class which constructs TID/TEC rings

Definition at line 10 of file CmsTrackerRingBuilder.h.

Member Function Documentation

void CmsTrackerRingBuilder::buildComponent ( DDFilteredView fv,
GeometricDet g,
std::string  s 
)
privatevirtual

Implements CmsTrackerLevelBuilder.

Definition at line 13 of file CmsTrackerRingBuilder.cc.

References CmsDetConstruction::buildComponent().

13  {
14  CmsDetConstruction theCmsDetConstruction;
15  theCmsDetConstruction.buildComponent(fv,g,s);
16 }
void buildComponent(DDFilteredView &, GeometricDet *, std::string)
void CmsTrackerRingBuilder::sortNS ( DDFilteredView fv,
GeometricDet det 
)
privatevirtual

Reimplemented from CmsTrackerLevelBuilder.

Definition at line 18 of file CmsTrackerRingBuilder.cc.

References GeometricDet::addComponents(), GeometricDet::clearComponents(), AlCaHLTBitMon_QueryRunRegistry::comp, GeometricDet::component(), GeometricDet::components(), GeometricDet::DetUnit, DDFilteredView::firstChild(), ExtractStringFromDDD::getString(), i, GeometricDet::mergedDet, DDFilteredView::parent(), unpackData-CaloStage2::pname, GeometricDet::setGeographicalID(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, TrackerStablePhiSort(), GeometricDet::translation(), and z.

18  {
20  fv.firstChild();
23 
24 
25  switch(comp.front()->type()) {
26 
28  TrackerStablePhiSort(comp.begin(), comp.end(), ExtractPhiGluedModule());
29  break;
31  TrackerStablePhiSort(comp.begin(), comp.end(), ExtractPhi());
32  break;
33  default:
34  edm::LogError("CmsTrackerRingBuilder")<<"ERROR - wrong SubDet to sort..... "<<det->components().front()->type();
35  }
36 
37  static std::string const part("TkDDDStructure");
38  static std::string const TECGluedDet("TECGluedDet");
39  static std::string const TECDet("TECDet");
40 
42 
43  // TEC
44  // Module Number: 3 bits [1,...,5 at most]
45  if(pname== TECGluedDet || pname == TECDet){
46 
47  // TEC-
48  if( det->translation().z() < 0 && pname == TECDet) {
49  TrackerStablePhiSort(comp.begin(), comp.end(), ExtractPhiMirror());
50  }
51 
52  if( det->translation().z() < 0 && pname == TECGluedDet) {
53  TrackerStablePhiSort(comp.begin(), comp.end(), ExtractPhiGluedModuleMirror());
54  }
55 
56  for(uint32_t i=0; i<comp.size();i++)
57  det->component(i)->setGeographicalID(i+1);
58 
59  } else {
60  // TID
61  // Ring Side: 2 bits [back:1 front:2]
62  // Module Number: 5 bits [1,...,20 at most]
63  //
64  for(uint32_t i=0; i<comp.size();i++){
65  if(fabs(comp[i]->translation().z())<fabs(det->translation().z())){
66  compfw.push_back(det->component(i));
67  } else {
68  compbw.push_back(det->component(i));
69  }
70  }
71 
72  for(uint32_t i=0; i<compbw.size();i++){
73  uint32_t temp = i+1;
74  temp |=(1<<5);
75  compbw[i]->setGeographicalID(temp);
76  }
77 
78  for(uint32_t i=0; i<compfw.size();i++){
79  uint32_t temp = i+1;
80  temp |=(2<<5);
81  compfw[i]->setGeographicalID(temp);
82  }
83 
84  det->clearComponents();
85  det->addComponents(compfw);
86  det->addComponents(compbw);
87 
88  }
89 
90  fv.parent();
91 
92 }
static std::string getString(std::string const &, DDFilteredView *)
int i
Definition: DBlmapReader.cc:9
bool parent()
set the current node to the parent node ...
void clearComponents()
Definition: GeometricDet.h:96
void setGeographicalID(DetId id)
Definition: GeometricDet.h:80
std::vector< GeometricDet * > GeometricDetContainer
Definition: GeometricDet.h:37
ConstGeometricDetContainer & components()
Definition: GeometricDet.h:174
void TrackerStablePhiSort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
DDTranslation const & translation() const
Definition: GeometricDet.h:123
GeometricDet * component(size_t index)
Definition: GeometricDet.h:112
std::vector< GeometricDet const * > ConstGeometricDetContainer
Definition: GeometricDet.h:36
part
Definition: HCALResponse.h:20
void addComponents(GeometricDetContainer const &cont)
bool firstChild()
set the current node to the first child ...