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

#include <MuonCreatorAlg.h>

Inheritance diagram for MuonCreatorAlg:

Public Member Functions

 MuonCreatorAlg (const std::string &name, ISvcLocator *pSvcLocator)
 ~MuonCreatorAlg ()=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

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

Private Attributes

ToolHandle< MuonCombined::IMuonCreatorToolm_muonCreatorTool
SG::WriteHandleKey< xAOD::MuonContainerm_muonCollectionName {this, "MuonContainerLocation", "Muons", "Muon Container"}
SG::WriteHandleKey< xAOD::SlowMuonContainerm_slowMuonCollectionName
SG::WriteHandleKey< xAOD::TrackParticleContainerm_combinedCollectionName {this, "CombinedLocation", "CombinedMuon", "Combined muons"}
SG::WriteHandleKey< TrackCollectionm_combinedTrkCollectionName {this, "CombinedTrackLocation", "CombinedMuon", "Combined muon tracks"}
SG::WriteHandleKey< xAOD::TrackParticleContainerm_extrapolatedCollectionName
SG::WriteHandleKey< TrackCollectionm_extrapolatedTrkCollectionName
SG::WriteHandleKey< xAOD::TrackParticleContainerm_msOnlyExtrapolatedCollectionName
SG::WriteHandleKey< TrackCollectionm_msOnlyExtrapolatedTrkCollectionName
SG::ReadHandleKey< InDetCandidateCollectionm_indetCandidateCollectionName
SG::ReadHandleKeyArray< MuonCandidateCollectionm_muonCandidateKeys
SG::ReadHandleKeyArray< MuonCombined::InDetCandidateToTagMapm_tagMaps
SG::ReadHandleKey< MuonCombined::MuonTagToSegMapm_segAssocMapKey {this, "TagToSegmentKey", "MuonTagSegMap"}
SG::ReadHandleKey< xAOD::MuonSegmentContainerm_segContainerName {this, "SegmentContainerName", "MuonSegments", "Segments"}
SG::WriteHandleKey< xAOD::CaloClusterContainerm_clusterContainerName
SG::WriteHandleKey< CaloClusterCellLinkContainerm_clusterContainerLinkName
Gaudi::Property< bool > m_buildSlowMuon {this, "BuildSlowMuon", false}
Gaudi::Property< bool > m_doSA {this, "CreateSAmuons", false}
Gaudi::Property< bool > m_makeClusters {this, "MakeClusters", true}
ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "", "Monitoring tool"}
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

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

◆ MuonCreatorAlg()

MuonCreatorAlg::MuonCreatorAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 30 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx.

30: AthReentrantAlgorithm(name, pSvcLocator) {}

◆ ~MuonCreatorAlg()

MuonCreatorAlg::~MuonCreatorAlg ( )
default

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}

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

Use the ConstDataVector pipe all MuonCandidate collections into a single vector

Definition at line 72 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx.

72 {
73 std::vector<const MuonCombined::InDetCandidateToTagMap*> tagMaps;
74 tagMaps.reserve(m_tagMaps.size());
75 if (!m_doSA) {
76 for (SG::ReadHandle<MuonCombined::InDetCandidateToTagMap>& h : m_tagMaps.makeHandles(ctx)) tagMaps.push_back(h.cptr());
77 }
78
79 // Create the xAOD container and its auxiliary store:
80 SG::WriteHandle<xAOD::MuonContainer> wh_muons{m_muonCollectionName, ctx};
81 ATH_CHECK(wh_muons.recordNonConst(std::make_unique<xAOD::MuonContainer>(), std::make_unique<xAOD::MuonAuxContainer>()));
82 ATH_MSG_DEBUG("Recorded Muons with key: " << m_muonCollectionName.key());
83 MuonCombined::IMuonCreatorTool::OutputData output(*(wh_muons.ptr()));
84
85 // Create and record track particles:
86 // combined tracks
87 SG::WriteHandle<xAOD::TrackParticleContainer> wh_combtp(m_combinedCollectionName, ctx);
88 SG::WriteHandle<TrackCollection> wh_combtrk(m_combinedTrkCollectionName, ctx);
89 ATH_CHECK(wh_combtp.record(std::make_unique<xAOD::TrackParticleContainer>(), std::make_unique<xAOD::TrackParticleAuxContainer>()));
90 ATH_CHECK(wh_combtrk.record(std::make_unique<TrackCollection>()));
91 output.combinedTrackParticleContainer = wh_combtp.ptr();
92 output.combinedTrackCollection = wh_combtrk.ptr();
93
94 // extrapolated tracks
95 SG::WriteHandle<xAOD::TrackParticleContainer> wh_extrtp(m_extrapolatedCollectionName, ctx);
96 SG::WriteHandle<TrackCollection> wh_extrtrk(m_extrapolatedTrkCollectionName, ctx);
97 ATH_CHECK(wh_extrtp.record(std::make_unique<xAOD::TrackParticleContainer>(), std::make_unique<xAOD::TrackParticleAuxContainer>()));
98 ATH_CHECK(wh_extrtrk.record(std::make_unique<TrackCollection>()));
99 output.extrapolatedTrackParticleContainer = wh_extrtp.ptr();
100 output.extrapolatedTrackCollection = wh_extrtrk.ptr();
101
102 // msonly tracks
103 SG::WriteHandle<xAOD::TrackParticleContainer> wh_msextrtp(m_msOnlyExtrapolatedCollectionName, ctx);
104 SG::WriteHandle<TrackCollection> wh_msextrtrk(m_msOnlyExtrapolatedTrkCollectionName, ctx);
105 ATH_CHECK(wh_msextrtp.record(std::make_unique<xAOD::TrackParticleContainer>(), std::make_unique<xAOD::TrackParticleAuxContainer>()));
106 ATH_CHECK(wh_msextrtrk.record(std::make_unique<TrackCollection>()));
107 output.msOnlyExtrapolatedTrackParticleContainer = wh_msextrtp.ptr();
108 output.msOnlyExtrapolatedTrackCollection = wh_msextrtrk.ptr();
109
110 // segments
111 if (!m_segContainerName.empty()) {
112 SG::ReadHandle<xAOD::MuonSegmentContainer> rh_segment(m_segContainerName, ctx);
113 output.xaodSegmentContainer = rh_segment.ptr();
114 }
115 if (!m_segAssocMapKey.empty()) {
116 SG::ReadHandle<MuonCombined::MuonTagToSegMap> rh_segAssocMap(m_segAssocMapKey, ctx);
117 output.tagToSegmentAssocMap = rh_segAssocMap.ptr();
118 }
119
120 // calo clusters
121 std::unique_ptr<xAOD::CaloClusterContainer> caloclusters{nullptr};
122 std::unique_ptr<xAOD::CaloClusterAuxContainer> caloclustersaux{nullptr};
123
124 if (m_makeClusters) {
125 caloclusters = std::make_unique<xAOD::CaloClusterContainer>();
126 caloclustersaux = std::make_unique<xAOD::CaloClusterAuxContainer>();
127 caloclusters->setStore(caloclustersaux.get());
128 output.clusterContainer = caloclusters.get();
129 }
130
131 SG::WriteHandle<xAOD::SlowMuonContainer> wh_slowmuon;
133 ConstDataVector<MuonCandidateCollection> muon_candidates{SG::VIEW_ELEMENTS};
134
135 if (m_buildSlowMuon) {
136 wh_slowmuon = SG::WriteHandle<xAOD::SlowMuonContainer>(m_slowMuonCollectionName, ctx);
137 ATH_CHECK(wh_slowmuon.record(std::make_unique<xAOD::SlowMuonContainer>(), std::make_unique<xAOD::SlowMuonAuxContainer>()));
138 output.slowMuonContainer = wh_slowmuon.ptr();
139 } else {
140 for (SG::ReadHandle<MuonCandidateCollection>& muonCandidateRH : m_muonCandidateKeys.makeHandles(ctx)) {
141 if (!muonCandidateRH.isValid()) {
142 ATH_MSG_ERROR("Could not read " << muonCandidateRH.fullKey());
143 return StatusCode::FAILURE;
144 }
145 muon_candidates.insert(muon_candidates.end(), muonCandidateRH->begin(), muonCandidateRH->end());
146 }
147 }
148 m_muonCreatorTool->create(ctx, muon_candidates.asDataVector(), tagMaps, output);
149
150 if (m_makeClusters) {
151 SG::WriteHandle<CaloClusterCellLinkContainer> wh_clusterslink{m_clusterContainerLinkName, ctx};
152 SG::WriteHandle<xAOD::CaloClusterContainer> wh_clusters{m_clusterContainerName, ctx};
153 std::unique_ptr<CaloClusterCellLinkContainer> clusterlinks = std::make_unique<CaloClusterCellLinkContainer>();
154 auto* sg = wh_clusters.storeHandle().get();
155 for (xAOD::CaloCluster* cl : *output.clusterContainer) { cl->setLink(clusterlinks.get(), sg); }
156 ATH_CHECK(wh_clusterslink.record(std::move(clusterlinks)));
157 ATH_CHECK(wh_clusters.record(std::move(caloclusters), std::move(caloclustersaux)));
158 }
159
160 //---------------------------------------------------------------------------------------------------------------------//
161 //------------ Monitoring of the reconstructed muons inside the trigger algs ------------//
162 //------------ Author: Laurynas Mince ------------//
163 //------------ Created: 26.07.2019 ------------//
164 //---------------------------------------------------------------------------------------------------------------------//
165
166 // Only run monitoring for online algorithms
167 if (!m_monTool.name().empty()) {
168 // Monitoring histograms and variables
169 auto muon_n = Monitored::Scalar<int>("muon_n", wh_muons->size());
170 auto muon_pt =
171 Monitored::Collection("muon_pt", *(wh_muons.ptr()), [](auto const& mu) { return mu->pt() * MeVtoGeV; }); // converted to GeV
172 auto muon_eta = Monitored::Collection("muon_eta", *(wh_muons.ptr()), &xAOD::Muon_v1::eta);
173 auto muon_phi = Monitored::Collection("muon_phi", *(wh_muons.ptr()), &xAOD::Muon_v1::phi);
174
175 std::vector<float> MDT_R, MDT_dR;
176 for( const auto mu : *wh_muons ) {
177 if (!(mu->muonType() == xAOD::Muon::MuonType::CaloTagged ||
178 mu->muonType() == xAOD::Muon::MuonType::SegmentTagged)) {
179 const Trk::Track* trk = mu->primaryTrackParticle()->track();
180 for (const Trk::TrackStateOnSurface* tsos : *trk->trackStateOnSurfaces()) {
181 const Muon::MdtDriftCircleOnTrack* mdt = dynamic_cast <const Muon::MdtDriftCircleOnTrack*>(tsos->measurementOnTrack());
182 if (!mdt) continue;
183 MDT_R.push_back(std::abs(mdt->driftRadius()));
184 MDT_dR.push_back(Amg::error(mdt->localCovariance(), Trk::locX));
185 }
186 }
187 }
188 auto muon_MDT_R = Monitored::Collection("muon_MDT_R", MDT_R);
189 auto muon_MDT_dR = Monitored::Collection("muon_MDT_dR", MDT_dR);
190
191 auto satrks_n = Monitored::Scalar<int>("satrks_n", wh_extrtp->size());
192 auto satrks_pt = Monitored::Collection("satrks_pt", *(wh_extrtp.ptr()),
193 [](auto const& satrk) { return satrk->pt() * MeVtoGeV; }); // converted to GeV
194 auto satrks_eta = Monitored::Collection("satrks_eta", *(wh_extrtp.ptr()), &xAOD::TrackParticle_v1::eta);
195 auto satrks_phi = Monitored::Collection("satrks_phi", *(wh_extrtp.ptr()), &xAOD::TrackParticle_v1::phi);
196
197 auto cbtrks_n = Monitored::Scalar<int>("cbtrks_n", wh_combtp->size());
198 auto cbtrks_pt = Monitored::Collection("cbtrks_pt", *(wh_combtp.ptr()),
199 [](auto const& cbtrk) { return cbtrk->pt() * MeVtoGeV; }); // converted to GeV
200 auto cbtrks_eta = Monitored::Collection("cbtrks_eta", *(wh_combtp.ptr()), &xAOD::TrackParticle_v1::eta);
201 auto cbtrks_phi = Monitored::Collection("cbtrks_phi", *(wh_combtp.ptr()), &xAOD::TrackParticle_v1::phi);
202
203 if (!m_doSA) {
204 SG::ReadHandle<InDetCandidateCollection> indetCandidateCollection{m_indetCandidateCollectionName, ctx};
205
206 auto idtrks_n = Monitored::Scalar<int>("idtrks_n", indetCandidateCollection->size());
207 auto idtrks_pt = Monitored::Collection("idtrks_pt", *indetCandidateCollection,
208 [](auto const& idtrk) { return idtrk->indetTrackParticle().pt() * MeVtoGeV; });
209 auto idtrks_eta = Monitored::Collection("idtrks_eta", *indetCandidateCollection,
210 [](auto const& idtrk) { return idtrk->indetTrackParticle().eta(); });
211 auto idtrks_phi = Monitored::Collection("idtrks_phi", *indetCandidateCollection,
212 [](auto const& idtrk) { return idtrk->indetTrackParticle().phi(); });
213 auto monitorIt = Monitored::Group(m_monTool, muon_n, muon_pt, muon_eta, muon_phi, muon_MDT_R, muon_MDT_dR, satrks_n, satrks_pt, satrks_eta, satrks_phi,
214 cbtrks_n, cbtrks_pt, cbtrks_eta, cbtrks_phi, idtrks_n, idtrks_pt, idtrks_eta, idtrks_phi);
215 } else
216 auto monitorIt = Monitored::Group(m_monTool, muon_n, muon_pt, muon_eta, muon_phi, muon_MDT_R, muon_MDT_dR, satrks_n, satrks_pt, satrks_eta, satrks_phi,
217 cbtrks_n, cbtrks_pt, cbtrks_eta, cbtrks_phi);
218 }
219
220 return StatusCode::SUCCESS;
221}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
iterator end() noexcept
Return an iterator pointing past the end of the collection.
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_combinedCollectionName
SG::ReadHandleKeyArray< MuonCandidateCollection > m_muonCandidateKeys
SG::ReadHandleKey< MuonCombined::MuonTagToSegMap > m_segAssocMapKey
SG::ReadHandleKey< InDetCandidateCollection > m_indetCandidateCollectionName
SG::WriteHandleKey< xAOD::SlowMuonContainer > m_slowMuonCollectionName
SG::WriteHandleKey< TrackCollection > m_msOnlyExtrapolatedTrkCollectionName
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_clusterContainerLinkName
ToolHandle< MuonCombined::IMuonCreatorTool > m_muonCreatorTool
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_clusterContainerName
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_msOnlyExtrapolatedCollectionName
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_extrapolatedCollectionName
SG::ReadHandleKeyArray< MuonCombined::InDetCandidateToTagMap > m_tagMaps
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segContainerName
double driftRadius() const
Returns the value of the drift radius.
const ServiceHandle< IProxyDict > & storeHandle() const
Return handle to the referenced store.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
StatusCode recordNonConst(std::unique_ptr< T > data)
Record a non-const object to the store.
pointer_type ptr()
Dereference the pointer.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .).
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
constexpr float MeVtoGeV
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
@ locX
Definition ParamDefs.h:37
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
output
Definition merge.py:16
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ 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

◆ initialize()

StatusCode MuonCreatorAlg::initialize ( )
overridevirtual

Definition at line 32 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx.

32 {
33 ATH_CHECK(m_muonCreatorTool.retrieve());
34 ATH_CHECK(m_muonCollectionName.initialize());
38 // Can't use a flag in intialize for an array of keys
39 if (!m_doSA) ATH_CHECK(m_tagMaps.initialize());
40 else m_tagMaps.clear();
42 ATH_CHECK(m_segAssocMapKey.initialize(!m_segAssocMapKey.empty()));
44 m_combinedCollectionName = m_combinedCollectionName.key() + "TrackParticles";
58
59 if (not m_monTool.name().empty()) { ATH_CHECK(m_monTool.retrieve()); }
60 ATH_MSG_INFO("MuonCreatorAlg has been setup successfully");
61 ATH_MSG_INFO(" *** CombinedTrackContainer: " << m_combinedTrkCollectionName);
62 ATH_MSG_INFO(" *** xAOD::CombinedTrackContainer: " << m_combinedCollectionName);
63
64 ATH_MSG_INFO(" *** xAOD::ExtrpolatedTrackContainer: " << m_extrapolatedCollectionName);
65 ATH_MSG_INFO(" *** ExtrpolatedTrackContainer: " << m_extrapolatedTrkCollectionName);
66 ATH_MSG_INFO(" *** xAOD::MSOnlyTrackContainer: " << m_msOnlyExtrapolatedCollectionName);
67 ATH_MSG_INFO(" *** ExtrpolatedTackContainer: " << m_msOnlyExtrapolatedTrkCollectionName);
68
69 return StatusCode::SUCCESS;
70}
#define ATH_MSG_INFO(x)

◆ 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_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_buildSlowMuon

Gaudi::Property<bool> MuonCreatorAlg::m_buildSlowMuon {this, "BuildSlowMuon", false}
private

Definition at line 69 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

69{this, "BuildSlowMuon", false};

◆ m_clusterContainerLinkName

SG::WriteHandleKey<CaloClusterCellLinkContainer> MuonCreatorAlg::m_clusterContainerLinkName
private
Initial value:
{this, "CaloClusterCellLinkName", "MuonClusterCollection",
"Cluster links"}

Definition at line 66 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

66 {this, "CaloClusterCellLinkName", "MuonClusterCollection",
67 "Cluster links"};

◆ m_clusterContainerName

SG::WriteHandleKey<xAOD::CaloClusterContainer> MuonCreatorAlg::m_clusterContainerName
private
Initial value:
{this, "ClusterContainerName", "MuonClusterCollection",
"Clusters"}

Definition at line 64 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

64 {this, "ClusterContainerName", "MuonClusterCollection",
65 "Clusters"};

◆ m_combinedCollectionName

SG::WriteHandleKey<xAOD::TrackParticleContainer> MuonCreatorAlg::m_combinedCollectionName {this, "CombinedLocation", "CombinedMuon", "Combined muons"}
private

Definition at line 43 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

43{this, "CombinedLocation", "CombinedMuon", "Combined muons"};

◆ m_combinedTrkCollectionName

SG::WriteHandleKey<TrackCollection> MuonCreatorAlg::m_combinedTrkCollectionName {this, "CombinedTrackLocation", "CombinedMuon", "Combined muon tracks"}
private

Definition at line 44 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

44{this, "CombinedTrackLocation", "CombinedMuon", "Combined muon tracks"};

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

Gaudi::Property<bool> MuonCreatorAlg::m_doSA {this, "CreateSAmuons", false}
private

Definition at line 70 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

70{this, "CreateSAmuons", false};

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

SG::WriteHandleKey<xAOD::TrackParticleContainer> MuonCreatorAlg::m_extrapolatedCollectionName
private
Initial value:
{this, "ExtrapolatedLocation", "ExtrapolatedMuon",
"Extrapolated muons"}

Definition at line 45 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

45 {this, "ExtrapolatedLocation", "ExtrapolatedMuon",
46 "Extrapolated muons"};

◆ m_extrapolatedTrkCollectionName

SG::WriteHandleKey<TrackCollection> MuonCreatorAlg::m_extrapolatedTrkCollectionName
private
Initial value:
{this, "ExtrapolatedTrackLocation", "ExtrapolatedMuon",
"Extrapolated muon tracks"}

Definition at line 47 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

47 {this, "ExtrapolatedTrackLocation", "ExtrapolatedMuon",
48 "Extrapolated muon tracks"};

◆ m_indetCandidateCollectionName

SG::ReadHandleKey<InDetCandidateCollection> MuonCreatorAlg::m_indetCandidateCollectionName
private
Initial value:
{this, "InDetCandidateLocation", "InDetCandidates",
"ID candidates"}

Definition at line 53 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

53 {this, "InDetCandidateLocation", "InDetCandidates",
54 "ID candidates"};

◆ m_makeClusters

Gaudi::Property<bool> MuonCreatorAlg::m_makeClusters {this, "MakeClusters", true}
private

Definition at line 71 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

71{this, "MakeClusters", true};

◆ m_monTool

ToolHandle<GenericMonitoringTool> MuonCreatorAlg::m_monTool {this, "MonTool", "", "Monitoring tool"}
private

Definition at line 74 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

74{this, "MonTool", "", "Monitoring tool"};

◆ m_msOnlyExtrapolatedCollectionName

SG::WriteHandleKey<xAOD::TrackParticleContainer> MuonCreatorAlg::m_msOnlyExtrapolatedCollectionName
private
Initial value:
{this, "MSOnlyExtrapolatedLocation",
"MSOnlyExtrapolatedMuon", "MS Extrapolated muons"}

Definition at line 49 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

49 {this, "MSOnlyExtrapolatedLocation",
50 "MSOnlyExtrapolatedMuon", "MS Extrapolated muons"};

◆ m_msOnlyExtrapolatedTrkCollectionName

SG::WriteHandleKey<TrackCollection> MuonCreatorAlg::m_msOnlyExtrapolatedTrkCollectionName
private
Initial value:
{
this, "MSOnlyExtrapolatedTrackLocation", "MSOnlyExtrapolatedMuonTracks", "MS extrapolated muon tracks"}

Definition at line 51 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

51 {
52 this, "MSOnlyExtrapolatedTrackLocation", "MSOnlyExtrapolatedMuonTracks", "MS extrapolated muon tracks"};

◆ m_muonCandidateKeys

SG::ReadHandleKeyArray<MuonCandidateCollection> MuonCreatorAlg::m_muonCandidateKeys
private
Initial value:
{
this, "MuonCandidateLocation", {"MuonCandidates"}, "Muon candidates"}

Definition at line 56 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

56 {
57 this, "MuonCandidateLocation", {"MuonCandidates"}, "Muon candidates"};

◆ m_muonCollectionName

SG::WriteHandleKey<xAOD::MuonContainer> MuonCreatorAlg::m_muonCollectionName {this, "MuonContainerLocation", "Muons", "Muon Container"}
private

Definition at line 40 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

40{this, "MuonContainerLocation", "Muons", "Muon Container"};

◆ m_muonCreatorTool

ToolHandle<MuonCombined::IMuonCreatorTool> MuonCreatorAlg::m_muonCreatorTool
private
Initial value:
{this, "MuonCreatorTool", "MuonCombined::MuonCreatorTool/MuonCreatorTool",
"Muon creator tool"}

Definition at line 38 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

38 {this, "MuonCreatorTool", "MuonCombined::MuonCreatorTool/MuonCreatorTool",
39 "Muon creator tool"};

◆ m_segAssocMapKey

SG::ReadHandleKey<MuonCombined::MuonTagToSegMap> MuonCreatorAlg::m_segAssocMapKey {this, "TagToSegmentKey", "MuonTagSegMap"}
private

Definition at line 61 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

61{this, "TagToSegmentKey", "MuonTagSegMap"};

◆ m_segContainerName

SG::ReadHandleKey<xAOD::MuonSegmentContainer> MuonCreatorAlg::m_segContainerName {this, "SegmentContainerName", "MuonSegments", "Segments"}
private

Definition at line 62 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

62{this, "SegmentContainerName", "MuonSegments", "Segments"};

◆ m_slowMuonCollectionName

SG::WriteHandleKey<xAOD::SlowMuonContainer> MuonCreatorAlg::m_slowMuonCollectionName
private
Initial value:
{this, "SlowMuonContainerLocation", "SlowMuons",
"Slow Muon Container"}

Definition at line 41 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

41 {this, "SlowMuonContainerLocation", "SlowMuons",
42 "Slow Muon Container"};

◆ m_tagMaps

Initial value:
{
this, "TagMaps", {"muidcoTagMap", "stacoTagMap", "muGirlTagMap", "caloTagMap", "segmentTagMap"}, "ID candidate to tag maps"}

Definition at line 58 of file Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h.

58 {
59 this, "TagMaps", {"muidcoTagMap", "stacoTagMap", "muGirlTagMap", "caloTagMap", "segmentTagMap"}, "ID candidate to tag maps"};

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