CMS 3D CMS Logo

CmsTrackerDebugNavigator.cc
Go to the documentation of this file.
5 
7 
8 CmsTrackerDebugNavigator::CmsTrackerDebugNavigator(const std::vector<GeometricDetExtra>& gdes) {
9  std::vector<GeometricDetExtra>::const_iterator gdeiEnd(gdes.end());
10  std::vector<GeometricDetExtra>::const_iterator gdei(gdes.begin());
11  for (; gdei != gdeiEnd; ++gdei) {
12  const GeometricDetExtra* gdeaddr = &(*gdei);
13  _helperMap[gdei->geographicalId().rawId()] = gdeaddr;
14  }
15 }
16 
17 void CmsTrackerDebugNavigator::dump(const GeometricDet& in, const std::vector<GeometricDetExtra>& gdes) {
18  edm::LogInfo("CmsTrackerDebugNavigator") << " CmsTrackerDebugNavigator - Starting debug";
19  for (int k = 0; k < 20; k++)
20  numinstances[k] = 0;
21  iterate(in, 0, gdes);
22 
23  for (int k = 0; k < 20; k++) {
24  edm::LogInfo("CmsTrackerDebugNavigator")
25  << " CmsTrackerDebugNavigator has found " << numinstances[k] << " GeometricDets at level " << k;
26  }
27 }
28 
29 void CmsTrackerDebugNavigator::iterate(const GeometricDet& in, int level, const std::vector<GeometricDetExtra>& gdes) {
31  for (unsigned int k = 0; k < in.components().size(); k++) {
32  std::string spaces = "";
33  for (unsigned int i = 0; (int)i <= level; i++)
34  spaces += " ";
35  const GeometricDetExtra* extra = _helperMap[in.components()[k]->geographicalId().rawId()];
36  edm::LogInfo("CmsTrackerDebugNavigator")
37  << level << spaces << "### VOLUME " << in.components()[k]->name() << " of type " << in.components()[k]->type()
38  << " copy number " << extra->copyno() << " positioned in " << in.name() << " global position of centre "
39  << in.components()[k]->translation()
40  // << " rotation matrix " << in.components()[k]->rotation()
41  << " volume = " << extra->volume() << " cm3"
42  << " density = " << extra->density() << " g/cm3"
43  << " weight " << extra->weight() << " g" << std::endl;
44  iterate(*((in.components())[k]), level + 1, gdes);
45  }
46  return;
47 }
personalPlayback.level
level
Definition: personalPlayback.py:22
mps_fire.i
i
Definition: mps_fire.py:355
MessageLogger.h
CmsTrackerDebugNavigator.h
edm::LogInfo
Definition: MessageLogger.h:254
CmsTrackerDebugNavigator::_helperMap
std::map< uint32_t, const GeometricDetExtra * > _helperMap
Definition: CmsTrackerDebugNavigator.h:22
CmsTrackerDebugNavigator::CmsTrackerDebugNavigator
CmsTrackerDebugNavigator(const std::vector< GeometricDetExtra > &)
Definition: CmsTrackerDebugNavigator.cc:8
GeometricDetExtra::weight
double weight() const
Definition: GeometricDetExtra.h:53
GeometricDetExtra::volume
double volume() const
Definition: GeometricDetExtra.h:51
GeometricDet
Definition: GeometricDet.h:30
dqmdumpme.k
k
Definition: dqmdumpme.py:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CmsTrackerDebugNavigator::numinstances
int numinstances[30]
Definition: CmsTrackerDebugNavigator.h:20
recoMuon::in
Definition: RecoMuonEnumerators.h:6
createfilelist.int
int
Definition: createfilelist.py:10
GeometricDetExtra
Definition: GeometricDetExtra.h:17
GeometricDet.h
GeometricDetExtra.h
CmsTrackerDebugNavigator::iterate
void iterate(const GeometricDet &, int, const std::vector< GeometricDetExtra > &)
Definition: CmsTrackerDebugNavigator.cc:29
GeometricDetExtra::density
double density() const
Definition: GeometricDetExtra.h:52
GeometricDetExtra::copyno
int copyno() const
Definition: GeometricDetExtra.h:50
CmsTrackerDebugNavigator::dump
void dump(const GeometricDet &, const std::vector< GeometricDetExtra > &)
Definition: CmsTrackerDebugNavigator.cc:17