ATLAS Offline Software
Loading...
Searching...
No Matches
ParticleJetTools::TauSeedJetAlg Class Reference

#include <TauSeedJetAlg.h>

Inheritance diagram for ParticleJetTools::TauSeedJetAlg:
Collaboration diagram for ParticleJetTools::TauSeedJetAlg:

Public Member Functions

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

Protected Member Functions

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

Private Types

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

SG::ReadHandleKey< xAOD::TauJetContainer > m_tauKey
SG::ReadHandleKey< xAOD::IParticleContainer > m_constituentKey
SG::ReadHandleKeyArray< xAOD::TruthParticleContainer > m_ghostKeys
SG::WriteHandleKey< xAOD::JetContainer > m_jetKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_linkKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_statusKey
ToolHandleArray< IJetModifier > m_modifiers
Gaudi::Property< float > m_jetRadius
Gaudi::Property< float > m_neighbourDR
Gaudi::Property< float > m_ghostDR
std::vector< std::string > m_ghostLabels
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 38 of file TauSeedJetAlg.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

◆ TauSeedJetAlg()

ParticleJetTools::TauSeedJetAlg::TauSeedJetAlg ( const std::string & name,
ISvcLocator * loc )

Definition at line 32 of file TauSeedJetAlg.cxx.

33 : AthReentrantAlgorithm(name, loc) {}

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

Definition at line 54 of file TauSeedJetAlg.cxx.

