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

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

Definition at line 25 of file DetIdInfo.cc.

References DetId::Calo, ME0DetId::chamber(), CSCDetId::chamber(), GEMDetId::chamber(), MuonSubdetId::CSC, HcalDetId::depth(), MuonSubdetId::DT, DetId::Ecal, EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalPreshower, EcalTriggerTower, CSCDetId::endcap(), MuonSubdetId::GEM, DetId::Hcal, HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalOther, HcalOuter, HcalTriggerTower, EEDetId::ic(), CaloTowerDetId::ieta(), EBDetId::ieta(), HcalDetId::ieta(), CaloTowerDetId::iphi(), EBDetId::iphi(), HcalDetId::iphi(), EEDetId::iquadrant(), EEDetId::isc(), EEDetId::ix(), EEDetId::iy(), ME0DetId::layer(), CSCDetId::layer(), GEMDetId::layer(), RPCDetId::layer(), TrackerTopology::layer(), MuonSubdetId::ME0, DetId::Muon, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, ME0DetId::region(), GEMDetId::region(), RPCDetId::region(), GEMDetId::ring(), RPCDetId::ring(), CSCDetId::ring(), RPCDetId::roll(), MuonSubdetId::RPC, DTChamberId::sector(), RPCDetId::sector(), DTChamberId::station(), GEMDetId::station(), ME0DetId::station(), CSCDetId::station(), RPCDetId::station(), HcalDetId::subdet(), RPCDetId::subsector(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, EBDetId::tower_ieta(), EBDetId::tower_iphi(), DetId::Tracker, and DTChamberId::wheel().

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 
32  case DetId::Tracker:
33  switch ( id.subdetId() ) {
35  {
36  oss <<"TIB ";
37  }
38  break;
40  {
41  oss <<"TOB ";
42  }
43  break;
45  {
46  oss <<"TEC ";
47  }
48  break;
50  {
51  oss <<"TID ";
52  }
53  break;
55  {
56  oss <<"PixBarrel ";
57  }
58  break;
60  {
61  oss <<"PixEndcap ";
62  }
63  break;
64  }
65  if ( tTopo!=0)
66  oss<< tTopo->layer(id);
67  break;
68 
69  case DetId::Muon:
70  switch ( id.subdetId() ) {
71  case MuonSubdetId::DT:
72  {
73  DTChamberId detId(id.rawId());
74  oss << "DT chamber (wheel, station, sector): "
75  << detId.wheel() << ", "
76  << detId.station() << ", "
77  << detId.sector();
78  }
79  break;
80  case MuonSubdetId::CSC:
81  {
82  CSCDetId detId(id.rawId());
83  oss << "CSC chamber (endcap, station, ring, chamber, layer): "
84  << detId.endcap() << ", "
85  << detId.station() << ", "
86  << detId.ring() << ", "
87  << detId.chamber() << ", "
88  << detId.layer();
89  }
90  break;
91  case MuonSubdetId::RPC:
92  {
93  RPCDetId detId(id.rawId());
94  oss << "RPC chamber ";
95  switch ( detId.region() ) {
96  case 0:
97  oss << "/ barrel / (wheel, station, sector, layer, subsector, roll): "
98  << detId.ring() << ", "
99  << detId.station() << ", "
100  << detId.sector() << ", "
101  << detId.layer() << ", "
102  << detId.subsector() << ", "
103  << detId.roll();
104  break;
105  case 1:
106  oss << "/ forward endcap / (wheel, station, sector, layer, subsector, roll): "
107  << detId.ring() << ", "
108  << detId.station() << ", "
109  << detId.sector() << ", "
110  << detId.layer() << ", "
111  << detId.subsector() << ", "
112  << detId.roll();
113  break;
114  case -1:
115  oss << "/ backward endcap / (wheel, station, sector, layer, subsector, roll): "
116  << detId.ring() << ", "
117  << detId.station() << ", "
118  << detId.sector() << ", "
119  << detId.layer() << ", "
120  << detId.subsector() << ", "
121  << detId.roll();
122  break;
123  }
124  }
125  break;
126  case MuonSubdetId::GEM:
127  {
128  GEMDetId detId(id.rawId());
129  oss << "GEM chamber (endcap, station, ring, chamber, layer): "
130  << detId.region() << ", "
131  << detId.station() << ", "
132  << detId.ring() << ", "
133  << detId.chamber() << ", "
134  << detId.layer();
135  }
136  break;
137  case MuonSubdetId::ME0:
138  {
139  ME0DetId detId(id.rawId());
140  oss << "ME0 chamber (endcap, station, ring, chamber, layer): "
141  << detId.region() << ", "
142  << detId.station() << ", "
143  << detId.chamber() << ", "
144  << detId.layer();
145  }
146  break;
147  }
148  break;
149 
150  case DetId::Calo:
151  {
152  CaloTowerDetId detId( id.rawId() );
153  oss << "CaloTower (ieta, iphi): "
154  << detId.ieta() << ", "
155  << detId.iphi();
156  }
157  break;
158 
159  case DetId::Ecal:
160  switch ( id.subdetId() ) {
161  case EcalBarrel:
162  {
163  EBDetId detId(id);
164  oss << "EcalBarrel (ieta, iphi, tower_ieta, tower_iphi): "
165  << detId.ieta() << ", "
166  << detId.iphi() << ", "
167  << detId.tower_ieta() << ", "
168  << detId.tower_iphi();
169  }
170  break;
171  case EcalEndcap:
172  {
173  EEDetId detId(id);
174  oss << "EcalEndcap (ix, iy, SuperCrystal, crystal, quadrant): "
175  << detId.ix() << ", "
176  << detId.iy() << ", "
177  << detId.isc() << ", "
178  << detId.ic() << ", "
179  << detId.iquadrant();
180  }
181  break;
182  case EcalPreshower:
183  oss << "EcalPreshower";
184  break;
185  case EcalTriggerTower:
186  oss << "EcalTriggerTower";
187  break;
188  case EcalLaserPnDiode:
189  oss << "EcalLaserPnDiode";
190  break;
191  }
192  break;
193 
194  case DetId::Hcal:
195  {
196  HcalDetId detId(id);
197  switch ( detId.subdet() ) {
198  case HcalEmpty:
199  oss << "HcalEmpty ";
200  break;
201  case HcalBarrel:
202  oss << "HcalBarrel ";
203  break;
204  case HcalEndcap:
205  oss << "HcalEndcap ";
206  break;
207  case HcalOuter:
208  oss << "HcalOuter ";
209  break;
210  case HcalForward:
211  oss << "HcalForward ";
212  break;
213  case HcalTriggerTower:
214  oss << "HcalTriggerTower ";
215  break;
216  case HcalOther:
217  oss << "HcalOther ";
218  break;
219  }
220  oss << "(ieta, iphi, depth):"
221  << detId.ieta() << ", "
222  << detId.iphi() << ", "
223  << detId.depth();
224  }
225  break;
226  default :;
227  }
228  return oss.str();
229 }
static const int GEM
Definition: MuonSubdetId.h:15
static const int ME0
Definition: MuonSubdetId.h:16
static const int CSC
Definition: MuonSubdetId.h:13
unsigned int layer(const DetId &id) const
static const int RPC
Definition: MuonSubdetId.h:14
static const int DT
Definition: MuonSubdetId.h:12
std::string DetIdInfo::info ( const std::set< DetId > &  idSet,
const TrackerTopology tTopo 
)
static

Definition at line 232 of file DetIdInfo.cc.

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

232  {
234  for(std::set<DetId>::const_iterator id = idSet.begin(); id != idSet.end(); id++)
235  {
236  text += info(*id, tTopo);
237  text += "\n";
238  }
239  return text;
240 }
static std::string info(const DetId &, const TrackerTopology *tTopo)
Definition: DetIdInfo.cc:25
std::string DetIdInfo::info ( const std::vector< DetId > &  idSet,
const TrackerTopology tTopo 
)
static

Definition at line 242 of file DetIdInfo.cc.

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

242  {
244  for(std::vector<DetId>::const_iterator id = idSet.begin(); id != idSet.end(); id++)
245  {
246  text += info(*id, tTopo);
247  text += "\n";
248  }
249  return text;
250 }
static std::string info(const DetId &, const TrackerTopology *tTopo)
Definition: DetIdInfo.cc:25