thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Vectors
HepMCConverter.h
1
// -*- C++ -*-
2
//
3
// HepMCConverter.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_HepMCConverter_H
10
#define ThePEG_HepMCConverter_H
11
// This is the declaration of the HepMCConverter class.
12
13
#include "
ThePEG/Config/ThePEG.h
"
14
#include "ThePEG/EventRecord/Event.h"
15
#include "HepMCTraits.h"
16
17
namespace
ThePEG
{
18
19
31
template
<
typename
HepMCEventT,
typename
Traits = HepMCTraits<HepMCEventT> >
32
class
HepMCConverter
{
33
34
public
:
35
38
struct
HepMCConverterException:
public
Exception
{};
45
struct
Vertex
{
47
tcParticleSet
in
;
49
tcParticleSet
out
;
50
};
51
53
typedef
typename
Traits::ParticleT
GenParticle
;
55
typedef
typename
Traits::ParticlePtrT
GenParticlePtrT
;
57
typedef
typename
Traits::EventT
GenEvent
;
59
typedef
typename
Traits::VertexT
GenVertex
;
61
typedef
typename
Traits::VertexPtrT
GenVertexPtrT
;
63
typedef
typename
Traits::PdfInfoT
PdfInfo
;
65
typedef
map<tcPPtr,GenParticlePtrT>
ParticleMap
;
67
typedef
map<tcColinePtr,long>
FlowMap
;
69
typedef
map<tcPPtr,Vertex*>
VertexMap
;
71
typedef
map<const Vertex *, GenVertexPtrT>
GenVertexMap
;
72
73
public
:
74
84
static
GenEvent
*
convert
(
const
Event
& ev,
bool
nocopies =
false
,
85
Energy
eunit = Traits::defaultEnergyUnit(),
86
Length
lunit = Traits::defaultLengthUnit());
87
97
static
void
98
convert
(
const
Event
& ev,
GenEvent
& gev,
bool
nocopies,
99
Energy
eunit,
Length
lunit);
100
110
static
void
111
convert
(
const
Event
& ev,
GenEvent
& gev,
bool
nocopies =
false
);
112
113
private
:
114
119
HepMCConverter
(
const
Event
& ev,
bool
nocopies,
Energy
eunit,
Length
lunit);
120
125
HepMCConverter
(
const
Event
& ev,
GenEvent
& gev,
bool
nocopies,
126
Energy
eunit,
Length
lunit);
127
131
void
init
(
const
Event
& ev,
bool
nocopies);
132
136
HepMCConverter
();
137
141
HepMCConverter
(
const
HepMCConverter
&);
142
146
HepMCConverter
&
operator=
(
const
HepMCConverter
&) =
delete
;
147
148
private
:
149
153
GenParticlePtrT
createParticle
(
tcPPtr
p)
const
;
154
159
void
join
(
tcPPtr
parent,
tcPPtr
child);
160
164
GenVertexPtrT
createVertex
(
Vertex
* v);
165
169
void
setPdfInfo
(
const
Event
& e);
170
171
private
:
172
176
GenEvent
*
geneve
;
177
182
ParticleMap
pmap
;
183
188
FlowMap
flowmap
;
189
193
vector<Vertex>
vertices
;
194
198
VertexMap
prov
;
199
203
VertexMap
decv
;
204
208
GenVertexMap
vmap
;
209
213
Energy
energyUnit
;
214
218
Length
lengthUnit
;
219
220
};
221
222
}
223
224
#include "HepMCConverter.tcc"
225
226
#endif
/* ThePEG_HepMCConverter_H */
ThePEG.h
This is the main config header file for ThePEG.
ThePEG::Event
The Event class contains all Particles produced in the generation of an event.
Definition:
Event.h:37
ThePEG::Exception
Exception is the base class for all exceptions to be used in ThePEG.
Definition:
Exception.h:44
ThePEG::HepMCConverter
The HepMCConverter defines only one public static function which converts a ThePEG::Event object to a...
Definition:
HepMCConverter.h:32
ThePEG::HepMCConverter::GenEvent
Traits::EventT GenEvent
Forward typedefs from Traits class.
Definition:
HepMCConverter.h:57
ThePEG::HepMCConverter::FlowMap
map< tcColinePtr, long > FlowMap
Map ThePEG colour lines to HepMC colour indices.
Definition:
HepMCConverter.h:67
ThePEG::HepMCConverter::flowmap
FlowMap flowmap
The translation table between ThePEG ColourLine objects and HepMC Flow indices.
Definition:
HepMCConverter.h:188
ThePEG::HepMCConverter::ParticleMap
map< tcPPtr, GenParticlePtrT > ParticleMap
Map ThePEG particles to HepMC particles.
Definition:
HepMCConverter.h:65
ThePEG::HepMCConverter::decv
VertexMap decv
The mapping of particles to their decy vertices.
Definition:
HepMCConverter.h:203
ThePEG::HepMCConverter::HepMCConverter
HepMCConverter()
Default constructor is unimplemented and private and should never be used.
ThePEG::HepMCConverter::init
void init(const Event &ev, bool nocopies)
Common init function used by the constructors.
ThePEG::HepMCConverter::prov
VertexMap prov
The mapping of particles to their production vertices.
Definition:
HepMCConverter.h:198
ThePEG::HepMCConverter::GenVertexMap
map< const Vertex *, GenVertexPtrT > GenVertexMap
Map vertices to GenVertex.
Definition:
HepMCConverter.h:71
ThePEG::HepMCConverter::HepMCConverter
HepMCConverter(const Event &ev, GenEvent &gev, bool nocopies, Energy eunit, Length lunit)
The proper constructors are private.
ThePEG::HepMCConverter::join
void join(tcPPtr parent, tcPPtr child)
Join the decay vertex of the parent with the decay vertex of the child.
ThePEG::HepMCConverter::GenVertexPtrT
Traits::VertexPtrT GenVertexPtrT
Forward typedefs from Traits class.
Definition:
HepMCConverter.h:61
ThePEG::HepMCConverter::createVertex
GenVertexPtrT createVertex(Vertex *v)
Create a GenVertex from a temporary Vertex.
ThePEG::HepMCConverter::HepMCConverter
HepMCConverter(const HepMCConverter &)
Copy constructor is unimplemented and private and should never be used.
ThePEG::HepMCConverter::setPdfInfo
void setPdfInfo(const Event &e)
Create and set a PdfInfo object for the event.
ThePEG::HepMCConverter::createParticle
GenParticlePtrT createParticle(tcPPtr p) const
Create a GenParticle from a ThePEG Particle.
ThePEG::HepMCConverter::GenVertex
Traits::VertexT GenVertex
Forward typedefs from Traits class.
Definition:
HepMCConverter.h:59
ThePEG::HepMCConverter::convert
static void convert(const Event &ev, GenEvent &gev, bool nocopies=false)
Convert a ThePEG::Event to a HepMC::GenEvent.
ThePEG::HepMCConverter::GenParticle
Traits::ParticleT GenParticle
Forward typedefs from Traits class.
Definition:
HepMCConverter.h:53
ThePEG::HepMCConverter::convert
static void convert(const Event &ev, GenEvent &gev, bool nocopies, Energy eunit, Length lunit)
Convert a ThePEG::Event to a HepMC::GenEvent.
ThePEG::HepMCConverter::lengthUnit
Length lengthUnit
The length unit to be used in the GenEvent.
Definition:
HepMCConverter.h:218
ThePEG::HepMCConverter::PdfInfo
Traits::PdfInfoT PdfInfo
Forward typedefs from Traits class.
Definition:
HepMCConverter.h:63
ThePEG::HepMCConverter::pmap
ParticleMap pmap
The translation table between the ThePEG particles and the GenParticles.
Definition:
HepMCConverter.h:182
ThePEG::HepMCConverter::GenParticlePtrT
Traits::ParticlePtrT GenParticlePtrT
Forward typedefs from Traits class.
Definition:
HepMCConverter.h:55
ThePEG::HepMCConverter::vmap
GenVertexMap vmap
The mapping between temporary vertices and the created GenVertex Objects.
Definition:
HepMCConverter.h:208
ThePEG::HepMCConverter::operator=
HepMCConverter & operator=(const HepMCConverter &)=delete
Assignment is unimplemented and private and should never be used.
ThePEG::HepMCConverter::HepMCConverter
HepMCConverter(const Event &ev, bool nocopies, Energy eunit, Length lunit)
The proper constructors are private.
ThePEG::HepMCConverter::convert
static GenEvent * convert(const Event &ev, bool nocopies=false, Energy eunit=Traits::defaultEnergyUnit(), Length lunit=Traits::defaultLengthUnit())
Convert a ThePEG::Event to a HepMC::GenEvent.
ThePEG::HepMCConverter::energyUnit
Energy energyUnit
The energy unit to be used in the GenEvent.
Definition:
HepMCConverter.h:213
ThePEG::HepMCConverter::geneve
GenEvent * geneve
The constructed GenEvent.
Definition:
HepMCConverter.h:176
ThePEG::HepMCConverter::VertexMap
map< tcPPtr, Vertex * > VertexMap
Map ThePEG particles to vertices.
Definition:
HepMCConverter.h:69
ThePEG::HepMCConverter::vertices
vector< Vertex > vertices
All temporary vertices created.
Definition:
HepMCConverter.h:193
ThePEG::Pointer::TransientConstRCPtr
TransientConstRCPtr is a simple wrapper around a bare const pointer which can be assigned to and from...
Definition:
RCPtr.h:696
ThePEG::Qty< 0, 1, 0 >
ThePEG
This is the main namespace within which all identifiers in ThePEG are declared.
Definition:
FactoryBase.h:28
ThePEG::tcParticleSet
set< tcPPtr, less< tcPPtr > > tcParticleSet
A set of transient pointers to const Particle.
Definition:
EventConfig.h:80
ThePEG::HepMCConverter::Vertex
Help class to represent a temporary vertex which can be converted to a GenVertex.
Definition:
HepMCConverter.h:45
ThePEG::HepMCConverter::Vertex::out
tcParticleSet out
Particles going out of the vertex.
Definition:
HepMCConverter.h:49
ThePEG::HepMCConverter::Vertex::in
tcParticleSet in
Particles going in to the vertex.
Definition:
HepMCConverter.h:47
Generated on Thu Jun 20 2024 14:47:02 for ThePEG by
1.9.6