CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TAMuonChamberMatch.cc
Go to the documentation of this file.
5 #include <sstream>
6 
8  int muonSubdetId = id.subdetId();
9 
10  if(muonSubdetId==1) {//DT
11  DTChamberId segId(id.rawId());
12  return segId.station();
13  }
14  if(muonSubdetId==2) {//CSC
15  CSCDetId segId(id.rawId());
16  return segId.station();
17  }
18  if(muonSubdetId==3) {//RPC
19  RPCDetId segId(id.rawId());
20  return segId.station();
21  }
22 
23  return -1;
24 }
25 
26 std::string TAMuonChamberMatch::info() const {
27  int muonSubdetId = id.subdetId();
28  std::ostringstream oss;
29 
30  if(muonSubdetId==1) {//DT
31  DTChamberId segId(id.rawId());
32  oss << "DT chamber (wheel, station, sector): "
33  << segId.wheel() << ", "
34  << segId.station() << ", "
35  << segId.sector();
36  }
37 
38  if(muonSubdetId==2) {//CSC
39  CSCDetId segId(id.rawId());
40  oss << "CSC chamber (endcap, station, ring, chamber, layer): "
41  << segId.endcap() << ", "
42  << segId.station() << ", "
43  << segId.ring() << ", "
44  << segId.chamber() << ", "
45  << segId.layer();
46  }
47  if(muonSubdetId==3) {//RPC
48  // RPCDetId segId(id.rawId());
49  oss << "RPC chamber";
50  }
51 
52  return oss.str();
53 }
int chamber() const
Definition: CSCDetId.h:70
int layer() const
Definition: CSCDetId.h:63
int endcap() const
Definition: CSCDetId.h:95
int ring() const
Definition: CSCDetId.h:77
int sector() const
Definition: DTChamberId.h:63
int station() const
Definition: CSCDetId.h:88
std::string info() const
int station() const
Return the station number.
Definition: DTChamberId.h:53
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:47
int station() const
Definition: RPCDetId.h:98