Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CopyTruthJetParticles Class Referenceabstract

#include <CopyTruthJetParticles.h>

Inheritance diagram for CopyTruthJetParticles:
Collaboration diagram for CopyTruthJetParticles:

Public Member Functions

 CopyTruthJetParticles (const std::string &name)
 Constructor. More...
 
virtual StatusCode initialize ()
 Function initialising the tool. More...
 
virtual int execute () const
 redefine execute so we can call our own classify() with the barcode offset for the current event. More...
 
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) More...
 
int setBarCodeFromMetaDataCheck () const
 
bool classify (const xAOD::TruthParticle *) const
 The base classify() is not used. More...
 
virtual int inputContainerNames (std::vector< std::string > &connames)
 Method to return the list of input containers. More...
 
virtual int outputContainerNames (std::vector< std::string > &connames)
 Method to return the list of output containers. More...
 
virtual void print () const =0
 Print the state of the tool. More...
 
virtual void print () const
 Print the state of the tool. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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 > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

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< float > m_maxAbsEta {this, "MaxAbsEta" , 5.}
 Maximum allowed eta for particles in jets. More...
 
Gaudi::Property< std::vector< int > > m_vetoPDG_IDs
 
Gaudi::Property< std::string > m_dressingName
 Name of the decoration to be used for identifying FSR (dressing) photons. More...
 
ToolHandle< IMCTruthClassifierm_classif {this, "MCTruthClassifier", ""}
 Handle on MCTruthClassifier for finding prompt leptons. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 16 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 34 of file CopyTruthJetParticles.cxx.

Member Function Documentation

◆ classify()

bool CopyTruthJetParticles::classify ( const xAOD::TruthParticle ) const
inlinevirtual

The base classify() is not used.

Implements CopyTruthParticles.

Definition at line 39 of file CopyTruthJetParticles.h.

39 {return false;}

◆ classifyJetInput()

bool CopyTruthJetParticles::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)

Definition at line 47 of file CopyTruthJetParticles.cxx.

49  {
50 
51  // Check if this thing is a candidate to be in a truth jet
52  // First block is largely copied from isGenStable, which works on HepMC only
53  if (HepMC::is_simulation_particle(tp)) return false; // Particle is from G4
54  int pdgid = tp->pdgId();
55  if (MC::isZeroEnergyPhoton(tp)) return false; // Work around for an old generator bug
56 
57  // -- changed for dark jet clustering -- //
58  if ( !MC::isStable(tp) && !m_includeDark ) return false; // dark hadrons will not be status 1
59  // ----------------------------------- //
60 
61  // Easy classifiers by PDG ID
62  if(MC::isNeutrino(pdgid)) {
63  if (!m_includeNu) return false;
64  } else {
65  if (!m_includeBSMNonInt && !MC::isInteracting(pdgid)) return false;
66  }
67  if (!m_includeMu && MC::isMuon(pdgid)) return false;
68 
69  // Already built a list of prompt leptons, just use it here
70  if (!m_includePromptLeptons && std::find(promptLeptons.begin(),promptLeptons.end(),tp)!=promptLeptons.end()){
71  ATH_MSG_VERBOSE("Veto prompt lepton (" << pdgid << ") with pt " << tp->pt());
72  return false;
73  }
74 
75  // Extra catch. If we aren't supposed to include prompt leptons, we aren't supposed to include prompt neutrinos
76  unsigned int tc_res = getTCresult(tp, tc_results);
78  return false;
79  }
80 
81  // -- added for dark jet clustering -- //
82  // new classifiers to account for dark particles
83  // for dark jets: ignore SM particles; include only "stable" dark hadrons
84  if (!m_includeSM && !MC::isHiddenValley(tp)) return false;
85  if (m_includeDark) {
86  if (abs(tp->pdgId()) <= 4900101) return false; // ignore Xd, qd, gd
87  if (tp->hasDecayVtx()) {
88  size_t good_hadrons = 0;
89  for (size_t p = 0; p < tp->end_vertex()->nOutgoingParticles(); ++p) {
90  if (!MC::isHiddenValley(tp->child(p))) {
91  good_hadrons++;
92  }
93  }
94  if (good_hadrons == 0) return false; // ignore "non-stable" dark hadrons (decaying to dark sector) -- "stable" if decaying to SM
95  }
96  }
97  // for SM jets: ignore dark particles - probably unnecessary bc of status requirement above
98  if (!m_includeDark && MC::isHiddenValley(tp)) return false;
99  // ----------------------------------- //
100 
101  if (!m_includePromptPhotons && MC::isPhoton(pdgid) && tp->hasProdVtx()){
102  //ParticleOrigin orig = getPartOrigin(tp, originMap);
103  //if (orig==Higgs || orig==HiggsMSSM) return false;
104  if (MCTruthPartClassifier::isPrompt(tc_res)) return false;
105  }
106 
107  // If we want to remove photons via the dressing decoration
108  if (!m_dressingName.empty()){
109  // Accessor for the dressing decoration above
110  const static SG::AuxElement::Accessor<char> dressAcc(m_dressingName);
111  if (MC::isPhoton(pdgid) && dressAcc(*tp)) return false;
112  } // End of removal via dressing decoration
113 
114  // Pseudo-rapidity cut
115  if(std::abs(tp->eta())>m_maxAbsEta) return false;
116 
117  // Vetoes of specific origins. Not fast, but if no particles are specified should not execute
118  if (m_vetoPDG_IDs.size()>0){
119  std::vector<int> used_vertices;
120  for (int anID : m_vetoPDG_IDs){
121  used_vertices.clear();
122  if (comesFrom(tp,anID,used_vertices)) return false;
123  }
124  }
125 
126  // Made it!
127  return true;
128 }

