ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMufastHypoTool.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_TRIGMUFASTHYPOTOOL_H
6#define TRIGMUONHYPO_TRIGMUFASTHYPOTOOL_H 1
7
9#include "GaudiKernel/SystemOfUnits.h"
10
15
16class StoreGateSvc;
17
18// --------------------------------------------------------------------------------
19// --------------------------------------------------------------------------------
20
29
30// --------------------------------------------------------------------------------
31// --------------------------------------------------------------------------------
32
34 enum { MaxNumberTools = 20 };
35 public:
36
37 TrigMufastHypoTool(const std::string& type,
38 const std::string & name,
39 const IInterface* parent );
40
41 virtual ~TrigMufastHypoTool();
42
61
62 virtual StatusCode initialize() override;
63
64 virtual StatusCode decide(std::vector<TrigMufastHypoTool::MuonClusterInfo>& toolInput) const;
65
66 private:
67
69
70 bool decideOnSingleObject(TrigMufastHypoTool::MuonClusterInfo& input, size_t cutIndex) const;
71
72 // for single muon event
73 StatusCode inclusiveSelection(std::vector<TrigMufastHypoTool::MuonClusterInfo>& toolInput) const;
74
75 // for multipul muon event
76 StatusCode multiplicitySelection(std::vector<TrigMufastHypoTool::MuonClusterInfo>& toolInput) const;
77
78 StatusCode applyOverlapRemoval(std::vector<TrigMufastHypoTool::MuonClusterInfo>& toolInput) const;
79 StatusCode checkOverlap(std::vector<TrigMufastHypoTool::MuonClusterInfo*>& input) const;
80 bool isOverlap(const xAOD::L2StandAloneMuon *mf1, const xAOD::L2StandAloneMuon *mf2) const;
81 double dR(double eta1, double phi1, double eta2, double phi2) const;
82 double invMass(double m1, double pt1, double eta1, double phi1,
83 double m2, double pt2, double eta2, double phi2) const;
84 StatusCode chooseBestMuon(std::vector<TrigMufastHypoTool::MuonClusterInfo*>& input, const std::vector<unsigned int>& mufastResult) const;
85
86 float getLocalPhi(float, float, float) const;
87
88 // Properties:
89 Gaudi::Property< std::vector<std::vector<double>> > m_ptBins {
90 this, "PtBins", { {0, 2.5} }, "Bins range of each pT threshold" };
91
92 Gaudi::Property< std::vector<std::vector<double>> > m_ptThresholds {
93 this, "PtThresholds", { {5.49*Gaudi::Units::GeV} }, "Track pT requirement ( separate threshold for each muon )" };
94
95 Gaudi::Property< bool > m_acceptAll {
96 this, "AcceptAll", false, "Ignore selection" };
97
98 Gaudi::Property< bool > m_selectPV {
99 this, "SelectPV", false, "Select PV" };
100
101 Gaudi::Property< float > m_ZPV {
102 this, "ZPVBins", 400. , "Define ZPV" };
103
104 Gaudi::Property< float > m_RPV {
105 this, "RPVBins", 200., "Define RPV" };
106
107 Gaudi::Property< std::vector<double> > m_ptThresholdForECWeakBRegionA {
108 this, "PtThresholdForECWeakBRegionA", {3.}, "Track pT requirement on regionA of weak magnetic field ( separate threshold for each muon )" };
109
110 Gaudi::Property< std::vector<double> > m_ptThresholdForECWeakBRegionB {
111 this, "PtThresholdForECWeakBRegionB", {3.}, "Track pT requirement on regionB of weak magnetic field ( separate threshold for each muon )" };
112
113 Gaudi::Property<bool> m_decisionPerCluster {
114 this, "DecisionPerCluster", true, "Is multiplicity requirement refering to muons ( false ) or RoIs/clusters with muons ( false ), relevant only in when multiplicity > 1" };
115
116 Gaudi::Property< bool > m_doCalib {
117 this, "DoCalib", false, "muoncalib chain" };
118
119 // Members for overlap removal
120 Gaudi::Property< bool > m_applyOR {
121 this, "ApplyOR", false, "apply overlap removal for mufast" };
122
123 Gaudi::Property<bool> m_requireDR{
124 this, "RequireDR", true, "require or not DR cut for overlap removal"};
125
126 Gaudi::Property<bool> m_requireMass{
127 this, "RequireMass", true, "require or not mass cut for overlap removal"};
128
129 Gaudi::Property<bool> m_requireSameSign{
130 this, "RequireSameSign", true, "require or not charge cut for overlap removal"};
131
132 Gaudi::Property< float > m_dRThresBB {
133 this, "DRThresBB", 0.05, "DR threshold in barel and barel region"};
134
135 Gaudi::Property< float > m_massThresBB {
136 this, "MassThresBB", 0.20, "mass threshold in barel and barel region"};
137
138 Gaudi::Property< float > m_dRThresBE {
139 this, "DRThresBE", 0.05, "DR threshold in barel and barel region"};
140
141 Gaudi::Property< float > m_massThresBE {
142 this, "MassThresBE", 0.20, "mass threshold in barel and endcap region"};
143
144 Gaudi::Property< std::vector<float> > m_etaBinsEC {
145 this, "EtaBinsEC", {0, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds in endcap and barel region"};
146
147 Gaudi::Property< std::vector<float> > m_dRThresEC {
148 this, "DRThresEC", {0.06, 0.05, 0.05}, "DR threshold in endcap and barel region"};
149
150 Gaudi::Property< std::vector<float> > m_massThresEC {
151 this, "MassThresEC", {0.20, 0.15, 0.10}, "mass threshold in endcap and endcap region"};
152
153
154 // Other members:
155 std::vector<size_t> m_bins = {0};
156
157 ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
158
159
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< double > > m_ptThresholdForECWeakBRegionB
Gaudi::Property< std::vector< float > > m_dRThresEC
virtual StatusCode initialize() override
TrigMufastHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< bool > m_acceptAll
Gaudi::Property< float > m_ZPV
float getLocalPhi(float, float, float) const
Gaudi::Property< bool > m_applyOR
Gaudi::Property< float > m_massThresBB
Gaudi::Property< std::vector< float > > m_massThresEC
Gaudi::Property< bool > m_doCalib
StatusCode chooseBestMuon(std::vector< TrigMufastHypoTool::MuonClusterInfo * > &input, const std::vector< unsigned int > &mufastResult) const
virtual StatusCode decide(std::vector< TrigMufastHypoTool::MuonClusterInfo > &toolInput) const
double invMass(double m1, double pt1, double eta1, double phi1, double m2, double pt2, double eta2, double phi2) const
Gaudi::Property< std::vector< std::vector< double > > > m_ptBins
Gaudi::Property< bool > m_decisionPerCluster
std::vector< size_t > m_bins
StatusCode checkOverlap(std::vector< TrigMufastHypoTool::MuonClusterInfo * > &input) const
StatusCode applyOverlapRemoval(std::vector< TrigMufastHypoTool::MuonClusterInfo > &toolInput) const
StatusCode inclusiveSelection(std::vector< TrigMufastHypoTool::MuonClusterInfo > &toolInput) const
Gaudi::Property< bool > m_requireDR
HLT::Identifier m_decisionId
bool decideOnSingleObject(TrigMufastHypoTool::MuonClusterInfo &input, size_t cutIndex) const
Gaudi::Property< float > m_massThresBE
StatusCode multiplicitySelection(std::vector< TrigMufastHypoTool::MuonClusterInfo > &toolInput) const
Gaudi::Property< float > m_dRThresBB
Gaudi::Property< bool > m_selectPV
bool isOverlap(const xAOD::L2StandAloneMuon *mf1, const xAOD::L2StandAloneMuon *mf2) const
Gaudi::Property< std::vector< std::vector< double > > > m_ptThresholds
Gaudi::Property< float > m_RPV
Gaudi::Property< std::vector< double > > m_ptThresholdForECWeakBRegionA
Gaudi::Property< bool > m_requireSameSign
Gaudi::Property< bool > m_requireMass
Gaudi::Property< std::vector< float > > m_etaBinsEC
Gaudi::Property< float > m_dRThresBE
double dR(double eta1, double phi1, double eta2, double phi2) const
ToolHandle< GenericMonitoringTool > m_monTool
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
int r
Definition globals.cxx:22
std::set< DecisionID > DecisionIDContainer
L2StandAloneMuon_v2 L2StandAloneMuon
Define the latest version of the muon SA class.
const TrigCompositeUtils::DecisionIDContainer previousDecisionIDs
TrigCompositeUtils::Decision * decision
const xAOD::L2StandAloneMuon * muFast
MuonClusterInfo(TrigCompositeUtils::Decision *d, const TrigRoiDescriptor *r, const xAOD::L2StandAloneMuon *f, const TrigCompositeUtils::Decision *previousDecision)
TrigCompositeUtils::DecisionIDContainer isOR