CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
TrackerAlignmentLevelBuilder Class Reference

#include <TrackerAlignmentLevelBuilder.h>

Public Member Functions

void addDetUnitInfo (const DetId &detId)
 
std::vector< align::AlignmentLevelsbuild ()
 
const AlignableObjectIdobjectIdProvider () const
 
 TrackerAlignmentLevelBuilder (const TrackerTopology *, const TrackerGeometry *)
 
const align::TrackerNameSpacetrackerNameSpace () const
 
virtual ~TrackerAlignmentLevelBuilder ()
 

Private Member Functions

void addPXBDetUnitInfo (const DetId &detId)
 
void addPXEDetUnitInfo (const DetId &detId)
 
void addTECDetUnitInfo (const DetId &detId)
 
void addTIBDetUnitInfo (const DetId &detId)
 
void addTIDDetUnitInfo (const DetId &detId)
 
void addTOBDetUnitInfo (const DetId &detId)
 
align::AlignmentLevels buildPXBAlignmentLevels ()
 
align::AlignmentLevels buildPXEAlignmentLevels ()
 
align::AlignmentLevels buildTECAlignmentLevels ()
 
align::AlignmentLevels buildTIBAlignmentLevels ()
 
align::AlignmentLevels buildTIDAlignmentLevels ()
 
align::AlignmentLevels buildTOBAlignmentLevels ()
 

Private Attributes

const AlignableObjectId alignableObjectId_
 
bool levelsBuilt_ {false}
 
std::set< unsigned int > pxbLadderIDs_
 
std::map< unsigned int, unsigned int > pxbLaddersPerLayer_
 
std::set< unsigned int > pxbLayerIDs_
 
std::set< unsigned int > pxbModuleIDs_
 
std::map< unsigned int, unsigned int > pxbStringsPerHalfShell_
 
std::set< unsigned int > pxeBladeIDs_
 
std::set< unsigned int > pxeDiskIDs_
 
std::set< unsigned int > pxeModuleIDs_
 
std::set< unsigned int > pxePanelIDs_
 
std::set< unsigned int > pxeSideIDs_
 
std::set< unsigned int > tecModuleIDs_
 
std::set< unsigned int > tecPetalIDs_
 
std::set< unsigned int > tecRingIDs_
 
std::set< unsigned int > tecSideIDs_
 
std::set< unsigned int > tecWheelIDs_
 
std::set< unsigned int > tibLayerIDs_
 
std::set< unsigned int > tibModuleIDs_
 
std::set< unsigned int > tibSideIDs_
 
std::set< unsigned int > tibStringIDs_
 
std::set< unsigned int > tidModuleIDs_
 
std::set< unsigned int > tidRingIDs_
 
std::set< unsigned int > tidSideIDs_
 
std::map< unsigned int, unsigned int > tidStringsInnerLayer_
 
std::map< unsigned int, unsigned int > tidStringsOuterLayer_
 
std::set< unsigned int > tidWheelIDs_
 
std::set< unsigned int > tobLayerIDs_
 
std::set< unsigned int > tobModuleIDs_
 
std::set< unsigned int > tobRodIDs_
 
std::set< unsigned int > tobSideIDs_
 
align::TrackerNameSpace trackerNameSpace_
 
const TrackerTopologytrackerTopology_
 

Detailed Description

Definition at line 24 of file TrackerAlignmentLevelBuilder.h.

Constructor & Destructor Documentation

TrackerAlignmentLevelBuilder::TrackerAlignmentLevelBuilder ( const TrackerTopology trackerTopology,
const TrackerGeometry trackerGeometry 
)

Definition at line 19 of file TrackerAlignmentLevelBuilder.cc.

References ~TrackerAlignmentLevelBuilder().

20  :
21  trackerTopology_(trackerTopology),
22  alignableObjectId_(trackerGeometry, nullptr, nullptr),
23  trackerNameSpace_(trackerTopology)
24 {
25 }
const AlignableObjectId alignableObjectId_
TrackerAlignmentLevelBuilder::~TrackerAlignmentLevelBuilder ( )
virtual

Definition at line 29 of file TrackerAlignmentLevelBuilder.cc.

References addDetUnitInfo().

Referenced by TrackerAlignmentLevelBuilder().

30 {
31 }

Member Function Documentation

void TrackerAlignmentLevelBuilder::addDetUnitInfo ( const DetId detId)

Definition at line 35 of file TrackerAlignmentLevelBuilder.cc.

