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

#include <CopyTruthJetParticles.h>

Inheritance diagram for CopyTruthJetParticles:
Collaboration diagram for CopyTruthJetParticles:

Public Member Functions

 CopyTruthJetParticles (const std::string &name)
 Constructor.
virtual StatusCode initialize () override final
 Function initialising the tool.
virtual int execute () const override final
 redefine execute so we can call our own classify()
virtual int inputContainerNames (std::vector< std::string > &connames)
 Method to return the list of input containers.
virtual int outputContainerNames (std::vector< std::string > &connames)
 Method to return the list of output containers.
virtual void print () const
 Print the state of the tool.
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 sysInitialize () override
 Perform system initialization for an algorithm.
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
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool classifyJetInput (const xAOD::TruthParticle *tp, std::vector< const xAOD::TruthParticle * > &promptLeptons, std::map< const xAOD::TruthParticle *, unsigned int > &tc_results) const
 Redefine our own Classifier function(s)
unsigned int getTCresult (const xAOD::TruthParticle *tp, std::map< const xAOD::TruthParticle *, unsigned int > &tc_results) const
bool comesFrom (const xAOD::TruthParticle *tp, const int pdgID, std::vector< int > &used_vertices) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< IMCTruthClassifierm_classif {this, "MCTruthClassifier", ""}
 Handle on MCTruthClassifier for finding prompt leptons.
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthParticleKey {this, "TruthParticleKey", "TruthParticles", "SG Key for input truth particle container"}
 Key for input truth event.
SG::ReadDecorHandleKeyArray< xAOD::TruthParticleContainerm_dressingNames {this, "DressingDecorationNames", {}, "Name of the dressed photon decoration (if one should be used)"}
 Name of the decoration to be used for identifying FSR (dressing) photons.
SG::WriteHandleKey< ConstDataVector< xAOD::TruthParticleContainer > > m_outTruthPartKey {this, "OutputName", "TagInputs", "Name of the resulting TruthParticle collection"}
 Key for output truth particles.
Gaudi::Property< float > m_ptmin {this, "PtMin", 0. , "Minimum pT of particles to be accepted for tagging (in MeV)"}
 Minimum pT for particle selection (in MeV)
Gaudi::Property< float > m_maxAbsEta {this, "MaxAbsEta" , 5.}
 Maximum allowed eta for particles in jets.
Gaudi::Property< std::vector< int > > m_vetoPDG_IDs
Gaudi::Property< bool > m_includeBSMNonInt
Gaudi::Property< bool > m_includeNu
Gaudi::Property< bool > m_includeMu
Gaudi::Property< bool > m_includePromptLeptons
Gaudi::Property< bool > m_includePromptPhotons
Gaudi::Property< bool > m_chargedOnly
Gaudi::Property< bool > m_includeSM
Gaudi::Property< bool > m_includeDark
Gaudi::Property< bool > m_use_barcode
SG::ConstAccessor< int > m_uid {"uid"}
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 CopyTruthJetParticles.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CopyTruthJetParticles()

CopyTruthJetParticles::CopyTruthJetParticles ( const std::string & name)

Constructor.

Definition at line 33 of file CopyTruthJetParticles.cxx.

34 : AsgTool(name) {}
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58

Member Function Documentation

◆ classifyJetInput()

bool CopyTruthJetParticles::classifyJetInput ( const xAOD::TruthParticle * tp,
std::vector< const xAOD::TruthParticle * > & promptLeptons,
std::map< const xAOD::TruthParticle *, unsigned int > & tc_results ) const
private

Redefine our own Classifier function(s)

Definition at line 50 of file CopyTruthJetParticles.cxx.

52 {
53
54 // Needed for the dressed photon decorations
55 const EventContext& ctx = Gaudi::Hive::currentContext();
56
57 // Check if this thing is a candidate to be in a truth jet
58 // First block is largely copied from isGenStable, which works on HepMC only
59 if (HepMC::is_simulation_particle(tp)) return false; // Particle is from G4
60 int pdgid = tp->pdgId();
61 if (MC::isZeroEnergyPhoton(tp)) return false; // Work around for an old generator bug
62
63 // -- changed for dark jet clustering -- //
64 if ( !MC::isStable(tp) && !m_includeDark ) return false; // dark hadrons will not be status 1
65 // ----------------------------------- //
66
67 // Easy classifiers by PDG ID
68 if(MC::isNeutrino(pdgid)) {
69 if (!m_includeNu) return false;
70 } else {
71 if (!m_includeBSMNonInt && !MC::isInteracting(pdgid)) return false;
72 }
73 if (!m_includeMu && MC::isMuon(pdgid)) return false;
74
75 // Already built a list of prompt leptons, just use it here
76 if (!m_includePromptLeptons && std::find(promptLeptons.begin(),promptLeptons.end(),tp)!=promptLeptons.end()){
77 ATH_MSG_VERBOSE("Veto prompt lepton (" << pdgid << ") with pt " << tp->pt());
78 return false;
79 }
80
81 // Extra catch. If we aren't supposed to include prompt leptons, we aren't supposed to include prompt neutrinos
82 unsigned int tc_res = getTCresult(tp, tc_results);
84 return false;
85 }
86
87 // -- added for dark jet clustering -- //
88 // new classifiers to account for dark particles
89 // for dark jets: ignore SM particles; include only "stable" dark hadrons
90 if (!m_includeSM && !MC::isHiddenValley(tp)) return false;
91 if (m_includeDark) {
92 if (abs(tp->pdgId()) <= 4900101) return false; // ignore Xd, qd, gd
93 if (tp->hasDecayVtx()) {
94 size_t good_hadrons = 0;
95 for (size_t p = 0; p < tp->end_vertex()->nOutgoingParticles(); ++p) {
96 if (!MC::isHiddenValley(tp->child(p))) {
97 good_hadrons++;
98 }
99 }
100 if (good_hadrons == 0) return false; // ignore "non-stable" dark hadrons (decaying to dark sector) -- "stable" if decaying to SM
101 }
102 }
103 // for SM jets: ignore dark particles - probably unnecessary bc of status requirement above
104 if (!m_includeDark && MC::isHiddenValley(tp)) return false;
105 // ----------------------------------- //
106
107 if (!m_includePromptPhotons && MC::isPhoton(pdgid) && tp->hasProdVtx()){
108 //ParticleOrigin orig = getPartOrigin(tp, originMap);
109 //if (orig==Higgs || orig==HiggsMSSM) return false;
110 if (MCTruthPartClassifier::isPrompt(tc_res)) return false;
111 }
112
113 // If we want to remove photons via the dressing decoration
114 if (!m_dressingNames.empty()){
115 // Accessor for the dressing decoration above
116 bool foundDressDec{false};
117 for(const auto &decName : m_dressingNames){
118 SG::ReadDecorHandle<xAOD::TruthParticleContainer, char> dressAcc(decName, ctx);
119 if (MC::isPhoton(pdgid) && dressAcc(*tp)) foundDressDec = true;
120 }
121 if (foundDressDec) return false;
122 } // End of removal via dressing decoration
123
124 // Pseudo-rapidity cut
125 if(std::abs(tp->eta())>m_maxAbsEta) return false;
126
127 // Vetoes of specific origins. Not fast, but if no particles are specified should not execute
128 if (m_vetoPDG_IDs.size()>0){
129 std::vector<int> used_vertices;
130 for (int anID : m_vetoPDG_IDs){
131 used_vertices.clear();
132 if (comesFrom(tp,anID,used_vertices)) return false;
133 }
134 }
135
136 // Made it!
137 return true;
138}
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< bool > m_includeDark
bool comesFrom(const xAOD::TruthParticle *tp, const int pdgID, std::vector< int > &used_vertices) const
Gaudi::Property< bool > m_includeSM
Gaudi::Property< std::vector< int > > m_vetoPDG_IDs
Gaudi::Property< bool > m_includeBSMNonInt
Gaudi::Property< bool > m_includeNu
unsigned int getTCresult(const xAOD::TruthParticle *tp, std::map< const xAOD::TruthParticle *, unsigned int > &tc_results) const
Gaudi::Property< bool > m_includePromptLeptons
Gaudi::Property< float > m_maxAbsEta
Maximum allowed eta for particles in jets.
Gaudi::Property< bool > m_includePromptPhotons
Gaudi::Property< bool > m_includeMu
SG::ReadDecorHandleKeyArray< xAOD::TruthParticleContainer > m_dressingNames
Name of the decoration to be used for identifying FSR (dressing) photons.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays=true)
bool isZeroEnergyPhoton(const T &p)
Identify a photon with zero energy. Probably a workaround for a generator bug.
bool isPhoton(const T &p)
bool isNeutrino(const T &p)
APID: the fourth generation neutrinos are neutrinos.
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool isInteracting(const T &p)
Identify if the particle with given PDG ID would not interact with the detector, i....
bool isMuon(const T &p)
bool isHiddenValley(const T &p)
PDG rule 11k Hidden Valley particles have n = 4 and n_r = 9, and trailing numbers in agreement with t...

◆ comesFrom()

bool CopyTruthJetParticles::comesFrom ( const xAOD::TruthParticle * tp,
const int pdgID,
std::vector< int > & used_vertices ) const
private

Definition at line 227 of file CopyTruthJetParticles.cxx.

227 {
228 // If it's not a particle, then it doesn't come from something...
229 if (!tp) return false;
230 // If it doesn't have a production vertex or has no parents, it doesn't come from much of anything
231 if (!tp->prodVtx() || tp->nParents()==0) return false;
232 // If we have seen it before, then skip this production vertex
233 // ATLASRECTS-8290: this should be replaced with ->uid()
234 if (std::find(used_vertices.begin(),used_vertices.end(), m_uid(*tp->prodVtx()))!=used_vertices.end()) return false;
235 // Add the production vertex to our used list
236 // ATLASRECTS-8290: this should be replaced with ->uid()
237 used_vertices.push_back( m_uid(*tp->prodVtx()) );
238 // Loop over the parents
239 for (size_t par=0;par<tp->nParents();++par){
240 // Check for null pointers in case of skimming
241 if (!tp->parent(par)) continue;
242 // Check for a match
243 if (tp->parent(par)->absPdgId()==pdgID) return true;
244 // Recurse on this parent
245 if (comesFrom(tp->parent(par), pdgID, used_vertices)) return true;
246 }
247 // No hits -- all done with the checks!
248 return false;
249}
SG::ConstAccessor< int > m_uid

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

int CopyTruthJetParticles::execute ( ) const
finaloverridevirtual

redefine execute so we can call our own classify()

Implements IJetExecuteTool.

Definition at line 151 of file CopyTruthJetParticles.cxx.

151 {
152
153 // retrieve barcode Offset for this event from metadata.
154 // We'd need a cleaner solution where this offset is set only at
155 // each new file, but this requires some tool interface which does
156 // not exist in RootCore yet.
157 // So we use the less disruptive solution in Athena for now...
158
159 // the function used below is
160 // std::call_once(metaDataFlag,basicMetaDataCheck(), this);
161 // std::call_once(metaDataFlag,this->basicMetaDataCheck());
162 // the syntax is explained in http://stackoverflow.com/questions/23197333/why-is-this-pointer-needed-when-calling-stdcall-once
163 // this syntax requires the call_once function to receive the object the function is called upon
164 //": these are all non-static member functions , they act on objects
165 // they need the "this" pointer which always point to the object the function is working on
166 //http://www.learncpp.com/cpp-tutorial/812-static-member-functions/
167
168 std::vector<const xAOD::TruthParticle*> promptLeptons;
169 promptLeptons.reserve(10);
170
171 // Retrieve the xAOD truth objects
172 auto truthParticles = SG::makeHandle(m_truthParticleKey);
173 if ( !truthParticles.isValid() ) {
174 ATH_MSG_ERROR("Failed to retrieve truth particle container " << m_truthParticleKey.key());
175 return 1;
176 }
177
178 // Classify particles for tagging and add to the TruthParticleContainer
179 std::unique_ptr<ConstDataVector<xAOD::TruthParticleContainer> > ptruth(new ConstDataVector<xAOD::TruthParticleContainer>(SG::VIEW_ELEMENTS));
180 std::map<const xAOD::TruthParticle*,unsigned int> tc_results;
181 tc_results.clear();
182 size_t numCopied = 0;
183
184 for (const xAOD::TruthParticle* tp : *truthParticles) {
185 if(!tp) continue;
186 if (tp->pt() < m_ptmin)
187 continue;
188 // Cannot use the truth helper functions; they're written for HepMC
189 // Last two switches only apply if the thing is a lepton and not a tau
190 if ((MC::isElectron(tp) || MC::isMuon(tp)) && tp->hasProdVtx()) {
191 // If this is a prompt, generator stable lepton, then we can use it
193 promptLeptons.push_back(tp);
194 }
195 }
196 }
197
198 for (const xAOD::TruthParticle* tp : *truthParticles) {
199 if(!tp) continue;
200 if (tp->pt() < m_ptmin)
201 continue;
202
203 if (classifyJetInput(tp, promptLeptons, tc_results)) {
204 ptruth->push_back(tp);
205 numCopied += 1;
206 }
207 }
208
209 ATH_MSG_DEBUG("Copied " << numCopied << " truth particles into " << m_outTruthPartKey.key() << " TruthParticle container");
210
211 // record
212 auto truthParticles_out = SG::makeHandle(m_outTruthPartKey);
213 ATH_MSG_DEBUG("Recorded truth particle collection " << m_outTruthPartKey.key());
214 // notify
215 if (!truthParticles_out.put(std::move(ptruth))) {
216 ATH_MSG_ERROR("Unable to write new TruthParticleContainer to event store: "
217 << m_outTruthPartKey.key());
218 } else {
219 ATH_MSG_DEBUG("Created new TruthParticleContainer in event store: "
220 << m_outTruthPartKey.key());
221 }
222
223 return 0;
224}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
bool classifyJetInput(const xAOD::TruthParticle *tp, std::vector< const xAOD::TruthParticle * > &promptLeptons, std::map< const xAOD::TruthParticle *, unsigned int > &tc_results) const
Redefine our own Classifier function(s)
SG::WriteHandleKey< ConstDataVector< xAOD::TruthParticleContainer > > m_outTruthPartKey
Key for output truth particles.
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleKey
Key for input truth event.
Gaudi::Property< float > m_ptmin
Minimum pT for particle selection (in MeV)
bool isElectron(const T &p)
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TruthParticle_v1 TruthParticle
Typedef to implementation.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::TEvent, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::TEvent, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ getTCresult()

unsigned int CopyTruthJetParticles::getTCresult ( const xAOD::TruthParticle * tp,
std::map< const xAOD::TruthParticle *, unsigned int > & tc_results ) const
private

Definition at line 141 of file CopyTruthJetParticles.cxx.

143{
144 if(tc_results.find(tp) == tc_results.end()) {
145 const unsigned int result = tp ? std::get<0>(MCTruthPartClassifier::defOrigOfParticle(tp)) : 0;
146 tc_results[tp] = result;
147 }
148 return tc_results[tp];
149}
std::tuple< unsigned int, T > defOrigOfParticle(T thePart)

◆ initialize()

StatusCode CopyTruthJetParticles::initialize ( void )
finaloverridevirtual

Function initialising the tool.

Reimplemented from asg::AsgTool.

Definition at line 36 of file CopyTruthJetParticles.cxx.

