CMS 3D CMS Logo

List of all members | Static Public Member Functions
DetIdInfo Class Reference

#include <DetIdInfo.h>

Static Public Member Functions

static std::string info (const DetId &, const TrackerTopology *tTopo)
 
static std::string info (const std::set< DetId > &, const TrackerTopology *tTopo)
 
static std::string info (const std::vector< DetId > &, const TrackerTopology *tTopo)
 

Detailed Description

Definition at line 17 of file DetIdInfo.h.

Member Function Documentation

◆ info() [1/3]

std::string DetIdInfo::info ( const DetId id,
const TrackerTopology tTopo 
)
static

Definition at line 25 of file DetIdInfo.cc.

References DetId::Calo, MuonSubdetId::CSC, hcalRecHitTable_cff::detId, MuonSubdetId::DT, DetId::Ecal, EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalPreshower, EcalTriggerTower, MuonSubdetId::GEM, DetId::Hcal, HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalTriggerTower, TrackerTopology::layer(), MuonSubdetId::ME0, DetId::Muon, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, nano_mu_digi_cff::rawId, MuonSubdetId::RPC, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, and DetId::Tracker.

Referenced by DetIdAssociator::buildMap(), TrackDetectorAssociator::fillHcal(), TrackDetMatchInfo::findMaxDeposition(), TrackDetectorAssociator::getTAMuonChamberMatches(), info(), and TrackDetMatchInfo::nXnEnergy().

25  {
26  std::ostringstream oss;
27 
28  oss << "DetId: " << id.rawId() << "\n";
29 
30  switch (id.det()) {
31  case DetId::Tracker:
32  switch (id.subdetId()) {
33  case StripSubdetector::TIB: {
34  oss << "TIB ";
35  } break;
36  case StripSubdetector::TOB: {
37  oss << "TOB ";
38  } break;
39  case StripSubdetector::TEC: {
40  oss << "TEC ";
41  } break;
42  case StripSubdetector::TID: {
43  oss << "TID ";
44  } break;
46  oss << "PixBarrel ";
47  } break;
49  oss << "PixEndcap ";
50  } break;
51  }
52  if (tTopo != nullptr)
53  oss << tTopo->layer(id);
54  break;
55 
56  case DetId::Muon:
57  switch (id.subdetId()) {
58  case MuonSubdetId::DT: {
59  DTChamberId detId(id.rawId());
60  oss << "DT chamber (wheel, station, sector): " << detId.wheel() << ", " << detId.station() << ", "
61  << detId.sector();
62  } break;
63  case MuonSubdetId::CSC: {
64  CSCDetId detId(id.rawId());
65  oss << "CSC chamber (endcap, station, ring, chamber, layer): " << detId.endcap() << ", " << detId.station()
66  << ", " << detId.ring() << ", " << detId.chamber() << ", " << detId.layer();
67  } break;
68  case MuonSubdetId::RPC: {
69  RPCDetId detId(id.rawId());
70  oss << "RPC chamber ";
71  switch (detId.region()) {
72  case 0:
73  oss << "/ barrel / (wheel, station, sector, layer, subsector, roll): " << detId.ring() << ", "
74  << detId.station() << ", " << detId.sector() << ", " << detId.layer() << ", " << detId.subsector()
75  << ", " << detId.roll();
76  break;
77  case 1:
78  oss << "/ forward endcap / (wheel, station, sector, layer, subsector, roll): " << detId.ring() << ", "
79  << detId.station() << ", " << detId.sector() << ", " << detId.layer() << ", " << detId.subsector()
80  << ", " << detId.roll();
81  break;
82  case -1:
83  oss << "/ backward endcap / (wheel, station, sector, layer, subsector, roll): " << detId.ring() << ", "
84  << detId.station() << ", " << detId.sector() << ", " << detId.layer() << ", " << detId.subsector()
85  << ", " << detId.roll();
86  break;
87  }
88  } break;
89  case MuonSubdetId::GEM: {
90  GEMDetId detId(id.rawId());
91  oss << "GEM chamber (endcap, station, ring, chamber, layer): " << detId.region() << ", " << detId.station()
92  << ", " << detId.ring() << ", " << detId.chamber() << ", " << detId.layer();
93  } break;
94  case MuonSubdetId::ME0: {
95  ME0DetId detId(id.rawId());
96  oss << "ME0 chamber (endcap, station, ring, chamber, layer): " << detId.region() << ", " << detId.station()
97  << ", " << detId.chamber() << ", " << detId.layer();
98  } break;
99  }
100  break;
101 
102  case DetId::Calo: {
103  CaloTowerDetId detId(id.rawId());
104  oss << "CaloTower (ieta, iphi): " << detId.ieta() << ", " << detId.iphi();
105  } break;
106 
107  case DetId::Ecal:
108  switch (id.subdetId()) {
109  case EcalBarrel: {
110  EBDetId detId(id);
111  oss << "EcalBarrel (ieta, iphi, tower_ieta, tower_iphi): " << detId.ieta() << ", " << detId.iphi() << ", "
112  << detId.tower_ieta() << ", " << detId.tower_iphi();
113  } break;
114  case EcalEndcap: {
115  EEDetId detId(id);
116  oss << "EcalEndcap (ix, iy, SuperCrystal, crystal, quadrant): " << detId.ix() << ", " << detId.iy() << ", "
117  << detId.isc() << ", " << detId.ic() << ", " << detId.iquadrant();
118  } break;
119  case EcalPreshower:
120  oss << "EcalPreshower";
121  break;
122  case EcalTriggerTower:
123  oss << "EcalTriggerTower";
124  break;
125  case EcalLaserPnDiode:
126  oss << "EcalLaserPnDiode";
127  break;
128  }
129  break;
130 
131  case DetId::Hcal: {
132  HcalDetId detId(id);
133  switch (detId.subdet()) {
134  case HcalEmpty:
135  oss << "HcalEmpty ";
136  break;
137  case HcalBarrel:
138  oss << "HcalBarrel ";
139  break;
140  case HcalEndcap:
141  oss << "HcalEndcap ";
142  break;
143  case HcalOuter:
144  oss << "HcalOuter ";
145  break;
146  case HcalForward:
147  oss << "HcalForward ";
148  break;
149  case HcalTriggerTower:
150  oss << "HcalTriggerTower ";
151  break;
152  case HcalOther:
153  oss << "HcalOther ";
154  break;
155  }
156  oss << "(ieta, iphi, depth):" << detId.ieta() << ", " << detId.iphi() << ", " << detId.depth();
157  } break;
158  default:;
159  }
160  return oss.str();
161 }
static constexpr auto TEC
static constexpr int GEM
Definition: MuonSubdetId.h:14
unsigned int layer(const DetId &id) const
static constexpr int ME0
Definition: MuonSubdetId.h:15
static constexpr auto TOB
static constexpr auto TIB
static constexpr int RPC
Definition: MuonSubdetId.h:13
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12
static constexpr auto TID

◆ info() [2/3]

std::string DetIdInfo::info ( const std::set< DetId > &  idSet,
const TrackerTopology tTopo 
)
static

Definition at line 163 of file DetIdInfo.cc.

References info(), AlCaHLTBitMon_QueryRunRegistry::string, and submitPVValidationJobs::text.

163  {
165  for (std::set<DetId>::const_iterator id = idSet.begin(); id != idSet.end(); id++) {
166  text += info(*id, tTopo);
167  text += "\n";
168  }
169  return text;
170 }
static std::string info(const DetId &, const TrackerTopology *tTopo)
Definition: DetIdInfo.cc:25

◆ info() [3/3]

std::string DetIdInfo::info ( const std::vector< DetId > &  idSet,
const TrackerTopology tTopo 
)
static

Definition at line 172 of file DetIdInfo.cc.

References info(), AlCaHLTBitMon_QueryRunRegistry::string, and submitPVValidationJobs::text.

172  {
174  for (std::vector<DetId>::const_iterator id = idSet.begin(); id != idSet.end(); id++) {
175  text += info(*id, tTopo);
176  text += "\n";
177  }
178  return text;
179 }
static std::string info(const DetId &, const TrackerTopology *tTopo)
Definition: DetIdInfo.cc:25