54 {
55 SG::ReadHandle<xAOD::TauJetContainer> taus(m_tauKey, ctx);
56 SG::ReadHandle<xAOD::IParticleContainer> constituents(m_constituentKey, ctx);
57 ATH_CHECK(taus.isValid());
58 ATH_CHECK(constituents.isValid());
59
60 std::vector<const xAOD::TruthParticleContainer*> ghostContainers;
61 for (const auto& key : m_ghostKeys) {
62 SG::ReadHandle<xAOD::TruthParticleContainer> ghosts(key, ctx);
63 ATH_CHECK(ghosts.isValid());
64 ghostContainers.push_back(ghosts.cptr());
65 }
66
67 auto jets = std::make_unique<xAOD::JetContainer>();
68 auto jetsAux = std::make_unique<xAOD::JetAuxContainer>();
69 jets->setStore(jetsAux.get());
70 std::vector<int> statuses;
71 const fastjet::JetDefinition jetDefinition(fastjet::antikt_algorithm, m_jetRadius);
72
73 for (const xAOD::TauJet* tau : *taus) {
74 TLorentzVector seedAxis;
75 seedAxis.SetPtEtaPhiM(tau->ptJetSeed(), tau->etaJetSeed(), tau->phiJetSeed(), tau->mJetSeed());
76 const fastjet::PseudoJet seedPseudoJet(seedAxis);
77
78 xAOD::Jet* seedJet = jets->push_back(std::make_unique<xAOD::Jet>());
83
84 std::set<std::size_t> tauClusters;
85 TLorentzVector clusterSum;
86 for (const auto& link : tau->clusterLinks()) {
87 if (link.index() >= constituents->size()) {
88 ATH_MSG_WARNING("Tau cluster index " << link.index() << " outside of " << m_constituentKey.key());
89 continue;
90 }
91 if (!tauClusters.insert(link.index()).second) continue;
92 const xAOD::IParticle* cluster = constituents->at(link.index());
93 seedJet->addConstituent(cluster);
94 clusterSum += cluster->p4();
95 }
96 const xAOD::JetFourMom_t seedP4 = tauClusters.empty()
97 ? xAOD::JetFourMom_t(0, 0, 0, 0)
98 : xAOD::JetFourMom_t(clusterSum.Pt(), clusterSum.Eta(), clusterSum.Phi(), clusterSum.M());
99 seedJet->setJetP4(seedP4);
100 seedJet->setJetP4(xAOD::JetConstitScaleMomentum, seedP4);
101
102 std::vector<fastjet::PseudoJet> inputs;
103 for (std::size_t index = 0; index < constituents->size(); ++index) {
104 const xAOD::IParticle* constituent = constituents->at(index);
105 if (constituent->e() <= 0) continue;
106 if (!tauClusters.contains(index) && seedAxis.DeltaR(constituent->p4()) > m_neighbourDR) continue;
107 fastjet::PseudoJet pseudoJet(constituent->p4());
108 pseudoJet.set_user_index(index);
109 inputs.push_back(pseudoJet);
110 }
111
112 // ghosts get negative user indices pointing into ghostRefs
113 std::vector<std::pair<std::size_t, const xAOD::TruthParticle*>> ghostRefs;
114 for (std::size_t iContainer = 0; iContainer < ghostContainers.size(); ++iContainer) {
115 for (const xAOD::TruthParticle* particle : *ghostContainers.at(iContainer)) {
116 if (particle->e() <= 0) continue;
117 fastjet::PseudoJet pseudoJet(particle->p4());
118 // in rapidity as in the clustering, partons can be far off shell
119 if (seedPseudoJet.delta_R(pseudoJet) > m_ghostDR) continue;
120 pseudoJet *= ghostScale;
121 pseudoJet.set_user_index(-1 - static_cast<int>(ghostRefs.size()));
122 ghostRefs.emplace_back(iContainer, particle);
123 inputs.push_back(pseudoJet);
124 }
125 }
126
127 fastjet::ClusterSequence clusterSequence(inputs, jetDefinition);
128 const std::vector<fastjet::PseudoJet> clustered = clusterSequence.inclusive_jets();
129
130 const fastjet::PseudoJet* tauJet = nullptr;
131 double maxTauPt = 0;
132 std::size_t nTauInJet = 0;
133 std::size_t nOtherInJet = 0;
134 for (const fastjet::PseudoJet& jet : clustered) {
135 double tauPt = 0;
136 std::size_t nTau = 0;
137 std::size_t nOther = 0;
138 for (const fastjet::PseudoJet& constituent : jet.constituents()) {
139 if (constituent.user_index() < 0) continue;
140 if (tauClusters.contains(constituent.user_index())) {
141 tauPt += constituent.pt();
142 ++nTau;
143 } else {
144 ++nOther;
145 }
146 }
147 if (nTau > 0 && tauPt > maxTauPt) {
148 maxTauPt = tauPt;
149 tauJet = &jet;
150 nTauInJet = nTau;
151 nOtherInJet = nOther;
152 }
153 }
154
155 std::vector<std::vector<const xAOD::TruthParticle*>> associated(ghostContainers.size());
156 int status = -1;
157 if (tauJet) {
158 const std::size_t nTauInputs = std::count_if(
159 inputs.begin(), inputs.end(), [&tauClusters](const fastjet::PseudoJet& pj) {
160 return pj.user_index() >= 0 && tauClusters.contains(pj.user_index());
161 });
162 if (nTauInJet < nTauInputs) status = 2;
163 else status = nOtherInJet > 0 ? 1 : 0;
164 for (const fastjet::PseudoJet& constituent : tauJet->constituents()) {
165 if (constituent.user_index() >= 0) continue;
166 const auto& [iContainer, particle] = ghostRefs.at(-1 - constituent.user_index());
167 associated.at(iContainer).push_back(particle);
168 }
169 }
170 statuses.push_back(status);
171
172 // same ghost content as in IParticleExtractor
173 for (std::size_t iContainer = 0; iContainer < associated.size(); ++iContainer) {
174 const std::string& label = m_ghostLabels.at(iContainer);
175 float ptSum = 0;
176 for (const xAOD::TruthParticle* particle : associated.at(iContainer)) ptSum += particle->pt();
177 seedJet->setAssociatedObjects(label, associated.at(iContainer));
178 seedJet->setAttribute<float>(label + "Pt", ptSum);
179 seedJet->setAttribute<int>(label + "Count", associated.at(iContainer).size());
180 }
181 }
182
183 SG::WriteHandle<xAOD::JetContainer> seedJets(m_jetKey, ctx);
184 ATH_CHECK(seedJets.record(std::move(jets), std::move(jetsAux)));
185 for (const ToolHandle<IJetModifier>& modifier : m_modifiers) {
186 ATH_CHECK(modifier->modify(*seedJets));
187 }
188
189 std::optional<SG::WriteDecorHandle<xAOD::TauJetContainer, ElementLink<xAOD::JetContainer>>> linkHandle;
190 if (!m_linkKey.empty()) linkHandle.emplace(m_linkKey, ctx);
191 std::optional<SG::WriteDecorHandle<xAOD::TauJetContainer, int>> statusHandle;
192 if (!m_statusKey.empty()) statusHandle.emplace(m_statusKey, ctx);
193 for (std::size_t index = 0; index < taus->size(); ++index) {
194 const xAOD::TauJet& tau = *taus->at(index);
195 if (linkHandle) (*linkHandle)(tau) = ElementLink<xAOD::JetContainer>(*seedJets, index, ctx);
196 if (statusHandle) (*statusHandle)(tau) = statuses.at(index);
197 }
198
199 return StatusCode::SUCCESS;
200}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x,...)
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition JetTypes.h:17
static Double_t taus
@ Phi
Definition RPCdef.h:8
@ Eta
Definition RPCdef.h:8
size_t size() const
Number of registered mappings.
Gaudi::Property< float > m_jetRadius
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_linkKey
std::vector< std::string > m_ghostLabels
SG::ReadHandleKey< xAOD::IParticleContainer > m_constituentKey
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_statusKey
ToolHandleArray< IJetModifier > m_modifiers
Gaudi::Property< float > m_neighbourDR
SG::WriteHandleKey< xAOD::JetContainer > m_jetKey
SG::ReadHandleKeyArray< xAOD::TruthParticleContainer > m_ghostKeys
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauKey
Gaudi::Property< float > m_ghostDR
virtual FourMom_t p4() const =0
The full 4-momentum of the particle.
virtual double pt() const =0
The transverse momentum ( ) of the particle.
virtual double e() const =0
The total energy of the particle.
void setAlgorithmType(JetAlgorithmType::ID a)
Definition Jet_v1.cxx:269
void setAttribute(const std::string &name, const T &v)
void addConstituent(const ElementLink< IParticleContainer > &link, float weight=1.0)
Add a constituent directly in the ElementLink format.
Definition Jet_v1.cxx:113
void setJetP4(const JetFourMom_t &p4)
Definition Jet_v1.cxx:182
void setConstituentsSignalState(JetConstitScale t)
Set the state at which constituents were when this jet was found. This function is called by jet buil...
Definition Jet_v1.cxx:143
void setAssociatedObjects(const std::string &name, const std::vector< const T * > &vec)
set associated objects from a vector of arbitrary object.
void setSizeParameter(float p)
Definition Jet_v1.cxx:268
void setInputType(JetInput::Type t)
Definition Jet_v1.cxx:270
std::string label(const std::string &format, int i)
Definition label.h:19
str index
Definition DeMoScan.py:362
list statuses
pointer & link(pointer p) const
Return a reference to the link for an element.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
status
Definition merge.py:16
Jet_v1 Jet
Definition of the current "jet version".
TauJet_v3 TauJet
Definition of the current "tau version".
Definition TauJet.h:17
TruthParticle_v1 TruthParticle
Typedef to implementation.
@ JetConstitScaleMomentum
Definition JetTypes.h:29
@ CalibratedJetConstituent
Definition JetTypes.h:22
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< double > > JetFourMom_t
Base 4 Momentum type for Jet.
Definition JetTypes.h:17

