ATLAS Offline Software
Loading...
Searching...
No Matches
MuFastSteering.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGL2MUONSA_MUFASTSTEERING_H
6#define TRIGL2MUONSA_MUFASTSTEERING_H
7
9#include "GaudiKernel/ToolHandle.h"
10#include "GaudiKernel/ServiceHandle.h"
11
13
15#include "MuFastPatternFinder.h"
16#include "MuFastStationFitter.h"
17#include "MuFastTrackFitter.h"
19#include "RecMuonRoIUtils.h"
20#include "MuCalStreamerTool.h"
21#include "CscSegmentMaker.h"
22#include "FtfRoadDefiner.h"
23
24//handle key classes for AthenaMT
28
37
38
40
42{
43 public:
44 enum {
52 };
53
54
55 public:
56
58 MuFastSteering(const std::string& name, ISvcLocator* svc);
59
60 virtual StatusCode initialize() override;
61
63 virtual StatusCode execute(const EventContext& ctx) const override;
64
66 StatusCode findMuonSignature(const std::vector<const TrigRoiDescriptor*>& roi,
67 const std::vector<const xAOD::MuonRoI*>& muonRoIs,
69 xAOD::TrigCompositeContainer* outputMuonCal,
72 const bool dynamicDeltaRpc,
73 const EventContext& ctx ) const;
74
76 StatusCode findMuonSignatureIO(const xAOD::TrackParticleContainer& idtracks,
77 const std::vector<const TrigRoiDescriptor*>& roids,
78 const std::vector<const xAOD::MuonRoI*>& muonRoIs,
81 const bool dynamicDeltaRpc,
82 const EventContext& ctx ) const;
83
85 StatusCode findMultiTrackSignature(const std::vector<const TrigRoiDescriptor*>& roi,
86 const std::vector<const xAOD::MuonRoI*>& muonRoIs,
88 const bool dynamicDeltaRpc,
89 const EventContext& ctx) const;
90
91 int L2MuonAlgoMap(const std::string& name) const;
92
93 protected:
94
99 bool updateOutputObjects(const xAOD::MuonRoI* roi,
100 const TrigRoiDescriptor* roids,
101 const TrigL2MuonSA::MuonRoad& muonRoad,
102 const TrigL2MuonSA::MdtRegion& mdtRegion,
103 const TrigL2MuonSA::RpcHits& rpcHits,
104 const TrigL2MuonSA::TgcHits& tgcHits,
105 const TrigL2MuonSA::RpcFitResult& rpcFitResult,
106 const TrigL2MuonSA::TgcFitResult& tgcFitResult,
107 const TrigL2MuonSA::MdtHits& mdtHits,
108 const TrigL2MuonSA::CscHits& cscHits,
109 const TrigL2MuonSA::StgcHits& stgcHits,
110 const TrigL2MuonSA::MmHits& mmHits,
111 const std::vector<TrigL2MuonSA::TrackPattern>& trackPatterns,
115 const EventContext& ctx) const;
116
117 bool storeMuonSA(const xAOD::MuonRoI* roi,
118 const TrigRoiDescriptor* roids,
119 const TrigL2MuonSA::MuonRoad& muonRoad,
120 const TrigL2MuonSA::MdtRegion& mdtRegion,
121 const TrigL2MuonSA::RpcHits& rpcHits,
122 const TrigL2MuonSA::TgcHits& tgcHits,
123 const TrigL2MuonSA::RpcFitResult& rpcFitResult,
124 const TrigL2MuonSA::TgcFitResult& tgcFitResult,
125 const TrigL2MuonSA::MdtHits& mdtHits,
126 const TrigL2MuonSA::CscHits& cscHits,
127 const TrigL2MuonSA::StgcHits& stgcHits,
128 const TrigL2MuonSA::MmHits& mmHits,
129 const TrigL2MuonSA::TrackPattern& pattern,
131 const EventContext& ctx) const;
132
133 bool storeMSRoiDescriptor(const TrigRoiDescriptor* roids,
134 const TrigL2MuonSA::TrackPattern& pattern,
135 const DataVector<xAOD::L2StandAloneMuon>& outputTracks,
136 TrigRoiDescriptorCollection& outputMS) const;
137
138
139 bool storeIDRoiDescriptor(const TrigRoiDescriptor* roids,
140 const TrigL2MuonSA::TrackPattern& pattern,
141 const DataVector<xAOD::L2StandAloneMuon>& outputTracks,
142 TrigRoiDescriptorCollection& outputID) const;
143
147 StatusCode updateMonitor(const xAOD::MuonRoI* roi,
148 const TrigL2MuonSA::MdtHits& mdtHits,
149 std::vector<TrigL2MuonSA::TrackPattern>& trackPatterns ) const;
150
151
152
153 protected:
154
155 // Tools
156 ToolHandle<TrigL2MuonSA::MuFastDataPreparator> m_dataPreparator {
157 this, "DataPreparator", "TrigL2MuonSA::MuFastDataPreparator", "data preparator" };
158 ToolHandle<TrigL2MuonSA::MuFastPatternFinder> m_patternFinder {
159 this, "PatternFinder", "TrigL2MuonSA::MuFastPatternFinder", "pattern finder" };
160 ToolHandle<TrigL2MuonSA::MuFastStationFitter> m_stationFitter {
161 this, "StationFitter", "TrigL2MuonSA::MuFastStationFitter", "station fitter" };
162 ToolHandle<TrigL2MuonSA::MuFastTrackFitter> m_trackFitter {
163 this, "TrackFitter", "TrigL2MuonSA::MuFastTrackFitter", "track fitter" };
164 ToolHandle<TrigL2MuonSA::MuFastTrackExtrapolator> m_trackExtrapolator {
165 this, "TrackExtrapolator", "TrigL2MuonSA::MuFastTrackExtrapolator", "track extrapolator" };
166 ToolHandle<TrigL2MuonSA::FtfRoadDefiner> m_ftfRoadDefiner {
167 this, "FtfRoadDefiner", "TrigL2MuonSA::FtfRoadDefiner", "ftf road definer" };
168
170 ToolHandle<ITrigMuonBackExtrapolator> m_backExtrapolatorTool {
171 this, "BackExtrapolator", "TrigMuonBackExtrapolator", "public tool for back extrapolating the muon tracks to the IV" };
172
173 // calibration streamer tool
174 ToolHandle<TrigL2MuonSA::MuCalStreamerTool> m_calStreamer {
175 this, "CalibrationStreamer", "TrigL2MuonSA::MuCalStreamerTool", "calibration stream" };
176
177 // Utils
179
180 //Tools for CSC
181 ToolHandle<TrigL2MuonSA::CscSegmentMaker> m_cscsegmaker {
182 this, "CscSegmentMaker", "TrigL2MuonSA::CscSegmentMaker", "" };
183
184
185 private:
186
187 // Property
188 Gaudi::Property< float > m_scaleRoadBarrelInner { this, "Scale_Road_BarrelInner", 1 };
189 Gaudi::Property< float > m_scaleRoadBarrelMiddle { this, "Scale_Road_BarrelMiddle", 1 };
190 Gaudi::Property< float > m_scaleRoadBarrelOuter { this, "Scale_Road_BarrelOuter", 1 };
191
192 Gaudi::Property< bool > m_use_mcLUT { this, "UseLUTForMC", true};
193 Gaudi::Property< bool > m_use_new_segmentfit { this, "USE_NEW_SEGMENTFIT", true};
194 Gaudi::Property< bool > m_use_rpc { this, "USE_RPC", true};
195 Gaudi::Property< bool > m_use_stgc { this, "USE_STGC", true};
196 Gaudi::Property< bool > m_use_mm { this, "USE_MM", true};
197 Gaudi::Property< bool > m_use_RoIBasedDataAccess_MDT { this, "USE_ROIBASEDACCESS_MDT", true};
198 Gaudi::Property< bool > m_use_RoIBasedDataAccess_RPC { this, "USE_ROIBASEDACCESS_RPC", true};
199 Gaudi::Property< bool > m_use_RoIBasedDataAccess_TGC { this, "USE_ROIBASEDACCESS_TGC", true};
200 Gaudi::Property< bool > m_use_RoIBasedDataAccess_CSC { this, "USE_ROIBASEDACCESS_CSC", true};
201 Gaudi::Property< bool > m_use_RoIBasedDataAccess_STGC { this, "USE_ROIBASEDACCESS_STGC", true};
202 Gaudi::Property< bool > m_use_RoIBasedDataAccess_MM { this, "USE_ROIBASEDACCESS_MM", true};
203 Gaudi::Property< bool > m_calDataScouting { this, "MuonCalDataScouting", false};
204 Gaudi::Property< bool > m_rpcErrToDebugStream { this, "RpcErrToDebugStream", false};
205 Gaudi::Property< bool > m_use_endcapInnerFromBarrel { this, "UseEndcapInnerFromBarrel", false};
206
207
208 Gaudi::Property< int > m_esd_rpc_size { this, "ESD_RPC_size", 100 };
209 Gaudi::Property< int > m_esd_tgc_size { this, "ESD_TGC_size", 50 };
210 Gaudi::Property< int > m_esd_mdt_size { this, "ESD_MDT_size", 100 };
211 Gaudi::Property< int > m_esd_csc_size { this, "ESD_CSC_size", 100 };
212 Gaudi::Property< int > m_esd_stgc_size { this, "ESD_STGC_size", 100 };
213 Gaudi::Property< int > m_esd_mm_size { this, "ESD_MM_size", 100 };
214
215 Gaudi::Property< double > m_rWidth_RPC_Failed { this, "R_WIDTH_RPC_FAILED", 400 };
216 Gaudi::Property< double > m_rWidth_TGC_Failed { this, "R_WIDTH_TGC_FAILED", 200 };
217
218 Gaudi::Property< double > m_winPt { this, "WinPt", 4.0 };
219
220 Gaudi::Property< bool > m_insideOut { this, "InsideOutMode", false, "" };
221 Gaudi::Property< bool > m_multiTrack { this, "multitrackMode", false, "" };
222 Gaudi::Property< bool > m_doEndcapForl2mt { this, "doEndcapForl2mt", false, "" };
223 Gaudi::Property< float > m_ftfminPt { this, "FTFminPt", 3500, "pT [MeV] threshold to FTF tracks for L2Muon Inside-out mode" };
224 Gaudi::Property< bool > m_topoRoad { this, "topoRoad", false, "create road in barrel not to highly overlap surrounding L1 RoIs" };
225 Gaudi::Property< float > m_dPhisurrRoI { this, "dPhisurrRoI", 99, "phi range to find surrounding L1 RoIs" };
226 Gaudi::Property< float > m_dEtasurrRoI { this, "dEtasurrRoI", 99, "eta range to find surrounding L1 RoIs" };
227
228 float getRoiSizeForID(bool isEta, const xAOD::L2StandAloneMuon* muonSA) const;
229
230 // Enable to fill FS RoI for ID (cosmic run)
231 Gaudi::Property< bool > m_fill_FSIDRoI { this, "FILL_FSIDRoI", false, "Fill FS RoI for ID (will be used in cosmic run)"};
232
233 Gaudi::Property< bool > m_useRun3Config { this, "UseRun3Config", false, "use Run3 L1Muon EDM; xAOD::MuonRoI"};
234
235 //adding a part of DataHandle for AthenaMT
236 //ReadHandle xAOD::EventInfo
238 this, "EventInfo", "EventInfo", "Name of the xAOD::EventInfo object"};
239
240 //ReadHandle MURoIs
242 this, "MuRoIs", "HLT_MURoIs", "Name of the input data from HLTSeeding"};
243
244 //ReadHandle RecMuonRoIs
246 this, "Run2RecMuonRoI", "HLT_RecMURoIs", "Name of the input data on LVL1::RecMuonRoI produced by HLTSeeding"};
248 this, "RecMuonRoI", "LVL1MuonRoIs", "Name of the input data on xAOD::MuonRoI"};
249
250 //ReadHandle FTF Tracks
252 this, "TrackParticlesContainerName", "HLT_xAODTracks_Muon", "Name of the input data on xAOD::TrackParticleContainer produced by FTF for Inside-Out mode"};
253
254 //WriteHandle <xAOD::L2StandAloneMuonContainer>
256 this, "MuonL2SAInfo", "MuonL2SAInfo", "Name of the output data on xAOD::L2StandAloneMuonContainer"};
257
258 //WriteHandle <xAOD::L2StandAloneMuonContainer>
260 this, "MuonCalibrationStream", "", "Name of the decisions object attached by MuFastSteering"};
261
262 //WriteHandle <TrigRoiDescriptor> for ID
264 this, "forID", "forID", "Name of the output data for Inner Detector"};
265
266 //WriteHandle <TrigRoiDescriptor> for MS
268 this, "forMS", "forMS", "Name of the output data for MS"};
269
270 //WriteHandle <xAOD::L2CombinedMuonContainer> for Inside-out Mode
272 this, "L2IOCB", "MuonL2CBInfo", "output CB Muon container name"};
273
274 // Monitor system
275 ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
276
277
278
279};
280
281#endif // MUFASTSTEERING_H
ECRegions
@ WeakBFieldB
@ WeakBFieldA
@ Bulk
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.
Derived DataVector<T>.
Definition DataVector.h:818
int L2MuonAlgoMap(const std::string &name) const
ToolHandle< GenericMonitoringTool > m_monTool
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_muIdContainerKey
Gaudi::Property< float > m_scaleRoadBarrelMiddle
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_recRoiCollectionKey
Gaudi::Property< bool > m_use_new_segmentfit
Gaudi::Property< bool > m_use_RoIBasedDataAccess_RPC
Gaudi::Property< int > m_esd_mm_size
Gaudi::Property< float > m_dPhisurrRoI
ToolHandle< TrigL2MuonSA::MuCalStreamerTool > m_calStreamer
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
virtual StatusCode initialize() override
Gaudi::Property< int > m_esd_rpc_size
Gaudi::Property< bool > m_use_RoIBasedDataAccess_TGC
Gaudi::Property< bool > m_use_mm
Gaudi::Property< bool > m_fill_FSIDRoI
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_muCompositeContainerKey
SG::WriteHandleKey< xAOD::L2StandAloneMuonContainer > m_muFastContainerKey
StatusCode findMultiTrackSignature(const std::vector< const TrigRoiDescriptor * > &roi, const std::vector< const xAOD::MuonRoI * > &muonRoIs, DataVector< xAOD::L2StandAloneMuon > &outputTracks, const bool dynamicDeltaRpc, const EventContext &ctx) const
findMultiTrackSignature(), includes reconstract algorithms for multi-track mode
Gaudi::Property< bool > m_insideOut
Gaudi::Property< int > m_esd_csc_size
StatusCode findMuonSignatureIO(const xAOD::TrackParticleContainer &idtracks, const std::vector< const TrigRoiDescriptor * > &roids, const std::vector< const xAOD::MuonRoI * > &muonRoIs, DataVector< xAOD::L2CombinedMuon > &outputCBs, DataVector< xAOD::L2StandAloneMuon > &outputSAs, const bool dynamicDeltaRpc, const EventContext &ctx) const
findMuonSignatureIO(), includes reconstract algorithms for inside-out mode
Gaudi::Property< bool > m_use_RoIBasedDataAccess_MM
Gaudi::Property< bool > m_multiTrack
Gaudi::Property< double > m_rWidth_RPC_Failed
Gaudi::Property< bool > m_use_RoIBasedDataAccess_STGC
Gaudi::Property< float > m_ftfminPt
ToolHandle< TrigL2MuonSA::MuFastTrackFitter > m_trackFitter
Gaudi::Property< float > m_scaleRoadBarrelInner
ToolHandle< TrigL2MuonSA::FtfRoadDefiner > m_ftfRoadDefiner
Gaudi::Property< bool > m_use_endcapInnerFromBarrel
Gaudi::Property< int > m_esd_tgc_size
bool storeIDRoiDescriptor(const TrigRoiDescriptor *roids, const TrigL2MuonSA::TrackPattern &pattern, const DataVector< xAOD::L2StandAloneMuon > &outputTracks, TrigRoiDescriptorCollection &outputID) const
Gaudi::Property< float > m_dEtasurrRoI
Gaudi::Property< int > m_esd_mdt_size
ToolHandle< TrigL2MuonSA::MuFastPatternFinder > m_patternFinder
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_muMsContainerKey
Gaudi::Property< bool > m_calDataScouting
Gaudi::Property< bool > m_use_RoIBasedDataAccess_CSC
ToolHandle< ITrigMuonBackExtrapolator > m_backExtrapolatorTool
Handle to MuonBackExtrapolator tool.
ToolHandle< TrigL2MuonSA::MuFastDataPreparator > m_dataPreparator
Gaudi::Property< bool > m_use_mcLUT
Gaudi::Property< bool > m_rpcErrToDebugStream
TrigL2MuonSA::RecMuonRoIUtils m_recMuonRoIUtils
ToolHandle< TrigL2MuonSA::CscSegmentMaker > m_cscsegmaker
Gaudi::Property< bool > m_use_rpc
Gaudi::Property< bool > m_topoRoad
SG::ReadHandleKey< DataVector< LVL1::RecMuonRoI > > m_run2recRoiCollectionKey
Gaudi::Property< int > m_esd_stgc_size
SG::WriteHandleKey< xAOD::L2CombinedMuonContainer > m_outputCBmuonCollKey
float getRoiSizeForID(bool isEta, const xAOD::L2StandAloneMuon *muonSA) const
bool updateOutputObjects(const xAOD::MuonRoI *roi, const TrigRoiDescriptor *roids, const TrigL2MuonSA::MuonRoad &muonRoad, const TrigL2MuonSA::MdtRegion &mdtRegion, const TrigL2MuonSA::RpcHits &rpcHits, const TrigL2MuonSA::TgcHits &tgcHits, const TrigL2MuonSA::RpcFitResult &rpcFitResult, const TrigL2MuonSA::TgcFitResult &tgcFitResult, const TrigL2MuonSA::MdtHits &mdtHits, const TrigL2MuonSA::CscHits &cscHits, const TrigL2MuonSA::StgcHits &stgcHits, const TrigL2MuonSA::MmHits &mmHits, const std::vector< TrigL2MuonSA::TrackPattern > &trackPatterns, DataVector< xAOD::L2StandAloneMuon > &outputTracks, TrigRoiDescriptorCollection &outputID, TrigRoiDescriptorCollection &outputMS, const EventContext &ctx) const
Called at the end of the algorithm processing to set the steering navigation properly.
Gaudi::Property< bool > m_use_stgc
Gaudi::Property< float > m_scaleRoadBarrelOuter
Gaudi::Property< bool > m_useRun3Config
Gaudi::Property< double > m_rWidth_TGC_Failed
ToolHandle< TrigL2MuonSA::MuFastTrackExtrapolator > m_trackExtrapolator
ToolHandle< TrigL2MuonSA::MuFastStationFitter > m_stationFitter
StatusCode updateMonitor(const xAOD::MuonRoI *roi, const TrigL2MuonSA::MdtHits &mdtHits, std::vector< TrigL2MuonSA::TrackPattern > &trackPatterns) const
Update monitoring variables.
MuFastSteering(const std::string &name, ISvcLocator *svc)
Constructor.
bool storeMuonSA(const xAOD::MuonRoI *roi, const TrigRoiDescriptor *roids, const TrigL2MuonSA::MuonRoad &muonRoad, const TrigL2MuonSA::MdtRegion &mdtRegion, const TrigL2MuonSA::RpcHits &rpcHits, const TrigL2MuonSA::TgcHits &tgcHits, const TrigL2MuonSA::RpcFitResult &rpcFitResult, const TrigL2MuonSA::TgcFitResult &tgcFitResult, const TrigL2MuonSA::MdtHits &mdtHits, const TrigL2MuonSA::CscHits &cscHits, const TrigL2MuonSA::StgcHits &stgcHits, const TrigL2MuonSA::MmHits &mmHits, const TrigL2MuonSA::TrackPattern &pattern, DataVector< xAOD::L2StandAloneMuon > &outputTracks, const EventContext &ctx) const
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Gaudi::Property< bool > m_use_RoIBasedDataAccess_MDT
Gaudi::Property< double > m_winPt
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_FTFtrackKey
StatusCode findMuonSignature(const std::vector< const TrigRoiDescriptor * > &roi, const std::vector< const xAOD::MuonRoI * > &muonRoIs, DataVector< xAOD::L2StandAloneMuon > &outputTracks, xAOD::TrigCompositeContainer *outputMuonCal, TrigRoiDescriptorCollection &outputID, TrigRoiDescriptorCollection &outputMS, const bool dynamicDeltaRpc, const EventContext &ctx) const
findMuonSignature(), includes reconstract algorithms
bool storeMSRoiDescriptor(const TrigRoiDescriptor *roids, const TrigL2MuonSA::TrackPattern &pattern, const DataVector< xAOD::L2StandAloneMuon > &outputTracks, TrigRoiDescriptorCollection &outputMS) const
virtual StatusCode execute(const EventContext &ctx) const override
execute(), main code of the algorithm for AthenaMT
Gaudi::Property< bool > m_doEndcapForl2mt
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.
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
std::vector< StgcHitData > StgcHits
Definition StgcData.h:49
std::vector< MdtHitData > MdtHits
Definition MdtData.h:56
std::vector< MmHitData > MmHits
Definition MmData.h:47
std::vector< CscHitData > CscHits
Definition CscData.h:40
std::vector< RpcHitData > RpcHits
Definition RpcData.h:57
std::vector< TgcHitData > TgcHits
Definition TgcData.h:43
TrigCompositeContainer_v1 TrigCompositeContainer
Declare the latest version of the container.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
L2StandAloneMuon_v2 L2StandAloneMuon
Define the latest version of the muon SA class.
MuonRoI_v1 MuonRoI
Definition MuonRoI.h:15