36 {
37
38 ATH_CHECK(m_truthParticleKey.initialize());
39 ATH_CHECK(m_outTruthPartKey.initialize());
40 ATH_CHECK(m_dressingNames.initialize());
41
42 // ATLASRECTS-8290: this is for backward compatability, remove eventually
43 if (m_use_barcode) m_uid = SG::ConstAccessor<int>("barcode");
44
45 return StatusCode::SUCCESS;
46}
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Property< bool > m_use_barcode

◆ inputContainerNames()

int IJetExecuteTool::inputContainerNames ( std::vector< std::string > & connames)
virtualinherited

Method to return the list of input containers.

The names of required input containers are appended to connames. Returns nonzero for error. Default returns 0 and adds no names.

Reimplemented in JetRecTool.

Definition at line 11 of file IJetExecuteTool.cxx.

11 {
12 return 0;
13}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputContainerNames()

int IJetExecuteTool::outputContainerNames ( std::vector< std::string > & connames)
virtualinherited

Method to return the list of output containers.

The names of produced output containers are appended to connames. Returns nonzero for error. Default returns 0 and adds no names.

Reimplemented in JetRecTool.

Definition at line 17 of file IJetExecuteTool.cxx.

17 {
18 return 0;
19}

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ print()

◆ 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< AlgTool > >::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< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_chargedOnly

Gaudi::Property<bool> CopyTruthJetParticles::m_chargedOnly
private
Initial value:
{this, "ChargedParticlesOnly", false,
"Include only charged particles in the output collection" }

Definition at line 79 of file CopyTruthJetParticles.h.

79 {this, "ChargedParticlesOnly", false,
80 "Include only charged particles in the output collection" };

◆ m_classif

ToolHandle<IMCTruthClassifier> CopyTruthJetParticles::m_classif {this, "MCTruthClassifier", ""}
private

Handle on MCTruthClassifier for finding prompt leptons.

Definition at line 48 of file CopyTruthJetParticles.h.

48{this, "MCTruthClassifier", ""};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dressingNames

SG::ReadDecorHandleKeyArray<xAOD::TruthParticleContainer> CopyTruthJetParticles::m_dressingNames {this, "DressingDecorationNames", {}, "Name of the dressed photon decoration (if one should be used)"}
private

Name of the decoration to be used for identifying FSR (dressing) photons.

Definition at line 54 of file CopyTruthJetParticles.h.

