ATLAS Offline Software
Loading...
Searching...
No Matches
MuFastSteering.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 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//adding a part of DataHandle for AthenaMT
28
37
38#include "GaudiKernel/IIncidentListener.h"
39
40class IIncidentSvc;
41
43
44class MuFastSteering : public AthReentrantAlgorithm , public IIncidentListener
45{
46 public:
47 enum {
55 };
56
57
58 public:
59
61 MuFastSteering(const std::string& name, ISvcLocator* svc);
62
63 virtual StatusCode initialize() override;
64 virtual StatusCode stop() override;
65
67 virtual StatusCode execute(const EventContext& ctx) const override;
68
70 StatusCode findMuonSignature(const std::vector<const TrigRoiDescriptor*>& roi,
71 const std::vector<const xAOD::MuonRoI*>& muonRoIs,
73 xAOD::TrigCompositeContainer* outputMuonCal,
76 const bool dynamicDeltaRpc,
77 const EventContext& ctx ) const;
78
80 StatusCode findMuonSignatureIO(const xAOD::TrackParticleContainer& idtracks,
81 const std::vector<const TrigRoiDescriptor*>& roids,
82 const std::vector<const xAOD::MuonRoI*>& muonRoIs,
85 const bool dynamicDeltaRpc,
86 const EventContext& ctx ) const;
87
89 StatusCode findMultiTrackSignature(const std::vector<const TrigRoiDescriptor*>& roi,
90 const std::vector<const xAOD::MuonRoI*>& muonRoIs,
92 const bool dynamicDeltaRpc,
93 const EventContext& ctx) const;
94
95 int L2MuonAlgoMap(const std::string& name) const;
96
97 virtual void handle(const Incident& incident) override;
98
99 protected:
100
105 bool updateOutputObjects(const xAOD::MuonRoI* roi,
106 const TrigRoiDescriptor* roids,
107 const TrigL2MuonSA::MuonRoad& muonRoad,
108 const TrigL2MuonSA::MdtRegion& mdtRegion,
109 const TrigL2MuonSA::RpcHits& rpcHits,
110 const TrigL2MuonSA::TgcHits& tgcHits,
111 const TrigL2MuonSA::RpcFitResult& rpcFitResult,
112 const TrigL2MuonSA::TgcFitResult& tgcFitResult,
113 const TrigL2MuonSA::MdtHits& mdtHits,
114 const TrigL2MuonSA::CscHits& cscHits,
115 const TrigL2MuonSA::StgcHits& stgcHits,
116 const TrigL2MuonSA::MmHits& mmHits,
117 const std::vector<TrigL2MuonSA::TrackPattern>& trackPatterns,
121 const EventContext& ctx) const;
122
123 bool storeMuonSA(const xAOD::MuonRoI* roi,
124 const TrigRoiDescriptor* roids,
125 const TrigL2MuonSA::MuonRoad& muonRoad,
126 const TrigL2MuonSA::MdtRegion& mdtRegion,
127 const TrigL2MuonSA::RpcHits& rpcHits,
128 const TrigL2MuonSA::TgcHits& tgcHits,
129 const TrigL2MuonSA::RpcFitResult& rpcFitResult,
130 const TrigL2MuonSA::TgcFitResult& tgcFitResult,
131 const TrigL2MuonSA::MdtHits& mdtHits,
132 const TrigL2MuonSA::CscHits& cscHits,
133 const TrigL2MuonSA::StgcHits& stgcHits,
134 const TrigL2MuonSA::MmHits& mmHits,
135 const TrigL2MuonSA::TrackPattern& pattern,
137 const EventContext& ctx) const;
138
139 bool storeMSRoiDescriptor(const TrigRoiDescriptor* roids,
140 const TrigL2MuonSA::TrackPattern& pattern,
141 const DataVector<xAOD::L2StandAloneMuon>& outputTracks,
142 TrigRoiDescriptorCollection& outputMS) const;
143
144
145 bool storeIDRoiDescriptor(const TrigRoiDescriptor* roids,
146 const TrigL2MuonSA::TrackPattern& pattern,
147 const DataVector<xAOD::L2StandAloneMuon>& outputTracks,
148 TrigRoiDescriptorCollection& outputID) const;
149
153 StatusCode updateMonitor(const xAOD::MuonRoI* roi,
154 const TrigL2MuonSA::MdtHits& mdtHits,
155 std::vector<TrigL2MuonSA::TrackPattern>& trackPatterns ) const;
156
157
158
159 protected:
160
161 // Tools
162 ToolHandle<TrigL2MuonSA::MuFastDataPreparator> m_dataPreparator {
163 this, "DataPreparator", "TrigL2MuonSA::MuFastDataPreparator", "data preparator" };
164 ToolHandle<TrigL2MuonSA::MuFastPatternFinder> m_patternFinder {
165 this, "PatternFinder", "TrigL2MuonSA::MuFastPatternFinder", "pattern finder" };
166 ToolHandle<TrigL2MuonSA::MuFastStationFitter> m_stationFitter {
167 this, "StationFitter", "TrigL2MuonSA::MuFastStationFitter", "station fitter" };
168 ToolHandle<TrigL2MuonSA::MuFastTrackFitter> m_trackFitter {
169 this, "TrackFitter", "TrigL2MuonSA::MuFastTrackFitter", "track fitter" };
170 ToolHandle<TrigL2MuonSA::MuFastTrackExtrapolator> m_trackExtrapolator {
171 this, "TrackExtrapolator", "TrigL2MuonSA::MuFastTrackExtrapolator", "track extrapolator" };
172 ToolHandle<TrigL2MuonSA::FtfRoadDefiner> m_ftfRoadDefiner {
173 this, "FtfRoadDefiner", "TrigL2MuonSA::FtfRoadDefiner", "ftf road definer" };
174
176 ToolHandle<ITrigMuonBackExtrapolator> m_backExtrapolatorTool {
177 this, "BackExtrapolator", "TrigMuonBackExtrapolator", "public tool for back extrapolating the muon tracks to the IV" };
178
179 // calibration streamer tool
180 ToolHandle<TrigL2MuonSA::MuCalStreamerTool> m_calStreamer {
181 this, "CalibrationStreamer", "TrigL2MuonSA::MuCalStreamerTool", "calibration stream" };
182
183 // Utils
185
186 //Tools for CSC
187 ToolHandle<TrigL2MuonSA::CscSegmentMaker> m_cscsegmaker {
188 this, "CscSegmentMaker", "TrigL2MuonSA::CscSegmentMaker", "" };
189
190
191 private:
192
193 ServiceHandle< IIncidentSvc > m_incidentSvc{this, "IncidentSvc", "IncidentSvc"};
194 ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_jobOptionsSvc {this, "JobOptionsSvc", "JobOptionsSvc", "Job options service to retrieve DataFlowConfig" };
195 // Property
196 Gaudi::Property< float > m_scaleRoadBarrelInner { this, "Scale_Road_BarrelInner", 1 };
197 Gaudi::Property< float > m_scaleRoadBarrelMiddle { this, "Scale_Road_BarrelMiddle", 1 };
198 Gaudi::Property< float > m_scaleRoadBarrelOuter { this, "Scale_Road_BarrelOuter", 1 };
199
200 Gaudi::Property< bool > m_use_mcLUT { this, "UseLUTForMC", true};
201 Gaudi::Property< bool > m_use_new_segmentfit { this, "USE_NEW_SEGMENTFIT", true};
202 Gaudi::Property< bool > m_use_rpc { this, "USE_RPC", true};
203 Gaudi::Property< bool > m_use_stgc { this, "USE_STGC", true};
204 Gaudi::Property< bool > m_use_mm { this, "USE_MM", true};
205 Gaudi::Property< bool > m_use_RoIBasedDataAccess_MDT { this, "USE_ROIBASEDACCESS_MDT", true};
206 Gaudi::Property< bool > m_use_RoIBasedDataAccess_RPC { this, "USE_ROIBASEDACCESS_RPC", true};
207 Gaudi::Property< bool > m_use_RoIBasedDataAccess_TGC { this, "USE_ROIBASEDACCESS_TGC", true};
208 Gaudi::Property< bool > m_use_RoIBasedDataAccess_CSC { this, "USE_ROIBASEDACCESS_CSC", true};
209 Gaudi::Property< bool > m_use_RoIBasedDataAccess_STGC { this, "USE_ROIBASEDACCESS_STGC", true};
210 Gaudi::Property< bool > m_use_RoIBasedDataAccess_MM { this, "USE_ROIBASEDACCESS_MM", true};
211 Gaudi::Property< bool > m_doCalStream { this, "DoCalibrationStream", true};
212 Gaudi::Property< bool > m_calDataScouting { this, "MuonCalDataScouting", false};
213 Gaudi::Property< bool > m_rpcErrToDebugStream { this, "RpcErrToDebugStream", false};
214 Gaudi::Property< bool > m_use_endcapInnerFromBarrel { this, "UseEndcapInnerFromBarrel", false};
215
216
217 Gaudi::Property< int > m_esd_rpc_size { this, "ESD_RPC_size", 100 };
218 Gaudi::Property< int > m_esd_tgc_size { this, "ESD_TGC_size", 50 };
219 Gaudi::Property< int > m_esd_mdt_size { this, "ESD_MDT_size", 100 };
220 Gaudi::Property< int > m_esd_csc_size { this, "ESD_CSC_size", 100 };
221 Gaudi::Property< int > m_esd_stgc_size { this, "ESD_STGC_size", 100 };
222 Gaudi::Property< int > m_esd_mm_size { this, "ESD_MM_size", 100 };
223
224 Gaudi::Property< double > m_rWidth_RPC_Failed { this, "R_WIDTH_RPC_FAILED", 400 };
225 Gaudi::Property< double > m_rWidth_TGC_Failed { this, "R_WIDTH_TGC_FAILED", 200 };
226
227 Gaudi::Property< double > m_winPt { this, "WinPt", 4.0 };
228
229 Gaudi::Property< bool > m_insideOut { this, "InsideOutMode", false, "" };
230 Gaudi::Property< bool > m_multiTrack { this, "multitrackMode", false, "" };
231 Gaudi::Property< bool > m_doEndcapForl2mt { this, "doEndcapForl2mt", false, "" };
232 Gaudi::Property< float > m_ftfminPt { this, "FTFminPt", 3500, "pT [MeV] threshold to FTF tracks for L2Muon Inside-out mode" };
233 Gaudi::Property< bool > m_topoRoad { this, "topoRoad", false, "create road in barrel not to highly overlap surrounding L1 RoIs" };
234 Gaudi::Property< float > m_dPhisurrRoI { this, "dPhisurrRoI", 99, "phi range to find surrounding L1 RoIs" };
235 Gaudi::Property< float > m_dEtasurrRoI { this, "dEtasurrRoI", 99, "eta range to find surrounding L1 RoIs" };
236
237 float getRoiSizeForID(bool isEta, const xAOD::L2StandAloneMuon* muonSA) const;
238
239 Gaudi::Property< bool > m_allowOksConfig { this, "AllowOksConfig", true};
240 Gaudi::Property< std::string > m_calBufferName { this, "MuonCalBufferName", "/tmp/testOutput"};
241 Gaudi::Property< int > m_calBufferSize { this, "MuonCalBufferSize", 1024*1024};
242
243 // Enable to fill FS RoI for ID (cosmic run)
244 Gaudi::Property< bool > m_fill_FSIDRoI { this, "FILL_FSIDRoI", false, "Fill FS RoI for ID (will be used in cosmic run)"};
245
246 Gaudi::Property< bool > m_useRun3Config { this, "UseRun3Config", false, "use Run3 L1Muon EDM; xAOD::MuonRoI"};
247
248 //adding a part of DataHandle for AthenaMT
249 //ReadHandle xAOD::EventInfo
251 this, "EventInfo", "EventInfo", "Name of the xAOD::EventInfo object"};
252
253 //ReadHandle MURoIs
255 this, "MuRoIs", "HLT_MURoIs", "Name of the input data from HLTSeeding"};
256
257 //ReadHandle RecMuonRoIs
259 this, "Run2RecMuonRoI", "HLT_RecMURoIs", "Name of the input data on LVL1::RecMuonRoI produced by HLTSeeding"};
261 this, "RecMuonRoI", "LVL1MuonRoIs", "Name of the input data on xAOD::MuonRoI"};
262
263 //ReadHandle FTF Tracks
265 this, "TrackParticlesContainerName", "HLT_xAODTracks_Muon", "Name of the input data on xAOD::TrackParticleContainer produced by FTF for Inside-Out mode"};
266
267 //WriteHandle <xAOD::L2StandAloneMuonContainer>
269 this, "MuonL2SAInfo", "MuonL2SAInfo", "Name of the output data on xAOD::L2StandAloneMuonContainer"};
270
271 //WriteHandle <xAOD::L2StandAloneMuonContainer>
273 this, "MuonCalibrationStream", "", "Name of the decisions object attached by MuFastSteering"};
274
275 //WriteHandle <TrigRoiDescriptor> for ID
277 this, "forID", "forID", "Name of the output data for Inner Detector"};
278
279 //WriteHandle <TrigRoiDescriptor> for MS
281 this, "forMS", "forMS", "Name of the output data for MS"};
282
283 //WriteHandle <xAOD::L2CombinedMuonContainer> for Inside-out Mode
285 this, "L2IOCB", "MuonL2CBInfo", "output CB Muon container name"};
286
287 // Monitor system
288 ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
289
290
291
292};
293
294#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:795
int L2MuonAlgoMap(const std::string &name) const
ToolHandle< GenericMonitoringTool > m_monTool
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_muIdContainerKey
Gaudi::Property< float > m_scaleRoadBarrelMiddle
Gaudi::Property< int > m_calBufferSize
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
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jobOptionsSvc
Gaudi::Property< int > m_esd_rpc_size
Gaudi::Property< std::string > m_calBufferName
Gaudi::Property< bool > m_use_RoIBasedDataAccess_TGC
Gaudi::Property< bool > m_use_mm
virtual void handle(const Incident &incident) override
Gaudi::Property< bool > m_fill_FSIDRoI
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_muCompositeContainerKey
virtual StatusCode stop() override
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
ServiceHandle< IIncidentSvc > m_incidentSvc
Gaudi::Property< bool > m_doCalStream
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
Gaudi::Property< bool > m_allowOksConfig
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