ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DerivationFramework::TruthDecayCollectionMaker Class Reference

#include <TruthDecayCollectionMaker.h>

Inheritance diagram for DerivationFramework::TruthDecayCollectionMaker:
Collaboration diagram for DerivationFramework::TruthDecayCollectionMaker:

Public Member Functions

 TruthDecayCollectionMaker (const std::string &t, const std::string &n, const IInterface *p)
 
 ~TruthDecayCollectionMaker ()
 
StatusCode initialize ()
 
virtual StatusCode addBranches () const
 Pass the thinning service
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods. More...
 

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

int addTruthParticle (const EventContext &ctx, const xAOD::TruthParticle &old_part, xAOD::TruthParticleContainer *part_cont, xAOD::TruthVertexContainer *vert_cont, std::vector< int > &seen_particles, const int generations=-1) const
 
int addTruthVertex (const EventContext &, const xAOD::TruthVertex &old_vert, xAOD::TruthParticleContainer *part_cont, xAOD::TruthVertexContainer *vert_cont, std::vector< int > &seen_particles, const int generations=-1) const
 
bool id_ok (const xAOD::TruthParticle &part) 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< std::vector< int > > m_pdgIdsToKeep {this, "PDGIDsToKeep", {}, "PDG IDs of particles to build the collection from"}
 < List of PDG IDs to build this collection from More...
 
Gaudi::Property< bool > m_keepBHadrons {this, "KeepBHadrons", false, "Keep b-hadrons (easier than by PDG ID)"}
 < Option to keep all b-hadrons (better than giving PDG IDs) More...
 
Gaudi::Property< bool > m_keepCHadrons {this, "KeepCHadrons", false, "Keep c-hadrons (easier than by PDG ID)"}
 < Option to keep all c-hadrons (better than giving PDG IDs) More...
 
Gaudi::Property< bool > m_keepBSM {this, "KeepBSM", false, "Keep BSM particles (easier than by PDG ID)"}
 < Option to keep all BSM particles (better than giving PDG IDs) More...
 
Gaudi::Property< bool > m_rejectHadronChildren {this, "RejectHadronChildren", false, "Drop hadron descendants"}
 < Option to reject hadron descendants More...
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_particlesKey {this, "ParticlesKey", "TruthParticles", "ReadHandleKey for input TruthParticleContainer"}
 
SG::WriteHandleKey< xAOD::TruthParticleContainerm_outputParticlesKey {this, "NewParticleKey", "", "WriteHandleKey for new TruthParticleContainer"}
 
