ATLAS Offline Software
L2OverlapRemoverMon.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGMUONMONITORING_L2OVERLAPREMOVERMON_H
6 #define TRIGMUONMONITORING_L2OVERLAPREMOVERMON_H
7 
10 
11 /*
12 This is a class for monitoring L2MuonSA.
13  */
15 
16  public:
17  L2OverlapRemoverMon(const std::string& name, ISvcLocator* pSvcLocator );
18 
19  protected:
20  virtual StatusCode fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const override;
21 
22  private:
23 
30  template<class T>
31  StatusCode fillVariablesOverlapRemoverPlots(const std::string &chain, std::string &&trigstep) const;
32 
33  bool isOverlap(const std::string &chain, const ElementLink<xAOD::L2StandAloneMuonContainer>& muEL1, const ElementLink<xAOD::L2StandAloneMuonContainer>& muEL2) const;
34  bool isOverlap(const std::string &chain, const ElementLink<xAOD::L2CombinedMuonContainer>& muEL1, const ElementLink<xAOD::L2CombinedMuonContainer>& muEL2) const;
35 
42  StatusCode chooseBestMuon(const std::string &chain, const std::vector< TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> >& featureCont, const std::vector<unsigned int>& muResult) const;
43  StatusCode chooseBestMuon(const std::string &chain, const std::vector< TrigCompositeUtils::LinkInfo<xAOD::L2CombinedMuonContainer> >& featureCont, const std::vector<unsigned int>& muResult) const;
44 
45  static float calcinvMass(double m1, double pt1, double eta1, double phi1, double m2, double pt2, double eta2, double phi2) ;
46  static inline std::tuple<float,float,float> L2ORPosForMatchFunc(const xAOD::L2StandAloneMuon *trig);
47  static inline std::tuple<float,float,float> L2ORPosForMatchFunc(const xAOD::L2CombinedMuon *trig);
48 
49  // these threshold is same as the L2OverlapRemover in TrigMufastHypoTool
50  Gaudi::Property< float > m_dRSAThresBB {this, "DRThresBB", 0.05, "DR threshold of L2SA in barel and barel region"};
51  Gaudi::Property< float > m_massSAThresBB {this, "MassThresBB", 0.20, "mass threshold of L2SA in barel and barel region"};
52  Gaudi::Property< float > m_dRSAThresBE {this, "DRThresBE", 0.05, "DR threshold of L2SA in barel and barel region"};
53  Gaudi::Property< float > m_massSAThresBE {this, "MassThresBE", 0.20, "mass threshold of L2SA in barel and endcap region"};
54  Gaudi::Property< std::vector<float> > m_etaBins {this, "EtaBins", {0, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds"};
55  Gaudi::Property< std::vector<float> > m_dRSAThresEC {this, "DRThresEC", {0.06, 0.05, 0.05}, "DR threshold of L2SA in endcap and barel region"};
56  Gaudi::Property< std::vector<float> > m_massSAThresEC {this, "MassThresEC", {0.20, 0.15, 0.10}, "mass threshold of L2SA in endcap and endcap region"};
57  Gaudi::Property< std::vector<float> > m_dRCBThres {this, "DRThres", {0.06, 0.05, 0.05}, "DR threshold of L2CB"};
58  Gaudi::Property< std::vector<float> > m_dRbySAThres {this, "dRbySAThres", {0.06, 0.05, 0.05}, "mufast DR threshold of L2CB"};
59  Gaudi::Property< std::vector<float> > m_massCBThres {this, "MassThres", {0.20, 0.15, 0.10}, "mass threshold of L2CB"};
60 
61 };
62 
63 #include "L2OverlapRemoverMon.icc"
64 
65 #endif //TRIGMUONMONITORING_L2OVERLAPREMOVERMON_H
TrigMuonMonitorAlgorithm.h
L2OverlapRemoverMon
Definition: L2OverlapRemoverMon.h:14
L2OverlapRemoverMon::isOverlap
bool isOverlap(const std::string &chain, const ElementLink< xAOD::L2StandAloneMuonContainer > &muEL1, const ElementLink< xAOD::L2StandAloneMuonContainer > &muEL2) const
Definition: L2OverlapRemoverMon.cxx:24
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
L2OverlapRemoverMon::L2OverlapRemoverMon
L2OverlapRemoverMon(const std::string &name, ISvcLocator *pSvcLocator)
Definition: L2OverlapRemoverMon.cxx:9
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
xAOD::L2StandAloneMuon_v2
Class describing standalone muons reconstructed in the LVL2 trigger.
Definition: L2StandAloneMuon_v2.h:36
L2OverlapRemoverMon::L2ORPosForMatchFunc
static std::tuple< float, float, float > L2ORPosForMatchFunc(const xAOD::L2StandAloneMuon *trig)
Definition: L2OverlapRemoverMon.cxx:314
L2OverlapRemoverMon::m_massSAThresBB
Gaudi::Property< float > m_massSAThresBB
Definition: L2OverlapRemoverMon.h:51
L2StandAloneMuonContainer.h
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
L2OverlapRemoverMon::calcinvMass
static float calcinvMass(double m1, double pt1, double eta1, double phi1, double m2, double pt2, double eta2, double phi2)
Definition: L2OverlapRemoverMon.cxx:280
L2OverlapRemoverMon::m_etaBins
Gaudi::Property< std::vector< float > > m_etaBins
Definition: L2OverlapRemoverMon.h:54
L2OverlapRemoverMon::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: L2OverlapRemoverMon.cxx:14
xAOD::L2CombinedMuon_v1
Class describing combined muon reconstructed in the LVL2 trigger.
Definition: L2CombinedMuon_v1.h:41
L2OverlapRemoverMon::fillVariablesOverlapRemoverPlots
StatusCode fillVariablesOverlapRemoverPlots(const std::string &chain, std::string &&trigstep) const
Function that fills variables of L2OverlapRemover plots.
python.changerun.m1
m1
Definition: changerun.py:32
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
L2OverlapRemoverMon::m_massSAThresBE
Gaudi::Property< float > m_massSAThresBE
Definition: L2OverlapRemoverMon.h:53
L2OverlapRemoverMon::chooseBestMuon
StatusCode chooseBestMuon(const std::string &chain, const std::vector< TrigCompositeUtils::LinkInfo< xAOD::L2StandAloneMuonContainer > > &featureCont, const std::vector< unsigned int > &muResult) const
Function that choose best muon.
Definition: L2OverlapRemoverMon.cxx:160
L2OverlapRemoverMon::m_dRSAThresBE
Gaudi::Property< float > m_dRSAThresBE
Definition: L2OverlapRemoverMon.h:52
L2OverlapRemoverMon.icc
L2OverlapRemoverMon::m_dRSAThresEC
Gaudi::Property< std::vector< float > > m_dRSAThresEC
Definition: L2OverlapRemoverMon.h:55
L2OverlapRemoverMon::m_dRCBThres
Gaudi::Property< std::vector< float > > m_dRCBThres
Definition: L2OverlapRemoverMon.h:57
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrigCompositeUtils::LinkInfo
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition: LinkInfo.h:28
L2OverlapRemoverMon::m_dRSAThresBB
Gaudi::Property< float > m_dRSAThresBB
Definition: L2OverlapRemoverMon.h:50
L2OverlapRemoverMon::m_massCBThres
Gaudi::Property< std::vector< float > > m_massCBThres
Definition: L2OverlapRemoverMon.h:59
L2OverlapRemoverMon::m_massSAThresEC
Gaudi::Property< std::vector< float > > m_massSAThresEC
Definition: L2OverlapRemoverMon.h:56
L2OverlapRemoverMon::m_dRbySAThres
Gaudi::Property< std::vector< float > > m_dRbySAThres
Definition: L2OverlapRemoverMon.h:58