◆ 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 ParticleJetTools::TauSeedJetAlg::initialize ( )
overridevirtual

Definition at line 35 of file TauSeedJetAlg.cxx.

35 {
36 ATH_CHECK(m_tauKey.initialize());
37 ATH_CHECK(m_constituentKey.initialize());
38 ATH_CHECK(m_ghostKeys.initialize());
39 ATH_CHECK(m_jetKey.initialize());
40 if (!m_linkKey.empty()) m_linkKey = m_tauKey.key() + "." + m_linkKey.key();
42 if (!m_statusKey.empty()) m_statusKey = m_tauKey.key() + "." + m_statusKey.key();
44 ATH_CHECK(m_modifiers.retrieve());
45
46 for (const auto& key : m_ghostKeys) {
47 std::string label = key.key();
48 if (label.starts_with(truthLabelPrefix)) label.erase(0, truthLabelPrefix.size());
49 m_ghostLabels.push_back("Ghost" + label);
50 }
51 return StatusCode::SUCCESS;
52}

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

SG::ReadHandleKey<xAOD::IParticleContainer> ParticleJetTools::TauSeedJetAlg::m_constituentKey
private
Initial value:
{
this, "Constituents", "LCOriginTopoClusters",
"Seed jet constituents, index-parallel to the container of the tau clusterLinks"}

Definition at line 47 of file TauSeedJetAlg.h.

47 {
48 this, "Constituents", "LCOriginTopoClusters",
49 "Seed jet constituents, index-parallel to the container of the tau clusterLinks"};

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

Gaudi::Property<float> ParticleJetTools::TauSeedJetAlg::m_ghostDR
private
Initial value:
{
this, "GhostDR", 1.0, "Only ghosts within this rapidity-phi dR of the seed axis are clustered"}

