ATLAS Offline Software
Loading...
Searching...
No Matches
TrigmuCombHypoTool.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_TRIGMUCOMBHYPOTOOL_H
6#define TRIGMUONHYPO_TRIGMUCOMBHYPOTOOL_H 1
7
9#include "GaudiKernel/SystemOfUnits.h"
10
12
14
15class StoreGateSvc;
16
17// --------------------------------------------------------------------------------
18// --------------------------------------------------------------------------------
19
27
28// --------------------------------------------------------------------------------
29// --------------------------------------------------------------------------------
30
32 enum { MaxNumberTools = 20 };
33 public:
34
35 TrigmuCombHypoTool(const std::string& type,
36 const std::string & name,
37 const IInterface* parent );
38
57
58 virtual ~TrigmuCombHypoTool();
59
60 virtual StatusCode initialize() override;
61
62 virtual StatusCode decide(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& toolInput) const;
63
64 private:
65
66 bool decideOnSingleObject(TrigmuCombHypoTool::CombinedMuonInfo& input, size_t cutIndex) const;
67
68 StatusCode inclusiveSelection(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& input) const;
69
70 StatusCode multiplicitySelection(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& input) const;
71
72 StatusCode applyOverlapRemoval(std::vector<TrigmuCombHypoTool::CombinedMuonInfo>& toolInput) const;
73 StatusCode checkOverlap(std::vector<TrigmuCombHypoTool::CombinedMuonInfo*>& input) const;
74 bool isOverlap(const xAOD::L2CombinedMuon *mf1, const xAOD::L2CombinedMuon *mf2) const;
75 double dR(double eta1, double phi1, double eta2, double phi2) const;
76 double invMass(double m1, double pt1, double eta1, double phi1,
77 double m2, double pt2, double eta2, double phi2) const;
78 StatusCode chooseBestMuon(std::vector<TrigmuCombHypoTool::CombinedMuonInfo*>& input, const std::vector<unsigned int>& mucombResult) const;
79
81
82 ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
83
84 Gaudi::Property< std::vector<std::vector<double>> > m_ptBins {
85 this, "PtBins", { {0, 2.5} }, "Bins range of each pT threshold" };
86
87 Gaudi::Property< std::vector<std::vector<double>> > m_ptThresholds {
88 this, "PtThresholds", { {5.83 * Gaudi::Units::GeV} }, "Track pT requirement ( separate threshold for each muon )" };
89
90 Gaudi::Property< bool > m_acceptAll {
91 this, "AcceptAll", false, "Ignore selection" };
92
93 // Enable pi/k decay rejection
94 Gaudi::Property< bool > m_pikCuts {
95 this, "ApplyPikCuts", false, "Enable pi/k decay rejection" };
96
97 Gaudi::Property< double > m_maxPtToApplyPik {
98 this, "MaxPtToApplyPik", 25., "" };
99
100 Gaudi::Property< double > m_chi2MaxID {
101 this, "MaxChi2IDPik", 3.5, "" };
102
103 Gaudi::Property< size_t > m_numMuonThreshold {
104 this, "numMuonThreshold", 50, "Threshold of the number of muons" };
105
106 // Apply strategy dependent pT cuts (B/T/S = 0 fields, L1 seeded, ...)
107 // strategy dependent pT cuts
108 //0: Std
109 //1: simplified match Pt combined
110 //2: simplified match Pt ID
111 //3: simplified match Pt MU
112 //4: simplified match Pt infinite
113 Gaudi::Property< bool > m_strategydependent {
114 this, "ApplyStrategyDependentCuts", false, "" };
115
116 Gaudi::Property< std::vector<double> > m_strategyDependentPtCuts {
117 this, "StrategyDependentPtCuts",{ 0.0, 0.0, 0.0, -3.0 }, "" };
118 // { strategy 1 (in GeV) (if<0 do not apply the standard signature cut),
119 // strategy 2 (in GeV),
120 // strategy 3 (in GeV),
121 // strategy 4 (in GeV) }
122
123 Gaudi::Property<bool> m_decisionPerCluster {
124 this, "DecisionPerCluster", true, "Is multiplicity requirement refering to muons ( false ) or RoIs/clusters with muons ( false ), relevant only in when multiplicity > 1" };
125
126
127 // Members for overlap removal
128 Gaudi::Property< bool > m_applyOR {
129 this, "ApplyOR", false, "apply overlap removal for mucomb" };
130
131 Gaudi::Property<bool> m_requireDR{
132 this, "RequireDR", true, "require or not DR cut for overlap removal"};
133
134 Gaudi::Property<bool> m_requireMufastDR{
135 this, "RequireMufastDR", true, "require or not mufast DR cut for overlap removal"};
136
137 Gaudi::Property<bool> m_requireMass{
138 this, "RequireMass", true, "require or not mass cut for overlap removal"};
139
140 Gaudi::Property<bool> m_requireSameSign{
141 this, "RequireSameSign", true, "require or not charge cut for overlap removal"};
142
143 Gaudi::Property< std::vector<float> > m_etaBins {
144 this, "EtaBins", {0, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds"};
145
146 Gaudi::Property< std::vector<float> > m_dRThres {
147 this, "DRThres", {0.06, 0.05, 0.05}, "DR threshold"};
148
149 Gaudi::Property< std::vector<float> > m_mufastDRThres {
150 this, "MufastDRThres", {0.06, 0.05, 0.05}, "mufast DR threshold"};
151
152 Gaudi::Property< std::vector<float> > m_massThres {
153 this, "MassThres", {0.20, 0.15, 0.10}, "mass threshold"};
154
155 Gaudi::Property< float > m_d0min {
156 this, "MinimumD0", 0., "lower d0 cut (mm)"};
157
158 // Other members:
159 std::vector<size_t> m_bins = {0};
160};
161
162#endif
void decisionIDs(const Decision *d, DecisionIDContainer &id)
Extracts DecisionIDs stored in the Decision object.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
The Athena Transient Store API.
Gaudi::Property< std::vector< std::vector< double > > > m_ptThresholds
virtual StatusCode decide(std::vector< TrigmuCombHypoTool::CombinedMuonInfo > &toolInput) const
Gaudi::Property< std::vector< float > > m_massThres
StatusCode applyOverlapRemoval(std::vector< TrigmuCombHypoTool::CombinedMuonInfo > &toolInput) const
Gaudi::Property< bool > m_acceptAll
Gaudi::Property< bool > m_strategydependent
Gaudi::Property< bool > m_decisionPerCluster
bool decideOnSingleObject(TrigmuCombHypoTool::CombinedMuonInfo &input, size_t cutIndex) const
Gaudi::Property< bool > m_pikCuts
StatusCode checkOverlap(std::vector< TrigmuCombHypoTool::CombinedMuonInfo * > &input) const
StatusCode multiplicitySelection(std::vector< TrigmuCombHypoTool::CombinedMuonInfo > &input) const
Gaudi::Property< float > m_d0min
bool isOverlap(const xAOD::L2CombinedMuon *mf1, const xAOD::L2CombinedMuon *mf2) const
Gaudi::Property< bool > m_applyOR
Gaudi::Property< bool > m_requireMufastDR
StatusCode inclusiveSelection(std::vector< TrigmuCombHypoTool::CombinedMuonInfo > &input) const
std::vector< size_t > m_bins
double dR(double eta1, double phi1, double eta2, double phi2) const
Gaudi::Property< std::vector< double > > m_strategyDependentPtCuts
Gaudi::Property< std::vector< float > > m_etaBins
Gaudi::Property< bool > m_requireDR
TrigmuCombHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize() override
double invMass(double m1, double pt1, double eta1, double phi1, double m2, double pt2, double eta2, double phi2) const
Gaudi::Property< size_t > m_numMuonThreshold
Gaudi::Property< std::vector< float > > m_mufastDRThres
ToolHandle< GenericMonitoringTool > m_monTool
Gaudi::Property< double > m_chi2MaxID
HLT::Identifier m_decisionId
Gaudi::Property< bool > m_requireSameSign
Gaudi::Property< std::vector< float > > m_dRThres
StatusCode chooseBestMuon(std::vector< TrigmuCombHypoTool::CombinedMuonInfo * > &input, const std::vector< unsigned int > &mucombResult) const
Gaudi::Property< bool > m_requireMass
Gaudi::Property< double > m_maxPtToApplyPik
Gaudi::Property< std::vector< std::vector< double > > > m_ptBins
std::set< DecisionID > DecisionIDContainer
L2CombinedMuon_v1 L2CombinedMuon
Define the latest version of the muon CB class.
L2StandAloneMuon_v2 L2StandAloneMuon
Define the latest version of the muon SA class.
CombinedMuonInfo(TrigCompositeUtils::Decision *d, const xAOD::L2CombinedMuon *c, const xAOD::L2StandAloneMuon *f, const TrigCompositeUtils::Decision *previousDecision)
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs
const xAOD::L2CombinedMuon * muComb
TrigCompositeUtils::DecisionIDContainer isOR
const xAOD::L2StandAloneMuon * muFast
TrigCompositeUtils::Decision * decision