References addPXBDetUnitInfo(), addPXEDetUnitInfo(), addTECDetUnitInfo(), addTIBDetUnitInfo(), addTIDDetUnitInfo(), addTOBDetUnitInfo(), build(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, and StripSubdetector::TOB.

Referenced by ~TrackerAlignmentLevelBuilder().

36 {
37  int subdetId = detId.subdetId();
38 
39  switch (subdetId) {
42  case StripSubdetector::TIB: addTIBDetUnitInfo(detId); break;
43  case StripSubdetector::TID: addTIDDetUnitInfo(detId); break;
44  case StripSubdetector::TOB: addTOBDetUnitInfo(detId); break;
45  case StripSubdetector::TEC: addTECDetUnitInfo(detId); break;
46  }
47 }
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
void addPXBDetUnitInfo(const DetId &detId)
void TrackerAlignmentLevelBuilder::addPXBDetUnitInfo ( const DetId detId)
private

Definition at line 86 of file TrackerAlignmentLevelBuilder.cc.

References addPXEDetUnitInfo(), edm::eventsetup::heterocontainer::insert(), TrackerTopology::module(), TrackerTopology::pxbLadder(), pxbLadderIDs_, pxbLaddersPerLayer_, TrackerTopology::pxbLayer(), pxbLayerIDs_, pxbModuleIDs_, and trackerTopology_.

Referenced by addDetUnitInfo(), objectIdProvider(), and trackerNameSpace().

87 {
88  auto layerID = trackerTopology_->pxbLayer(detId);
89  auto ladderID = trackerTopology_->pxbLadder(detId);
90  auto moduleID = trackerTopology_->module(detId);
91 
92  if (pxbLaddersPerLayer_[layerID-1] < ladderID) {
93  pxbLaddersPerLayer_[layerID-1] = ladderID;
94  }
95 
96  pxbLayerIDs_. insert(layerID);
97  pxbLadderIDs_.insert(ladderID);
98  pxbModuleIDs_.insert(moduleID);
99 }
std::map< unsigned int, unsigned int > pxbLaddersPerLayer_
unsigned int pxbLadder(const DetId &id) const
unsigned int module(const DetId &id) const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
unsigned int pxbLayer(const DetId &id) const
void TrackerAlignmentLevelBuilder::addPXEDetUnitInfo ( const DetId detId)
private

Definition at line 103 of file TrackerAlignmentLevelBuilder.cc.

References addTIBDetUnitInfo(), edm::eventsetup::heterocontainer::insert(), TrackerTopology::module(), pxeBladeIDs_, pxeDiskIDs_, pxeModuleIDs_, pxePanelIDs_, pxeSideIDs_, TrackerTopology::pxfBlade(), TrackerTopology::pxfDisk(), TrackerTopology::pxfPanel(), TrackerTopology::pxfSide(), and trackerTopology_.

Referenced by addDetUnitInfo(), addPXBDetUnitInfo(), and objectIdProvider().

104 {
105  auto sideID = trackerTopology_->pxfSide(detId);
106  auto diskID = trackerTopology_->pxfDisk(detId);
107  auto bladeID = trackerTopology_->pxfBlade(detId);
108  auto panelID = trackerTopology_->pxfPanel(detId);
109  auto moduleID = trackerTopology_->module(detId);
110 
111  pxeSideIDs_. insert(sideID);
112  pxeDiskIDs_. insert(diskID);
113  pxeBladeIDs_. insert(bladeID);
114  pxePanelIDs_. insert(panelID);
115  pxeModuleIDs_.insert(moduleID);
116 }
unsigned int pxfDisk(const DetId &id) const
unsigned int module(const DetId &id) const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
unsigned int pxfSide(const DetId &id) const
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
void TrackerAlignmentLevelBuilder::addTECDetUnitInfo ( const DetId detId)
private

Definition at line 177 of file TrackerAlignmentLevelBuilder.cc.

References buildPXBAlignmentLevels(), edm::eventsetup::heterocontainer::insert(), TrackerTopology::module(), tecModuleIDs_, tecPetalIDs_, TrackerTopology::tecPetalNumber(), TrackerTopology::tecRing(), tecRingIDs_, TrackerTopology::tecSide(), tecSideIDs_, TrackerTopology::tecWheel(), tecWheelIDs_, and trackerTopology_.

Referenced by addDetUnitInfo(), addTOBDetUnitInfo(), and objectIdProvider().

178 {
179  auto sideID = trackerTopology_->tecSide(detId);
180  auto wheelID = trackerTopology_->tecWheel(detId);
181  auto petalID = trackerTopology_->tecPetalNumber(detId);
182  auto ringID = trackerTopology_->tecRing(detId);
183  auto moduleID = trackerTopology_->module(detId);
184 
185  tecSideIDs_. insert(sideID);
186  tecWheelIDs_. insert(wheelID);
187  tecPetalIDs_. insert(petalID);
188  tecRingIDs_. insert(ringID);
189  tecModuleIDs_.insert(moduleID);
190 }
unsigned int tecRing(const DetId &id) const
ring id
unsigned int module(const DetId &id) const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
unsigned int tecPetalNumber(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tecSide(const DetId &id) const
void TrackerAlignmentLevelBuilder::addTIBDetUnitInfo ( const DetId detId)
private

Definition at line 120 of file TrackerAlignmentLevelBuilder.cc.

References addTIDDetUnitInfo(), edm::eventsetup::heterocontainer::insert(), TrackerTopology::module(), TrackerTopology::tibLayer(), tibLayerIDs_, tibModuleIDs_, TrackerTopology::tibOrder(), TrackerTopology::tibSide(), tibSideIDs_, TrackerTopology::tibString(), tibStringIDs_, tidStringsInnerLayer_, tidStringsOuterLayer_, and trackerTopology_.

Referenced by addDetUnitInfo(), addPXEDetUnitInfo(), and objectIdProvider().

121 {
122  auto sideID = trackerTopology_->tibSide(detId);
123  auto layerID = trackerTopology_->tibLayer(detId);
124  auto layerSide = trackerTopology_->tibOrder(detId);
125  auto stringID = trackerTopology_->tibString(detId);
126  auto moduleID = trackerTopology_->module(detId);
127 
128  if (layerSide == 1) {
129  if (tidStringsInnerLayer_[layerID-1] < stringID) {
130  tidStringsInnerLayer_[layerID-1] = stringID;
131  }
132  } else {
133  if (tidStringsOuterLayer_[layerID-1] < stringID) {
134  tidStringsOuterLayer_[layerID-1] = stringID;
135  }
136  }
137 
138  tibSideIDs_. insert(sideID);
139  tibLayerIDs_. insert(layerID);
140  tibStringIDs_.insert(stringID);
141  tibModuleIDs_.insert(moduleID);
142 }
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
unsigned int module(const DetId &id) const
unsigned int tibSide(const DetId &id) const
std::map< unsigned int, unsigned int > tidStringsOuterLayer_
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
std::map< unsigned int, unsigned int > tidStringsInnerLayer_
unsigned int tibOrder(const DetId &id) const
void TrackerAlignmentLevelBuilder::addTIDDetUnitInfo ( const DetId detId)
private

Definition at line 146 of file TrackerAlignmentLevelBuilder.cc.

References addTOBDetUnitInfo(), edm::eventsetup::heterocontainer::insert(), TrackerTopology::module(), tidModuleIDs_, TrackerTopology::tidRing(), tidRingIDs_, TrackerTopology::tidSide(), tidSideIDs_, TrackerTopology::tidWheel(), tidWheelIDs_, and trackerTopology_.

Referenced by addDetUnitInfo(), addTIBDetUnitInfo(), and objectIdProvider().

147 {
148  auto sideID = trackerTopology_->tidSide(detId);
149  auto wheelID = trackerTopology_->tidWheel(detId);
150  auto ringID = trackerTopology_->tidRing(detId);
151  auto moduleID = trackerTopology_->module(detId);
152 
153  // tidOrder
154  tidSideIDs_. insert(sideID);
155  tidWheelIDs_. insert(wheelID);
156  tidRingIDs_. insert(ringID);
157  tidModuleIDs_.insert(moduleID);
158 }
unsigned int tidRing(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int module(const DetId &id) const
unsigned int tidSide(const DetId &id) const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
void TrackerAlignmentLevelBuilder::addTOBDetUnitInfo ( const DetId detId)
private

Definition at line 162 of file TrackerAlignmentLevelBuilder.cc.

References addTECDetUnitInfo(), edm::eventsetup::heterocontainer::insert(), TrackerTopology::module(), TrackerTopology::tobLayer(), tobLayerIDs_, tobModuleIDs_, TrackerTopology::tobRod(), tobRodIDs_, TrackerTopology::tobSide(), tobSideIDs_, and trackerTopology_.

Referenced by addDetUnitInfo(), addTIDDetUnitInfo(), and objectIdProvider().

163 {
164  auto layerID = trackerTopology_->tobLayer(detId);
165  auto sideID = trackerTopology_->tobSide(detId);
166  auto rodID = trackerTopology_->tobRod(detId);
167  auto moduleID = trackerTopology_->module(detId);
168 
169  tobLayerIDs_. insert(layerID);
170  tobSideIDs_. insert(sideID);
171  tobRodIDs_. insert(rodID);
172  tobModuleIDs_.insert(moduleID);
173 }
unsigned int module(const DetId &id) const
unsigned int tobSide(const DetId &id) const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
unsigned int tobRod(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
std::vector< align::AlignmentLevels > TrackerAlignmentLevelBuilder::build ( )

Definition at line 51 of file TrackerAlignmentLevelBuilder.cc.

References buildPXBAlignmentLevels(), buildPXEAlignmentLevels(), buildTECAlignmentLevels(), buildTIBAlignmentLevels(), buildTIDAlignmentLevels(), buildTOBAlignmentLevels(), jets_cff::levels, levelsBuilt_, and trackerNameSpace().

Referenced by addDetUnitInfo(), and psClasses.BuildThread::run().

52 {
53  std::vector<align::AlignmentLevels> levels;
54  levels.push_back(buildPXBAlignmentLevels());
55  levels.push_back(buildPXEAlignmentLevels());
56  levels.push_back(buildTIBAlignmentLevels());
57  levels.push_back(buildTIDAlignmentLevels());
58  levels.push_back(buildTOBAlignmentLevels());
59  levels.push_back(buildTECAlignmentLevels());
60  levelsBuilt_ = true;
61  return levels;
62 }
align::AlignmentLevels buildTOBAlignmentLevels()
align::AlignmentLevels buildPXEAlignmentLevels()
align::AlignmentLevels buildTIDAlignmentLevels()
align::AlignmentLevels buildPXBAlignmentLevels()
align::AlignmentLevels buildTIBAlignmentLevels()
align::AlignmentLevels buildTECAlignmentLevels()
align::AlignmentLevels TrackerAlignmentLevelBuilder::buildPXBAlignmentLevels ( )
private

Definition at line 196 of file TrackerAlignmentLevelBuilder.cc.

References alignableObjectId_, buildPXEAlignmentLevels(), AlignableObjectId::idToString(), align::TrackerNameSpace::TPB::lpqc_, pxbLadderIDs_, pxbLaddersPerLayer_, pxbLayerIDs_, pxbModuleIDs_, align::TrackerNameSpace::tpb_, align::TPBBarrel, align::TPBHalfBarrel, align::TPBLadder, align::TPBLayer, align::TPBModule, and trackerNameSpace_.

Referenced by addTECDetUnitInfo(), build(), and objectIdProvider().

197 {
198  int maxNumModules = pxbModuleIDs_.size();
199  int maxNumLadders = pxbLadderIDs_.size() / 2; // divide by 2 since we have
200  // HalfBarrels
201  int maxNumLayers = pxbLayerIDs_.size();
202 
203  std::ostringstream ss;
204  ss << "determined following numbers for "
205  << alignableObjectId_.idToString(align::TPBBarrel) << " geometry:" << "\n"
206  << " max. number of modules: " << maxNumModules << "\n"
207  << " max. number of ladders: " << maxNumLadders << "\n";
208 
209  for (size_t layer = 0; layer < pxbLaddersPerLayer_.size(); ++layer) {
210  // divide by 4, because we need the ladders per quarter cylinder
211  trackerNameSpace_.tpb_.lpqc_.push_back(pxbLaddersPerLayer_[layer] / 4);
212  ss << " ladders in layer-" << layer << ": "
213  << pxbLaddersPerLayer_[layer] << "\n";
214  }
215 
216  ss << " max. number of layers: " << maxNumLayers;
217  edm::LogInfo("AlignableBuildProcess")
218  << "@SUB=TrackerAlignmentLevelBuilder::buildPXBAlignmentLevels"
219  << ss.str();
220 
222  pxb.push_back(std::make_unique<AlignmentLevel>(align::TPBModule, maxNumModules, false));
223  pxb.push_back(std::make_unique<AlignmentLevel>(align::TPBLadder, maxNumLadders, true));
224  pxb.push_back(std::make_unique<AlignmentLevel>(align::TPBLayer, maxNumLayers, false));
225  pxb.push_back(std::make_unique<AlignmentLevel>(align::TPBHalfBarrel, 2, false));
226  pxb.push_back(std::make_unique<AlignmentLevel>(align::TPBBarrel, 1, false));
227  return pxb;
228 }
std::vector< std::unique_ptr< AlignmentLevel > > AlignmentLevels
Definition: Utilities.h:34
std::map< unsigned int, unsigned int > pxbLaddersPerLayer_
const AlignableObjectId alignableObjectId_
const char * idToString(align::StructureType type) const
std::vector< unsigned int > lpqc_
Number of ladders for each quarter cylinder.
align::AlignmentLevels TrackerAlignmentLevelBuilder::buildPXEAlignmentLevels ( )
private

Definition at line 232 of file TrackerAlignmentLevelBuilder.cc.

References alignableObjectId_, align::TrackerNameSpace::TPE::bpqd_, buildTIBAlignmentLevels(), AlignableObjectId::idToString(), pxeBladeIDs_, pxeDiskIDs_, pxeModuleIDs_, pxePanelIDs_, pxeSideIDs_, align::TrackerNameSpace::tpe_, align::TPEBlade, align::TPEEndcap, align::TPEHalfCylinder, align::TPEHalfDisk, align::TPEModule, align::TPEPanel, and trackerNameSpace_.

Referenced by build(), buildPXBAlignmentLevels(), and objectIdProvider().

233 {
234  int maxNumModules = pxeModuleIDs_.size();
235  int maxNumPanels = pxePanelIDs_.size();
236  int maxNumBlades = pxeBladeIDs_.size() / 2;
237  int maxNumDisks = pxeDiskIDs_.size();
238  int maxNumSides = pxeSideIDs_.size();
239 
240  std::ostringstream ss;
241  ss << "determined following numbers for "
242  << alignableObjectId_.idToString(align::TPEEndcap) << " geometry:" << "\n"
243  << " max. number of modules: " << maxNumModules << "\n"
244  << " max. number of panels: " << maxNumPanels << "\n"
245  << " max. number of blades: " << maxNumBlades << "\n";
246 
247  trackerNameSpace_.tpe_.bpqd_ = maxNumBlades / 2;
248 
249  ss << " blades per quarter disk: " << trackerNameSpace_.tpe_.bpqd_ << "\n"
250  << " max. number of disks: " << maxNumDisks << "\n"
251  << " max. number of sides: " << maxNumSides;
252  edm::LogInfo("AlignableBuildProcess")
253  << "@SUB=TrackerAlignmentLevelBuilder::buildPXEAlignmentLevels"
254  << ss.str();
255 
257  pxe.push_back(std::make_unique<AlignmentLevel>(align::TPEModule, maxNumModules, false));
258  pxe.push_back(std::make_unique<AlignmentLevel>(align::TPEPanel, maxNumPanels, true));
259  pxe.push_back(std::make_unique<AlignmentLevel>(align::TPEBlade, maxNumBlades, true));
260  pxe.push_back(std::make_unique<AlignmentLevel>(align::TPEHalfDisk, maxNumDisks, false));
261  pxe.push_back(std::make_unique<AlignmentLevel>(align::TPEHalfCylinder, 2, false));
262  pxe.push_back(std::make_unique<AlignmentLevel>(align::TPEEndcap, maxNumSides, false));
263  return pxe;
264 }
std::vector< std::unique_ptr< AlignmentLevel > > AlignmentLevels
Definition: Utilities.h:34
unsigned int bpqd_
no. of blades per quarter disk
const AlignableObjectId alignableObjectId_
const char * idToString(align::StructureType type) const
align::AlignmentLevels TrackerAlignmentLevelBuilder::buildTECAlignmentLevels ( )
private

Definition at line 367 of file TrackerAlignmentLevelBuilder.cc.

References alignableObjectId_, AlignableObjectId::idToString(), align::TECDisk, align::TECEndcap, align::TECModule, tecModuleIDs_, align::TECPetal, tecPetalIDs_, align::TECRing, tecRingIDs_, align::TECSide, tecSideIDs_, and tecWheelIDs_.

Referenced by build(), buildTOBAlignmentLevels(), and objectIdProvider().

368 {
369  int maxNumModules = tecModuleIDs_.size();
370  int maxNumRings = tecRingIDs_.size();
371  int maxNumPetals = tecPetalIDs_.size();
372  int maxNumDisks = tecWheelIDs_.size();
373  int maxNumSides = tecSideIDs_.size();
374 
375  edm::LogInfo("AlignableBuildProcess")
376  << "@SUB=TrackerAlignmentLevelBuilder::buildTECAlignmentLevels"
377  << "determined following numbers for "
378  << alignableObjectId_.idToString(align::TECEndcap) << " geometry:" << "\n"
379  << " max. number of modules: " << maxNumModules << "\n"
380  << " max. number of rings: " << maxNumRings << "\n"
381  << " max. number of petals: " << maxNumPetals << "\n"
382  << " max. number of wheels: " << maxNumDisks << "\n"
383  << " max. number of sides: " << maxNumSides;
384 
386  tec.push_back(std::make_unique<AlignmentLevel>(align::TECModule, maxNumModules, false));
387  tec.push_back(std::make_unique<AlignmentLevel>(align::TECRing, maxNumRings, true));
388  tec.push_back(std::make_unique<AlignmentLevel>(align::TECPetal, maxNumPetals, true));
389  tec.push_back(std::make_unique<AlignmentLevel>(align::TECSide, 2, false)); // 2 sides per disk
390  tec.push_back(std::make_unique<AlignmentLevel>(align::TECDisk, maxNumDisks, false));
391  tec.push_back(std::make_unique<AlignmentLevel>(align::TECEndcap, 2, false));
392  return tec;
393 }
std::vector< std::unique_ptr< AlignmentLevel > > AlignmentLevels
Definition: Utilities.h:34
const AlignableObjectId alignableObjectId_
const char * idToString(align::StructureType type) const
align::AlignmentLevels TrackerAlignmentLevelBuilder::buildTIBAlignmentLevels ( )
private

Definition at line 268 of file TrackerAlignmentLevelBuilder.cc.

References alignableObjectId_, buildTIDAlignmentLevels(), AlignableObjectId::idToString(), align::TrackerNameSpace::TIB::sphs_, align::TrackerNameSpace::tib_, align::TIBBarrel, align::TIBHalfBarrel, align::TIBHalfShell, align::TIBLayer, tibLayerIDs_, align::TIBModule, tibModuleIDs_, tibSideIDs_, align::TIBString, tibStringIDs_, align::TIBSurface, tidStringsInnerLayer_, tidStringsOuterLayer_, and trackerNameSpace_.

Referenced by build(), buildPXEAlignmentLevels(), and objectIdProvider().

269 {
270  int maxNumModules = tibModuleIDs_.size();
271  int maxNumStrings = tibStringIDs_.size();
272  int maxNumLayers = tibLayerIDs_.size();
273  int maxNumSides = tibSideIDs_.size();
274 
275  std::ostringstream ss;
276  ss << "determined following numbers for "
277  << alignableObjectId_.idToString(align::TIBBarrel) << " geometry:" << "\n"
278  << " max. number of modules: " << maxNumModules << "\n"
279  << " max. number of strings: " << maxNumStrings << "\n";
280 
281  for (size_t layer = 0; layer < tidStringsInnerLayer_.size(); ++layer) {
282  // divide by 2, because we have HalfShells
283  trackerNameSpace_.tib_.sphs_.push_back(tidStringsInnerLayer_[layer] / 2);
284  trackerNameSpace_.tib_.sphs_.push_back(tidStringsOuterLayer_[layer] / 2);
285 
286  ss << " strings in layer-" << layer << " (inside): "
287  << tidStringsInnerLayer_[layer] << "\n"
288  << " strings in layer-" << layer << " (outside): "
289  << tidStringsOuterLayer_[layer] << "\n";
290  }
291 
292  ss << " max. number of layers: " << maxNumLayers << "\n"
293  << " max. number of sides: " << maxNumSides;
294  edm::LogInfo("AlignableBuildProcess")
295  << "@SUB=TrackerAlignmentLevelBuilder::buildTIBAlignmentLevels"
296  << ss.str();
297 
299  tib.push_back(std::make_unique<AlignmentLevel>(align::TIBModule, maxNumModules, false));
300  tib.push_back(std::make_unique<AlignmentLevel>(align::TIBString, maxNumStrings, true));
301  tib.push_back(std::make_unique<AlignmentLevel>(align::TIBSurface, 2, false)); // 2 surfaces per half shell
302  tib.push_back(std::make_unique<AlignmentLevel>(align::TIBHalfShell, 2, false)); // 2 half shells per layer
303  tib.push_back(std::make_unique<AlignmentLevel>(align::TIBLayer, maxNumLayers, false));
304  tib.push_back(std::make_unique<AlignmentLevel>(align::TIBHalfBarrel, 2, false));
305  tib.push_back(std::make_unique<AlignmentLevel>(align::TIBBarrel, 1, false));
306  return tib;
307 }
std::vector< std::unique_ptr< AlignmentLevel > > AlignmentLevels
Definition: Utilities.h:34
std::vector< unsigned int > sphs_
Number of strings for each surface of a half shell.
std::map< unsigned int, unsigned int > tidStringsOuterLayer_
const AlignableObjectId alignableObjectId_
const char * idToString(align::StructureType type) const
std::map< unsigned int, unsigned int > tidStringsInnerLayer_
align::AlignmentLevels TrackerAlignmentLevelBuilder::buildTIDAlignmentLevels ( )
private

Definition at line 311 of file TrackerAlignmentLevelBuilder.cc.

References alignableObjectId_, buildTOBAlignmentLevels(), AlignableObjectId::idToString(), align::TIDDisk, align::TIDEndcap, align::TIDModule, tidModuleIDs_, align::TIDRing, tidRingIDs_, align::TIDSide, tidSideIDs_, and tidWheelIDs_.

Referenced by build(), buildTIBAlignmentLevels(), and objectIdProvider().

312 {
313  int maxNumModules = tidModuleIDs_.size();
314  int maxNumRings = tidRingIDs_.size();
315  // TODO: for PhaseII geometry the method name for tidWheel changes:
316  // -> trackerTopology->tidDisk(detId);
317  int maxNumWheels = tidWheelIDs_.size();
318  int maxNumSides = tidSideIDs_.size();
319 
320  edm::LogInfo("AlignableBuildProcess")
321  << "@SUB=TrackerAlignmentLevelBuilder::buildTIDAlignmentLevels"
322  << "determined following numbers for "
323  << alignableObjectId_.idToString(align::TIDEndcap) << " geometry:" << "\n"
324  << " max. number of modules: " << maxNumModules << "\n"
325  << " max. number of rings: " << maxNumRings << "\n"
326  << " max. number of wheels: " << maxNumWheels << "\n"
327  << " max. number of sides: " << maxNumSides;
328 
330  tid.push_back(std::make_unique<AlignmentLevel>(align::TIDModule, maxNumModules, false));
331  tid.push_back(std::make_unique<AlignmentLevel>(align::TIDSide, 2, false)); // 2 sides per ring
332  tid.push_back(std::make_unique<AlignmentLevel>(align::TIDRing, maxNumRings, false));
333  tid.push_back(std::make_unique<AlignmentLevel>(align::TIDDisk, maxNumWheels, false));
334  tid.push_back(std::make_unique<AlignmentLevel>(align::TIDEndcap, 2, false)); // 2 endcaps in TID
335  return tid;
336 }
std::vector< std::unique_ptr< AlignmentLevel > > AlignmentLevels
Definition: Utilities.h:34
const AlignableObjectId alignableObjectId_
const char * idToString(align::StructureType type) const
align::AlignmentLevels TrackerAlignmentLevelBuilder::buildTOBAlignmentLevels ( )
private

Definition at line 340 of file TrackerAlignmentLevelBuilder.cc.

References alignableObjectId_, buildTECAlignmentLevels(), AlignableObjectId::idToString(), align::TOBBarrel, align::TOBHalfBarrel, align::TOBLayer, tobLayerIDs_, align::TOBModule, tobModuleIDs_, align::TOBRod, tobRodIDs_, and tobSideIDs_.

Referenced by build(), buildTIDAlignmentLevels(), and objectIdProvider().

341 {
342  int maxNumModules = tobModuleIDs_.size();
343  int maxNumRods = tobRodIDs_.size();
344  int maxNumSides = tobSideIDs_.size();
345  int maxNumLayers = tobLayerIDs_.size();
346 
347  edm::LogInfo("AlignableBuildProcess")
348  << "@SUB=TrackerAlignmentLevelBuilder::buildTOBAlignmentLevels"
349  << "determined following numbers for "
350  << alignableObjectId_.idToString(align::TOBBarrel) << " geometry:" << "\n"
351  << " max. number of modules: " << maxNumModules << "\n"
352  << " max. number of rods: " << maxNumRods << "\n"
353  << " max. number of sides: " << maxNumSides << "\n"
354  << " max. number of layers: " << maxNumLayers;
355 
357  tob.push_back(std::make_unique<AlignmentLevel>(align::TOBModule, maxNumModules, false));
358  tob.push_back(std::make_unique<AlignmentLevel>(align::TOBRod, maxNumRods, true));
359  tob.push_back(std::make_unique<AlignmentLevel>(align::TOBLayer, maxNumLayers, false));
360  tob.push_back(std::make_unique<AlignmentLevel>(align::TOBHalfBarrel, maxNumSides, false));
361  tob.push_back(std::make_unique<AlignmentLevel>(align::TOBBarrel, 1, false));
362  return tob;
363 }
std::vector< std::unique_ptr< AlignmentLevel > > AlignmentLevels
Definition: Utilities.h:34
const AlignableObjectId alignableObjectId_
const char * idToString(align::StructureType type) const
const AlignableObjectId& TrackerAlignmentLevelBuilder::objectIdProvider ( ) const
inline
const align::TrackerNameSpace & TrackerAlignmentLevelBuilder::trackerNameSpace ( ) const

Definition at line 67 of file TrackerAlignmentLevelBuilder.cc.

References addPXBDetUnitInfo(), Exception, levelsBuilt_, and trackerNameSpace_.

Referenced by build(), objectIdProvider(), and AlignableTrackerBuilder::trackerNameSpace().

67  {
68  if (levelsBuilt_) {
69  return trackerNameSpace_;
70  } else {
71  throw cms::Exception("LogicError")
72  << "@SUB=TrackerAlignmentLevelBuilder::trackerNameSpace\n"
73  << "trying to get the name space before it has been properly initialized;"
74  << " please call TrackerAlignmentLevelBuilder::build() first";
75  }
76 }

Member Data Documentation

const AlignableObjectId TrackerAlignmentLevelBuilder::alignableObjectId_
private
bool TrackerAlignmentLevelBuilder::levelsBuilt_ {false}
private

Definition at line 61 of file TrackerAlignmentLevelBuilder.h.

Referenced by build(), and trackerNameSpace().

std::set<unsigned int> TrackerAlignmentLevelBuilder::pxbLadderIDs_
private

Definition at line 65 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXBDetUnitInfo(), and buildPXBAlignmentLevels().

std::map<unsigned int, unsigned int> TrackerAlignmentLevelBuilder::pxbLaddersPerLayer_
private

Definition at line 67 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXBDetUnitInfo(), and buildPXBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::pxbLayerIDs_
private

Definition at line 64 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXBDetUnitInfo(), and buildPXBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::pxbModuleIDs_
private

Definition at line 66 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXBDetUnitInfo(), and buildPXBAlignmentLevels().

std::map<unsigned int, unsigned int> TrackerAlignmentLevelBuilder::pxbStringsPerHalfShell_
private

Definition at line 81 of file TrackerAlignmentLevelBuilder.h.

std::set<unsigned int> TrackerAlignmentLevelBuilder::pxeBladeIDs_
private

Definition at line 72 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXEDetUnitInfo(), and buildPXEAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::pxeDiskIDs_
private

Definition at line 71 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXEDetUnitInfo(), and buildPXEAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::pxeModuleIDs_
private

Definition at line 74 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXEDetUnitInfo(), and buildPXEAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::pxePanelIDs_
private

Definition at line 73 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXEDetUnitInfo(), and buildPXEAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::pxeSideIDs_
private

Definition at line 70 of file TrackerAlignmentLevelBuilder.h.

Referenced by addPXEDetUnitInfo(), and buildPXEAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tecModuleIDs_
private

Definition at line 102 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTECDetUnitInfo(), and buildTECAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tecPetalIDs_
private

Definition at line 100 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTECDetUnitInfo(), and buildTECAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tecRingIDs_
private

Definition at line 101 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTECDetUnitInfo(), and buildTECAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tecSideIDs_
private

Definition at line 98 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTECDetUnitInfo(), and buildTECAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tecWheelIDs_
private

Definition at line 99 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTECDetUnitInfo(), and buildTECAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tibLayerIDs_
private

Definition at line 78 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIBDetUnitInfo(), and buildTIBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tibModuleIDs_
private

Definition at line 80 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIBDetUnitInfo(), and buildTIBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tibSideIDs_
private

Definition at line 77 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIBDetUnitInfo(), and buildTIBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tibStringIDs_
private

Definition at line 79 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIBDetUnitInfo(), and buildTIBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tidModuleIDs_
private

Definition at line 87 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIDDetUnitInfo(), and buildTIDAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tidRingIDs_
private

Definition at line 86 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIDDetUnitInfo(), and buildTIDAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tidSideIDs_
private

Definition at line 84 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIDDetUnitInfo(), and buildTIDAlignmentLevels().

std::map<unsigned int, unsigned int> TrackerAlignmentLevelBuilder::tidStringsInnerLayer_
private

Definition at line 88 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIBDetUnitInfo(), and buildTIBAlignmentLevels().

std::map<unsigned int, unsigned int> TrackerAlignmentLevelBuilder::tidStringsOuterLayer_
private

Definition at line 89 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIBDetUnitInfo(), and buildTIBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tidWheelIDs_
private

Definition at line 85 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTIDDetUnitInfo(), and buildTIDAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tobLayerIDs_
private

Definition at line 92 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTOBDetUnitInfo(), and buildTOBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tobModuleIDs_
private

Definition at line 95 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTOBDetUnitInfo(), and buildTOBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tobRodIDs_
private

Definition at line 94 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTOBDetUnitInfo(), and buildTOBAlignmentLevels().

std::set<unsigned int> TrackerAlignmentLevelBuilder::tobSideIDs_
private

Definition at line 93 of file TrackerAlignmentLevelBuilder.h.

Referenced by addTOBDetUnitInfo(), and buildTOBAlignmentLevels().

align::TrackerNameSpace TrackerAlignmentLevelBuilder::trackerNameSpace_
private
const TrackerTopology* TrackerAlignmentLevelBuilder::trackerTopology_
private