SG::WriteHandleKey< xAOD::TruthVertexContainerm_outputVerticesKey {this, "NewVertexKey", "", "WriteHandleKey for new TruthVertexContainer"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_originDecoratorKey {this, "classifierParticleOrigin", "TruthParticles.classifierParticleOrigin","Name of the decoration which records the particle origin as determined by the MCTruthClassifier"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_typeDecoratorKey {this, "classifierParticleType", "TruthParticles.classifierParticleType","Name of the decoration which records the particle type as determined by the MCTruthClassifier"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_outcomeDecoratorKey {this, "classifierParticleOutCome", "TruthParticles.classifierParticleOutCome","Name of the decoration which records the particle outcome as determined by the MCTruthClassifier"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_classificationDecoratorKey {this, "Classification", "TruthParticles.Classification","Name of the decoration which records the particle outcome as determined by the MCTruthClassifier"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_motherIDDecoratorKey {this, "motherID", "TruthParticles.motherID","Name of the decoration which records the ID of the particle's mother"}
 
SG::WriteDecorHandleKey< xAOD::TruthParticleContainerm_daughterIDDecoratorKey {this, "daughterID", "TruthParticles.daughterID","Name of the decoration which records the ID of the particle's daughter"}
 
Gaudi::Property< std::string > m_collectionName {this, "NewCollectionName", "", "New collection name stem"}
 < Output collection name stem More...
 
Gaudi::Property< int > m_generations {this, "Generations", -1, "Number of generations after the particle in question to keep (-1 for all)"}
 < Number of generations after the particle in question to keep 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 26 of file TruthDecayCollectionMaker.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

◆ TruthDecayCollectionMaker()

DerivationFramework::TruthDecayCollectionMaker::TruthDecayCollectionMaker ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 29 of file TruthDecayCollectionMaker.cxx.

32  : AthAlgTool(t,n,p)
33 {
34  declareInterface<DerivationFramework::IAugmentationTool>(this);
35 }

◆ ~TruthDecayCollectionMaker()

DerivationFramework::TruthDecayCollectionMaker::~TruthDecayCollectionMaker ( )

Definition at line 38 of file TruthDecayCollectionMaker.cxx.

38  {
39 }

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::TruthDecayCollectionMaker::addBranches ( ) const
virtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 86 of file TruthDecayCollectionMaker.cxx.

87 {
88  // Event context for AthenaMT
89  const EventContext& ctx = Gaudi::Hive::currentContext();
90 
91  // Retrieve truth collections
93  if (!truthParticles.isValid()) {
94  ATH_MSG_ERROR("Couldn't retrieve TruthParticle collection with name " << m_particlesKey);
95  return StatusCode::FAILURE;
96  }
97 
98  // Create the new particle containers and WriteHandles
100  ATH_CHECK(newParticlesWriteHandle.record(std::make_unique<xAOD::TruthParticleContainer>(),
101  std::make_unique<xAOD::TruthParticleAuxContainer>()));
102  ATH_MSG_DEBUG( "Recorded new TruthParticleContainer with key: " << (m_outputParticlesKey.key()));
103  // Create the new vertex containers and WriteHandles
105  ATH_CHECK(newVerticesWriteHandle.record(std::make_unique<xAOD::TruthVertexContainer>(),
106  std::make_unique<xAOD::TruthVertexAuxContainer>()));
107  ATH_MSG_DEBUG( "Recorded new TruthVertexContainer with key: " << (m_outputVerticesKey.key()));
108 
109  // List of unique IDs for particles in our collection already. Because of the way we recurse,
110  // adding more particles as we go, there should be no need to add (or help from adding) the
111  // unique IDs of particles that we are *not* going to keep
112  std::vector<int> seen_particles;
113  // Go through that list of particles!
114  for (const auto * part : *truthParticles){
115  // If this passes my cuts, keep it
116  if (id_ok(*part)){
117  addTruthParticle( ctx, *part, newParticlesWriteHandle.ptr(), newVerticesWriteHandle.ptr(), seen_particles , m_generations );
118  }
119  } // Loop over the initial truth particle collection
120  return StatusCode::SUCCESS;
121 }

◆ addTruthParticle()

int DerivationFramework::TruthDecayCollectionMaker::addTruthParticle ( const EventContext &  ctx,
const xAOD::TruthParticle old_part,
xAOD::TruthParticleContainer part_cont,
xAOD::TruthVertexContainer vert_cont,
std::vector< int > &  seen_particles,
const int  generations = -1 
) const
private

Definition at line 123 of file TruthDecayCollectionMaker.cxx.

128  {
129  // See if we've seen it - note, could also do this with a unary function on the container itself
130  if (std::find(seen_particles.begin(),seen_particles.end(),HepMC::uniqueID(&old_part))!=seen_particles.end()){
131  for (size_t p=0;p<part_cont->size();++p){
132  // Was it a hit?
133  const xAOD::TruthParticle *theParticle = (*part_cont)[p];
134  if (HepMC::uniqueID(theParticle) == HepMC::uniqueID(&old_part)) return p;
135  } // Look through the old container
136  } // Found it in the old container
137  // Now we have seen it
138  seen_particles.push_back(HepMC::uniqueID(&old_part));
139  // Set up decorators
146  // Make a truth particle and add it to the container
147  xAOD::TruthParticle* xTruthParticle = new xAOD::TruthParticle();
148  part_cont->push_back( xTruthParticle );
149  // Fill with numerical content
150  xTruthParticle->setPdgId(old_part.pdgId());
151  xTruthParticle->setBarcode(HepMC::barcode(&old_part)); // FIXME barcode-based
152  xTruthParticle->setStatus(old_part.status());
153  xTruthParticle->setM(old_part.m());
154  xTruthParticle->setPx(old_part.px());
155  xTruthParticle->setPy(old_part.py());
156  xTruthParticle->setPz(old_part.pz());
157  xTruthParticle->setE(old_part.e());
158  // Copy over the polarization information if it's there
159  if (old_part.polarization().valid()){
162  }
163  // Make a link to this particle
164  int my_index = part_cont->size()-1;
165  ElementLink<xAOD::TruthParticleContainer> eltp(*part_cont, my_index);
166  // Decay vertex information
167  if (old_part.hasDecayVtx()) {
168  int vert_index = addTruthVertex( ctx, *old_part.decayVtx(), part_cont, vert_cont, seen_particles, generations);
169  ElementLink<xAOD::TruthVertexContainer> eltv( *vert_cont, vert_index );
170  xTruthParticle->setDecayVtxLink( eltv );
171  (*vert_cont)[vert_index]->addIncomingParticleLink( eltp );
172  }
173  // Copy over the decorations if they are available
174  static const SG::ConstAccessor<unsigned int> classifierParticleTypeAcc("classifierParticleType");
175  static const SG::ConstAccessor<unsigned int> classifierParticleOriginAcc("classifierParticleOrigin");
176  static const SG::ConstAccessor<unsigned int> classifierParticleOutComeAcc("classifierParticleOutCome");
177  static const SG::ConstAccessor<unsigned int> ClassificationAcc("Classification");
178 
179  typeDecorator(*xTruthParticle) = classifierParticleTypeAcc.withDefault (old_part, 0);
180  originDecorator(*xTruthParticle) = classifierParticleOriginAcc.withDefault (old_part, 0);
181  outcomeDecorator(*xTruthParticle) = classifierParticleOutComeAcc.withDefault (old_part, 0);
182  classificationDecorator(*xTruthParticle) = ClassificationAcc.withDefault (old_part, 0);
183 
184  // Return a link to this particle
185  return my_index;
186 }

◆ addTruthVertex()

int DerivationFramework::TruthDecayCollectionMaker::addTruthVertex ( const EventContext &  ctx,
const xAOD::TruthVertex old_vert,
xAOD::TruthParticleContainer part_cont,
xAOD::TruthVertexContainer vert_cont,
std::vector< int > &  seen_particles,
const int  generations = -1 
) const
private

Definition at line 188 of file TruthDecayCollectionMaker.cxx.

193  {
194  // Make a new vertex and add it to the container
195  xAOD::TruthVertex* xTruthVertex = new xAOD::TruthVertex();
196  vert_cont->push_back( xTruthVertex );
197  // Get a link to this vertex -- will be used to set production vertices on all the next particles
198  int my_index = vert_cont->size()-1;
199  ElementLink<xAOD::TruthVertexContainer> eltv(*vert_cont, my_index);
200  // Set properties
201  xTruthVertex->setId(HepMC::status(old_vert));
202  xTruthVertex->setBarcode(HepMC::barcode(&old_vert)); // FIXME barcode-based
203  xTruthVertex->setX(old_vert.x());
204  xTruthVertex->setY(old_vert.y());
205  xTruthVertex->setZ(old_vert.z());
206  xTruthVertex->setT(old_vert.t());
207  // If we are done, then stop here
208  if (generations==0) return my_index;
209  // Add all the outgoing particles
210  for (size_t n=0;n<old_vert.nOutgoingParticles();++n){
211  if (!old_vert.outgoingParticle(n)) continue; // Just in case we removed some truth particles, e.g. G4 decays
212  if (m_rejectHadronChildren && old_vert.outgoingParticle(n)->isHadron()) { // Option to skip hadrons outright{
213  continue;
214  }
215  // Continue on the next generation; note that we only decrement the generation if this particle doesn't also pass our cuts
216  int part_index = addTruthParticle( ctx, *old_vert.outgoingParticle(n), part_cont, vert_cont, seen_particles,
217  generations-1+(id_ok(*old_vert.outgoingParticle(n))?1:0) );
218  ElementLink<xAOD::TruthParticleContainer> eltp( *part_cont, part_index);
219  xTruthVertex->addOutgoingParticleLink( eltp );
220  (*part_cont)[part_index]->setProdVtxLink( eltv );
221  }
222  // Return a link to this vertex
223  return my_index;
224 }

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

◆ 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

◆ id_ok()

bool DerivationFramework::TruthDecayCollectionMaker::id_ok ( const xAOD::TruthParticle part) const
private

Definition at line 226 of file TruthDecayCollectionMaker.cxx.

227 {
228  // Check list of PDG IDs to keep
229  for (int id : m_pdgIdsToKeep){
230  if (part.absPdgId()==id){
231  return true;
232  } // Found a particle of interest!
233  } // Loop over the PDG IDs we want to keep
234  // Also check functions for B/C/BSM
235  return (m_keepBHadrons && part.isBottomHadron()) ||
236 
237  (m_keepCHadrons && part.isCharmHadron()) ||
238 
239  (m_keepBSM && part.isBSM());
240 }

◆ initialize()

StatusCode DerivationFramework::TruthDecayCollectionMaker::initialize ( )

Definition at line 42 of file TruthDecayCollectionMaker.cxx.

43 {
44  ATH_MSG_VERBOSE("initialize() ...");
45 
46  // Input truth particles
48  ATH_MSG_INFO("Using " << m_particlesKey.key() << " as the input truth container key");
49 
50  // Output particle/vertex containers
51  if (m_collectionName.empty()) {
52  ATH_MSG_FATAL("No base name provided for the new truth particle/vertex containers");
53  return StatusCode::FAILURE;
54  } else {ATH_MSG_INFO("Base name for new truth particle/vertex containers: " << m_collectionName );}
55  m_outputParticlesKey = m_collectionName + "Particles";
56  ATH_CHECK(m_outputParticlesKey.initialize());
57  ATH_MSG_INFO("New truth particles container key: " << m_outputParticlesKey.key() );
58  m_outputVerticesKey = m_collectionName + "Vertices";
59  ATH_CHECK(m_outputVerticesKey.initialize());
60  ATH_MSG_INFO("New truth vertices container key: " << m_outputVerticesKey.key() );
61 
62  if (m_pdgIdsToKeep.empty() && !m_keepBHadrons && !m_keepCHadrons && !m_keepBSM) {
63  ATH_MSG_FATAL("No PDG IDs provided, not keeping b- or c-hadrons or BSM particles -- what do you want?");
64  return StatusCode::FAILURE;
65  }
66 
67  // Decorators
68  m_originDecoratorKey = m_outputParticlesKey.key()+".classifierParticleOrigin";
69  ATH_CHECK(m_originDecoratorKey.initialize());
70  m_typeDecoratorKey = m_outputParticlesKey.key()+".classifierParticleType";
71  ATH_CHECK(m_typeDecoratorKey.initialize());
72  m_outcomeDecoratorKey = m_outputParticlesKey.key()+".classifierParticleOutCome";
73  ATH_CHECK(m_outcomeDecoratorKey.initialize());
74  m_classificationDecoratorKey = m_outputParticlesKey.key()+".Classification";
76  m_motherIDDecoratorKey = m_outputParticlesKey.key()+".motherID";
77  ATH_CHECK(m_motherIDDecoratorKey.initialize());
78  m_daughterIDDecoratorKey = m_outputParticlesKey.key()+".daughterID";
79  ATH_CHECK(m_daughterIDDecoratorKey.initialize());
80 
81  return StatusCode::SUCCESS;
82 }

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

◆ interfaceID()

static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 31 of file IAugmentationTool.h.

31 { return IID_IAugmentationTool; }

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

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

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

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

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

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> DerivationFramework::TruthDecayCollectionMaker::m_classificationDecoratorKey {this, "Classification", "TruthParticles.Classification","Name of the decoration which records the particle outcome as determined by the MCTruthClassifier"}
private

Definition at line 56 of file TruthDecayCollectionMaker.h.

◆ m_collectionName

Gaudi::Property<std::string> DerivationFramework::TruthDecayCollectionMaker::m_collectionName {this, "NewCollectionName", "", "New collection name stem"}
private

< Output collection name stem

Definition at line 63 of file TruthDecayCollectionMaker.h.

◆ m_daughterIDDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> DerivationFramework::TruthDecayCollectionMaker::m_daughterIDDecoratorKey {this, "daughterID", "TruthParticles.daughterID","Name of the decoration which records the ID of the particle's daughter"}
private

Definition at line 60 of file TruthDecayCollectionMaker.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_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_generations

Gaudi::Property<int> DerivationFramework::TruthDecayCollectionMaker::m_generations {this, "Generations", -1, "Number of generations after the particle in question to keep (-1 for all)"}
private

< Number of generations after the particle in question to keep

Definition at line 65 of file TruthDecayCollectionMaker.h.

◆ m_keepBHadrons

Gaudi::Property<bool> DerivationFramework::TruthDecayCollectionMaker::m_keepBHadrons {this, "KeepBHadrons", false, "Keep b-hadrons (easier than by PDG ID)"}
private

< Option to keep all b-hadrons (better than giving PDG IDs)

Definition at line 36 of file TruthDecayCollectionMaker.h.

◆ m_keepBSM

Gaudi::Property<bool> DerivationFramework::TruthDecayCollectionMaker::m_keepBSM {this, "KeepBSM", false, "Keep BSM particles (easier than by PDG ID)"}
private

< Option to keep all BSM particles (better than giving PDG IDs)

Definition at line 40 of file TruthDecayCollectionMaker.h.

◆ m_keepCHadrons

Gaudi::Property<bool> DerivationFramework::TruthDecayCollectionMaker::m_keepCHadrons {this, "KeepCHadrons", false, "Keep c-hadrons (easier than by PDG ID)"}
private

< Option to keep all c-hadrons (better than giving PDG IDs)

Definition at line 38 of file TruthDecayCollectionMaker.h.

◆ m_motherIDDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> DerivationFramework::TruthDecayCollectionMaker::m_motherIDDecoratorKey {this, "motherID", "TruthParticles.motherID","Name of the decoration which records the ID of the particle's mother"}
private

Definition at line 58 of file TruthDecayCollectionMaker.h.

◆ m_originDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> DerivationFramework::TruthDecayCollectionMaker::m_originDecoratorKey {this, "classifierParticleOrigin", "TruthParticles.classifierParticleOrigin","Name of the decoration which records the particle origin as determined by the MCTruthClassifier"}
private

Definition at line 50 of file TruthDecayCollectionMaker.h.

◆ m_outcomeDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> DerivationFramework::TruthDecayCollectionMaker::m_outcomeDecoratorKey {this, "classifierParticleOutCome", "TruthParticles.classifierParticleOutCome","Name of the decoration which records the particle outcome as determined by the MCTruthClassifier"}
private

Definition at line 54 of file TruthDecayCollectionMaker.h.

◆ m_outputParticlesKey

SG::WriteHandleKey<xAOD::TruthParticleContainer> DerivationFramework::TruthDecayCollectionMaker::m_outputParticlesKey {this, "NewParticleKey", "", "WriteHandleKey for new TruthParticleContainer"}
private

Definition at line 46 of file TruthDecayCollectionMaker.h.

◆ m_outputVerticesKey

SG::WriteHandleKey<xAOD::TruthVertexContainer> DerivationFramework::TruthDecayCollectionMaker::m_outputVerticesKey {this, "NewVertexKey", "", "WriteHandleKey for new TruthVertexContainer"}
private

Definition at line 48 of file TruthDecayCollectionMaker.h.

◆ m_particlesKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> DerivationFramework::TruthDecayCollectionMaker::m_particlesKey {this, "ParticlesKey", "TruthParticles", "ReadHandleKey for input TruthParticleContainer"}
private

Definition at line 44 of file TruthDecayCollectionMaker.h.

◆ m_pdgIdsToKeep

Gaudi::Property<std::vector<int> > DerivationFramework::TruthDecayCollectionMaker::m_pdgIdsToKeep {this, "PDGIDsToKeep", {}, "PDG IDs of particles to build the collection from"}
private

< List of PDG IDs to build this collection from

Definition at line 34 of file TruthDecayCollectionMaker.h.

◆ m_rejectHadronChildren

Gaudi::Property<bool> DerivationFramework::TruthDecayCollectionMaker::m_rejectHadronChildren {this, "RejectHadronChildren", false, "Drop hadron descendants"}
private

< Option to reject hadron descendants

Definition at line 42 of file TruthDecayCollectionMaker.h.

◆ m_typeDecoratorKey

SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> DerivationFramework::TruthDecayCollectionMaker::m_typeDecoratorKey {this, "classifierParticleType", "TruthParticles.classifierParticleType","Name of the decoration which records the particle type as determined by the MCTruthClassifier"}
private

Definition at line 52 of file TruthDecayCollectionMaker.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.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:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
xAOD::TruthVertex_v1::nOutgoingParticles
size_t nOutgoingParticles() const
Get the number of outgoing particles.
xAOD::TruthParticle_v1::setStatus
void setStatus(int value)
Set status code.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
DerivationFramework::TruthDecayCollectionMaker::m_rejectHadronChildren
Gaudi::Property< bool > m_rejectHadronChildren
< Option to reject hadron descendants
Definition: TruthDecayCollectionMaker.h:43
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
xAOD::TruthParticle_v1::pz
float pz() const
The z component of the particle's momentum.
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAOD::TruthParticle_v1::setE
void setE(float value)
Set the energy of the particle.
Definition: TruthParticle_v1.cxx:235
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DerivationFramework::TruthDecayCollectionMaker::m_outputParticlesKey
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_outputParticlesKey
Definition: TruthDecayCollectionMaker.h:47
xAOD::TruthParticle_v1::setBarcode
void setBarcode(int value)
Set barcode.
xAOD::TruthParticle_v1::setPolarizationParameter
bool setPolarizationParameter(float value, PolParam parameter)
Set method for polarization parameter values.
Definition: TruthParticle_v1.cxx:351
xAOD::TruthParticle_v1::Polarization::valid
bool valid() const
Check if the stored values are valid.
Definition: TruthParticle_v1.h:379
DerivationFramework::TruthDecayCollectionMaker::m_keepBSM
Gaudi::Property< bool > m_keepBSM
< Option to keep all BSM particles (better than giving PDG IDs)
Definition: TruthDecayCollectionMaker.h:41
xAOD::TruthParticle_v1::polarization
Polarization polarization() const
Retrieve a full Polarization with a single call.
Definition: TruthParticle_v1.cxx:383
xAOD::TruthParticle_v1::px
float px() const
The x component of the particle's momentum.
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
xAOD::TruthVertex_v1::setT
void setT(float value)
Set the vertex time.
xAOD::TruthParticle_v1::setPx
void setPx(float value)
Set the x component of the particle's momentum.
DerivationFramework::TruthDecayCollectionMaker::m_keepBHadrons
Gaudi::Property< bool > m_keepBHadrons
< Option to keep all b-hadrons (better than giving PDG IDs)
Definition: TruthDecayCollectionMaker.h:37
xAOD::TruthParticle_v1::py
float py() const
The y component of the particle's momentum.
SG::ConstAccessor< unsigned int >
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::TruthVertex_v1::addOutgoingParticleLink
void addOutgoingParticleLink(const TPLink_t &link)
Add one outgoing particle.
Definition: TruthVertex_v1.cxx:139
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAOD::TruthVertex_v1::setY
void setY(float value)
Set the y displacement of the vertex.
xAOD::TruthVertex_v1::y
float y() const
Vertex y displacement.
HepMC::BarcodeBased::generations
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (only to be used in...
Definition: MagicNumbers.h:204
xAOD::TruthVertex_v1::t
float t() const
Vertex time.
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::TruthParticle_v1::hasDecayVtx
bool hasDecayVtx() const
Check for a decay vertex on this particle.
DerivationFramework::TruthDecayCollectionMaker::m_keepCHadrons
Gaudi::Property< bool > m_keepCHadrons
< Option to keep all c-hadrons (better than giving PDG IDs)
Definition: TruthDecayCollectionMaker.h:39
xAOD::TruthParticle_v1::setM
void setM(float value)
Also store the mass.
Definition: TruthParticle_v1.cxx:241
AthCommonDataStore
Definition: AthCommonDataStore.h:52
DerivationFramework::TruthDecayCollectionMaker::addTruthVertex
int addTruthVertex(const EventContext &, const xAOD::TruthVertex &old_vert, xAOD::TruthParticleContainer *part_cont, xAOD::TruthVertexContainer *vert_cont, std::vector< int > &seen_particles, const int generations=-1) const
Definition: TruthDecayCollectionMaker.cxx:188
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::TruthParticle_v1::e
virtual double e() const override final
The total energy of the particle.
DerivationFramework::TruthDecayCollectionMaker::addTruthParticle
int addTruthParticle(const EventContext &ctx, const xAOD::TruthParticle &old_part, xAOD::TruthParticleContainer *part_cont, xAOD::TruthVertexContainer *vert_cont, std::vector< int > &seen_particles, const int generations=-1) const
Definition: TruthDecayCollectionMaker.cxx:123
DerivationFramework::TruthDecayCollectionMaker::m_collectionName
Gaudi::Property< std::string > m_collectionName
< Output collection name stem
Definition: TruthDecayCollectionMaker.h:64
beamspotman.n
n
Definition: beamspotman.py:731
DerivationFramework::TruthDecayCollectionMaker::m_typeDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_typeDecoratorKey
Definition: TruthDecayCollectionMaker.h:53
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DerivationFramework::TruthDecayCollectionMaker::m_motherIDDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_motherIDDecoratorKey
Definition: TruthDecayCollectionMaker.h:59
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:41
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:99
xAOD::TruthParticle
TruthParticle_v1 TruthParticle
Typedef to implementation.
Definition: Event/xAOD/xAODTruth/xAODTruth/TruthParticle.h:15
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:113
xAOD::TruthParticle_v1::setPy
void setPy(float value)
Set the y component of the particle's momentum.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DerivationFramework::TruthDecayCollectionMaker::m_outputVerticesKey
SG::WriteHandleKey< xAOD::TruthVertexContainer > m_outputVerticesKey
Definition: TruthDecayCollectionMaker.h:49
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::TruthVertex
TruthVertex_v1 TruthVertex
Typedef to implementation.
Definition: TruthVertex.h:15
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
DerivationFramework::TruthDecayCollectionMaker::m_classificationDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_classificationDecoratorKey
Definition: TruthDecayCollectionMaker.h:57
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
xAOD::TruthParticle_v1::decayVtx
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
xAOD::TruthVertex_v1
Class describing a truth vertex in the MC record.
Definition: TruthVertex_v1.h:41
xAOD::TruthParticle_v1::setPdgId
void setPdgId(int pid)
Set PDG ID code.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DerivationFramework::TruthDecayCollectionMaker::m_particlesKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_particlesKey
Definition: TruthDecayCollectionMaker.h:45
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DerivationFramework::TruthDecayCollectionMaker::id_ok
bool id_ok(const xAOD::TruthParticle &part) const
Definition: TruthDecayCollectionMaker.cxx:226
xAOD::TruthVertex_v1::setId
void setId(int value)
Obsolete function Set vertex ID code HepMC2 id == HepMC3 status, i.e.
xAOD::TruthParticle_v1::polarizationParameter
bool polarizationParameter(float &value, PolParam parameter) const
Accessor for polarization parameters.
Definition: TruthParticle_v1.cxx:328
xAOD::TruthVertex_v1::x
float x() const
Vertex x displacement.
xAOD::TruthVertex_v1::setZ
void setZ(float value)
Set the vertex's longitudinal distance from the origin.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
xAOD::TruthParticle_v1::status
int status() const
Status code.
a
TList * a
Definition: liststreamerinfos.cxx:10
h
xAOD::TruthVertex_v1::setBarcode
void setBarcode(int value)
Set barcode.
xAOD::TruthParticle_v1::polarizationTheta
@ polarizationTheta
Polarization in ( )
Definition: TruthParticle_v1.h:323
DerivationFramework::TruthDecayCollectionMaker::m_generations
Gaudi::Property< int > m_generations
< Number of generations after the particle in question to keep
Definition: TruthDecayCollectionMaker.h:66
DerivationFramework::TruthDecayCollectionMaker::m_outcomeDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_outcomeDecoratorKey
Definition: TruthDecayCollectionMaker.h:55
xAOD::TruthParticle_v1::polarizationPhi
@ polarizationPhi
Polarization in ( )
Definition: TruthParticle_v1.h:322
xAOD::TruthVertex_v1::z
float z() const
Vertex longitudinal distance along the beam line form the origin.
xAOD::TruthParticle_v1::setPz
void setPz(float value)
Set the z component of the particle's momentum.
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
xAOD::TruthParticle_v1::setDecayVtxLink
void setDecayVtxLink(const ElementLink< TruthVertexContainer > &link)
Set the decay vertex of the particle.
DerivationFramework::TruthDecayCollectionMaker::m_pdgIdsToKeep
Gaudi::Property< std::vector< int > > m_pdgIdsToKeep
< List of PDG IDs to build this collection from
Definition: TruthDecayCollectionMaker.h:35
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
DerivationFramework::TruthDecayCollectionMaker::m_originDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_originDecoratorKey
Definition: TruthDecayCollectionMaker.h:51
DerivationFramework::TruthDecayCollectionMaker::m_daughterIDDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_daughterIDDecoratorKey
Definition: TruthDecayCollectionMaker.h:61
HepMC::status
int status(const T &p)
Definition: MagicNumbers.h:130
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::TruthVertex_v1::outgoingParticle
const TruthParticle_v1 * outgoingParticle(size_t index) const
Get one of the outgoing particles.
Definition: TruthVertex_v1.cxx:121
xAOD::TruthParticle_v1::m
virtual double m() const override final
The mass of the particle.
fitman.k
k
Definition: fitman.py:528
xAOD::TruthParticle_v1::isHadron
bool isHadron() const
Whether the particle is a hadron.
xAOD::TruthVertex_v1::setX
void setX(float value)
Set the x displacement of the vertex.