◆ comesFrom()

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

Definition at line 255 of file CopyTruthJetParticles.cxx.

255  {
256  // If it's not a particle, then it doesn't come from something...
257  if (!tp) return false;
258  // If it doesn't have a production vertex or has no parents, it doesn't come from much of anything
259  if (!tp->prodVtx() || tp->nParents()==0) return false;
260  // If we have seen it before, then skip this production vertex
261  if (std::find(used_vertices.begin(),used_vertices.end(), HepMC::uniqueID(tp->prodVtx()))!=used_vertices.end()) return false;
262  // Add the production vertex to our used list
263  used_vertices.push_back( HepMC::uniqueID(tp->prodVtx()) );
264  // Loop over the parents
265  for (size_t par=0;par<tp->nParents();++par){
266  // Check for null pointers in case of skimming
267  if (!tp->parent(par)) continue;
268  // Check for a match
269  if (tp->parent(par)->absPdgId()==pdgID) return true;
270  // Recurse on this parent
271  if (comesFrom(tp->parent(par), pdgID, used_vertices)) return true;
272  }
273  // No hits -- all done with the checks!
274  return false;
275 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

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

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

int CopyTruthJetParticles::execute ( ) const
virtual

redefine execute so we can call our own classify() with the barcode offset for the current event.

Reimplemented from CopyTruthParticles.

Definition at line 165 of file CopyTruthJetParticles.cxx.

165  {
166 
167  // retrieve barcode Offset for this event from metadata.
168  // We'd need a cleaner solution where this offset is set only at
169  // each new file, but this requires some tool interface which does
170  // not exist in RootCore yet.
171  // So we use the less disruptive solution in Athena for now...
172 
173  // the function used below is
174  // std::call_once(metaDataFlag,basicMetaDataCheck(), this);
175  // std::call_once(metaDataFlag,this->basicMetaDataCheck());
176  // the syntax is explained in http://stackoverflow.com/questions/23197333/why-is-this-pointer-needed-when-calling-stdcall-once
177  // this syntax requires the call_once function to receive the object the function is called upon
178  //": these are all non-static member functions , they act on objects
179  // they need the "this" pointer which always point to the object the function is working on
180  //http://www.learncpp.com/cpp-tutorial/812-static-member-functions/
181 
182 
183  // std::call_once(metaDataFlag,&CopyTruthJetParticles::basicMetaDataCheck,this,barcodeOffset);
184  // this call happens only once and it modifies m_barcodeOffset
185  // Note that catching the return value of this is rather complicated, so it throws rather than returning errors
186  static std::once_flag metaDataFlag;
187  std::call_once(metaDataFlag,[&]() {setBarCodeFromMetaDataCheck();});
188 
189  std::vector<const xAOD::TruthParticle*> promptLeptons;
190  promptLeptons.reserve(10);
191 
192  // Retrieve the xAOD truth objects
193  auto truthEvents = SG::makeHandle(m_truthEventKey);
194  if ( !truthEvents.isValid() ) {
195  ATH_MSG_ERROR("Failed to retrieve truth event container " << m_truthEventKey.key());
196  return 1;
197  }
198 
199  // Classify particles for tagging and add to the TruthParticleContainer
200  std::unique_ptr<ConstDataVector<xAOD::TruthParticleContainer> > ptruth(new ConstDataVector<xAOD::TruthParticleContainer>(SG::VIEW_ELEMENTS));
201  std::map<const xAOD::TruthParticle*,unsigned int> tc_results;
202  tc_results.clear();
203  size_t numCopied = 0;
204  const xAOD::TruthEvent* hsevt = truthEvents->front();
205  if(!hsevt) {
206  ATH_MSG_ERROR("Null pointer received for first truth event!");
207  return 1;
208  }
209 
210  for (unsigned int ip = 0; ip < hsevt->nTruthParticles(); ++ip) {
211  const xAOD::TruthParticle* tp = hsevt->truthParticle(ip);
212  if(!tp) continue;
213  if (tp->pt() < m_ptmin)
214  continue;
215  // Cannot use the truth helper functions; they're written for HepMC
216  // Last two switches only apply if the thing is a lepton and not a tau
217  if ((MC::isElectron(tp) || MC::isMuon(tp)) && tp->hasProdVtx()) {
218  // If this is a prompt, generator stable lepton, then we can use it
220  promptLeptons.push_back(tp);
221  }
222  }
223  }
224 
225  for (size_t itp(0); itp<hsevt->nTruthParticles(); ++itp) {
226  const xAOD::TruthParticle* tp = hsevt->truthParticle(itp);
227  if(!tp) continue;
228  if (tp->pt() < m_ptmin)
229  continue;
230 
231  if (classifyJetInput(tp, promptLeptons, tc_results)) {
232  ptruth->push_back(tp);
233  numCopied += 1;
234  }
235  }
236 
237  ATH_MSG_DEBUG("Copied " << numCopied << " truth particles into " << m_outTruthPartKey.key() << " TruthParticle container");
238 
239  // record
240  auto truthParticles_out = SG::makeHandle(m_outTruthPartKey);
241  ATH_MSG_DEBUG("Recorded truth particle collection " << m_outTruthPartKey.key());
242  // notify
243  if (!truthParticles_out.put(std::move(ptruth))) {
244  ATH_MSG_ERROR("Unable to write new TruthParticleContainer to event store: "
245  << m_outTruthPartKey.key());
246  } else {
247  ATH_MSG_DEBUG("Created new TruthParticleContainer in event store: "
248  << m_outTruthPartKey.key());
249  }
250 
251  return 0;
252 }

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

