ATLAS Offline Software
L2MuonSAIOMon.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGMUONMONITORING_L2MUONSAIOMON_H
6 #define TRIGMUONMONITORING_L2MUONSAIOMON_H
7 
11 
12 /*
13 This is a class for monitoring L2MuonSAIO.
14  */
16 
17  public:
18  L2MuonSAIOMon(const std::string& name, ISvcLocator* pSvcLocator );
19 
20  virtual StatusCode initialize() override;
21 
22  protected:
23  virtual StatusCode fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const override;
24  virtual StatusCode fillVariablesPerOfflineMuonPerChain(const EventContext& ctx, const xAOD::Muon* mu, const std::string &chain) const override;
25 
26  private:
27  Gaudi::Property<std::vector<float> > m_monitored_chains_plateau {this, "Plateaus", {}, "List of plateaus of measured trigger"};
28  std::map<std::string, double> m_plateaus {};
29  SG::ReadHandleKey<xAOD::L2CombinedMuonContainer> m_L2MuonCBIOContainerKey {this, "L2CombinedMuonContainerName_IO", "HLT_MuonL2CBInfoIOmode", "L2MuonCBIO container"};
30  StatusCode matchL2IO_wContainer(const EventContext &ctx, const std::string &chain, std::vector< const xAOD::L2CombinedMuon* > &Trig_L2IOobjects) const;
31  StatusCode L2OverlapRemover( const std::vector< const xAOD::L2CombinedMuon* >& matchSA_L2IOobjects, std::vector< bool > &isoverlap, std::vector< bool > &passOR ) const;
32  bool isOverlap( const xAOD::L2CombinedMuon* matchSA_L2IOobject1, const xAOD::L2CombinedMuon* matchSA_L2IOobject2 ) const;
33  StatusCode chooseBestMuon( const std::vector< const xAOD::L2CombinedMuon* >& matchSA_L2IOobjects, std::vector< bool > &passOR, std::vector< unsigned int > &mucombResult ) const;
34  StatusCode muCombHypo_TDTworkaround( const std::string &chain, const std::vector< const xAOD::L2CombinedMuon* >& Trig_L2IOobjects, std::vector< bool > &pass_muCombHypo ) const;
35  StatusCode isPassedmuCombHypo( const std::string &chain, const xAOD::L2CombinedMuon* Trig_L2IOobjects ,bool &pass_muCombHypo) const;
36  StatusCode decision_ptthreshold( const std::string &chain, std::vector< float > &my_EtaBins, std::vector< float > &my_muCombThres,
37  bool &my_pikCuts, float &my_maxPtToApplyPik, float &my_chi2MaxID ) const;
38 
39  const xAOD::L2CombinedMuon* searchL2InsideOut(const EventContext &ctx, const xAOD::Muon *mu, const std::string& trigger) const;
40  const xAOD::Muon* searchTagOfflineMuon( const EventContext& ctx, const xAOD::Muon* probe ) const;
41 
42  static inline std::tuple<float,float,float> L2ORPosForMatchFunc(const xAOD::L2StandAloneMuon *trig);
43  static inline std::tuple<float,float,float> L2ORPosForMatchFunc(const xAOD::L2CombinedMuon *trig);
44 
45  // these threshold is same as the L2OverlapRemover in TrigMufastHypoTool
46  Gaudi::Property< std::vector<float> > m_etaBins {this, "EtaBins", {0, 0.9, 1.1, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds"};
47  Gaudi::Property< std::vector<float> > m_dRCBThres {this, "DRThres", {0.002, 0.001, 0.002, 0.002, 0.002}, "DR threshold of L2CB"};
48  Gaudi::Property< std::vector<float> > m_dRbySAThres {this, "dRbySAThres", {0, 0, 0, 0, 0}, "mufast DR threshold of L2CB"};
49  Gaudi::Property< std::vector<float> > m_massCBThres {this, "MassThres", {0.004, 0.002, 0.006, 0.006, 0.006}, "mass threshold of L2CB"};
50 
51  // config of L2OverlapRemover for L2Inside-Out
52  bool m_RequireDR = true;
53  bool m_RequireDRbySA = false;
54  bool m_RequireMass = true;
55  bool m_RequireSameSign = true;
56 
57 };
58 
59 #endif //TRIGMUONMONITORING_L2MUONSAIOMON_H
TrigMuonMonitorAlgorithm.h
L2MuonSAIOMon::m_massCBThres
Gaudi::Property< std::vector< float > > m_massCBThres
Definition: L2MuonSAIOMon.h:49
L2MuonSAIOMon::L2OverlapRemover
StatusCode L2OverlapRemover(const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &isoverlap, std::vector< bool > &passOR) const
Definition: L2MuonSAIOMon.cxx:677
L2MuonSAIOMon::m_RequireDR
bool m_RequireDR
Definition: L2MuonSAIOMon.h:52
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
xAOD::L2StandAloneMuon_v2
Class describing standalone muons reconstructed in the LVL2 trigger.
Definition: L2StandAloneMuon_v2.h:36
L2MuonSAIOMon::m_L2MuonCBIOContainerKey
SG::ReadHandleKey< xAOD::L2CombinedMuonContainer > m_L2MuonCBIOContainerKey
Definition: L2MuonSAIOMon.h:29
L2CombinedMuonContainer.h
L2MuonSAIOMon::chooseBestMuon
StatusCode chooseBestMuon(const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &passOR, std::vector< unsigned int > &mucombResult) const
Definition: L2MuonSAIOMon.cxx:859
L2MuonSAIOMon::initialize
virtual StatusCode initialize() override
initialize
Definition: L2MuonSAIOMon.cxx:15
L2StandAloneMuonContainer.h
L2MuonSAIOMon::isOverlap
bool isOverlap(const xAOD::L2CombinedMuon *matchSA_L2IOobject1, const xAOD::L2CombinedMuon *matchSA_L2IOobject2) const
Definition: L2MuonSAIOMon.cxx:754
L2MuonSAIOMon::searchL2InsideOut
const xAOD::L2CombinedMuon * searchL2InsideOut(const EventContext &ctx, const xAOD::Muon *mu, const std::string &trigger) const
Definition: L2MuonSAIOMon.cxx:1039
L2MuonSAIOMon::m_plateaus
std::map< std::string, double > m_plateaus
Definition: L2MuonSAIOMon.h:28
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
L2MuonSAIOMon::m_RequireSameSign
bool m_RequireSameSign
Definition: L2MuonSAIOMon.h:55
L2MuonSAIOMon
Definition: L2MuonSAIOMon.h:15
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
xAOD::L2CombinedMuon_v1
Class describing combined muon reconstructed in the LVL2 trigger.
Definition: L2CombinedMuon_v1.h:41
L2MuonSAIOMon::m_RequireMass
bool m_RequireMass
Definition: L2MuonSAIOMon.h:54
L2MuonSAIOMon::muCombHypo_TDTworkaround
StatusCode muCombHypo_TDTworkaround(const std::string &chain, const std::vector< const xAOD::L2CombinedMuon * > &Trig_L2IOobjects, std::vector< bool > &pass_muCombHypo) const
Definition: L2MuonSAIOMon.cxx:942
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigMuonMonitorAlgorithm
Base class from which analyzers can define a derived class to do specific analysis.
Definition: TrigMuonMonitorAlgorithm.h:22
L2MuonSAIOMon::m_RequireDRbySA
bool m_RequireDRbySA
Definition: L2MuonSAIOMon.h:53
L2MuonSAIOMon::fillVariablesPerOfflineMuonPerChain
virtual StatusCode fillVariablesPerOfflineMuonPerChain(const EventContext &ctx, const xAOD::Muon *mu, const std::string &chain) const override
Function that fills variables of trigger objects associated to specified trigger chains comparing off...
Definition: L2MuonSAIOMon.cxx:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
L2MuonSAIOMon::m_etaBins
Gaudi::Property< std::vector< float > > m_etaBins
Definition: L2MuonSAIOMon.h:46
L2MuonSAIOMon::m_dRCBThres
Gaudi::Property< std::vector< float > > m_dRCBThres
Definition: L2MuonSAIOMon.h:47
L2MuonSAIOMon::L2MuonSAIOMon
L2MuonSAIOMon(const std::string &name, ISvcLocator *pSvcLocator)
Definition: L2MuonSAIOMon.cxx:11
L2MuonSAIOMon::isPassedmuCombHypo
StatusCode isPassedmuCombHypo(const std::string &chain, const xAOD::L2CombinedMuon *Trig_L2IOobjects, bool &pass_muCombHypo) const
Definition: L2MuonSAIOMon.cxx:963
L2MuonSAIOMon::fillVariablesPerChain
virtual StatusCode fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const override
Function that fills variables of trigger objects associated to specified trigger chains.
Definition: L2MuonSAIOMon.cxx:34
L2MuonSAIOMon::L2ORPosForMatchFunc
static std::tuple< float, float, float > L2ORPosForMatchFunc(const xAOD::L2StandAloneMuon *trig)
Definition: L2MuonSAIOMon.cxx:1029
L2MuonSAIOMon::searchTagOfflineMuon
const xAOD::Muon * searchTagOfflineMuon(const EventContext &ctx, const xAOD::Muon *probe) const
Definition: L2MuonSAIOMon.cxx:1082
L2MuonSAIOMon::m_monitored_chains_plateau
Gaudi::Property< std::vector< float > > m_monitored_chains_plateau
Definition: L2MuonSAIOMon.h:27
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
passOR
@ passOR
Definition: SUSYToolsTester.cxx:100
L2MuonSAIOMon::decision_ptthreshold
StatusCode decision_ptthreshold(const std::string &chain, std::vector< float > &my_EtaBins, std::vector< float > &my_muCombThres, bool &my_pikCuts, float &my_maxPtToApplyPik, float &my_chi2MaxID) const
Definition: L2MuonSAIOMon.cxx:1004
L2MuonSAIOMon::m_dRbySAThres
Gaudi::Property< std::vector< float > > m_dRbySAThres
Definition: L2MuonSAIOMon.h:48
PhysDESDM_Quirks.trigger
trigger
Definition: PhysDESDM_Quirks.py:27
L2MuonSAIOMon::matchL2IO_wContainer
StatusCode matchL2IO_wContainer(const EventContext &ctx, const std::string &chain, std::vector< const xAOD::L2CombinedMuon * > &Trig_L2IOobjects) const
Definition: L2MuonSAIOMon.cxx:611