ATLAS Offline Software
Loading...
Searching...
No Matches
Rec::MuSAVtxJPsiValidationAlg Class Reference

#include <MuSAVtxJPsiValidationAlg.h>

Inheritance diagram for Rec::MuSAVtxJPsiValidationAlg:
Collaboration diagram for Rec::MuSAVtxJPsiValidationAlg:

Public Member Functions

 MuSAVtxJPsiValidationAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
const xAOD::Muon * findMuonFromTrack (const xAOD::TrackParticle *tp, const xAOD::MuonContainer *muons)
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

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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.

Protected Attributes

SG::ReadHandleKey< xAOD::MuonContainer > m_muonContainer { this, "MuonContainer", "Muons", "input muon collection" }
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo { this, "EventInfo", "EventInfo", "event info" }
SG::WriteHandleKey< xAOD::MuonContainer > m_JPsiMuonContainer { this, "JPsiMuonContainer", "JPsiMuons", "output J/Psi muon collection" }
SG::WriteHandleKey< xAOD::VertexContainer > m_JPsiVertexContainer { this, "JPsiVertexContainer", "JPsiVertices", "output J/Psi vertex collection" }
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_JPsiTrackParticleContainer { this, "JPsiTrackParticleContainer", "JPsiVerticesTracks", "output J/Psi track collection" }
ToolHandle< Analysis::JpsiFinder > m_JPsiFinderTool { this, "JpsiFinderTool", "Analysis::JpsiFinder/JpsiFinder", "find J/Psi -> mumu" }
PublicToolHandle< Trig::TrigDecisionTool > m_tdt {this, "TrigDecisionTool", ""}
ToolHandle< Trig::IMatchingTool > m_matchTool {this, "TrigMatchingTool", ""}
Gaudi::Property< std::vector< std::string > > m_triggerChains {this, "Chain", {"HLT_2mu10_bJpsimumu_L12MU8F", "HLT_2mu4_bJpsimumu_L12MU3VF"}}
Gaudi::Property< double > m_dR {this, "TriggerMatchDR", 0.01}
SG::WriteDecorHandleKeyArray< xAOD::VertexContainer > m_trigDecorKeys {this, "TriggerDecorKeys", {}}

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_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

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 22 of file MuSAVtxJPsiValidationAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuSAVtxJPsiValidationAlg()

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

Definition at line 44 of file MuSAVtxJPsiValidationAlg.cxx.

45 : AthAlgorithm(name,p)
46{}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

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

Execute method.

Implements AthAlgorithm.

Definition at line 71 of file MuSAVtxJPsiValidationAlg.cxx.

