ATLAS Offline Software
Loading...
Searching...
No Matches
MuonCombinedMuonCandidateAlg Class Reference

#include <MuonCombinedMuonCandidateAlg.h>

Inheritance diagram for MuonCombinedMuonCandidateAlg:
Collaboration diagram for MuonCombinedMuonCandidateAlg:

Public Member Functions

 ~MuonCombinedMuonCandidateAlg ()=default
StatusCode initialize () override
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

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::TrackParticleContainerm_muonTrackParticleLocation
SG::WriteHandleKey< MuonCandidateCollectionm_candidateCollectionName
SG::WriteHandleKey< TrackCollectionm_msOnlyTracks
PublicToolHandle< Muon::MuonEDMPrinterToolm_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
ToolHandle< Rec::ICombinedMuonTrackBuilderm_trackBuilder {this, "TrackBuilder", "", ""}
ToolHandle< Muon::IMuonTrackExtrapolationToolm_trackExtrapolationTool
ToolHandle< Trk::ITrackAmbiguityProcessorToolm_ambiguityProcessor
ToolHandle< Trk::IExtendedTrackSummaryToolm_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"}
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
SG::ReadHandleKey< Trk::SegmentCollectionm_segmentKey {this, "SegmentContainer", ""}
 Retrieve the segment container to perform the segment association offline.
PublicToolHandle< MuonCombined::IMuonTrackToSegmentAssociationToolm_trackSegmentAssociationTool
Gaudi::Property< unsigned int > m_extrapolationStrategy {this, "ExtrapolationStrategy", 0}
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 33 of file MuonCombinedMuonCandidateAlg.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

◆ ~MuonCombinedMuonCandidateAlg()

MuonCombinedMuonCandidateAlg::~MuonCombinedMuonCandidateAlg ( )
default

Member Function Documentation

◆ 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 MuonCombinedMuonCandidateAlg::execute ( const EventContext & ctx) const
override

Last but not least set the segments

Definition at line 39 of file MuonCombinedMuonCandidateAlg.cxx.

39 {
40 // retrieve MuonSpectrometer tracks
41 const xAOD::TrackParticleContainer* muonTrackParticles{};
42 ATH_CHECK(SG::get(muonTrackParticles, m_muonTrackParticleLocation, ctx));
43
44 SG::WriteHandle muonCandidates{m_candidateCollectionName, ctx};
45 SG::WriteHandle msOnlyTracks{m_msOnlyTracks, ctx};
46
47 ATH_CHECK(muonCandidates.record(std::make_unique<MuonCandidateCollection>()));
48 ATH_CHECK(msOnlyTracks.record(std::make_unique<TrackCollection>()));
49
50 const InDet::BeamSpotData* beamSpot{nullptr};
51 ATH_CHECK(SG::get(beamSpot, m_beamSpotKey, ctx));
52
53 ATH_MSG_DEBUG("Producing MuonCandidates for " << muonTrackParticles->size());
54 unsigned int ntracks = 0;
55
56
57 ATH_MSG_DEBUG("Beamspot position bs_x=" << Amg::toString(beamSpot->beamPos()));
58
59 std::vector<track_link> trackLinks;
60
61 unsigned int index = -1;
62 // Loop over MS tracks
63 for (const xAOD::TrackParticle* track : *muonTrackParticles) {
64 ++index;
65
66 if (!track->track()) {
67 ATH_MSG_WARNING("MuonStandalone track particle without Trk::Track");
68 continue;
69 }
70 const Trk::Track& msTrack = *track->track();
71
72 ATH_MSG_VERBOSE("Re-Fitting track " << std::endl
73 << m_printer->print(msTrack) << std::endl
74 << m_printer->printStations(msTrack));
75
76 std::unique_ptr<Trk::Track> standaloneTrack;
77 if (m_extrapolationStrategy == 0u) {
78 standaloneTrack = m_trackBuilder->standaloneFit(ctx, msTrack, beamSpot->beamPos(), nullptr);
79 } else {
80 standaloneTrack = m_trackExtrapolationTool->extrapolate(msTrack, ctx);
81 }
82
83 if (standaloneTrack) {
84 // Reject the track if its fit quality is much (much much) worse than that of the non-extrapolated track
85 if (standaloneTrack->fitQuality()->doubleNumberDoF() == 0) {
86 standaloneTrack.reset();
87 ATH_MSG_DEBUG("extrapolated track has no DOF, don't use it");
88 } else {
89 double mschi2 = 2.5; // a default we should hopefully never have to use (taken from CombinedMuonTrackBuilder)
90 if (msTrack.fitQuality()->doubleNumberDoF() > 0)
91 mschi2 = msTrack.fitQuality()->chiSquared() / msTrack.fitQuality()->doubleNumberDoF();
92 // choice of 1000 is slightly arbitrary, the point is that the fit should be really be terrible
93 if (standaloneTrack->fitQuality()->chiSquared() / standaloneTrack->fitQuality()->doubleNumberDoF() > 1000 * mschi2) {
94 standaloneTrack.reset();
95 ATH_MSG_DEBUG("extrapolated track has a degraded fit, don't use it");
96 }
97 }
98 }
99 if (standaloneTrack) {
100 standaloneTrack->info().setParticleHypothesis(Trk::muon);
101 standaloneTrack->info().setPatternRecognitionInfo(Trk::TrackInfo::MuidStandAlone);
102 ATH_MSG_VERBOSE("Extrapolated track " << std::endl
103 << m_printer->print(*standaloneTrack) << std::endl
104 << m_printer->printStations(*standaloneTrack));
105 ++ntracks;
106 if (!standaloneTrack->perigeeParameters()) {
107 ATH_MSG_WARNING(" Track without perigee " << (*standaloneTrack));
108 } else if (!standaloneTrack->perigeeParameters()->covariance()) {
109 ATH_MSG_WARNING(" Track with perigee without covariance " << (*standaloneTrack));
110 }
111 trackLinks.emplace_back(std::move(standaloneTrack), index, true);
112 } else {
113 // We can create tracks from EM segments+TGC hits
114 // If these are not successfully extrapolated, they are too low quality to be useful
115 // So only make candidates from un-extrapolated tracks if they are not EM-only
116 bool skipTrack = true;
117 const Trk::MuonTrackSummary* msMuonTrackSummary = nullptr;
118 std::unique_ptr<Trk::TrackSummary> msTrackSummary;
119 // If reading from an ESD, the track will not have a track summary yet
120 if (!msTrack.trackSummary()) {
121 msTrackSummary = m_trackSummaryTool->summary(ctx, msTrack);
122 msMuonTrackSummary = msTrackSummary->muonTrackSummary();
123 } else{
124 msMuonTrackSummary = msTrack.trackSummary()->muonTrackSummary();
125 }
126 for (const auto& chs : msMuonTrackSummary->chamberHitSummary()) {
127 using namespace Muon::MuonStationIndex;
128 if ((chs.isMdt() && m_idHelperSvc->stationIndex(chs.chamberId()) != StIndex::EM) ||
129 m_idHelperSvc->isCsc(chs.chamberId())) {
130 skipTrack = false;
131 break;
132 }
133 }
134 if (!skipTrack) {
135 trackLinks.emplace_back(std::make_unique<Trk::Track>(msTrack), index, false);
136 }
137 }
138 }
140 auto extrapTracks = std::make_unique<TrackCollection>(SG::VIEW_ELEMENTS);
141 extrapTracks->reserve(trackLinks.size());
142 for (const track_link& link : trackLinks) {
143 extrapTracks->push_back(link.track.get());
144 }
145 ATH_MSG_DEBUG("Finished back-tracking, total number of successfull fits " << ntracks);
146
147 // Resolve ambiguity between extrapolated tracks (where available)
148 auto resolvedTracks(m_ambiguityProcessor->process(ctx, extrapTracks.get()));
149
150 ATH_MSG_DEBUG("Finished ambiguity solving: " << extrapTracks->size() << " track(s) in -> " << resolvedTracks->size()
151 << " track(s) out");
152
153 const Trk::SegmentCollection* segments{nullptr};
154 ATH_CHECK(SG::get(segments, m_segmentKey, ctx));
155
156 // Loop over resolved tracks and build MuonCondidate collection
157 for (const Trk::Track* track : *resolvedTracks) {
158 std::vector<track_link>::iterator tLink = std::ranges::find_if(trackLinks,
159 [&track](const track_link& link) {
160 return link.track.get() == track;
161 });
162
163 if (tLink == trackLinks.end()) {
164 ATH_MSG_WARNING("Unable to find internal link between MS and SA tracks!");
165 continue;
166 }
167
168 std::unique_ptr<MuonCombined::MuonCandidate> muon_candidate{};
169 ElementLink<xAOD::TrackParticleContainer> MS_TrkLink{*muonTrackParticles, tLink->container_index, ctx};
170 if (tLink->extp_succeed) {
171 msOnlyTracks->push_back(std::move(tLink->track));
172 ElementLink<TrackCollection> saLink(*msOnlyTracks, msOnlyTracks->size() - 1, ctx);
173 muon_candidate = std::make_unique<MuonCombined::MuonCandidate>(MS_TrkLink, saLink,
174 msOnlyTracks->size() - 1);
175 // remove track from set so it is not deleted
176 } else {
177 // in this case the extrapolation failed
178 muon_candidate = std::make_unique<MuonCombined::MuonCandidate>(MS_TrkLink);
179 }
181 if (segments) {
182 std::vector<const Muon::MuonSegment*> assoc_segs;
183 m_trackSegmentAssociationTool->associatedSegments(*muon_candidate->primaryTrack(), segments, assoc_segs);
184 muon_candidate->setSegments(std::move(assoc_segs));
185 }
186 muonCandidates->push_back(std::move(muon_candidate));
187 }
188 return StatusCode::SUCCESS;
189}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
size_type size() const noexcept
Returns the number of elements in the collection.
SG::WriteHandleKey< MuonCandidateCollection > m_candidateCollectionName
ToolHandle< Muon::IMuonTrackExtrapolationTool > m_trackExtrapolationTool
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_muonTrackParticleLocation
ToolHandle< Trk::ITrackAmbiguityProcessorTool > m_ambiguityProcessor
PublicToolHandle< MuonCombined::IMuonTrackToSegmentAssociationTool > m_trackSegmentAssociationTool
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
ToolHandle< Rec::ICombinedMuonTrackBuilder > m_trackBuilder
Gaudi::Property< unsigned int > m_extrapolationStrategy
SG::WriteHandleKey< TrackCollection > m_msOnlyTracks
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
SG::ReadHandleKey< Trk::SegmentCollection > m_segmentKey
Retrieve the segment container to perform the segment association offline.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
double chiSquared() const
returns the of the overall track fit
Definition FitQuality.h:56
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
Definition FitQuality.h:68
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
const MuonTrackSummary * muonTrackSummary() const
returns a pointer to the MuonTrackSummary if available
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr).
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
str index
Definition DeMoScan.py:362
pointer & link(pointer p) const
Return a reference to the link for an element.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
DataVector< Trk::Segment > SegmentCollection
AthConfigFlags beamSpot(AthConfigFlags flags, str instanceName, str recoMode)
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".