◆ 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 131 of file CopyTruthJetParticles.cxx.

133 {
134  if(tc_results.find(tp) == tc_results.end()) {
135  const unsigned int result = tp ? std::get<0>(MCTruthPartClassifier::defOrigOfParticle(tp)) : 0;
136  tc_results[tp] = result;
137  }
138  return tc_results[tp];
139 }

◆ initialize()

StatusCode CopyTruthJetParticles::initialize ( )
virtual

Function initialising the tool.

Reimplemented from CopyTruthParticles.

Definition at line 36 of file CopyTruthJetParticles.cxx.

36  {
37  ATH_CHECK(m_classif.retrieve());
38 
39  ATH_CHECK(m_truthEventKey.initialize());
40  ATH_CHECK(m_outTruthPartKey.initialize());
41 
42  return StatusCode::SUCCESS;
43 }

◆ 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() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

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

◆ 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() [1/2]

void asg::AsgTool::print ( ) const
virtualinherited

◆ print() [2/2]

virtual void asg::IAsgTool::print ( ) const
pure virtualinherited

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

◆ setBarCodeFromMetaDataCheck()

int CopyTruthJetParticles::setBarCodeFromMetaDataCheck ( ) const

Definition at line 141 of file CopyTruthJetParticles.cxx.

141  {
142 
143  // Usage of metadata is only possible in Athena (not supported by dual-use tools yet)...
144 #ifndef XAOD_STANDALONE
145  bool found = false;
146  // retrieve the value for the current sample from metadata
147 
148  int barcodeOffset_tmp(0);
149  ATH_MSG_INFO("Look for barcode offset in metadata ... ");
150  try {
151  StatusCode sc= AthAnalysisHelper::retrieveMetadata("/Simulation/Parameters","SimBarcodeOffset",barcodeOffset_tmp) ;
152  found = sc.isSuccess();
153  } catch(std::exception &e) {
154  ATH_MSG_DEBUG(" Could not retrieve barcode offset in metadata : "<< e.what());
155  }
156  if (found) {
157  if (HepMC::SIM_BARCODE_THRESHOLD!=barcodeOffset_tmp) ATH_MSG_WARNING(" Barcode offset found in metadata. Its value is : "<< barcodeOffset_tmp << "vs the used "<< HepMC::SIM_BARCODE_THRESHOLD);
158  }
159 #else // standalone :
160  ATH_MSG_WARNING("Can't retrieve automatically the truth barcode offset outside Athena. Falling back to offset property: " << HepMC::SIM_BARCODE_THRESHOLD);
161 #endif
162  return 0;
163 }

