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 unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
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 L0Muon::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< L0Muon::RPCCandDataContainerm_barrelCandidateKey {this, "L0MuonRPCCandKey", "L0MuonRPCCand"}
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

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

62{
63 return 0;
64}

◆ 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 190 of file MDTSimulation.cxx.

190 {
191
192
193 hits.clear();
194
195 const float dEta = 0.01f, dPhi = 0.01f;
196
197
198 RoiDescriptor roi(eta, eta-dEta, eta+dEta,
199 phi, phi-dPhi, phi+dPhi);
200 TrigRoiDescriptor trigROI(roi);
201
202
203 auto regSel = m_regionSelector->lookup(ctx);
204 if (!regSel) return StatusCode::FAILURE;
205
206 std::vector<IdentifierHash> hashList;
207 regSel->HashIDList(trigROI, hashList);
208
209
210 const xAOD::MdtDriftCircleContainer* driftCircles{};
211 ATH_CHECK(SG::get(driftCircles, m_mdtDriftCircleKey, ctx));
212
213 float windowSize = 5;
214
215 ATH_MSG_DEBUG("found n chamber hashes " << hashList.size());
216 xAOD::ChamberViewer viewer{*driftCircles, m_idHelperSvc.get(), xAOD::ChamberView::Mode::Chamber};
217 IdContext modContext = m_idHelperSvc->mdtIdHelper().module_context();
218 for (const IdentifierHash& h : hashList) {
219 Identifier mId;
220 m_idHelperSvc->mdtIdHelper().get_id(h, mId, &modContext);
221 ATH_MSG_DEBUG("looking at chamber " << m_idHelperSvc->toString(mId));
222
223
224 if(!viewer.loadView(mId)){
225 continue;
226 }
227 for(const xAOD::MdtDriftCircle* dc : viewer){
228 const MuonGMR4::MdtReadoutElement* detEl = dc->readoutElement();
229 const float pitch = detEl->tubePitch();
230 const Amg::Transform3D& locToGlob= detEl->localToGlobalTransform(gctx,dc->measurementHash());
231 const Amg::Vector3D gpos = locToGlob* dc->localMeasurementPos() ;
232 float resZ = computeResidual(gpos, m, b);
233 if (std::abs(resZ) > windowSize * pitch) continue;
234
235 hits.push_back(dc);
236
237
238
239 }
240 }
241 return StatusCode::SUCCESS;
242 }
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 245 of file MDTSimulation.cxx.

245 {
246 float z_pred = (m!=0.f ? (gpos.perp() - b)/m : 0.f);
247 return gpos.z() - z_pred;
248 }

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

◆ 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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

88{
89 // If we didn't find any symlinks to add, just return the collection
90 // from the base class. Otherwise, return the extended collection.
91 if (!m_extendedExtraObjects.empty()) {
93 }
95}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ fitRPC()

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

Definition at line 148 of file MDTSimulation.cxx.

148 {
149
150 float theta = 2.f * std::atan(std::exp(-cand.eta()));
151 float tanTheta = std::tan(theta);
152
153 z_positions.clear();
154 r_positions.clear();
155
156 for (int i = 0; i < 4; ++i) {
157 const float z_pos = cand.zPos(i);
158 z_positions.push_back(z_pos);
159 r_positions.push_back(z_pos * tanTheta);
160 }
161
162 size_t N = z_positions.size();
163 if (N < 1) return false; // nothing to fit
164
165 float sumZ=0, sumR=0, sumZZ=0, sumZR=0;
166 for (size_t i=0;i<N;++i) {
167 sumZ += z_positions[i];
168 sumR += r_positions[i];
169 sumZZ += z_positions[i]*z_positions[i];
170 sumZR += z_positions[i]*r_positions[i];
171 }
172
173 if (N>=2) {
174 float den = N*sumZZ - sumZ*sumZ;
175 if (den != 0) {
176 m = (N*sumZR - sumZ*sumR) / den;
177 b = (sumR - m*sumZ) / N;
178 }
179 } else {//if the RPC candidate has only one z position we provide the fit using IP
180 m = tanTheta;
181 b = 0.f;
182 }
183
184 return true;
185 }
Scalar theta() const
theta method
float eta() const
get the kinematic parameters
Definition ICandData.cxx:28
float zPos(int index) const

◆ 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()

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

75{
76 return BaseAlg::sysExecute (ctx);
77}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

105 {
107
108 if (sc.isFailure()) {
109 return sc;
110 }
111
112 ServiceHandle<ICondSvc> cs("CondSvc",name());
113 for (auto h : outputHandles()) {
114 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
115 // do this inside the loop so we don't create the CondSvc until needed
116 if ( cs.retrieve().isFailure() ) {
117 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
118 return StatusCode::SUCCESS;
119 }
120 if (cs->regHandle(this,*h).isFailure()) {
122 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
123 << " with CondSvc");
124 }
125 }
126 }
127 return sc;
128}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
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<L0Muon::RPCCandDataContainer> L0Muon::MDTSimulation::m_barrelCandidateKey {this, "L0MuonRPCCandKey", "L0MuonRPCCand"}
private

Definition at line 80 of file MDTSimulation.h.

80{this, "L0MuonRPCCandKey", "L0MuonRPCCand"};

◆ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.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: