ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
GeneratorObjectsTPCnv
GeneratorObjectsTPCnv
McEventCollectionCnv_p5.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_p5.h
8
// Header file for class McEventCollectionCnv_p5
9
// Author: S.Binet<binet@cern.ch>
11
#ifndef GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P5_H
12
#define GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P5_H
13
14
// STL includes
15
#include <unordered_map>
16
#include <sstream>
17
18
#include "
AtlasHepMC/GenEvent.h
"
19
#include "
AtlasHepMC/GenVertex.h
"
20
#include "
AtlasHepMC/GenParticle.h
"
21
#include "
GeneratorObjects/McEventCollection.h
"
22
23
// AthenaPoolCnvSvc includes
24
#include "
AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h
"
25
26
// GeneratorObjectsTPCnv includes
27
#include "
GeneratorObjectsTPCnv/McEventCollection_p5.h
"
28
29
#include "GaudiKernel/ServiceHandle.h"
30
31
class
IHepMCWeightSvc
;
32
33
// Forward declaration
34
class
MsgStream;
35
namespace
HepMC
{
struct
DataPool
; }
36
37
class
McEventCollectionCnv_p5
:
public
T_AthenaPoolTPCnvBase
<
38
McEventCollection,
39
McEventCollection_p5
40
>
41
{
42
43
typedef
T_AthenaPoolTPCnvBase
<
McEventCollection
,
44
McEventCollection_p5
>
Base_t
;
45
47
// Public methods:
49
public
:
50
53
McEventCollectionCnv_p5
();
54
57
McEventCollectionCnv_p5
(
const
McEventCollectionCnv_p5
& rhs );
58
61
McEventCollectionCnv_p5
&
operator=
(
const
McEventCollectionCnv_p5
& rhs );
62
65
virtual
~McEventCollectionCnv_p5
();
66
67
void
setPileup
();
68
72
virtual
void
persToTrans
(
const
McEventCollection_p5
* persObj,
73
McEventCollection
* transObj,
74
MsgStream &log ) ;
75
79
virtual
void
transToPers
(
const
McEventCollection
* transObj,
80
McEventCollection_p5
* persObj,
81
MsgStream &log ) ;
82
84
// Protected method:
86
protected
:
87
88
typedef
std::unordered_map<HepMC::GenParticlePtr,int>
ParticlesMap_t
;
89
99
HepMC::GenVertexPtr
100
createGenVertex
(
const
McEventCollection_p5
& persEvts,
101
const
GenVertex_p5
& vtx,
102
ParticlesMap_t
& bcToPart,
103
HepMC::DataPool
& datapools,
HepMC::GenEvent
* parent=
nullptr
)
const
;
104
110
HepMC::GenParticlePtr
111
createGenParticle
(
const
GenParticle_p5
& p,
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,
120
McEventCollection_p5
& persEvt ) ;
126
static
int
writeGenParticle
(
const
HepMC::ConstGenParticlePtr
& p,
127
McEventCollection_p5
& persEvt ) ;
129
// Protected data:
131
protected
:
132
133
bool
m_isPileup
;
134
ServiceHandle<IHepMCWeightSvc>
m_hepMCWeightSvc
;
135
};
136
#endif
//> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P5_H
GenEvent.h
GenParticle.h
GenVertex.h
McEventCollection.h
McEventCollection_p5.h
T_AthenaPoolTPConverter.h
T_AthenaPoolTPCnvBase
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
Definition
T_AthenaPoolTPConverter.h:41
GenParticle_p5
Definition
GenParticle_p5.h:22
GenVertex_p5
Definition
GenVertex_p5.h:24
IHepMCWeightSvc
IService to read/write HepMC's WeightContainer key names from/to IOVMetaDataContainers author: will b...
Definition
IHepMCWeightSvc.h:18
McEventCollectionCnv_p5::operator=
McEventCollectionCnv_p5 & operator=(const McEventCollectionCnv_p5 &rhs)
Assignement operator.
Definition
McEventCollectionCnv_p5.cxx:41
McEventCollectionCnv_p5::transToPers
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p5 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p5 from its transient representation ...
Definition
McEventCollectionCnv_p5.cxx:206
McEventCollectionCnv_p5::Base_t
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p5 > Base_t
Definition
McEventCollectionCnv_p5.h:44
McEventCollectionCnv_p5::~McEventCollectionCnv_p5
virtual ~McEventCollectionCnv_p5()
Destructor.
McEventCollectionCnv_p5::writeGenParticle
static int writeGenParticle(const HepMC::ConstGenParticlePtr &p, McEventCollection_p5 &persEvt)
Method to write a persistent GenParticle object It returns the index of the persistent GenParticle in...
Definition
McEventCollectionCnv_p5.cxx:481
McEventCollectionCnv_p5::McEventCollectionCnv_p5
McEventCollectionCnv_p5()
Default constructor:
Definition
McEventCollectionCnv_p5.cxx:30
McEventCollectionCnv_p5::createGenParticle
HepMC::GenParticlePtr createGenParticle(const GenParticle_p5 &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.
Definition
McEventCollectionCnv_p5.cxx:387
McEventCollectionCnv_p5::ParticlesMap_t
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
Definition
McEventCollectionCnv_p5.h:88
McEventCollectionCnv_p5::persToTrans
virtual void persToTrans(const McEventCollection_p5 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
Definition
McEventCollectionCnv_p5.cxx:58
McEventCollectionCnv_p5::writeGenVertex
static void writeGenVertex(const HepMC::ConstGenVertexPtr &vtx, McEventCollection_p5 &persEvt)
Method to write a persistent GenVertex object.
Definition
McEventCollectionCnv_p5.cxx:445
McEventCollectionCnv_p5::m_isPileup
bool m_isPileup
Definition
McEventCollectionCnv_p5.h:133
McEventCollectionCnv_p5::m_hepMCWeightSvc
ServiceHandle< IHepMCWeightSvc > m_hepMCWeightSvc
Definition
McEventCollectionCnv_p5.h:134
McEventCollectionCnv_p5::setPileup
void setPileup()
Definition
McEventCollectionCnv_p5.cxx:523
McEventCollectionCnv_p5::createGenVertex
HepMC::GenVertexPtr createGenVertex(const McEventCollection_p5 &persEvts, const GenVertex_p5 &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.
Definition
McEventCollectionCnv_p5.cxx:340
McEventCollection_p5
Definition
McEventCollection_p5.h:27
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
Definition
McEventCollection.h:31
ServiceHandle
Definition
ClusterMakerTool.h:36
HepMC
Definition
Barcode.h:13
HepMC::GenParticlePtr
HepMC3::GenParticlePtr GenParticlePtr
Definition
GenParticle.h:19
HepMC::GenVertexPtr
HepMC3::GenVertexPtr GenVertexPtr
Definition
GenVertex.h:23
HepMC::ConstGenParticlePtr
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition
GenParticle.h:20
HepMC::ConstGenVertexPtr
HepMC3::ConstGenVertexPtr ConstGenVertexPtr
Definition
GenVertex.h:24
HepMC::GenEvent
HepMC3::GenEvent GenEvent
Definition
GenEvent.h:39
HepMC::DataPool
Definition
HepMcDataPool.h:23
Generated on
for ATLAS Offline Software by
1.17.0