CMS 3D CMS Logo

DebugInfo.cc
Go to the documentation of this file.
6 
7 #include<iostream>
8 
9 namespace spr{
10 
11  void debugEcalDets(unsigned int i, const DetId& det, bool flag) {
12 
13  std::cout << "Cell [" << i << "] 0x";
14  if (det.subdetId() == EcalBarrel) {
15  EBDetId id = det;
16  std::cout << std::hex << det() << std::dec << " " << id;
17  } else if (det.subdetId() == EcalEndcap) {
18  EEDetId id = det;
19  std::cout << std::hex << det() << std::dec << " " << id;
20  } else {
21  std::cout << std::hex << det() << std::dec << " Unknown Type";
22  }
23  if (flag) std::cout << std::endl;
24  }
25 
26  void debugEcalDets(unsigned int last, std::vector<DetId>& vdets) {
27 
28  for (unsigned int i=last; i<vdets.size(); ++i) {
29  debugEcalDets (i, vdets[i], true);
30  }
31  }
32 
33  void debugEcalDets(unsigned int last, std::vector<DetId>& vdets,
34  std::vector<CaloDirection>& dirs) {
35 
36  for (unsigned int i=last; i<vdets.size(); ++i) {
37  debugEcalDets (i, vdets[i], false);
38  std::cout << " along " << dirs[i] << std::endl;
39  }
40  }
41 
42  void debugHcalDets(unsigned int last, std::vector<DetId>& vdets) {
43 
44  for (unsigned int i=last; i<vdets.size(); ++i) {
45  HcalDetId id = vdets[i]();
46  std::cout << "Cell [" << i << "] 0x" << std::hex << vdets[i]()
47  << std::dec << " " << id << std::endl;
48  }
49  }
50 }
void debugEcalDets(unsigned int, const DetId &, bool)
Definition: DebugInfo.cc:11
void debugHcalDets(unsigned int, std::vector< DetId > &)
Definition: DebugInfo.cc:42
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18