ATLAS Offline Software
Loading...
Searching...
No Matches
muComb.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ********************************************************************
6//
7// NAME: muComb.h
8// PACKAGE: Trigger/TrigAlgorithms/TrigmuComb
9//
10// AUTHORS: S. Giagu <stefano.giagu@cern.ch>
11//
12// PURPOSE: LVL2 Combined Muon FEX Algorithm (MT version)
13// ********************************************************************
14#ifndef TRIGMUCOMB_MUCOMB_H
15#define TRIGMUCOMB_MUCOMB_H
16
17// standard stuff
18#include <vector>
19#include <cmath>
20
21//Gaudi
22#include "GaudiKernel/ToolHandle.h"
23#include "GaudiKernel/SystemOfUnits.h"
24
25// Base class
29
31
34
37
39 double ptinv;
40 double eta;
41 double phi;
42 double eptinv;
43 double eeta;
44 double ephi;
45 double charge;
49 int status;
50};
51
54{
55 public:
57 muComb(const std::string&, ISvcLocator*);
58
60 virtual StatusCode initialize() override;
61
63 virtual StatusCode execute(const EventContext& ctx) const override;
64
65 private:
66
68 "TrackParticlesContainerName", // property name
69 "InDetTrigTrackingxAODCnv_Muon_FTF", // default value of StoreGate key
70 "input TrackParticle container name"};
71
73 "L2StandAloneMuonContainerName", // property name
74 "xAOD::L2StandAloneMuonContainer", // default value of StoreGate key
75 "input L2StandAloneMuon Container name"};
76
77
79 "L2CombinedMuonContainerName", // property name
80 "MuonL2CBInfo", // default value of StoreGate key
81 "output CB Muon container name"};
82
83 ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
84
86 ToolHandle<Trk::IExtrapolator> m_backExtrapolatorG4 {this,
87 "AtlasExtrapolator",
88 "Trk::Extrapolator/AtlasExtrapolator",
89 "Tool to backextrapolate muon from MS to IP (G4 based)"};
90
91 SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
92
93
94 int drptMatch(double, double, double,
95 double, double, double, int,
96 double&, double&, double&, double&, double&) const;
97
98 int drptMatch(const xAOD::L2StandAloneMuon* feature,
99 double, double, double, int,
100 double&, double&, double&, double&, double&) const;
101
102 int mfMatch(const xAOD::L2StandAloneMuon* feature,
103 double, double, double, double,
104 double&, double&, double&, double&, double&, int&) const;
105
106 int g4Match(const ExtrapolationResult &extr,
107 double, double, double, double, double, double, double,
108 double&, double&, double&, double&, double&, int&) const;
109
110 ExtrapolationResult getExtrapolatedMuon(const EventContext& ctx, const xAOD::L2StandAloneMuon* feature) const;
111
112 private:
113
114 // Properties
115
117 Gaudi::Property<bool> m_useBackExtrapolatorG4 {this, "UseBackExtrapolatorG4", true, "Use g4-based back-extraploator"};
118
120 Gaudi::Property<bool> m_assumeToroidOff {this, "AssumeToroidOff", false, "Force assumption toroid off"};
122 Gaudi::Property<bool> m_assumeSolenoidOff {this, "AssumeSolenoidOff", false, "Force assumption solenoid off"};
123
124
129 Gaudi::Property<int> m_AlgoStrategy {this, "MuCombStrategy", 0, "Algoritgm strategy [0=auto select best option,1=simple angular match]"};
130
136 Gaudi::Property<int> m_ChargeStrategy {this, "ChargeStrategy", 0, "Charge assignement strategy [0=muFast,1=ID,2=resolution based]"};
137
139 Gaudi::Property<std::string> m_ID_algo_to_use {this, "IDalgo", "InDetTrigTrackingxAODCnv_Muon_FTF","ID trk xAOD collection to use"};
140
142 Gaudi::Property<double> m_PtMinTrk {this, "MinPtTRK", 1.*Gaudi::Units::GeV, "ID track minimum pT"}; //GeV/c
144 Gaudi::Property<double> m_EtaMaxTrk {this, "MaxAbsEtaTRK", 2.5, "ID tracks max |eta|"};
145
146 // Matching Parameters
147 //Common
149 Gaudi::Property<int> m_NdofMin {this, "NdofMin", 9999, "matching parameter: min ndof"};
151 Gaudi::Property<bool> m_UseAbsPt {this, "UseAbsPt", false, "matching parameter: use absolute pT"};
152
153 // LUT based backextrapolator
155 Gaudi::Property<double> m_WinEta {this, "WinEtaSigma", 4.0, "matching parameter: LUT-based"};
157 Gaudi::Property<double> m_WinPhi {this, "WinPhiSigma", 4.0, "matching parameter: LUT-based"};
159 Gaudi::Property<double> m_Chi2Max {this, "Chi2Max", 1.e33, "matching parameter: LUT-based"};
161 Gaudi::Property<double> m_WinEta_EC {this, "WinEtaSigmaEndCaps", 4.0, "matching parameter: LUT-based"};
163 Gaudi::Property<double> m_WinPhi_EC {this, "WinPhiSigmaEndCaps", 10., "matching parameter: LUT-based"};
165 Gaudi::Property<double> m_Chi2Max_EC {this, "Chi2MaxEndCaps", 1.e33, "matching parameter: LUT-based"};
167 Gaudi::Property<double> m_WinEta_TS {this, "WinEtaSigmaTS", 5.0, "matching parameter: LUT-based"};
169 Gaudi::Property<double> m_WinPhi_TS {this, "WinPhiSigmaTS", 5.0, "matching parameter: LUT-based"};
171 Gaudi::Property<double> m_Chi2Max_TS {this, "Chi2MaxTS", 1.e33, "matching parameter: LUT-based"};
173 Gaudi::Property<double> m_WinEta_FE {this, "WinEtaSigmaFE", 10.0, "matching parameter: LUT-based"};
175 Gaudi::Property<double> m_WinPhi_FE {this, "WinPhiSigmaFE", 10.0, "matching parameter: LUT-based"};
177 Gaudi::Property<double> m_Chi2Max_FE {this, "Chi2MaxFE", 1.e33, "matching parameter: LUT-based"};
179 Gaudi::Property<double> m_WeightEta {this, "WeightEta", 2.0, "matching parameter: LUT-based"};
181 Gaudi::Property<double> m_WeightPhi {this, "WeightPhi", 2.0, "matching parameter: LUT-based"};
182
183 // g4 based backextrapolator
185 Gaudi::Property<double> m_WinEta_g4 {this, "WinEtaSigma_g4", 7.0, "matching parameter: G4-based"};
187 Gaudi::Property<double> m_WinPhi_g4 {this, "WinPhiSigma_g4", 7.0, "matching parameter: G4-based"};
189 Gaudi::Property<double> m_Chi2Max_g4 {this, "Chi2Max_g4", 1.e33, "matching parameter: G4-based"};
191 Gaudi::Property<double> m_WinEta_EC_g4 {this, "WinEtaSigmaEndCaps_g4",7.0, "matching parameter: G4-based"};
193 Gaudi::Property<double> m_WinPhi_EC_g4 {this, "WinPhiSigmaEndCaps_g4",7.0, "matching parameter: G4-based"};
195 Gaudi::Property<double> m_Chi2Max_EC_g4 {this, "Chi2MaxEndCaps_g4", 1.e33, "matching parameter: G4-based"};
197 Gaudi::Property<double> m_WeightEta_g4 {this, "WeightEta_g4", 2.0, "matching parameter: G4-based"};
199 Gaudi::Property<double> m_WeightPhi_g4 {this, "WeightPhi_g4", 2.0, "matching parameter: G4-based"};
201 Gaudi::Property<double> m_Chi2Weight_g4 {this, "Chi2Weight_g4", 2.0, "matching parameter: G4-based"};
202
203 // Simplified DeltaR(/Pt) based match
205 Gaudi::Property<double> m_winPt {this, "WinPt", -1.0*Gaudi::Units::GeV, "matching parameter (simplifed): pT windows in geV (disabled if < 0)"};
207 Gaudi::Property<double> m_winDR {this, "WinDelta", 0.2, "matching parameter (simplifed): strategy dependent"};
208
209 // ID parametrized rsolution for matching
210 Gaudi::Property<std::vector<double>> m_IDSCANRes_barrel {this, "IDSCANBarrelRes", {0.017, 0.000000418}, "ID parametrized rsolution for matching (barrel)"};
211 Gaudi::Property<std::vector<double>> m_IDSCANRes_endcap1 {this, "IDSCANEndcap1Res",{0.025, 0.0000002}, "ID parametrized rsolution for matching (ec1)"};
212 Gaudi::Property<std::vector<double>> m_IDSCANRes_endcap2 {this, "IDSCANEndcap2Res",{0.030, 0.0000002}, "ID parametrized rsolution for matching (ec2)"};
213 Gaudi::Property<std::vector<double>> m_IDSCANRes_endcap3 {this, "IDSCANEndcap3Res",{0.036, 0.0000004}, "ID parametrized rsolution for matching (ec3)"};
214 Gaudi::Property<std::vector<double>> m_IDSCANRes_endcap4 {this, "IDSCANEndcap4Res",{0.046, 0.0000002}, "ID parametrized rsolution for matching (ec4)"};
215
216};
217
218#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Gaudi::Property< double > m_Chi2Max
Max Chi2 for the combined muon in LUT backextrapolator (Barrel)
Definition muComb.h:159
Gaudi::Property< double > m_Chi2Weight_g4
Scale factor for the Chi2 1/pt resolutions (MS and ID) (Barrel)
Definition muComb.h:201
Gaudi::Property< double > m_Chi2Max_g4
Max Chi2 for the combined muon in LUT backextrapolator (Barrel)
Definition muComb.h:189
Gaudi::Property< std::string > m_ID_algo_to_use
ID Track collection used for matching.
Definition muComb.h:139
Gaudi::Property< double > m_WinEta_g4
Number of sigmas for the Eta matching window LUT backextrapolator (Barrel)
Definition muComb.h:185
Gaudi::Property< double > m_WinEta
Number of sigmas for the Eta matching window LUT backextrapolator (Barrel)
Definition muComb.h:155
Gaudi::Property< double > m_WinPhi_TS
Number of sigmas for the Phi matching window LUT backextrapolator (Trigger Stations)
Definition muComb.h:169
Gaudi::Property< double > m_winPt
max deltaPt for simpified matching
Definition muComb.h:205
Gaudi::Property< double > m_WeightPhi_g4
Scale factor for the Phi matching window in LUT backextrapolator.
Definition muComb.h:199
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackParticleContainerKey
Definition muComb.h:67
Gaudi::Property< int > m_NdofMin
Min Number of DOF to apply the chi2 cut on macthing based on LUT and G4 backextrapolators.
Definition muComb.h:149
Gaudi::Property< bool > m_UseAbsPt
Use Absolute value of the Pt in chi2 calculation (i.e.
Definition muComb.h:151
int drptMatch(double, double, double, double, double, double, int, double &, double &, double &, double &, double &) const
Definition muComb.cxx:72
Gaudi::Property< bool > m_assumeSolenoidOff
flag to assume B_Solenoid=0 anyway
Definition muComb.h:122
Gaudi::Property< double > m_WinPhi_EC
Number of sigmas for the Phi matching window LUT backextrapolator (EndCaps)
Definition muComb.h:163
int mfMatch(const xAOD::L2StandAloneMuon *feature, double, double, double, double, double &, double &, double &, double &, double &, int &) const
Definition muComb.cxx:330
Gaudi::Property< double > m_Chi2Max_EC_g4
Max Chi2 for the combined muon in LUT backextrapolator (EndCaps)
Definition muComb.h:195
Gaudi::Property< double > m_WinEta_FE
Number of sigmas for the Eta matching window LUT backextrapolator (MS Feet region)
Definition muComb.h:173
Gaudi::Property< double > m_WeightEta_g4
Scale factor for the Eta matching window in LUT backextrapolator.
Definition muComb.h:197
Gaudi::Property< double > m_WinEta_TS
Number of sigmas for the Eta matching window LUT backextrapolator (Trigger Stations)
Definition muComb.h:167
virtual StatusCode execute(const EventContext &ctx) const override
execute execute the combined muon FEX.
Definition muComb.cxx:456
Gaudi::Property< double > m_WinEta_EC
Number of sigmas for the Eta matching window LUT backextrapolator (EndCaps)
Definition muComb.h:161
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap2
Definition muComb.h:212
SG::WriteHandleKey< xAOD::L2CombinedMuonContainer > m_outputCBmuonCollKey
Definition muComb.h:78
Gaudi::Property< double > m_Chi2Max_TS
Max Chi2 for the combined muon in LUT backextrapolator (Trigger Stations)
Definition muComb.h:171
Gaudi::Property< double > m_WinPhi_FE
Number of sigmas for the Phi matching window LUT backextrapolator (MS Feet region)
Definition muComb.h:175
int g4Match(const ExtrapolationResult &extr, double, double, double, double, double, double, double, double &, double &, double &, double &, double &, int &) const
Definition muComb.cxx:231
Gaudi::Property< double > m_Chi2Max_EC
Max Chi2 for the combined muon in LUT backextrapolator (EndCaps)
Definition muComb.h:165
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition muComb.h:91
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap3
Definition muComb.h:213
Gaudi::Property< double > m_PtMinTrk
Min Pt to select the ID track for matching.
Definition muComb.h:142
Gaudi::Property< double > m_WinPhi_g4
Number of sigmas for the Phi matching window LUT backextrapolator (Barrel)
Definition muComb.h:187
Gaudi::Property< std::vector< double > > m_IDSCANRes_barrel
Definition muComb.h:210
Gaudi::Property< double > m_Chi2Max_FE
Max Chi2 for the combined muon in LUT backextrapolator (MS Feet region)
Definition muComb.h:177
Gaudi::Property< double > m_winDR
max deltaR for simplified matching
Definition muComb.h:207
ExtrapolationResult getExtrapolatedMuon(const EventContext &ctx, const xAOD::L2StandAloneMuon *feature) const
Definition muComb.cxx:129
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap1
Definition muComb.h:211
Gaudi::Property< double > m_EtaMaxTrk
Max abs(eta) to select the ID track for matching.
Definition muComb.h:144
Gaudi::Property< int > m_ChargeStrategy
muComb charge assignment strategy: 0: useMuFast 1: use ID 2: use resolution model
Definition muComb.h:136
Gaudi::Property< double > m_WeightEta
Scale factor for the Eta matching window in LUT backextrapolator.
Definition muComb.h:179
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap4
Definition muComb.h:214
Gaudi::Property< bool > m_useBackExtrapolatorG4
flag to switch between G4 and LUT based back-extrapolation
Definition muComb.h:117
Gaudi::Property< double > m_WinPhi_EC_g4
Number of sigmas for the Phi matching window LUT backextrapolator (EndCaps)
Definition muComb.h:193
Gaudi::Property< int > m_AlgoStrategy
muComb matching strategy: 0: auto select best option 1: simplified R,(Pt) matching
Definition muComb.h:129
ToolHandle< GenericMonitoringTool > m_monTool
Definition muComb.h:83
muComb(const std::string &, ISvcLocator *)
Constructor.
Definition muComb.cxx:28
Gaudi::Property< double > m_WeightPhi
Scale factor for the Phi matching window in LUT backextrapolator.
Definition muComb.h:181
Gaudi::Property< double > m_WinPhi
Number of sigmas for the Phi matching window LUT backextrapolator (Barrel)
Definition muComb.h:157
Gaudi::Property< bool > m_assumeToroidOff
flag to assume B_Toroid=0 anyway
Definition muComb.h:120
Gaudi::Property< double > m_WinEta_EC_g4
Number of sigmas for the Eta matching window LUT backextrapolator (EndCaps)
Definition muComb.h:191
virtual StatusCode initialize() override
initialize.
Definition muComb.cxx:33
ToolHandle< Trk::IExtrapolator > m_backExtrapolatorG4
Handle to the G4 backExtrapolator tool.
Definition muComb.h:86
SG::ReadHandleKey< xAOD::L2StandAloneMuonContainer > m_muonCollKey
Definition muComb.h:72
L2StandAloneMuon_v2 L2StandAloneMuon
Define the latest version of the muon SA class.