ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
GeneratorObjectsTPCnv
GeneratorObjectsTPCnv
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
"
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_p4.h
"
28
29
#include "GaudiKernel/ServiceHandle.h"
30
31
// Forward declaration
32
class
IHepMCWeightSvc
;
33
class
MsgStream;
34
namespace
HepMC
{
struct
DataPool
; }
35
36
class
McEventCollectionCnv_p4
:
public
T_AthenaPoolTPCnvBase
<
37
McEventCollection,
38
McEventCollection_p4
39
>
40
{
41
42
typedef
T_AthenaPoolTPCnvBase
<
McEventCollection
,
43
McEventCollection_p4
>
Base_t
;
44
46
// Public methods:
48
public
:
49
52
McEventCollectionCnv_p4
();
53
56
McEventCollectionCnv_p4
(
const
McEventCollectionCnv_p4
& rhs );
57
60
McEventCollectionCnv_p4
&
operator=
(
const
McEventCollectionCnv_p4
& rhs );
61
64
virtual
~McEventCollectionCnv_p4
();
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
98
HepMC::GenVertexPtr
99
createGenVertex
(
const
McEventCollection_p4
& persEvts,
100
const
GenVertex_p4
& vtx,
101
ParticlesMap_t
& bcToPart,
102
HepMC::DataPool
& datapools,
HepMC::GenEvent
* parent=
nullptr
)
const
;
103
109
HepMC::GenParticlePtr
110
createGenParticle
(
const
GenParticle_p4
& p,
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
133
bool
m_isPileup
;
134
ServiceHandle<IHepMCWeightSvc>
m_hepMCWeightSvc
;
135
};
136
#endif
//> GENERATOROBJECTSTPCNV_MCEVENTCOLLECTIONCNV_P4_H
GenEvent.h
GenParticle.h
GenVertex.h
McEventCollection.h
McEventCollection_p4.h
T_AthenaPoolTPConverter.h
T_AthenaPoolTPCnvBase
TPConverterBase< TRANS, PERS > T_AthenaPoolTPCnvBase
Definition
T_AthenaPoolTPConverter.h:41
GenParticle_p4
Definition
GenParticle_p4.h:22
GenVertex_p4
Definition
GenVertex_p4.h:24
IHepMCWeightSvc
IService to read/write HepMC's WeightContainer key names from/to IOVMetaDataContainers author: will b...
Definition
IHepMCWeightSvc.h:18
McEventCollectionCnv_p4::persToTrans
virtual void persToTrans(const McEventCollection_p4 *persObj, McEventCollection *transObj, MsgStream &log)
Method creating the transient representation of McEventCollection from its persistent representation ...
Definition
McEventCollectionCnv_p4.cxx:64
McEventCollectionCnv_p4::createGenParticle
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.
Definition
McEventCollectionCnv_p4.cxx:295
McEventCollectionCnv_p4::setPileup
void setPileup()
Definition
McEventCollectionCnv_p4.cxx:437
McEventCollectionCnv_p4::writeGenParticle
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...
Definition
McEventCollectionCnv_p4.cxx:397
McEventCollectionCnv_p4::m_isPileup
bool m_isPileup
Definition
McEventCollectionCnv_p4.h:133
McEventCollectionCnv_p4::operator=
McEventCollectionCnv_p4 & operator=(const McEventCollectionCnv_p4 &rhs)
Assignement operator.
Definition
McEventCollectionCnv_p4.cxx:44
McEventCollectionCnv_p4::~McEventCollectionCnv_p4
virtual ~McEventCollectionCnv_p4()
Destructor.
McEventCollectionCnv_p4::McEventCollectionCnv_p4
McEventCollectionCnv_p4()
Default constructor:
Definition
McEventCollectionCnv_p4.cxx:33
McEventCollectionCnv_p4::transToPers
virtual void transToPers(const McEventCollection *transObj, McEventCollection_p4 *persObj, MsgStream &log)
Method creating the persistent representation McEventCollection_p4 from its transient representation ...
Definition
McEventCollectionCnv_p4.cxx:171
McEventCollectionCnv_p4::Base_t
T_AthenaPoolTPCnvBase< McEventCollection, McEventCollection_p4 > Base_t
Definition
McEventCollectionCnv_p4.h:43
McEventCollectionCnv_p4::ParticlesMap_t
std::unordered_map< HepMC::GenParticlePtr, int > ParticlesMap_t
Definition
McEventCollectionCnv_p4.h:87
McEventCollectionCnv_p4::createGenVertex
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.
Definition
McEventCollectionCnv_p4.cxx:254
McEventCollectionCnv_p4::writeGenVertex
static void writeGenVertex(const HepMC::ConstGenVertexPtr &vtx, McEventCollection_p4 &persEvt)
Method to write a persistent GenVertex object.
Definition
McEventCollectionCnv_p4.cxx:360
McEventCollectionCnv_p4::m_hepMCWeightSvc
ServiceHandle< IHepMCWeightSvc > m_hepMCWeightSvc
Definition
McEventCollectionCnv_p4.h:134
McEventCollection_p4
Definition
McEventCollection_p4.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