◆ 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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

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 54 of file CopyTruthJetParticles.h.

◆ m_classif

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

Handle on MCTruthClassifier for finding prompt leptons.

Definition at line 77 of file CopyTruthJetParticles.h.

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

Gaudi::Property<std::string> CopyTruthJetParticles::m_dressingName
private
Initial value:
{this, "DressingDecorationName", "",
"Name of the dressed photon decoration (if one should be used)"}

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

Definition at line 73 of file CopyTruthJetParticles.h.

◆ 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 44 of file CopyTruthJetParticles.h.

◆ m_includeDark

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

Definition at line 59 of file CopyTruthJetParticles.h.

◆ m_includeMu

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

Definition at line 48 of file CopyTruthJetParticles.h.

◆ m_includeNu

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

Definition at line 46 of file CopyTruthJetParticles.h.

◆ 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 50 of file CopyTruthJetParticles.h.

◆ 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 52 of file CopyTruthJetParticles.h.

◆ m_includeSM

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

Definition at line 57 of file CopyTruthJetParticles.h.

◆ m_maxAbsEta

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

Maximum allowed eta for particles in jets.

Definition at line 66 of file CopyTruthJetParticles.h.

◆ m_outTruthPartKey

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

Key for output truth particles.

Definition at line 46 of file CopyTruthParticles.h.

◆ m_ptmin

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

Minimum pT for particle selection (in MeV)

Definition at line 40 of file CopyTruthParticles.h.

◆ m_truthEventKey

SG::ReadHandleKey<xAOD::TruthEventContainer> CopyTruthParticles::m_truthEventKey {this, "TruthEventKey", "TruthEvents", "SG Key for input truth event container"}
protectedinherited

Key for input truth event.

Definition at line 43 of file CopyTruthParticles.h.

◆ 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 68 of file CopyTruthJetParticles.h.

