ATLAS Offline Software
TruthBornLeptonCollectionMaker.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TruthBornLeptonCollectionMaker.h
8 
9 #ifndef DERIVATIONFRAMEWORK_TRUTHBORNLEPTONCOLLECTIONMAKER_H
10 #define DERIVATIONFRAMEWORK_TRUTHBORNLEPTONCOLLECTIONMAKER_H
11 
12 // Base classes
15 // EDM includes for the particles we need
17 // R/W/D key handles
21 // For the Metadata store
22 #include "GaudiKernel/ServiceHandle.h"
23 // STL includes
24 #include <string>
25 
26 // Forward declarations
27 class StoreGateSvc;
28 
29 namespace DerivationFramework {
30 
31  class TruthBornLeptonCollectionMaker : public extends<AthAlgTool, IAugmentationTool> {
32  public:
33  TruthBornLeptonCollectionMaker(const std::string& t, const std::string& n, const IInterface* p);
36  virtual StatusCode addBranches() const;
37 
38  private:
41  {this, "ParticlesKey", "TruthParticles", "Name of TruthParticle key for input"};
43  {this, "Input_classifierParticleOrigin", m_particlesKey, "classifierParticleOrigin", "Particle origin decoration"};
45  {this, "Input_classifierParticleType",m_particlesKey, "classifierParticleType", "Particle type decoration"};
47  {this, "Input_classifierParticleOutCome", m_particlesKey, "classifierParticleOutCome", "Particle outcome decoration"};
49  {this, "Input_Classification", m_particlesKey, "Classification", "Classification code decoration"};
52  {this, "NewCollectionName", "", "Name of TruthParticle key for output"};
53  // Decorators - FIXME we should not need to use WriteDecorHandleKeys here.
55  {this, "classifierParticleOrigin", m_collectionName, "classifierParticleOrigin", "Particle origin decoration"};
57  {this, "classifierParticleType",m_collectionName, "classifierParticleType", "Particle type decoration"};
59  {this, "classifierParticleOutCome", m_collectionName, "classifierParticleOutCome", "Particle outcome decoration"};
61  {this, "Classification", m_collectionName, "Classification", "Classification code decoration"};
62 
64  bool hasBareDescendent( const xAOD::TruthParticle* p ) const;
66  };
67 }
68 
69 #endif // DERIVATIONFRAMEWORK_TRUTHBORNLEPTONCOLLECTIONMAKER_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer >
DerivationFramework::TruthBornLeptonCollectionMaker::m_outcomeAccessorKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_outcomeAccessorKey
Definition: TruthBornLeptonCollectionMaker.h:47
IAugmentationTool.h
DerivationFramework::TruthBornLeptonCollectionMaker::m_originDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_originDecoratorKey
Definition: TruthBornLeptonCollectionMaker.h:55
DerivationFramework::TruthBornLeptonCollectionMaker::m_outcomeDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_outcomeDecoratorKey
Definition: TruthBornLeptonCollectionMaker.h:59
DerivationFramework::TruthBornLeptonCollectionMaker::TruthBornLeptonCollectionMaker
TruthBornLeptonCollectionMaker(const std::string &t, const std::string &n, const IInterface *p)
Definition: TruthBornLeptonCollectionMaker.cxx:28
DerivationFramework::TruthBornLeptonCollectionMaker::addBranches
virtual StatusCode addBranches() const
Definition: TruthBornLeptonCollectionMaker.cxx:76
DerivationFramework::TruthBornLeptonCollectionMaker::m_typeAccessorKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_typeAccessorKey
Definition: TruthBornLeptonCollectionMaker.h:45
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey< xAOD::TruthParticleContainer >
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:120
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
SG::WriteHandleKey< xAOD::TruthParticleContainer >
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
beamspotman.n
n
Definition: beamspotman.py:727
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
AthAlgTool.h
DerivationFramework::TruthBornLeptonCollectionMaker::initialize
StatusCode initialize()
Definition: TruthBornLeptonCollectionMaker.cxx:42
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DerivationFramework::TruthBornLeptonCollectionMaker::m_collectionName
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_collectionName
Definition: TruthBornLeptonCollectionMaker.h:52
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
DerivationFramework::TruthBornLeptonCollectionMaker::m_typeDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_typeDecoratorKey
Definition: TruthBornLeptonCollectionMaker.h:57
DerivationFramework::TruthBornLeptonCollectionMaker
Definition: TruthBornLeptonCollectionMaker.h:31
DerivationFramework::TruthBornLeptonCollectionMaker::m_classificationAccessorKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_classificationAccessorKey
Output particle collection key.
Definition: TruthBornLeptonCollectionMaker.h:49
DerivationFramework::TruthBornLeptonCollectionMaker::hasBareDescendent
bool hasBareDescendent(const xAOD::TruthParticle *p) const
Helper function for finding bare descendents of born leptons.
Definition: TruthBornLeptonCollectionMaker.cxx:213
DerivationFramework::TruthBornLeptonCollectionMaker::m_classificationDecoratorKey
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_classificationDecoratorKey
Definition: TruthBornLeptonCollectionMaker.h:61
DerivationFramework::TruthBornLeptonCollectionMaker::m_originAccessorKey
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer > m_originAccessorKey
Definition: TruthBornLeptonCollectionMaker.h:43
DerivationFramework::TruthBornLeptonCollectionMaker::m_metaStore
ServiceHandle< StoreGateSvc > m_metaStore
Handle on the metadata store for init.
Definition: TruthBornLeptonCollectionMaker.h:63
DerivationFramework::TruthBornLeptonCollectionMaker::~TruthBornLeptonCollectionMaker
~TruthBornLeptonCollectionMaker()
Definition: TruthBornLeptonCollectionMaker.cxx:38
SG::ReadDecorHandleKey< xAOD::TruthParticleContainer >
TruthParticle.h
ServiceHandle< StoreGateSvc >
DerivationFramework::TruthBornLeptonCollectionMaker::m_particlesKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_particlesKey
< Input particle collection key
Definition: TruthBornLeptonCollectionMaker.h:41