Definition at line 71 of file TauSeedJetAlg.h.

71 {
72 this, "GhostDR", 1.0, "Only ghosts within this rapidity-phi dR of the seed axis are clustered"};

◆ m_ghostKeys

SG::ReadHandleKeyArray<xAOD::TruthParticleContainer> ParticleJetTools::TauSeedJetAlg::m_ghostKeys
private
Initial value:
{
this, "GhostCollections",
{"TruthLabelBHadronsFinal", "TruthLabelCHadronsFinal",
"TruthLabelTausFinal", "TruthLabelPartons"},
"Ghost truth particles, associated as Ghost<name without TruthLabel>"}

Definition at line 50 of file TauSeedJetAlg.h.

50 {
51 this, "GhostCollections",
52 {"TruthLabelBHadronsFinal", "TruthLabelCHadronsFinal",
53 "TruthLabelTausFinal", "TruthLabelPartons"},
54 "Ghost truth particles, associated as Ghost<name without TruthLabel>"};

◆ m_ghostLabels

std::vector<std::string> ParticleJetTools::TauSeedJetAlg::m_ghostLabels
private

Definition at line 74 of file TauSeedJetAlg.h.

◆ m_jetKey

SG::WriteHandleKey<xAOD::JetContainer> ParticleJetTools::TauSeedJetAlg::m_jetKey
private
Initial value:
{
this, "SeedJets", "TauSeedJets", "Seed jets, one per tau in the same order"}

Definition at line 55 of file TauSeedJetAlg.h.

55 {
56 this, "SeedJets", "TauSeedJets", "Seed jets, one per tau in the same order"};

◆ m_jetRadius

Gaudi::Property<float> ParticleJetTools::TauSeedJetAlg::m_jetRadius
private
Initial value:
{
this, "JetRadius", 0.4, "Radius of the anti-kt seed jet definition"}

Definition at line 66 of file TauSeedJetAlg.h.

66 {
67 this, "JetRadius", 0.4, "Radius of the anti-kt seed jet definition"};

◆ m_linkKey

SG::WriteDecorHandleKey<xAOD::TauJetContainer> ParticleJetTools::TauSeedJetAlg::m_linkKey
private
Initial value:
{
this, "SeedJetLink", "", "Optional tau decoration linking to its seed jet"}

Definition at line 57 of file TauSeedJetAlg.h.

57 {
58 this, "SeedJetLink", "", "Optional tau decoration linking to its seed jet"};

◆ m_modifiers

ToolHandleArray<IJetModifier> ParticleJetTools::TauSeedJetAlg::m_modifiers
private
Initial value:
{
this, "Modifiers", {}, "Jet modifiers run on the seed jets, e.g. the truth labelling"}

Definition at line 63 of file TauSeedJetAlg.h.

63 {
64 this, "Modifiers", {}, "Jet modifiers run on the seed jets, e.g. the truth labelling"};

◆ m_neighbourDR

Gaudi::Property<float> ParticleJetTools::TauSeedJetAlg::m_neighbourDR
private
Initial value:
{
this, "NeighbourDR", 1.0,
"Constituents within this dR of the seed axis are clustered with the tau clusters"}

Definition at line 68 of file TauSeedJetAlg.h.

68 {
69 this, "NeighbourDR", 1.0,
70 "Constituents within this dR of the seed axis are clustered with the tau clusters"};

◆ m_statusKey

SG::WriteDecorHandleKey<xAOD::TauJetContainer> ParticleJetTools::TauSeedJetAlg::m_statusKey
private
Initial value:
{
this, "StatusDecoration", "",
"Optional, e.g. GhostSeedJetStatus: 0 one jet holds exactly the tau clusters, "
"1 it holds other clusters as well, 2 tau clusters split over jets, -1 no clusters"}

Definition at line 59 of file TauSeedJetAlg.h.

59 {
60 this, "StatusDecoration", "",
61 "Optional, e.g. GhostSeedJetStatus: 0 one jet holds exactly the tau clusters, "
62 "1 it holds other clusters as well, 2 tau clusters split over jets, -1 no clusters"};

◆ m_tauKey

SG::ReadHandleKey<xAOD::TauJetContainer> ParticleJetTools::TauSeedJetAlg::m_tauKey
private
Initial value:
{
this, "TauJets", "TauJets", "Taus to build the seed jets for"}

Definition at line 45 of file TauSeedJetAlg.h.

45 {
46 this, "TauJets", "TauJets", "Taus to build the seed jets for"};

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