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 31 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().

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

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

238  {
240  for(std::set<DetId>::const_iterator id = idSet.begin(); id != idSet.end(); id++)
241  {
242  text += info(*id, tTopo);
243  text += "\n";
244  }
245  return text;
246 }
static std::string info(const DetId &, const TrackerTopology *tTopo)
Definition: DetIdInfo.cc:31
std::string DetIdInfo::info ( const std::vector< DetId > &  idSet,
const TrackerTopology tTopo 
)
static

Definition at line 248 of file DetIdInfo.cc.

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

248  {
250  for(std::vector<DetId>::const_iterator id = idSet.begin(); id != idSet.end(); id++)
251  {
252  text += info(*id, tTopo);
253  text += "\n";
254  }
255  return text;
256 }
static std::string info(const DetId &, const TrackerTopology *tTopo)
Definition: DetIdInfo.cc:31