ATLAS Offline Software
RPCDQUtils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // -*- c++ -*-
6 #ifndef RPCRAWDATAMONITORING_RPCDQUtils_H
7 #define RPCRAWDATAMONITORING_RPCDQUtils_H
8 
9 // ROOT
10 #include "TH1.h"
11 #include "TH1F.h"
12 
13 // Athena
17 #include "xAODMuon/MuonContainer.h"
18 
19 //================================================================================================
20 struct RpcPanel {
21  RpcPanel() = default;
22  RpcPanel(Identifier id, const RpcIdHelper &rpcIdHelper);
23  RpcPanel(const Muon::IMuonIdHelperSvc &idHelperSvc,
24  const MuonGM::RpcReadoutElement *_readoutEl, const int _doubletZ,
25  const int _doubletPhi, const int _gasgap, const int _measPhi);
26 
28 
30  bool panel_valid{false};
31  std::string panel_str{};
32  std::string panel_name{};
33  std::string stationNameStr{};
34 
35  void FillRpcId(Identifier id, const RpcIdHelper &rpcIdHelper);
36  void SetPanelIndex(int index);
37 
38  int stationName{0};
39  int stationEta{0};
40  int stationPhi{0};
41  int doubletR{0};
42  int doubletZ{0};
43  int doubletPhi{0};
44  int gasGap{0};
45  int measPhi{-1};
46  int panel_index{-1};
47  unsigned NHit_perEvt{0};
48 
49  std::string getOnlineConvention() const;
50  std::pair<int, int> getSectorLayer() const;
51  std::string getElementStr() const;
52 
53  bool operator==(const RpcPanel &rhs) const;
54 
55  bool operator<(const RpcPanel &rhs) const;
56 
57  bool operator>(const RpcPanel &rhs) const;
58 };
59 
60 //================================================================================================
61 struct TagDef {
62  TString eventTrig;
63  TString tagTrig;
64 };
65 
66 //================================================================================================
67 struct MyMuon {
68  const xAOD::Muon *muon;
69  TLorentzVector fourvec;
70 
71  bool tagged{false};
72  bool isolated{false};
73  bool tagProbeOK{false};
74  bool tagProbeAndZmumuOK{false};
75  bool isZmumu{false};
76 
77  std::set<int> matchedL1ThrExclusive;
78  std::set<int> matchedL1ThrInclusive;
79 };
80 
81 //================================================================================================
82 struct ExResult {
83  ExResult(const Identifier _gasgap_id, const Trk::PropDirection _direction);
84 
87 
88  bool localTrackPosInBounds{false};
92  float minTrackGasGapDEta{10.0};
93  float minTrackGasGapDPhi{10.0};
94  float minTrackGasGapDR{10.0};
95 };
96 
97 //================================================================================================
98 struct GasGapData {
99  GasGapData(const Muon::IMuonIdHelperSvc &idHelperSvc,
100  const MuonGM::RpcReadoutElement *_readoutEl, const int _doubletZ,
101  const int _doubletPhi, const unsigned _gasgap);
102 
104  const xAOD::TrackParticle &track) const;
106  ExResult &result, const Trk::TrackParameters *trackParam) const;
107 
109 
111  bool gapid_valid{false};
112  std::string gapid_str;
113 
117  int doubletR;
118  int doubletZ;
120  unsigned gasgap;
121 
122  unsigned NetaStrips{0};
123  unsigned NphiStrips{0};
124  double minStripEta{10.0};
125  double maxStripEta{-10.0};
126  double minStripPhi{10.0};
127  double maxStripPhi{-10.0};
128  double localTrackPosY{0.0};
129  double localTrackPosZ{0.0};
130 
131  std::pair<std::shared_ptr<RpcPanel>, std::shared_ptr<RpcPanel>>
133 };
134 
135 #endif
GasGapData::gasgap
unsigned gasgap
Definition: RPCDQUtils.h:120
MyMuon::tagged
bool tagged
Definition: RPCDQUtils.h:71
RpcPanel::stationPhi
int stationPhi
Definition: RPCDQUtils.h:40
get_generator_info.result
result
Definition: get_generator_info.py:21
GasGapData::minStripEta
double minStripEta
Definition: RPCDQUtils.h:124
ExResult
Definition: RPCDQUtils.h:82
RpcPanel::RpcPanel
RpcPanel()=default
GasGapData::NphiStrips
unsigned NphiStrips
Definition: RPCDQUtils.h:123
GasGapData::gapid
Identifier gapid
Definition: RPCDQUtils.h:110
index
Definition: index.py:1
RpcPanel::doubletPhi
int doubletPhi
Definition: RPCDQUtils.h:43
RpcPanel::FillRpcId
void FillRpcId(Identifier id, const RpcIdHelper &rpcIdHelper)
Definition: RPCDQUtils.cxx:27
RpcPanel::operator>
bool operator>(const RpcPanel &rhs) const
Definition: RPCDQUtils.cxx:115
GasGapData::doubletR
int doubletR
Definition: RPCDQUtils.h:117
ExResult::direction
const Trk::PropDirection direction
Definition: RPCDQUtils.h:86
ExResult::localTrackPosInBoundsTight
bool localTrackPosInBoundsTight
Definition: RPCDQUtils.h:89
GasGapData::localTrackPosZ
double localTrackPosZ
Definition: RPCDQUtils.h:129
MyMuon::muon
const xAOD::Muon * muon
Definition: RPCDQUtils.h:68
MuonGM::RpcReadoutElement
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:55
MyMuon::isZmumu
bool isZmumu
Definition: RPCDQUtils.h:75
PropDirection.h
IExtrapolator.h
RpcPanel::readoutEl
const MuonGM::RpcReadoutElement * readoutEl
Definition: RPCDQUtils.h:27
GasGapData
Definition: RPCDQUtils.h:98
MyMuon::fourvec
TLorentzVector fourvec
Definition: RPCDQUtils.h:69
GasGapData::readoutEl
const MuonGM::RpcReadoutElement * readoutEl
Definition: RPCDQUtils.h:108
MyMuon::isolated
bool isolated
Definition: RPCDQUtils.h:72
RpcIdHelper
Definition: RpcIdHelper.h:51
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
RpcPanel::gasGap
int gasGap
Definition: RPCDQUtils.h:44
RpcPanel
Definition: RPCDQUtils.h:20
MyMuon::matchedL1ThrExclusive
std::set< int > matchedL1ThrExclusive
Definition: RPCDQUtils.h:77
MyMuon
Definition: RPCDQUtils.h:67
RpcPanel::stationEta
int stationEta
Definition: RPCDQUtils.h:39
RpcPanel::SetPanelIndex
void SetPanelIndex(int index)
Definition: RPCDQUtils.cxx:83
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
RpcPanel::getOnlineConvention
std::string getOnlineConvention() const
Definition: RPCDQUtils.cxx:120
GasGapData::minStripPhi
double minStripPhi
Definition: RPCDQUtils.h:126
ExResult::gasgap_id
const Identifier gasgap_id
Definition: RPCDQUtils.h:85
GasGapData::NetaStrips
unsigned NetaStrips
Definition: RPCDQUtils.h:122
ExResult::ExResult
ExResult(const Identifier _gasgap_id, const Trk::PropDirection _direction)
Definition: RPCDQUtils.cxx:214
GasGapData::stationName
int stationName
Definition: RPCDQUtils.h:114
GasGapData::gapid_str
std::string gapid_str
Definition: RPCDQUtils.h:112
TagDef::eventTrig
TString eventTrig
Definition: RPCDQUtils.h:62
RpcPanel::getSectorLayer
std::pair< int, int > getSectorLayer() const
Definition: RPCDQUtils.cxx:184
GasGapData::stationEta
int stationEta
Definition: RPCDQUtils.h:115
RpcPanel::doubletR
int doubletR
Definition: RPCDQUtils.h:41
GasGapData::RpcPanel_eta_phi
std::pair< std::shared_ptr< RpcPanel >, std::shared_ptr< RpcPanel > > RpcPanel_eta_phi
Definition: RPCDQUtils.h:132
RpcPanel::panel_index
int panel_index
Definition: RPCDQUtils.h:46
ExResult::localTrackPosInBounds
bool localTrackPosInBounds
Definition: RPCDQUtils.h:88
RpcPanel::getElementStr
std::string getElementStr() const
Definition: RPCDQUtils.cxx:88
Trk::ParametersBase
Definition: ParametersBase.h:55
ExResult::minTrackGasGapDR
float minTrackGasGapDR
Definition: RPCDQUtils.h:94
MyMuon::matchedL1ThrInclusive
std::set< int > matchedL1ThrInclusive
Definition: RPCDQUtils.h:78
TagDef::tagTrig
TString tagTrig
Definition: RPCDQUtils.h:63
ExResult::globalPos
Amg::Vector3D globalPos
Definition: RPCDQUtils.h:91
GasGapData::computeTrackDistanceToGasGap
void computeTrackDistanceToGasGap(ExResult &result, const xAOD::TrackParticle &track) const
Definition: RPCDQUtils.cxx:290
GasGapData::doubletZ
int doubletZ
Definition: RPCDQUtils.h:118
ExResult::minTrackGasGapDEta
float minTrackGasGapDEta
Definition: RPCDQUtils.h:92
RpcPanel::doubletZ
int doubletZ
Definition: RPCDQUtils.h:42
TagDef
Definition: RPCDQUtils.h:61
RpcPanel::panel_valid
bool panel_valid
Definition: RPCDQUtils.h:30
RpcPanel::panelId
Identifier panelId
Definition: RPCDQUtils.h:29
GasGapData::maxStripEta
double maxStripEta
Definition: RPCDQUtils.h:125
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
GasGapData::maxStripPhi
double maxStripPhi
Definition: RPCDQUtils.h:127
MuonContainer.h
RpcPanel::stationName
int stationName
Definition: RPCDQUtils.h:38
GasGapData::doubletPhi
int doubletPhi
Definition: RPCDQUtils.h:119
RpcPanel::NHit_perEvt
unsigned NHit_perEvt
Definition: RPCDQUtils.h:47
RpcPanel::operator==
bool operator==(const RpcPanel &rhs) const
Definition: RPCDQUtils.cxx:97
GasGapData::stationPhi
int stationPhi
Definition: RPCDQUtils.h:116
ExResult::minTrackGasGapDPhi
float minTrackGasGapDPhi
Definition: RPCDQUtils.h:93
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
ExResult::localPos
Amg::Vector3D localPos
Definition: RPCDQUtils.h:90
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
RpcPanel::operator<
bool operator<(const RpcPanel &rhs) const
Definition: RPCDQUtils.cxx:110
RpcPanel::panel_name
std::string panel_name
Definition: RPCDQUtils.h:32
GasGapData::localTrackPosY
double localTrackPosY
Definition: RPCDQUtils.h:128
MyMuon::tagProbeAndZmumuOK
bool tagProbeAndZmumuOK
Definition: RPCDQUtils.h:74
GasGapData::GasGapData
GasGapData(const Muon::IMuonIdHelperSvc &idHelperSvc, const MuonGM::RpcReadoutElement *_readoutEl, const int _doubletZ, const int _doubletPhi, const unsigned _gasgap)
Definition: RPCDQUtils.cxx:221
IMuonIdHelperSvc.h
MyMuon::tagProbeOK
bool tagProbeOK
Definition: RPCDQUtils.h:73
RpcPanel::stationNameStr
std::string stationNameStr
Definition: RPCDQUtils.h:33
RpcPanel::measPhi
int measPhi
Definition: RPCDQUtils.h:45
GasGapData::gapid_valid
bool gapid_valid
Definition: RPCDQUtils.h:111
RpcPanel::panel_str
std::string panel_str
Definition: RPCDQUtils.h:31
Identifier
Definition: IdentifierFieldParser.cxx:14