71 {
72
73 ATH_MSG_DEBUG("Executing MuSAVtxJPsiValidationAlg for event");
74 SG::ReadHandle<xAOD::MuonContainer> muonContainer(m_muonContainer, ctx);
75 ATH_CHECK(muonContainer.isValid());
76
77 SG::ReadHandle<xAOD::EventInfo> evtInfo(m_eventInfo, ctx);
78 ATH_CHECK(evtInfo.isValid());
79
80 SG::WriteHandle<xAOD::MuonContainer> JPsiMuonContainer(m_JPsiMuonContainer, ctx);
81 ATH_CHECK(JPsiMuonContainer.record(std::make_unique<xAOD::MuonContainer>(), std::make_unique<xAOD::MuonAuxContainer>()));
82
83 SG::WriteHandle<xAOD::VertexContainer> JPsiVertexContainer(m_JPsiVertexContainer, ctx);
84 ATH_CHECK(JPsiVertexContainer.record(std::make_unique<xAOD::VertexContainer>(), std::make_unique<xAOD::VertexAuxContainer>()));
85
86 SG::WriteHandle<xAOD::TrackParticleContainer> JPsiTrackParticleContainer(m_JPsiTrackParticleContainer, ctx);
87 ATH_CHECK(JPsiTrackParticleContainer.record(std::make_unique<xAOD::TrackParticleContainer>(), std::make_unique<xAOD::TrackParticleAuxContainer>()));
88
89 // 1) Run J/Psi finder
90 auto jpsiVtxs = std::make_unique<xAOD::VertexContainer>();
91 auto jpsiAux = std::make_unique<xAOD::VertexAuxContainer>();
92 jpsiVtxs->setStore(jpsiAux.get());
93 ATH_CHECK(m_JPsiFinderTool->performSearch(ctx, *jpsiVtxs));
94
95 if (jpsiVtxs->empty()) {
96 ATH_MSG_DEBUG("No J/Psi candidates found");
97 return StatusCode::SUCCESS;
98 } else {
99 ATH_MSG_DEBUG("Found " << jpsiVtxs->size() << " J/Psi candidates");
100 }
101
102 // Create all trigger decor handles once, outside the vertex loop
103 std::vector<SG::WriteDecorHandle<xAOD::VertexContainer, char>> decors;
104 decors.reserve(m_trigDecorKeys.size());
105 for (const auto& key : m_trigDecorKeys){
106 ATH_MSG_DEBUG("Creating WriteDecorHandle for key: " << key.key());
107 decors.emplace_back(key, ctx);
108 }
109
110 for (const xAOD::Vertex* vtx : *jpsiVtxs) {
111 const auto& links = vtx->trackParticleLinks();
112 std::vector<char> isTriggerMatched(m_triggerChains.size(), 0);
113 if (links.size() == 2) {
114 const xAOD::TrackParticle* tp1 = links[0].isValid() ? *links[0] : nullptr;
115 const xAOD::TrackParticle* tp2 = links[1].isValid() ? *links[1] : nullptr;
116 const xAOD::Muon* mu1 = tp1 ? findMuonFromTrack(tp1, muonContainer.cptr()) : nullptr;
117 const xAOD::Muon* mu2 = tp2 ? findMuonFromTrack(tp2, muonContainer.cptr()) : nullptr;
118
119 if (!mu1 && !mu2) {
120 ATH_MSG_WARNING("No muons found for J/Psi vertex with index " << vtx->index());
121 continue;
122 } else if (!mu1 || !mu2) {
123 ATH_MSG_WARNING("Only one muon found for J/Psi vertex with index " << vtx->index());
124 } else {
125 ATH_MSG_DEBUG("Found J/Psi vertex with index " << vtx->index() << " and muons: " << mu1->index() << ", " << mu2->index());
126 }
127
128 if (mu1) JPsiMuonContainer->push_back(new xAOD::Muon(*mu1));
129 if (mu2) JPsiMuonContainer->push_back(new xAOD::Muon(*mu2));
130
131 if(mu1 && mu2) {
132 for(size_t iChain = 0; iChain < m_triggerChains.size(); ++iChain) {
133 const std::string& chain = m_triggerChains[iChain];
134 if (m_tdt->isPassed(chain)) {
135 // Check for matching muons
136 bool matched = m_matchTool->match(std::vector<const xAOD::IParticle*>{mu1, mu2}, chain, m_dR);
137 ATH_MSG_DEBUG("Trigger chain " << chain << " matched: " << (matched ? "Yes" : "No"));
138 isTriggerMatched[iChain] = matched;
139 }
140 }
141 }
142 }
143
144 // vertices right out of JPsiFinder have vxTrackAtVertex decorators that can't be saved to container
145 // thus we make a fresh copy to avoid this issue
146 xAOD::Vertex* newVtx = new xAOD::Vertex();
147 JPsiVertexContainer->push_back(newVtx); // add the vertex to the container first
148
149 // Set properties of the new vertex
150 newVtx->setPosition(vtx->position());
151 newVtx->setCovariance(vtx->covariance());
152 newVtx->setFitQuality(vtx->chiSquared(), vtx->numberDoF());
153 newVtx->setVertexType(vtx->vertexType());
154
155 //add trigger matching decorations to the new vertex
156 for (size_t iChain = 0; iChain < m_triggerChains.size(); ++iChain) {
157 decors[iChain](*newVtx) = isTriggerMatched[iChain];
158 }
159
160 // copy track particle links
161 for (const auto& link : vtx->trackParticleLinks()) {
162 if (!link.isValid()) continue;
163 const xAOD::TrackParticle* oldTrack = *link;
165 newTrack->makePrivateStore(*oldTrack);
166 JPsiTrackParticleContainer->push_back(newTrack);
167 ElementLink<xAOD::TrackParticleContainer> newLink(*JPsiTrackParticleContainer, newTrack->index(), ctx);
168 newVtx->addTrackAtVertex(newLink, 1.0); // weight is set to 1.0 for simplicity
169 }
170
171 // add identical decos to musa for comparison
172 constexpr double muonMass = 105.658; // Muon mass in MeV
173 TLorentzVector sumP4_muon, sumP4_electron, sumP4_selected;
174 std::vector<const xAOD::TrackParticle*> vtxTracks;
175
176 int vtxCharge = 0;
177
178 for (const auto& link : newVtx->trackParticleLinks()) {
179 const xAOD::TrackParticle* track = link.isValid() ? *link : nullptr;
180 if (!track) continue;
181
182 double pt = track->pt();
183 double eta = track->eta();
184 double phi = track->phi();
185
186 TLorentzVector p4_muon, p4_electron;
187 p4_muon.SetPtEtaPhiM(pt, eta, phi, muonMass);
188 p4_electron.SetPtEtaPhiM(pt, eta, phi, VKalVrtAthena::PhysConsts::mass_electron);
189
190 sumP4_muon += p4_muon;
191 sumP4_electron += p4_electron;
192 sumP4_selected += p4_muon; // assuming selected tracks are muons...
193
194 vtxCharge += track->charge();
195 vtxTracks.push_back(track);
196 }
197
198 //calculate opening angle between two tracks
199 float vtxDeltaR = 0;
200 if (vtxTracks.size() == 2) {
201 float dEta = vtxTracks[0]->eta() - vtxTracks[1]->eta();
202 float dPhi = std::abs(vtxTracks[0]->phi() - vtxTracks[1]->phi());
203 if (dPhi > M_PI) dPhi = 2 * M_PI - dPhi;
204 vtxDeltaR = std::sqrt(dEta * dEta + dPhi * dPhi);
205 }
206
207 vtx_pxAcc(*newVtx) = sumP4_muon.Px();
208 vtx_pyAcc(*newVtx) = sumP4_muon.Py();
209 vtx_pzAcc(*newVtx) = sumP4_muon.Pz();
210 vtx_massAcc(*newVtx) = sumP4_muon.M();
211 vtx_chargeAcc(*newVtx) = vtxCharge;
212 minOpAngAcc(*newVtx) = vtxDeltaR;
213 chi2_coreAcc(*newVtx) = vtx->chiSquared();
214 ndof_coreAcc(*newVtx) = vtx->numberDoF();
215 chi2_assocAcc(*newVtx) = vtx->chiSquared();
216 ndof_assocAcc(*newVtx) = vtx->numberDoF();
217 massAcc(*newVtx) = sumP4_muon.M();
218 mass_eAcc(*newVtx) = sumP4_electron.M();
219 mass_selectedTracksAcc(*newVtx) = sumP4_selected.M();
220 num_trksAcc(*newVtx) = links.size();
221 num_selectedTracksAcc(*newVtx) = links.size(); // Assuming all tracks are selected
222 num_associatedTracksAcc(*newVtx) = links.size(); // Assuming all tracks are associated
223 dCloseVrtAcc(*newVtx) = 0; // not implemented but assigned for comparison to MuSA
224 }
225
226 return StatusCode::SUCCESS;
227}
#define M_PI
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,...)
#define ATH_MSG_WARNING(x,...)
xAOD::MuonContainer * muonContainer
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_JPsiTrackParticleContainer
SG::ReadHandleKey< xAOD::MuonContainer > m_muonContainer
ToolHandle< Trig::IMatchingTool > m_matchTool
SG::WriteHandleKey< xAOD::VertexContainer > m_JPsiVertexContainer
SG::WriteDecorHandleKeyArray< xAOD::VertexContainer > m_trigDecorKeys
const xAOD::Muon * findMuonFromTrack(const xAOD::TrackParticle *tp, const xAOD::MuonContainer *muons)
PublicToolHandle< Trig::TrigDecisionTool > m_tdt
ToolHandle< Analysis::JpsiFinder > m_JPsiFinderTool
SG::WriteHandleKey< xAOD::MuonContainer > m_JPsiMuonContainer
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Gaudi::Property< std::vector< std::string > > m_triggerChains
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
void setVertexType(VxType::VertexType vType)
Set the type of the vertex.
void setCovariance(const std::vector< float > &value)
Sets the covariance matrix as a simple vector of values.
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
pointer & link(pointer p) const
Return a reference to the link for an element.
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
Definition Muon.h:13

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

