src
TrackingTools
TrackAssociator
src
TAMuonChamberMatch.cc
Go to the documentation of this file.
1
#include "
TrackingTools/TrackAssociator/interface/TAMuonChamberMatch.h
"
2
#include "
DataFormats/MuonDetId/interface/DTChamberId.h
"
3
#include "
DataFormats/MuonDetId/interface/CSCDetId.h
"
4
#include "
DataFormats/MuonDetId/interface/RPCDetId.h
"
5
#include "
DataFormats/MuonDetId/interface/GEMDetId.h
"
6
#include "
DataFormats/MuonDetId/interface/ME0DetId.h
"
7
#include <sstream>
8
9
int
TAMuonChamberMatch::station
()
const
{
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
36
std::string
TAMuonChamberMatch::info
()
const
{
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
}
DTChamberId::station
int station() const
Return the station number.
Definition:
DTChamberId.h:42
TAMuonChamberMatch::station
int station() const
Definition:
TAMuonChamberMatch.cc:9
GEMDetId::station
constexpr int station() const
Definition:
GEMDetId.h:179
GEMDetId
Definition:
GEMDetId.h:18
nano_mu_digi_cff.rawId
rawId
Definition:
nano_mu_digi_cff.py:56
ME0DetId
Definition:
ME0DetId.h:16
CSCDetId.h
TAMuonChamberMatch::info
std::string info() const
Definition:
TAMuonChamberMatch.cc:36
CSCDetId
Definition:
CSCDetId.h:26
RPCDetId.h
DTChamberId
Definition:
DTChamberId.h:14
CSCDetId::layer
int layer() const
Definition:
CSCDetId.h:56
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
ME0DetId::station
int station() const
Definition:
ME0DetId.h:58
DTChamberId.h
CSCDetId::chamber
int chamber() const
Definition:
CSCDetId.h:62
GEMDetId.h
RPCDetId
Definition:
RPCDetId.h:16
CSCDetId::station
int station() const
Definition:
CSCDetId.h:79
CSCDetId::endcap
int endcap() const
Definition:
CSCDetId.h:85
RPCDetId::station
int station() const
Definition:
RPCDetId.h:78
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition:
DTChamberId.h:39
DTChamberId::sector
int sector() const
Definition:
DTChamberId.h:49
ME0DetId.h
CSCDetId::ring
int ring() const
Definition:
CSCDetId.h:68
TAMuonChamberMatch.h
Generated for CMSSW Reference Manual by
1.8.14