ATLAS Offline Software
Loading...
Searching...
No Matches
L0Muon::MDTSimulation Class Reference

#include <MDTSimulation.h>

Inheritance diagram for L0Muon::MDTSimulation:
Collaboration diagram for L0Muon::MDTSimulation:

Public Member Functions

virtual ~MDTSimulation ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool fitRPC (const xAOD::RPCCandData &cand, float &m, float &b, std::vector< float > &z_positions, std::vector< float > &r_positions) const
StatusCode collectMDTHits (const EventContext &ctx, const ActsTrk::GeometryContext &gctx, float eta, float phi, std::vector< const xAOD::MdtDriftCircle * > &hits, float m, float b) const
 Collect MDT hits within a RoI around (eta, phi), keeping only those whose residual from the RPC fit line r = m*z + b is within a window of a few tube pitches.
float computeResidual (const Amg::Vector3D &gpos, float m, float b) const
 Compute the residual between a MDT hit global position and the fit line.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< IRegSelToolm_regionSelector {this, "RegSel_MDT", "RegSelTool/RegSelTool_MDT"}
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
ToolHandle< L0MDT::IL0MDTSegmentFinderToolm_csfSegmentFinder {this, "CSFSegmentFinder", "L0MDT::CompactSegmentFinderTool"}
ToolHandle< L0MDT::IL0MDTSegmentFinderToolm_legendreSegmentFinder {this, "LegendreSegmentFinder", "L0MDT::LegendreSegmentFinderTool"}
ToolHandle< L0MDT::IPtEstimationToolm_ptEstimationTool {this,"PtEstimationTool","L0MDT::PtEstimationTool/PtEstimationTool","Tool to estimate pT from CSF segments"}
SG::ReadHandleKey< ActsTrk::GeometryContextm_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
SG::ReadHandleKey< xAOD::MdtDriftCircleContainerm_mdtDriftCircleKey {this, "MdtDriftCircles", "xMdtDriftCircles"}
SG::ReadHandleKey< xAOD::RPCCandDataContainerm_barrelCandidateKey {this, "RPCCandKey", "RPCCandData"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 26 of file MDTSimulation.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~MDTSimulation()

virtual L0Muon::MDTSimulation::~MDTSimulation ( )
virtualdefault

Member Function Documentation

◆ collectMDTHits()

StatusCode L0Muon::MDTSimulation::collectMDTHits ( const EventContext & ctx,
const ActsTrk::GeometryContext & gctx,
float eta,
float phi,
std::vector< const xAOD::MdtDriftCircle * > & hits,
float m,
float b ) const
private

Collect MDT hits within a RoI around (eta, phi), keeping only those whose residual from the RPC fit line r = m*z + b is within a window of a few tube pitches.

Parameters
ctxEvent context
gctxACTS geometry context for alignment
etaPseudorapidity of the RPC candidate
phiAzimuthal angle of the RPC candidate
hitsOutput vector of collected MDT drift circles
mSlope of the RPC fit line in the (z, r) plane
bIntercept of the RPC fit line in the (z, r) plane

Definition at line 194 of file MDTSimulation.cxx.

194 {
195
196
197 hits.clear();
198
199 const float dEta = 0.01f, dPhi = 0.01f;
200
201
202 RoiDescriptor roi(eta, eta-dEta, eta+dEta,
203 phi, phi-dPhi, phi+dPhi);
204 TrigRoiDescriptor trigROI(roi);
205
206
207 auto regSel = m_regionSelector->lookup(ctx);
208 if (!regSel) return StatusCode::FAILURE;
209
210 std::vector<IdentifierHash> hashList;
211 regSel->HashIDList(trigROI, hashList);
212
213
214 const xAOD::MdtDriftCircleContainer* driftCircles{};
215 ATH_CHECK(SG::get(driftCircles, m_mdtDriftCircleKey, ctx));
216
217 float windowSize = 5;
218
219 ATH_MSG_DEBUG("found n chamber hashes " << hashList.size());
220 xAOD::ChamberViewer viewer{*driftCircles, m_idHelperSvc.get(), xAOD::ChamberView::Mode::Chamber};
221 IdContext modContext = m_idHelperSvc->mdtIdHelper().module_context();
222 for (const IdentifierHash& h : hashList) {
223 Identifier mId;
224 m_idHelperSvc->mdtIdHelper().get_id(h, mId, &modContext);
225 ATH_MSG_DEBUG("looking at chamber " << m_idHelperSvc->toString(mId));
226
227
228 if(!viewer.loadView(mId)){
229 continue;
230 }
231 for(const xAOD::MdtDriftCircle* dc : viewer){
232 const MuonGMR4::MdtReadoutElement* detEl = dc->readoutElement();
233 const float pitch = detEl->tubePitch();
234 const Amg::Transform3D& locToGlob= detEl->localToGlobalTransform(gctx,dc->measurementHash());
235 const Amg::Vector3D gpos = locToGlob* dc->localMeasurementPos() ;
236 float resZ = computeResidual(gpos, m, b);
237 if (std::abs(resZ) > windowSize * pitch) continue;
238
239 hits.push_back(dc);
240
241
242
243 }
244 }
245 return StatusCode::SUCCESS;
246 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
Athena::TPCnvVers::Current TrigRoiDescriptor
float computeResidual(const Amg::Vector3D &gpos, float m, float b) const
Compute the residual between a MDT hit global position and the fit line.
ToolHandle< IRegSelTool > m_regionSelector
SG::ReadHandleKey< xAOD::MdtDriftCircleContainer > m_mdtDriftCircleKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
double tubePitch() const
Returns the pitch between 2 tubes in a layer.
const Amg::Transform3D & localToGlobalTransform(const ActsTrk::GeometryContext &ctx) const
Returns the transformation from the local coordinate system of the readout element into the global AT...
bool loadView(const Identifier &chamberId)
Loads the view matching the parsed identifier.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
@ Chamber
View ends if the moduleHash changes.
MdtDriftCircle_v1 MdtDriftCircle
MdtDriftCircleContainer_v1 MdtDriftCircleContainer

◆ computeResidual()

float L0Muon::MDTSimulation::computeResidual ( const Amg::Vector3D & gpos,
float m,
float b ) const
private

Compute the residual between a MDT hit global position and the fit line.

Parameters
gposGlobal position of the MDT hit
mSlope of the fit line
bIntercept of the fit line

Definition at line 249 of file MDTSimulation.cxx.

249 {
250 float z_pred = (m!=0.f ? (gpos.perp() - b)/m : 0.f);
251 return gpos.z() - z_pred;
252 }

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode L0Muon::MDTSimulation::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 29 of file MDTSimulation.cxx.

29 {
30
31 const xAOD::RPCCandDataContainer* barrelCandidates{};
32 ATH_CHECK(SG::get(barrelCandidates, m_barrelCandidateKey, ctx));
33
34
35 const ActsTrk::GeometryContext* geoCtx{nullptr};
36 ATH_CHECK(SG::get(geoCtx, m_geoCtxKey, ctx));
37
38 const ActsTrk::GeometryContext& gctx = *geoCtx;
39 std::vector<float> z_positions, r_positions;
40
41
42
43 for(const auto& cand : *barrelCandidates) {
44
45 float m=0, b=0;
46
47 if (!fitRPC(*cand, m, b, z_positions, r_positions)) {
48 ATH_MSG_DEBUG("RPC fit failed for this candidate");
49 continue; // do NOT abort event
50 }
51
52 std::vector<const xAOD::MdtDriftCircle*> mdtHits;
53 float eta = (static_cast<float>(cand->eta()) / static_cast<float>(xAOD::ICandData_v1::etaBitRange())) * (2.0f * xAOD::ICandData_v1::etaRange()) - xAOD::ICandData_v1::etaRange();
54 float phi = (static_cast<float>(cand->phi()) / static_cast<float>(xAOD::ICandData_v1::phiBitRange())) * xAOD::ICandData_v1::phiRange() - M_PI;
55 ATH_CHECK(collectMDTHits(ctx, gctx, eta, phi, mdtHits, m, b));
56
57 // Split hits by station
58 std::vector<const xAOD::MdtDriftCircle*> biHits;
59 std::vector<const xAOD::MdtDriftCircle*> bmHits;
60 std::vector<const xAOD::MdtDriftCircle*> boHits;
61
62
63 for (const xAOD::MdtDriftCircle* dc : mdtHits) {
64 if (!dc) continue;
65
66 const Identifier id = dc->identify();
67 const auto& idh = m_idHelperSvc->mdtIdHelper();
68 const std::string st = idh.stationNameString(idh.stationName(id));
69
70 if (st.rfind("BI", 0) == 0) {
71 biHits.push_back(dc);
72 } else if (st.rfind("BM", 0) == 0) {
73 bmHits.push_back(dc);
74 } else if (st.rfind("BO", 0) == 0) {
75 boHits.push_back(dc);
76 }
77 }
78
79
80 // Require at least two stations with enough hits
81 int nStationsWithEnoughHits = 0;
82 if (biHits.size() >= 3) ++nStationsWithEnoughHits;
83 if (bmHits.size() >= 3) ++nStationsWithEnoughHits;
84 if (boHits.size() >= 3) ++nStationsWithEnoughHits;
85
86 if (nStationsWithEnoughHits < 2) {
87 ATH_MSG_DEBUG("Bad candidate: fewer than 2 stations with enough MDT hits");
88 continue;
89 } else {
90 ATH_MSG_DEBUG("Good candidate");
91 }
92
93 // Run the segment finder independently for each station
94 std::vector<L0MDT::Segment> biSegmentsCSF;
95 std::vector<L0MDT::Segment> bmSegmentsCSF;
96 std::vector<L0MDT::Segment> boSegmentsCSF;
97
98 std::vector<L0MDT::Segment> biSegmentsLEG;
99 std::vector<L0MDT::Segment> bmSegmentsLEG;
100 std::vector<L0MDT::Segment> boSegmentsLEG;
101
102
103 if (biHits.size() >= 2) {
104 ATH_CHECK(m_csfSegmentFinder->findSegments(biHits, gctx, m, b, biSegmentsCSF));
105 ATH_CHECK(m_legendreSegmentFinder->findSegments(biHits, gctx, m, b, biSegmentsLEG));
106 }
107 if (bmHits.size() >= 2) {
108 ATH_CHECK(m_csfSegmentFinder->findSegments(bmHits, gctx, m, b, bmSegmentsCSF));
109 ATH_CHECK(m_legendreSegmentFinder->findSegments(bmHits, gctx, m, b, bmSegmentsLEG));
110 }
111 if (boHits.size() >= 2) {
112 ATH_CHECK(m_csfSegmentFinder->findSegments(boHits, gctx, m, b, boSegmentsCSF));
113 ATH_CHECK(m_legendreSegmentFinder->findSegments(boHits, gctx, m, b, boSegmentsLEG));
114 }
115
116
117 ATH_MSG_DEBUG("CSF segment summary: "
118 << " BI=" << biSegmentsCSF.size()
119 << " BM=" << bmSegmentsCSF.size()
120 << " BO=" << boSegmentsCSF.size());
121
122
123 ATH_MSG_DEBUG("LEG segment summary: "
124 << " BI=" << biSegmentsLEG.size()
125 << " BM=" << bmSegmentsLEG.size()
126 << " BO=" << boSegmentsLEG.size());
127
128 const L0MDT::Segment* biSeg = biSegmentsCSF.empty() ? nullptr : &biSegmentsCSF.front();
129 const L0MDT::Segment* bmSeg = bmSegmentsCSF.empty() ? nullptr : &bmSegmentsCSF.front();
130 const L0MDT::Segment* boSeg = boSegmentsCSF.empty() ? nullptr : &boSegmentsCSF.front();
131
132 const auto ptResult = m_ptEstimationTool->estimatePt(biSeg, bmSeg, boSeg);
133
134 if (ptResult) {
135 ATH_MSG_DEBUG("pT estimate | "
136 << "nStations=" << ptResult->nStations
137 << " pt=" << ptResult->pt
138 << " deltaBeta=" << ptResult->deltaBeta
139 << " sagitta=" << ptResult->sagitta
140 << " leverArm=" << ptResult->leverArm);
141 } else {
142 ATH_MSG_DEBUG("pT estimate not available for this candidate");
143 }
144
145 }
146
147 return StatusCode::SUCCESS;
148 }
#define M_PI
ToolHandle< L0MDT::IL0MDTSegmentFinderTool > m_legendreSegmentFinder
SG::ReadHandleKey< xAOD::RPCCandDataContainer > m_barrelCandidateKey
bool fitRPC(const xAOD::RPCCandData &cand, float &m, float &b, std::vector< float > &z_positions, std::vector< float > &r_positions) const
StatusCode collectMDTHits(const EventContext &ctx, const ActsTrk::GeometryContext &gctx, float eta, float phi, std::vector< const xAOD::MdtDriftCircle * > &hits, float m, float b) const
Collect MDT hits within a RoI around (eta, phi), keeping only those whose residual from the RPC fit l...
SG::ReadHandleKey< ActsTrk::GeometryContext > m_geoCtxKey
ToolHandle< L0MDT::IL0MDTSegmentFinderTool > m_csfSegmentFinder
ToolHandle< L0MDT::IPtEstimationTool > m_ptEstimationTool
static constexpr uint16_t phiBitRange()
static constexpr float etaRange()
static constexpr float phiRange()
static constexpr uint16_t etaBitRange()

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ fitRPC()

bool L0Muon::MDTSimulation::fitRPC ( const xAOD::RPCCandData & cand,
float & m,
float & b,
std::vector< float > & z_positions,
std::vector< float > & r_positions ) const
private

Definition at line 151 of file MDTSimulation.cxx.

151 {
152
153 float eta = (static_cast<float>(cand.eta()) / static_cast<float>(xAOD::ICandData_v1::etaBitRange())) * (2.0f * xAOD::ICandData_v1::etaRange()) - xAOD::ICandData_v1::etaRange();
154 float theta = 2.f * std::atan(std::exp(-eta));
155 float tanTheta = std::tan(theta);
156
157 z_positions.clear();
158 r_positions.clear();
159
160 for (int i = 0; i < 4; ++i) {
161 const float z_pos = static_cast<float>(cand.zPos().at(i)) / static_cast<float>(xAOD::RPCCandData_v1::zPosBitRange()) * (2.0f * xAOD::RPCCandData_v1::zPosRange()) - xAOD::RPCCandData_v1::zPosRange();
162 z_positions.push_back(z_pos);
163 r_positions.push_back(z_pos * tanTheta);
164 }
165
166 size_t N = z_positions.size();
167 if (N < 1) return false; // nothing to fit
168
169 float sumZ=0, sumR=0, sumZZ=0, sumZR=0;
170 for (size_t i=0;i<N;++i) {
171 sumZ += z_positions[i];
172 sumR += r_positions[i];
173 sumZZ += z_positions[i]*z_positions[i];
174 sumZR += z_positions[i]*r_positions[i];
175 }
176
177 if (N>=2) {
178 float den = N*sumZZ - sumZ*sumZ;
179 if (den != 0) {
180 m = (N*sumZR - sumZ*sumR) / den;
181 b = (sumR - m*sumZ) / N;
182 }
183 } else {//if the RPC candidate has only one z position we provide the fit using IP
184 m = tanTheta;
185 b = 0.f;
186 }
187
188 return true;
189 }
Scalar theta() const
theta method
uint16_t eta() const
Retrieve the eta.
static constexpr uint16_t zPosBitRange()
static constexpr float zPosRange()
std::array< uint16_t, 4 > zPos() const
Retrieve the global z positions of the RPC sector logic.
mapped_type at(key_type key) const
Look up an element in the map.
constexpr std::size_t N

◆ initialize()

StatusCode L0Muon::MDTSimulation::initialize ( )
overridevirtual

Definition at line 15 of file MDTSimulation.cxx.

15 {
16 ATH_MSG_DEBUG("Initializing " << name() << "...");
17 ATH_CHECK(m_mdtDriftCircleKey.initialize());
18 ATH_CHECK(m_barrelCandidateKey.initialize());
19 ATH_CHECK(m_regionSelector.retrieve());
20 ATH_CHECK(m_idHelperSvc.retrieve());
21 ATH_CHECK(m_geoCtxKey.initialize());
22 ATH_CHECK(m_csfSegmentFinder.retrieve());
24 ATH_CHECK(m_ptEstimationTool.retrieve());
25
26 return StatusCode::SUCCESS;
27 }

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_barrelCandidateKey

SG::ReadHandleKey<xAOD::RPCCandDataContainer> L0Muon::MDTSimulation::m_barrelCandidateKey {this, "RPCCandKey", "RPCCandData"}
private

Definition at line 80 of file MDTSimulation.h.

80{this, "RPCCandKey", "RPCCandData"};

◆ m_csfSegmentFinder

ToolHandle<L0MDT::IL0MDTSegmentFinderTool> L0Muon::MDTSimulation::m_csfSegmentFinder {this, "CSFSegmentFinder", "L0MDT::CompactSegmentFinderTool"}
private

Definition at line 74 of file MDTSimulation.h.

74{this, "CSFSegmentFinder", "L0MDT::CompactSegmentFinderTool"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_geoCtxKey

SG::ReadHandleKey<ActsTrk::GeometryContext> L0Muon::MDTSimulation::m_geoCtxKey {this, "AlignmentKey", "ActsAlignment", "cond handle key"}
private

Definition at line 78 of file MDTSimulation.h.

78{this, "AlignmentKey", "ActsAlignment", "cond handle key"};

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> L0Muon::MDTSimulation::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 72 of file MDTSimulation.h.

72{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_legendreSegmentFinder

ToolHandle<L0MDT::IL0MDTSegmentFinderTool> L0Muon::MDTSimulation::m_legendreSegmentFinder {this, "LegendreSegmentFinder", "L0MDT::LegendreSegmentFinderTool"}
private

Definition at line 75 of file MDTSimulation.h.

75{this, "LegendreSegmentFinder", "L0MDT::LegendreSegmentFinderTool"};

◆ m_mdtDriftCircleKey

SG::ReadHandleKey<xAOD::MdtDriftCircleContainer> L0Muon::MDTSimulation::m_mdtDriftCircleKey {this, "MdtDriftCircles", "xMdtDriftCircles"}
private

Definition at line 79 of file MDTSimulation.h.

79{this, "MdtDriftCircles", "xMdtDriftCircles"};

◆ m_ptEstimationTool

ToolHandle<L0MDT::IPtEstimationTool> L0Muon::MDTSimulation::m_ptEstimationTool {this,"PtEstimationTool","L0MDT::PtEstimationTool/PtEstimationTool","Tool to estimate pT from CSF segments"}
private

Definition at line 76 of file MDTSimulation.h.

76{this,"PtEstimationTool","L0MDT::PtEstimationTool/PtEstimationTool","Tool to estimate pT from CSF segments"};

◆ m_regionSelector

ToolHandle<IRegSelTool> L0Muon::MDTSimulation::m_regionSelector {this, "RegSel_MDT", "RegSelTool/RegSelTool_MDT"}
private

Definition at line 71 of file MDTSimulation.h.

71{this, "RegSel_MDT", "RegSelTool/RegSelTool_MDT"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: