ATLAS Offline Software
Loading...
Searching...
No Matches
McEventCollectionCnv_p4.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_p4.h
8// Header file for class McEventCollectionCnv_p4
9// Author: S.Binet<binet@cern.ch>
11#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P4_H
12#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P4_H
13
14// STL includes
15#include <unordered_map>
16#include <sstream>
17
18#include "AtlasHepMC/GenEvent.h"
22
23// AthenaPoolCnvSvc includes
25
26// GeneratorObjectsTPCnv includes
28
29#include "GaudiKernel/ServiceHandle.h"
30
31// Forward declaration
32class IHepMCWeightSvc;
33class MsgStream;
34namespace HepMC { struct DataPool; }
35
37 McEventCollection,
38 McEventCollection_p4
39 >
40{
41
44
46 // Public methods:
48 public:
49
53
57
61
65
66 void setPileup();
67
71 virtual void persToTrans( const McEventCollection_p4* persObj,
72 McEventCollection* transObj,
73 MsgStream &log ) ;
74
78 virtual void transToPers( const McEventCollection* transObj,
79 McEventCollection_p4* persObj,
80 MsgStream &log ) ;
81
83 // Protected method:
85 protected:
86
87 typedef std::unordered_map<HepMC::GenParticlePtr,int> ParticlesMap_t;
88
100 const GenVertex_p4& vtx,
101 ParticlesMap_t& bcToPart,
102 HepMC::DataPool& datapools,HepMC::GenEvent* parent=nullptr ) const;
103
111 ParticlesMap_t& partToEndVtx,
112 HepMC::DataPool& datapools,const HepMC::GenVertexPtr& parent=nullptr , bool add_to_output = true ) const;
113
118 static void writeGenVertex( const HepMC::ConstGenVertexPtr& vtx,
119 McEventCollection_p4& persEvt ) ;
120
126 static int writeGenParticle( const HepMC::ConstGenParticlePtr& p,
127 McEventCollection_p4& persEvt ) ;
129 // Protected data:
131 protected:
132
135};
136#endif //> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P4_H
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
IService to read/write HepMC's WeightContainer key names from/to IOVMetaDataContainers author: will b...
virtual void persToTrans(const McEventCollection_p4 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
HepMC::GenParticlePtr createGenParticle(const GenParticle_p4 &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.
static int writeGenParticle(const HepMC::ConstGenParticlePtr &p, McEventCollection_p4 &persEvt)
Method to write a persistent GenParticle object It returns the index of the persistent GenParticle in...
McEventCollectionCnv_p4 & operator=(const McEventCollectionCnv_p4 &rhs)
Assignement operator.
virtual ~McEventCollectionCnv_p4()
Destructor.
McEventCollectionCnv_p4()
Default constructor:
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p4 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p4 from its transient representation ...
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p4 > Base_t
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
HepMC::GenVertexPtr createGenVertex(const McEventCollection_p4 &persEvts, const GenVertex_p4 &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 void writeGenVertex(const HepMC::ConstGenVertexPtr &vtx, McEventCollection_p4 &persEvt)
Method to write a persistent GenVertex object.
ServiceHandle< IHepMCWeightSvc > m_hepMCWeightSvc
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