ATLAS Offline Software
Loading...
Searching...
No Matches
McEventCollectionCnv_p7.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7// McEventCollectionCnv_p7.h
8// Header file for class McEventCollectionCnv_p7
9// Author: J.Chapman, P.Clark and A.Verbytskyi
11#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_p7_H
12#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_p7_H
13
14// STL includes
15#include <unordered_map>
16
17# include "AtlasHepMC/GenEvent.h"
18# include "AtlasHepMC/GenVertex.h"
20# include "HepMC3/Data/GenRunInfoData.h"
22
23// AthenaPoolCnvSvc includes
25
26// GeneratorObjectsTPCnv includes
28
29#include "GaudiKernel/ServiceHandle.h"
30
31class IHepMCWeightSvc;
32
33// Forward declaration
34class MsgStream;
35namespace HepMC { struct DataPool; }
36
38 McEventCollection,
39 McEventCollection_p7
40 >
41{
42
45
47 // Public methods:
49 public:
50
54
58
62
66
67 void setPileup();
68
72 virtual void persToTrans( const McEventCollection_p7* persObj,
73 McEventCollection* transObj,
74 MsgStream &log ) ;
75
79 virtual void transToPers( const McEventCollection* transObj,
80 McEventCollection_p7* persObj,
81 MsgStream &log ) ;
82
84 // Protected method:
86 protected:
87
88 typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
89
100 createGenVertex( const McEventCollection_p7& persEvts,
101 const GenVertex_p7& vtx,
102 ParticlesMap_t& bcToPart,
103 HepMC::DataPool& datapools, HepMC::GenEvent* parent=nullptr ) const;
104
112 ParticlesMap_t& partToEndVtx,
113 HepMC::DataPool& datapools, const HepMC::GenVertexPtr& parent=nullptr, bool add_to_output = true ) const;
114
119 static void writeGenVertex( const HepMC::ConstGenVertexPtr& vtx, McEventCollection_p7& persEvt );
126
129};
130#endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_p7_H
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
IService to read/write HepMC's WeightContainer key names from/to IOVMetaDataContainers author: will b...
HepMC::GenVertexPtr createGenVertex(const McEventCollection_p7 &persEvts, const GenVertex_p7 &vtx, ParticlesMap_t &bcToPart, HepMC::DataPool &datapools, HepMC::GenEvent *parent=nullptr) const
Create a transient GenVertex from a persistent one (version 1) It returns the new GenVertex.
static int writeGenParticle(const HepMC::ConstGenParticlePtr &p, McEventCollection_p7 &persEvt)
Method to write a persistent GenParticle object It returns the index of the persistent GenParticle in...
virtual void persToTrans(const McEventCollection_p7 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
McEventCollectionCnv_p7 & operator=(const McEventCollectionCnv_p7 &rhs)
Assignement operator.
HepMC::GenParticlePtr createGenParticle(const GenParticle_p7 &p, ParticlesMap_t &partToEndVtx, HepMC::DataPool &datapools, const HepMC::GenVertexPtr &parent=nullptr, bool add_to_output=true) const
Create a transient GenParticle from a persistent one (vers.1) It returns the new GenParticle.
virtual ~McEventCollectionCnv_p7()
Destructor.
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p7 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p7 from its transient representation ...
McEventCollectionCnv_p7()
Default constructor:
ServiceHandle< IHepMCWeightSvc > m_hepMCWeightSvc
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p7 > Base_t
static void writeGenVertex(const HepMC::ConstGenVertexPtr &vtx, McEventCollection_p7 &persEvt)
Method to write a persistent GenVertex object.
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
HepMC3::GenParticlePtr GenParticlePtr
Definition GenParticle.h:19
HepMC3::GenVertexPtr GenVertexPtr
Definition GenVertex.h:23
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition GenParticle.h:20
HepMC3::ConstGenVertexPtr ConstGenVertexPtr
Definition GenVertex.h:24
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39