54{this, "DressingDecorationNames", {}, "Name of the dressed photon decoration (if one should be used)"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_includeBSMNonInt

Gaudi::Property<bool> CopyTruthJetParticles::m_includeBSMNonInt
private
Initial value:
{this, "IncludeBSMNonInteracting", false,
"Include noninteracting BSM particles (excluding neutrinos) in the output collection"}

Definition at line 69 of file CopyTruthJetParticles.h.

69 {this, "IncludeBSMNonInteracting", false,
70 "Include noninteracting BSM particles (excluding neutrinos) in the output collection"};

◆ m_includeDark

Gaudi::Property<bool> CopyTruthJetParticles::m_includeDark
private
Initial value:
{this, "IncludeDarkHads", false,
"Include dark hadrons in the output collection"}

Definition at line 84 of file CopyTruthJetParticles.h.

84 {this, "IncludeDarkHads", false,
85 "Include dark hadrons in the output collection"};

◆ m_includeMu

Gaudi::Property<bool> CopyTruthJetParticles::m_includeMu
private
Initial value:
{this, "IncludeMuons", false,
"Include muons in the output collection"}

Definition at line 73 of file CopyTruthJetParticles.h.

73 {this, "IncludeMuons", false,
74 "Include muons in the output collection"};

◆ m_includeNu

Gaudi::Property<bool> CopyTruthJetParticles::m_includeNu
private
Initial value:
{this,"IncludeNeutrinos", false,
"Include neutrinos in the output collection"}

Definition at line 71 of file CopyTruthJetParticles.h.

71 {this,"IncludeNeutrinos", false,
72 "Include neutrinos in the output collection"};

◆ m_includePromptLeptons

Gaudi::Property<bool> CopyTruthJetParticles::m_includePromptLeptons
private
Initial value:
{this, "IncludePromptLeptons", true,
"Include leptons from prompt decays (i.e. not from hadron decays) in the output collection"}

Definition at line 75 of file CopyTruthJetParticles.h.

75 {this, "IncludePromptLeptons", true,
76 "Include leptons from prompt decays (i.e. not from hadron decays) in the output collection"};

◆ m_includePromptPhotons

Gaudi::Property<bool> CopyTruthJetParticles::m_includePromptPhotons
private
Initial value:
{this, "IncludePromptPhotons", true,
"Include photons from Higgs and other decays that produce isolated photons"}

Definition at line 77 of file CopyTruthJetParticles.h.

77 {this, "IncludePromptPhotons", true,
78 "Include photons from Higgs and other decays that produce isolated photons"};

◆ m_includeSM

Gaudi::Property<bool> CopyTruthJetParticles::m_includeSM
private
Initial value:
{this, "IncludeSMParts", true,
"Include SM particles in the output collection"}

Definition at line 82 of file CopyTruthJetParticles.h.

82 {this, "IncludeSMParts", true,
83 "Include SM particles in the output collection"};

◆ m_maxAbsEta

Gaudi::Property<float> CopyTruthJetParticles::m_maxAbsEta {this, "MaxAbsEta" , 5.}
private

Maximum allowed eta for particles in jets.

Definition at line 63 of file CopyTruthJetParticles.h.

63{this, "MaxAbsEta" , 5.};

◆ m_outTruthPartKey

SG::WriteHandleKey<ConstDataVector<xAOD::TruthParticleContainer> > CopyTruthJetParticles::m_outTruthPartKey {this, "OutputName", "TagInputs", "Name of the resulting TruthParticle collection"}
private

Key for output truth particles.

Definition at line 57 of file CopyTruthJetParticles.h.

57{this, "OutputName", "TagInputs", "Name of the resulting TruthParticle collection"};

◆ m_ptmin

Gaudi::Property<float> CopyTruthJetParticles::m_ptmin {this, "PtMin", 0. , "Minimum pT of particles to be accepted for tagging (in MeV)"}
private

Minimum pT for particle selection (in MeV)

Definition at line 60 of file CopyTruthJetParticles.h.

60{this, "PtMin", 0. , "Minimum pT of particles to be accepted for tagging (in MeV)"};

◆ m_truthParticleKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> CopyTruthJetParticles::m_truthParticleKey {this, "TruthParticleKey", "TruthParticles", "SG Key for input truth particle container"}
private

Key for input truth event.

Definition at line 51 of file CopyTruthJetParticles.h.

51{this, "TruthParticleKey", "TruthParticles", "SG Key for input truth particle container"};

◆ m_uid

SG::ConstAccessor<int> CopyTruthJetParticles::m_uid {"uid"}
private

Definition at line 91 of file CopyTruthJetParticles.h.

91{"uid"};

◆ m_use_barcode

Gaudi::Property<bool> CopyTruthJetParticles::m_use_barcode
private
Initial value:
{
this, "useBarcode", false, "use barcode rather than UID"
}

Definition at line 88 of file CopyTruthJetParticles.h.

88 {
89 this, "useBarcode", false, "use barcode rather than UID"
90 };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vetoPDG_IDs

Gaudi::Property<std::vector<int> > CopyTruthJetParticles::m_vetoPDG_IDs
private
Initial value:
{this, "VetoPDG_IDs", {},
"List of PDG IDs (python list) to veto. Will ignore these and all children of these."}

Definition at line 65 of file CopyTruthJetParticles.h.

65 {this, "VetoPDG_IDs", {},
66 "List of PDG IDs (python list) to veto. Will ignore these and all children of these."};

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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