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): " << segId.wheel() << ", " << segId.station() << ", "
43  << segId.sector();
44  }
45 
46  if (muonSubdetId == 2) { //CSC
47  CSCDetId segId(id.rawId());
48  oss << "CSC chamber (endcap, station, ring, chamber, layer): " << segId.endcap() << ", " << segId.station() << ", "
49  << segId.ring() << ", " << segId.chamber() << ", " << segId.layer();
50  }
51  if (muonSubdetId == 3) { //RPC
52  // RPCDetId segId(id.rawId());
53  oss << "RPC chamber";
54  }
55  if (muonSubdetId == 4) { //GEM
56  // GEMDetId segId(id.rawId());
57  oss << "GEM chamber";
58  }
59  if (muonSubdetId == 5) { //ME0
60  // ME0DetId segId(id.rawId());
61  oss << "ME0 chamber";
62  }
63 
64  return oss.str();
65 }
int station() const
Return the station number.
Definition: DTChamberId.h:42
constexpr int station() const
Definition: GEMDetId.h:179
std::string info() const
int layer() const
Definition: CSCDetId.h:56
int station() const
Definition: ME0DetId.h:58
int chamber() const
Definition: CSCDetId.h:62
int station() const
Definition: CSCDetId.h:79
int endcap() const
Definition: CSCDetId.h:85
int station() const
Definition: RPCDetId.h:78
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
int sector() const
Definition: DTChamberId.h:49
int ring() const
Definition: CSCDetId.h:68