test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 29 of file DetIdInfo.cc.

References DetId::Calo, CSCDetId::chamber(), MuonSubdetId::CSC, HcalDetId::depth(), MuonSubdetId::DT, DetId::Ecal, EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalPreshower, EcalTriggerTower, CSCDetId::endcap(), 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(), CSCDetId::layer(), RPCDetId::layer(), TrackerTopology::layer(), DetId::Muon, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, RPCDetId::region(), RPCDetId::ring(), CSCDetId::ring(), RPCDetId::roll(), MuonSubdetId::RPC, DTChamberId::sector(), RPCDetId::sector(), DTChamberId::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().

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

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

215  {
217  for(std::set<DetId>::const_iterator id = idSet.begin(); id != idSet.end(); id++)
218  {
219  text += info(*id, tTopo);
220  text += "\n";
221  }
222  return text;
223 }
tuple text
Definition: runonSM.py:42
static std::string info(const DetId &, const TrackerTopology *tTopo)
Definition: DetIdInfo.cc:29
std::string DetIdInfo::info ( const std::vector< DetId > &  idSet,
const TrackerTopology tTopo 
)
static

Definition at line 225 of file DetIdInfo.cc.

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

225  {
227  for(std::vector<DetId>::const_iterator id = idSet.begin(); id != idSet.end(); id++)
228  {
229  text += info(*id, tTopo);
230  text += "\n";
231  }
232  return text;
233 }
tuple text
Definition: runonSM.py:42
static std::string info(const DetId &, const TrackerTopology *tTopo)
Definition: DetIdInfo.cc:29