◆ 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:

◆ initialize()

StatusCode MuonCombinedMuonCandidateAlg::initialize ( )
override

Definition at line 21 of file MuonCombinedMuonCandidateAlg.cxx.

21 {
24 ATH_CHECK(m_msOnlyTracks.initialize());
25 ATH_CHECK(m_printer.retrieve());
26 ATH_CHECK(m_trackBuilder.retrieve(EnableTool{!m_trackBuilder.empty()}));
27 ATH_CHECK(m_trackExtrapolationTool.retrieve(EnableTool{!m_trackExtrapolationTool.empty()}));
29 ATH_CHECK(m_trackSummaryTool.retrieve());
30 ATH_CHECK(m_idHelperSvc.retrieve());
31 ATH_CHECK(m_beamSpotKey.initialize());
32
33 ATH_CHECK(m_segmentKey.initialize(!m_segmentKey.empty()));
34 ATH_CHECK(m_trackSegmentAssociationTool.retrieve(EnableTool{!m_segmentKey.empty()}));
35
36 return StatusCode::SUCCESS;
37}

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

ToolHandle<Trk::ITrackAmbiguityProcessorTool> MuonCombinedMuonCandidateAlg::m_ambiguityProcessor
private
Initial value:
{this, "AmbiguityProcessor",
"Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"}

Definition at line 65 of file MuonCombinedMuonCandidateAlg.h.

65 {this, "AmbiguityProcessor",
66 "Trk::TrackSelectionProcessorTool/MuonAmbiProcessor"};

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> MuonCombinedMuonCandidateAlg::m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
private

Definition at line 71 of file MuonCombinedMuonCandidateAlg.h.

71{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};

◆ m_candidateCollectionName

SG::WriteHandleKey<MuonCandidateCollection> MuonCombinedMuonCandidateAlg::m_candidateCollectionName
private
Initial value:
{
this,
"MuonCandidateLocation",
"MuonCandidates",
"Muon candidate collection",
}