◆ findMuonFromTrack()

const xAOD::Muon * Rec::MuSAVtxJPsiValidationAlg::findMuonFromTrack ( const xAOD::TrackParticle * tp,
const xAOD::MuonContainer * muons )

Definition at line 229 of file MuSAVtxJPsiValidationAlg.cxx.

229 {
230 for (const xAOD::Muon* mu : *muons) {
231 if (mu->trackParticle(xAOD::Muon::CombinedTrackParticle) == tp) return mu;
232 if (mu->trackParticle(xAOD::Muon::InnerDetectorTrackParticle) == tp) return mu;
233 }
234 return nullptr;
235}

◆ initialize()

StatusCode Rec::MuSAVtxJPsiValidationAlg::initialize ( )
overridevirtual

Definition at line 48 of file MuSAVtxJPsiValidationAlg.cxx.

48 {
49 ATH_CHECK(m_muonContainer.initialize());
50 ATH_CHECK(m_eventInfo.initialize());
51 ATH_CHECK(m_JPsiMuonContainer.initialize());
52 ATH_CHECK(m_JPsiVertexContainer.initialize());
54
55 ATH_CHECK(m_JPsiFinderTool.retrieve());
56 ATH_MSG_DEBUG("Retrieved J/Psi finder tool: " << m_JPsiFinderTool);
57
58 ATH_CHECK(m_tdt.retrieve(DisableTool{m_triggerChains.empty()}));
59 ATH_CHECK(m_matchTool.retrieve(DisableTool{m_triggerChains.empty()}));
60
61 for(const std::string& chain : m_triggerChains) {
62 m_trigDecorKeys.emplace_back(m_JPsiVertexContainer, std::format("muonsMatched_{:}", chain));
63 }
64 ATH_CHECK(m_trigDecorKeys.initialize());
65
66 ATH_MSG_DEBUG("Initialization successful");
67
68 return StatusCode::SUCCESS;
69}

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

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

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

Set filter decision:

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, 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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_dR

Gaudi::Property<double> Rec::MuSAVtxJPsiValidationAlg::m_dR {this, "TriggerMatchDR", 0.01}
protected

Definition at line 42 of file MuSAVtxJPsiValidationAlg.h.

42{this, "TriggerMatchDR", 0.01};

◆ m_eventInfo

SG::ReadHandleKey<xAOD::EventInfo> Rec::MuSAVtxJPsiValidationAlg::m_eventInfo { this, "EventInfo", "EventInfo", "event info" }
protected

Definition at line 32 of file MuSAVtxJPsiValidationAlg.h.

32{ this, "EventInfo", "EventInfo", "event info" };

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 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_JPsiFinderTool

ToolHandle<Analysis::JpsiFinder> Rec::MuSAVtxJPsiValidationAlg::m_JPsiFinderTool { this, "JpsiFinderTool", "Analysis::JpsiFinder/JpsiFinder", "find J/Psi -> mumu" }
protected

Definition at line 38 of file MuSAVtxJPsiValidationAlg.h.

38{ this, "JpsiFinderTool", "Analysis::JpsiFinder/JpsiFinder", "find J/Psi -> mumu" };

◆ m_JPsiMuonContainer

SG::WriteHandleKey<xAOD::MuonContainer> Rec::MuSAVtxJPsiValidationAlg::m_JPsiMuonContainer { this, "JPsiMuonContainer", "JPsiMuons", "output J/Psi muon collection" }
protected

Definition at line 34 of file MuSAVtxJPsiValidationAlg.h.

34{ this, "JPsiMuonContainer", "JPsiMuons", "output J/Psi muon collection" };

◆ m_JPsiTrackParticleContainer

SG::WriteHandleKey<xAOD::TrackParticleContainer> Rec::MuSAVtxJPsiValidationAlg::m_JPsiTrackParticleContainer { this, "JPsiTrackParticleContainer", "JPsiVerticesTracks", "output J/Psi track collection" }
protected

Definition at line 36 of file MuSAVtxJPsiValidationAlg.h.

36{ this, "JPsiTrackParticleContainer", "JPsiVerticesTracks", "output J/Psi track collection" };

◆ m_JPsiVertexContainer

SG::WriteHandleKey<xAOD::VertexContainer> Rec::MuSAVtxJPsiValidationAlg::m_JPsiVertexContainer { this, "JPsiVertexContainer", "JPsiVertices", "output J/Psi vertex collection" }
protected

Definition at line 35 of file MuSAVtxJPsiValidationAlg.h.

35{ this, "JPsiVertexContainer", "JPsiVertices", "output J/Psi vertex collection" };

◆ m_matchTool

ToolHandle<Trig::IMatchingTool> Rec::MuSAVtxJPsiValidationAlg::m_matchTool {this, "TrigMatchingTool", ""}
protected

Definition at line 40 of file MuSAVtxJPsiValidationAlg.h.

40{this, "TrigMatchingTool", ""};

◆ m_muonContainer

SG::ReadHandleKey<xAOD::MuonContainer> Rec::MuSAVtxJPsiValidationAlg::m_muonContainer { this, "MuonContainer", "Muons", "input muon collection" }
protected

Definition at line 31 of file MuSAVtxJPsiValidationAlg.h.

31{ this, "MuonContainer", "Muons", "input muon collection" };

◆ m_tdt

PublicToolHandle<Trig::TrigDecisionTool> Rec::MuSAVtxJPsiValidationAlg::m_tdt {this, "TrigDecisionTool", ""}
protected

Definition at line 39 of file MuSAVtxJPsiValidationAlg.h.

39{this, "TrigDecisionTool", ""};

◆ m_trigDecorKeys

SG::WriteDecorHandleKeyArray<xAOD::VertexContainer> Rec::MuSAVtxJPsiValidationAlg::m_trigDecorKeys {this, "TriggerDecorKeys", {}}
protected

Definition at line 44 of file MuSAVtxJPsiValidationAlg.h.

44{this, "TriggerDecorKeys", {}};

◆ m_triggerChains

Gaudi::Property<std::vector<std::string> > Rec::MuSAVtxJPsiValidationAlg::m_triggerChains {this, "Chain", {"HLT_2mu10_bJpsimumu_L12MU8F", "HLT_2mu4_bJpsimumu_L12MU3VF"}}
protected

Definition at line 41 of file MuSAVtxJPsiValidationAlg.h.

41{this, "Chain", {"HLT_2mu10_bJpsimumu_L12MU8F", "HLT_2mu4_bJpsimumu_L12MU3VF"}};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.


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