|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
    5 #ifndef XAODCREATORALGS_XAODTRUTHCNVALG_H 
    6 #define XAODCREATORALGS_XAODTRUTHCNVALG_H 
   17 #pragma clang diagnostic push 
   18 #pragma clang diagnostic ignored "-Wkeyword-macro" 
   20 #define private public 
   24 #pragma clang diagnostic pop 
   42 #include "GaudiKernel/IIncidentListener.h" 
   44 #include <unordered_set> 
   66     , 
virtual public IIncidentListener
 
   79     virtual void handle(
const Incident& incident) 
override;
 
   98                              const std::string& metaName);
 
  100                              const HepMC::GenEvent& genEvt,
 
  106       typedef std::lock_guard<std::mutex> 
lock_t;
 
  118       std::vector<ElementLink<xAOD::TruthParticleContainer> > 
incomingEL;
 
  120       std::vector<ElementLink<xAOD::TruthParticleContainer> > 
outgoingEL;
 
  123     typedef std::map<HepMC::ConstGenVertexPtr, VertexParticles> 
VertexMap;
 
  131       this, 
"AODContainerName", 
"GEN_AOD", 
"The input McEvenCollection"};
 
  135       this, 
"xAODTruthEventContainerName", 
"TruthEvents", 
"Output TruthEvents container"};
 
  137       this, 
"xAODTruthPileupEventContainerName", 
"TruthPileupEvents", 
"Output TruthPileupEvents container"};
 
  139       this, 
"xAODTruthParticleContainerName", 
"TruthParticles", 
"Output TruthParticles container"};
 
  141       this, 
"xAODTruthVertexContainerName", 
"TruthVertices", 
"Output TruthVertices container"};
 
  143       this, 
"TruthLinks", 
"xAODTruthLinks", 
"Output xAODTruthLinks container"};
 
  145       this, 
"xAODTruthLHEParticleContainerName", 
"", 
"Output TruthLHEParticles container"};
 
  175 #endif // XAODCREATORALGS_XAODTRUTHCNVALG_H 
  
Property holding a SG store/key/clid from which a ReadHandle is made.
std::vector< ElementLink< xAOD::TruthParticleContainer > > incomingEL
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_xaodTruthParticleContainerKey
SG::WriteHandleKey< xAOD::TruthParticleContainer > m_lheTruthParticleContainerKey
SG::WriteHandleKey< xAOD::TruthEventContainer > m_xaodTruthEventContainerKey
The key for the output xAOD truth containers.
std::string m_metaName
SG key and name for meta data.
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
static void fillParticle(xAOD::TruthParticle *tp, const HepMC::ConstGenParticlePtr &gp)
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< bool > m_doInTimePileUp
static void fillVertex(xAOD::TruthVertex *tv, const HepMC::ConstGenVertexPtr &gv)
These functions do not set up ELs, just the other variables.
Property holding a SG store/key/clid from which a WriteHandle is made.
bool m_firstBeginRun
Tag Info.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
SG::WriteHandleKey< xAOD::TruthPileupEventContainer > m_xaodTruthPUEventContainerKey
std::vector< xAOD::TruthParticle * > outgoing
virtual void handle(const Incident &incident) override
Incident handler.
SG::ReadHandleKey< McEventCollection > m_aodContainerKey
The key of the input AOD truth container.
virtual StatusCode initialize() override
Function initialising the algorithm.
SG::WriteHandleKey< xAOD::TruthVertexContainer > m_xaodTruthVertexContainerKey
MetadataFields m_metaFields
Property holding a SG store/key/clid from which a WriteHandle is made.
MetaDataWriter m_meta ATLAS_THREAD_SAFE
Helper for writing to the meta data store.
const GenParticle * ConstGenParticlePtr
Class describing a truth vertex in the MC record.
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfo
Event Info.
Type for tracking particles connected to a single vertex.
SG::WriteHandleKey< xAODTruthParticleLinkVector > m_truthLinkContainerKey
std::map< HepMC::ConstGenVertexPtr, VertexParticles > VertexMap
Convenience handle for a map of vtx ptrs -> connected particles.
Gaudi::Property< bool > m_writeMetaData
option to disable writing of metadata (e.g. if running a filter on xAOD in generators)
ServiceHandle< StoreGateSvc > m_metaStore
Connection to the metadata store.
std::vector< xAOD::TruthParticle * > incoming
Gaudi::Property< bool > m_doAllPileUp
Pile-up options.
std::vector< ElementLink< xAOD::TruthParticleContainer > > outgoingEL
const HepMC::GenVertex * ConstGenVertexPtr
Define macros for attributes used to control the static checker.
xAODTruthCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular algorithm constructor.
Algorithm creating xAOD truth from HepMC.