ATLAS Offline Software
TrigMuonEFHypoTool.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 TRIGMUONHYPO_TRIGMUONEFHYPOTOOL_H
6 #define TRIGMUONHYPO_TRIGMUONEFHYPOTOOL_H 1
10 #include "xAODMuon/MuonContainer.h"
11 #include "GaudiKernel/SystemOfUnits.h"
12 
13 // include Muon SelectionTool for quality criteria
15 
16 class StoreGateSvc;
18  enum { MaxNumberTools = 20 };
19  public:
20  TrigMuonEFHypoTool(const std::string& type, const std::string & name, const IInterface* parent);
22 
23  struct MuonEFInfo {
25  const xAOD::Muon* m,
26  const TrigCompositeUtils::Decision* previousDecision )
27  : decision( d ),
28  muon( m ),
30  TrigCompositeUtils::decisionIDs( previousDecision ).end() )
31  {}
32 
34  const xAOD::Muon* muon;
36  };
37  virtual StatusCode initialize() override;
38  StatusCode decide(std::vector<TrigMuonEFHypoTool::MuonEFInfo>& toolInput) const ;
39  float getdphi(float phi1, float phi2) const;
40  private:
41  bool passedQualityCuts(const xAOD::Muon* muon) const;
42  bool decideOnSingleObject(TrigMuonEFHypoTool::MuonEFInfo& input, size_t cutIndex) const;
43  StatusCode inclusiveSelection(std::vector<TrigMuonEFHypoTool::MuonEFInfo>& toolInput) const;
44  StatusCode multiplicitySelection(std::vector<TrigMuonEFHypoTool::MuonEFInfo>& toolInput) const;
45 
47  // Properties:
48  Gaudi::Property< bool > m_nscan {
49  this, "NarrowScan", false, "Apply narrow scan" };
50  Gaudi::Property< float > m_conesize {
51  this, "ConeSize", 0.5, "Narrow scan cone size" };
52  Gaudi::Property< bool > m_muonqualityCut {
53  this, "MuonQualityCut", false, "Ignore selection" };
54  Gaudi::Property< std::vector<std::vector<double>> > m_ptBins {
55  this, "PtBins", { {0, 2.5} }, "Bins range of each pT threshold" };
56  Gaudi::Property< std::vector<std::vector<double>> > m_ptThresholds {
57  this, "PtThresholds", { {5.49*Gaudi::Units::GeV} }, "Track pT requirement ( separate threshold for each muon )" };
58  Gaudi::Property< bool > m_acceptAll {
59  this, "AcceptAll", false, "Ignore selection" };
60  Gaudi::Property<bool> m_decisionPerRoI {
61  this, "DecisionPerRoI", true, "Is multiplicity requirement refering to muons ( false ) or RoIs with muons ( true ), relevant only in when multiplicity > 1" };
62  Gaudi::Property<bool> m_threeStationCut{
63  this, "RequireThreeStations", false, "Apply cut on N GoodPrecisionLayers in endcaps"};
64  Gaudi::Property<bool> m_doSA{
65  this, "RequireSAMuons", false, "Apply cut on SA muons (otherwise require combined muons)"};
66  Gaudi::Property< float > m_d0min {
67  this, "MinimumD0", 0., "lower d0 cut (mm)"};
68  Gaudi::Property< bool > m_checkOvlp {
69  this, "RemoveOverlaps", false, "do overlap removal"};
70  Gaudi::Property<bool> m_runCommissioningChain{
71  this, "RunCommissioningChain", false, "Apply a looser requirement according to absence of NSW"};
72 
73  // Other members:
74  std::vector<size_t> m_bins={0};
75  ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
76  ToolHandle<CP::IMuonSelectionTool> m_muonSelTool{this, "MuonSelectionTool", "CP::MuonSelectionTool/MuonSelectionTool", "Tool for muon quality selection"};
77  xAOD::Muon::TrackParticleType m_type;
78 
79 
80 };
81 #endif
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
TrigMuonEFHypoTool::MuonEFInfo::MuonEFInfo
MuonEFInfo(TrigCompositeUtils::Decision *d, const xAOD::Muon *m, const TrigCompositeUtils::Decision *previousDecision)
Definition: TrigMuonEFHypoTool.h:24
TrigMuonEFHypoTool::m_threeStationCut
Gaudi::Property< bool > m_threeStationCut
Definition: TrigMuonEFHypoTool.h:62
TrigMuonEFHypoTool::m_muonSelTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelTool
Definition: TrigMuonEFHypoTool.h:76
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TrigMuonEFHypoTool::MuonEFInfo::muon
const xAOD::Muon * muon
Definition: TrigMuonEFHypoTool.h:34
TrigMuonEFHypoTool::m_runCommissioningChain
Gaudi::Property< bool > m_runCommissioningChain
Definition: TrigMuonEFHypoTool.h:70
TrigMuonEFHypoTool::m_type
xAOD::Muon::TrackParticleType m_type
Definition: TrigMuonEFHypoTool.h:77
TrigMuonEFHypoTool::MuonEFInfo::decision
TrigCompositeUtils::Decision * decision
Definition: TrigMuonEFHypoTool.h:33
hist_file_dump.d
d
Definition: hist_file_dump.py:137
TrigMuonEFHypoTool::passedQualityCuts
bool passedQualityCuts(const xAOD::Muon *muon) const
Definition: TrigMuonEFHypoTool.cxx:162
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
TrigMuonEFHypoTool::initialize
virtual StatusCode initialize() override
Definition: TrigMuonEFHypoTool.cxx:17
TrigMuonEFHypoTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigMuonEFHypoTool.h:75
TrigMuonEFHypoTool::m_d0min
Gaudi::Property< float > m_d0min
Definition: TrigMuonEFHypoTool.h:66
TrigMuonEFHypoTool::decide
StatusCode decide(std::vector< TrigMuonEFHypoTool::MuonEFInfo > &toolInput) const
Definition: TrigMuonEFHypoTool.cxx:184
TrigMuonEFHypoTool::m_doSA
Gaudi::Property< bool > m_doSA
Definition: TrigMuonEFHypoTool.h:64
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
TrigMuonEFHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: TrigMuonEFHypoTool.h:58
TrigMuonEFHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigMuonEFHypoTool.h:46
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
IMuonSelectionTool.h
TrigMuonEFHypoTool::MaxNumberTools
@ MaxNumberTools
Definition: TrigMuonEFHypoTool.h:18
TrigCompositeUtils.h
GenericMonitoringTool.h
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigMuonEFHypoTool::m_bins
std::vector< size_t > m_bins
Definition: TrigMuonEFHypoTool.h:74
TrigMuonEFHypoTool::multiplicitySelection
StatusCode multiplicitySelection(std::vector< TrigMuonEFHypoTool::MuonEFInfo > &toolInput) const
Definition: TrigMuonEFHypoTool.cxx:220
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
TrigMuonEFHypoTool::m_ptThresholds
Gaudi::Property< std::vector< std::vector< double > > > m_ptThresholds
Definition: TrigMuonEFHypoTool.h:56
TrigMuonEFHypoTool::m_decisionPerRoI
Gaudi::Property< bool > m_decisionPerRoI
Definition: TrigMuonEFHypoTool.h:60
TrigMuonEFHypoTool::m_checkOvlp
Gaudi::Property< bool > m_checkOvlp
Definition: TrigMuonEFHypoTool.h:68
TrigMuonEFHypoTool::m_conesize
Gaudi::Property< float > m_conesize
Definition: TrigMuonEFHypoTool.h:50
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigMuonEFHypoTool::m_muonqualityCut
Gaudi::Property< bool > m_muonqualityCut
Definition: TrigMuonEFHypoTool.h:52
TrigMuonEFHypoTool::inclusiveSelection
StatusCode inclusiveSelection(std::vector< TrigMuonEFHypoTool::MuonEFInfo > &toolInput) const
Definition: TrigMuonEFHypoTool.cxx:197
TrigMuonEFHypoTool::m_ptBins
Gaudi::Property< std::vector< std::vector< double > > > m_ptBins
Definition: TrigMuonEFHypoTool.h:54
MuonContainer.h
TrigMuonEFHypoTool
Definition: TrigMuonEFHypoTool.h:17
TrigMuonEFHypoTool::decideOnSingleObject
bool decideOnSingleObject(TrigMuonEFHypoTool::MuonEFInfo &input, size_t cutIndex) const
Definition: TrigMuonEFHypoTool.cxx:62
TrigMuonEFHypoTool::MuonEFInfo
Definition: TrigMuonEFHypoTool.h:23
TrigMuonEFHypoTool::MuonEFInfo::previousDecisionIDs
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs
Definition: TrigMuonEFHypoTool.h:35
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
TrigMuonEFHypoTool::~TrigMuonEFHypoTool
~TrigMuonEFHypoTool()
Definition: TrigMuonEFHypoTool.cxx:15
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HLTIdentifier.h
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:67
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
TrigMuonEFHypoTool::TrigMuonEFHypoTool
TrigMuonEFHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigMuonEFHypoTool.cxx:11
AthAlgTool
Definition: AthAlgTool.h:26
TrigMuonEFHypoTool::getdphi
float getdphi(float phi1, float phi2) const
Definition: TrigMuonEFHypoTool.cxx:304
TrigMuonEFHypoTool::m_nscan
Gaudi::Property< bool > m_nscan
Definition: TrigMuonEFHypoTool.h:48