◆ 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:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
TruthTest.itp
itp
Definition: TruthTest.py:46
HepMC::SIM_BARCODE_THRESHOLD
constexpr int SIM_BARCODE_THRESHOLD
Constant defining the barcode threshold for simulated particles, eg. can be used to separate generato...
Definition: MagicNumbers.h:37
get_generator_info.result
result
Definition: get_generator_info.py:21
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:395
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CopyTruthJetParticles::m_includeSM
Gaudi::Property< bool > m_includeSM
Definition: CopyTruthJetParticles.h:57
CopyTruthJetParticles::comesFrom
bool comesFrom(const xAOD::TruthParticle *tp, const int pdgID, std::vector< int > &used_vertices) const
Definition: CopyTruthJetParticles.cxx:255
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
isHiddenValley
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...
Definition: AtlasPID.h:610
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TruthEventBase_v1::truthParticle
const TruthParticle * truthParticle(size_t index) const
Get a pointer to one of the truth particles.
Definition: TruthEventBase_v1.cxx:50
isNeutrino
bool isNeutrino(const T &p)
APID: the fourth generation neutrinos are neutrinos.
Definition: AtlasPID.h:201
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
CopyTruthJetParticles::m_maxAbsEta
Gaudi::Property< float > m_maxAbsEta
Maximum allowed eta for particles in jets.
Definition: CopyTruthJetParticles.h:66
MCTruthPartClassifier::defOrigOfParticle
std::tuple< unsigned int, T > defOrigOfParticle(T thePart)
Definition: TruthClassifiers.h:151
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CopyTruthJetParticles::m_includeDark
Gaudi::Property< bool > m_includeDark
Definition: CopyTruthJetParticles.h:59
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
CopyTruthJetParticles::m_includeMu
Gaudi::Property< bool > m_includeMu
Definition: CopyTruthJetParticles.h:48
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CopyTruthParticles::CopyTruthParticles
CopyTruthParticles(const std::string &name)
Constructor.
Definition: CopyTruthParticles.cxx:15
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:274
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
CopyTruthParticles::m_outTruthPartKey
SG::WriteHandleKey< ConstDataVector< xAOD::TruthParticleContainer > > m_outTruthPartKey
Key for output truth particles.
Definition: CopyTruthParticles.h:46
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
HepMC::is_simulation_particle
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...
Definition: MagicNumbers.h:355
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
CopyTruthJetParticles::setBarCodeFromMetaDataCheck
int setBarCodeFromMetaDataCheck() const
Definition: CopyTruthJetParticles.cxx:141
calibdata.exception
exception
Definition: calibdata.py:496
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
xAOD::TruthEvent_v1
Class describing a signal truth event in the MC record.
Definition: TruthEvent_v1.h:35
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CopyTruthParticles::m_truthEventKey
SG::ReadHandleKey< xAOD::TruthEventContainer > m_truthEventKey
Key for input truth event.
Definition: CopyTruthParticles.h:43
CopyTruthJetParticles::m_includePromptLeptons
Gaudi::Property< bool > m_includePromptLeptons
Definition: CopyTruthJetParticles.h:50
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CopyTruthJetParticles::m_dressingName
Gaudi::Property< std::string > m_dressingName
Name of the decoration to be used for identifying FSR (dressing) photons.
Definition: CopyTruthJetParticles.h:73
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
CopyTruthJetParticles::m_includePromptPhotons
Gaudi::Property< bool > m_includePromptPhotons
Definition: CopyTruthJetParticles.h:52
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
CopyTruthJetParticles::m_includeBSMNonInt
Gaudi::Property< bool > m_includeBSMNonInt
Definition: CopyTruthJetParticles.h:44
xAOD::TruthEventBase_v1::nTruthParticles
size_t nTruthParticles() const
Get the number of truth particles.
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
CopyTruthJetParticles::m_classif
ToolHandle< IMCTruthClassifier > m_classif
Handle on MCTruthClassifier for finding prompt leptons.
Definition: CopyTruthJetParticles.h:77
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
a
TList * a
Definition: liststreamerinfos.cxx:10
CopyTruthJetParticles::classifyJetInput
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)
Definition: CopyTruthJetParticles.cxx:47
h
MCTruthPartClassifier::isPrompt
int isPrompt(const unsigned int classify, bool allow_prompt_tau_decays=true)
Definition: TruthClassifiers.h:180
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
CopyTruthParticles::m_ptmin
Gaudi::Property< float > m_ptmin
Minimum pT for particle selection (in MeV)
Definition: CopyTruthParticles.h:40
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:21
CopyTruthJetParticles::m_vetoPDG_IDs
Gaudi::Property< std::vector< int > > m_vetoPDG_IDs
Definition: CopyTruthJetParticles.h:68
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
MC::isInteracting
bool isInteracting(const T &p)
Identify if the particle with given PDG ID would not interact with the detector, i....
Definition: HepMCHelpers.h:33
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
CopyTruthJetParticles::getTCresult
unsigned int getTCresult(const xAOD::TruthParticle *tp, std::map< const xAOD::TruthParticle *, unsigned int > &tc_results) const
Definition: CopyTruthJetParticles.cxx:131
MC::isZeroEnergyPhoton
bool isZeroEnergyPhoton(const T &p)
Identify a photon with zero energy. Probably a workaround for a generator bug.
Definition: HepMCHelpers.h:71
CopyTruthJetParticles::m_includeNu
Gaudi::Property< bool > m_includeNu
Definition: CopyTruthJetParticles.h:46
SG::DataProxy
Definition: DataProxy.h:45
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
AthAnalysisHelper::retrieveMetadata
static std::string retrieveMetadata(const std::string &folder, const std::string &key, const ServiceHandle< StoreGateSvc > &inputMetaStore)
method that always returns as a string you can use from, e.g, pyROOT with evt = ROOT....
Definition: AthAnalysisHelper.h:254
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:194