CMS 3D CMS Logo

TAMuonChamberMatch.cc
Go to the documentation of this file.
7 #include <sstream>
8 
10  int muonSubdetId = id.subdetId();
11 
12  if(muonSubdetId==1) {//DT
13  DTChamberId segId(id.rawId());
14  return segId.station();
15  }
16  if(muonSubdetId==2) {//CSC
17  CSCDetId segId(id.rawId());
18  return segId.station();
19  }
20  if(muonSubdetId==3) {//RPC
21  RPCDetId segId(id.rawId());
22  return segId.station();
23  }
24  if(muonSubdetId==4) {//GEM
25  GEMDetId segId(id.rawId());
26  return segId.station();
27  }
28  if(muonSubdetId==5) {//ME0
29  ME0DetId segId(id.rawId());
30  return segId.station();
31  }
32 
33  return -1;
34 }
35 
37  int muonSubdetId = id.subdetId();
38  std::ostringstream oss;
39 
40  if(muonSubdetId==1) {//DT
41  DTChamberId segId(id.rawId());
42  oss << "DT chamber (wheel, station, sector): "
43  << segId.wheel() << ", "
44  << segId.station() << ", "
45  << segId.sector();
46  }
47 
48  if(muonSubdetId==2) {//CSC
49  CSCDetId segId(id.rawId());
50  oss << "CSC chamber (endcap, station, ring, chamber, layer): "
51  << segId.endcap() << ", "
52  << segId.station() << ", "
53  << segId.ring() << ", "
54  << segId.chamber() << ", "
55  << segId.layer();
56  }
57  if(muonSubdetId==3) {//RPC
58  // RPCDetId segId(id.rawId());
59  oss << "RPC chamber";
60  }
61  if(muonSubdetId==4) {//GEM
62  // GEMDetId segId(id.rawId());
63  oss << "GEM chamber";
64  }
65  if(muonSubdetId==5) {//ME0
66  // ME0DetId segId(id.rawId());
67  oss << "ME0 chamber";
68  }
69 
70  return oss.str();
71 }
int chamber() const
Definition: CSCDetId.h:68
int layer() const
Definition: CSCDetId.h:61
int station() const
Definition: ME0DetId.h:76
int endcap() const
Definition: CSCDetId.h:93
int station() const
Station id : the station is the pair of chambers at same disk.
Definition: GEMDetId.h:64
int ring() const
Definition: CSCDetId.h:75
int sector() const
Definition: DTChamberId.h:61
int station() const
Definition: CSCDetId.h:86
std::string info() const
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
int station() const
Definition: RPCDetId.h:96