Definition at line 49 of file MuonCombinedMuonCandidateAlg.h.

49 {
50 this,
51 "MuonCandidateLocation",
52 "MuonCandidates",
53 "Muon candidate collection",
54 };

◆ 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_extrapolationStrategy

Gaudi::Property<unsigned int> MuonCombinedMuonCandidateAlg::m_extrapolationStrategy {this, "ExtrapolationStrategy", 0}
private

Definition at line 78 of file MuonCombinedMuonCandidateAlg.h.

78{this, "ExtrapolationStrategy", 0};

◆ m_idHelperSvc

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

Definition at line 69 of file MuonCombinedMuonCandidateAlg.h.

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

◆ m_msOnlyTracks

SG::WriteHandleKey<TrackCollection> MuonCombinedMuonCandidateAlg::m_msOnlyTracks
private
Initial value:
{
this,
"MSOnlyExtrapolatedTrackLocation",
"MSOnlyExtrapolatedTracks",
"MS extrapolated muon tracks",
}

Definition at line 55 of file MuonCombinedMuonCandidateAlg.h.

55 {
56 this,
57 "MSOnlyExtrapolatedTrackLocation",
58 "MSOnlyExtrapolatedTracks",
59 "MS extrapolated muon tracks",
60 };

◆ m_muonTrackParticleLocation

SG::ReadHandleKey<xAOD::TrackParticleContainer> MuonCombinedMuonCandidateAlg::m_muonTrackParticleLocation
private
Initial value:
{
this,
"MuonSpectrometerTrackParticleLocation",
"MuonSpectrometerTrackParticles",
"MS Track Particle collection",
}

Definition at line 43 of file MuonCombinedMuonCandidateAlg.h.

43 {
44 this,
45 "MuonSpectrometerTrackParticleLocation",
46 "MuonSpectrometerTrackParticles",
47 "MS Track Particle collection",
48 };

◆ m_printer

PublicToolHandle<Muon::MuonEDMPrinterTool> MuonCombinedMuonCandidateAlg::m_printer {this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
private

Definition at line 61 of file MuonCombinedMuonCandidateAlg.h.

61{this, "Printer", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"};

◆ m_segmentKey

SG::ReadHandleKey<Trk::SegmentCollection> MuonCombinedMuonCandidateAlg::m_segmentKey {this, "SegmentContainer", ""}
private

Retrieve the segment container to perform the segment association offline.

Definition at line 74 of file MuonCombinedMuonCandidateAlg.h.

74{this, "SegmentContainer", ""};

◆ m_trackBuilder

ToolHandle<Rec::ICombinedMuonTrackBuilder> MuonCombinedMuonCandidateAlg::m_trackBuilder {this, "TrackBuilder", "", ""}
private

Definition at line 62 of file MuonCombinedMuonCandidateAlg.h.

62{this, "TrackBuilder", "", ""};

◆ m_trackExtrapolationTool

ToolHandle<Muon::IMuonTrackExtrapolationTool> MuonCombinedMuonCandidateAlg::m_trackExtrapolationTool
private
Initial value:
{this, "TrackExtrapolationTool",
"ExtrapolateMuonToIPTool/ExtrapolateMuonToIPTool"}

Definition at line 63 of file MuonCombinedMuonCandidateAlg.h.

63 {this, "TrackExtrapolationTool",
64 "ExtrapolateMuonToIPTool/ExtrapolateMuonToIPTool"};

◆ m_trackSegmentAssociationTool

PublicToolHandle<MuonCombined::IMuonTrackToSegmentAssociationTool> MuonCombinedMuonCandidateAlg::m_trackSegmentAssociationTool
private
Initial value:
{
this, "TrackSegmentAssociationTool", "MuonCombined::TrackSegmentAssociationTool/TrackSegmentAssociationTool"}

Definition at line 75 of file MuonCombinedMuonCandidateAlg.h.

75 {
76 this, "TrackSegmentAssociationTool", "MuonCombined::TrackSegmentAssociationTool/TrackSegmentAssociationTool"};

◆ m_trackSummaryTool

ToolHandle<Trk::IExtendedTrackSummaryTool> MuonCombinedMuonCandidateAlg::m_trackSummaryTool {this, "TrackSummaryTool", "MuonTrackSummaryTool"}
private

Definition at line 67 of file MuonCombinedMuonCandidateAlg.h.

67{this, "TrackSummaryTool", "MuonTrackSummaryTool"};

◆ 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: