HepMC3 event record library
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
interfaces
mc-tester
include
HepMC3Event.h
1
/**
2
* @class HepMC3Event
3
* @brief HEPEvent Interface to HepMC classes
4
*
5
* This class provides a set of methods that allow access to event data
6
* stored in HepMC format. The HepMC data structures are used by
7
* HEP programs as storage for event records in C++
8
*
9
* This class extends the GenEvent class and implements the methods of
10
* HEPEvent used by MC-TESTER. Not all functions are needed by the MC-TESTER,
11
* so dummy defintion are introduced for these
12
*
13
*/
14
15
#ifndef _HepMC3Event_H
16
#define _HepMC3Event_H
17
18
#ifdef _USE_ROOT_
19
#include <TObject.h>
20
#include <TBuffer.h>
21
#include <TClass.h>
22
#endif
23
24
#include "
HepMC3/GenEvent.h
"
25
#include "HepMC3Particle.h"
26
#include "HEPEvent.H"
27
28
29
30
class
HepMC3Event
:
public
HEPEvent
31
{
32
private
:
33
/** List of particles in the event */
34
HepMC3Particle
**
particles
;
35
36
/** Flag for how particles decaying into there own type are treated */
37
bool
count_self_decays
;
38
39
public
:
40
/** Constructor for HepMC3Event. Creates a new event using the
41
event info from GenEvent e. Also copies each particle
42
into a HepMC3Particle and stores them as a list. */
43
HepMC3Event
(
HepMC3::GenEvent
&e,
bool
include_self_decay=
true
);
44
/** Destructor for HepMC3Event */
45
~HepMC3Event
();
46
47
/** return the number of particles in the event */
48
int
GetNumOfParticles
();
49
50
/** returns the event number */
51
int
GetEventNumber
();
52
53
/** Dummy function definition. Do not use */
54
void
SetNumOfParticles
(
int
n);
55
56
/** Dummy function definition. Do not use */
57
void
SetEventNumber
(
int
ev);
58
59
/** Returns the HEPParticle with id "idx". This is the id number as used
60
by MC-TESTER and not the id number from the original GenParticle.
61
Note: Indecies begin at 1.*/
62
HEPParticle*
GetParticle
(
int
idx);
63
64
/** Returns the HepMC3Particle by its id. This is the ID
65
number from the original GenParticle and not the ID used by
66
MC-TESTER. */
67
HepMC3Particle
*
GetParticleWithId
(
int
id
);
68
69
/** Dummy function definition. Do not use */
70
void
SetParticle
(
int
idx, HEPParticle *particle) ;
71
72
/** Dummy function definition. Do not use */
73
void
AddParticle
( HEPParticle *particle);
74
75
/** Dummy function definition. Do not use */
76
void
Clear
(
int
fromIdx);
77
78
/** Dummy function definition. Do not use */
79
void
InsertParticle
(
int
at_idx,HEPParticle *p);
80
81
/** Dummy function definition. Do not use */
82
void
AddParticle
(
int
id
,
int
pdgid,
int
status,
83
int
mother,
int
mother2,
84
int
firstdaughter,
int
lastdaughter,
85
double
E,
double
px,
double
py,
double
pz,
double
m,
86
double
vx,
double
vy,
double
vz,
double
tau);
87
88
std::vector<double> * Sum4Momentum();
89
90
bool
CountSelfDecays() {
return
count_self_decays
; };
91
92
/** Implementation of FindParticle needed for excluding "self decays" */
93
HEPParticleList*
FindParticle
(
int
pdg, HEPParticleList *
list
);
94
95
private
:
96
HepMC3::GenEvent
*evt;
97
int
m_particle_count;
98
#ifdef _USE_ROOT_
99
ClassDef(
HepMC3Event
,1)
//Interface to HepMC event record
100
#endif
101
};
102
#endif
HepMC3Event::count_self_decays
bool count_self_decays
Definition:
HepMC3Event.h:37
HepMC3Event::FindParticle
HEPParticleList * FindParticle(int pdg, HEPParticleList *list)
HepMC3Event::SetNumOfParticles
void SetNumOfParticles(int n)
HepMC3Event::GetEventNumber
int GetEventNumber()
HepMC3Event::GetParticle
HEPParticle * GetParticle(int idx)
HepMC3Event::GetParticleWithId
HepMC3Particle * GetParticleWithId(int id)
HepMC3Event::SetEventNumber
void SetEventNumber(int ev)
HepMC3Event::~HepMC3Event
~HepMC3Event()
HepMC3Event::particles
HepMC3Particle ** particles
Definition:
HepMC3Event.h:34
HepMC3Event::Clear
void Clear(int fromIdx)
HepMC3::GenEvent
Stores event-related information.
Definition:
GenEvent.h:41
HepMC3Event::HepMC3Event
HepMC3Event(HepMC3::GenEvent &e, bool include_self_decay=true)
HepMC3Event
HEPEvent Interface to HepMC classes.
Definition:
HepMC3Event.h:30
list
Definition:
pytypes.h:1320
HepMC3Particle
HEPParticle interface to HepMC classes.
Definition:
HepMC3Particle.h:25
HepMC3Event::InsertParticle
void InsertParticle(int at_idx, HEPParticle *p)
GenEvent.h
Definition of class GenEvent.
HepMC3Event::SetParticle
void SetParticle(int idx, HEPParticle *particle)
HepMC3Event::GetNumOfParticles
int GetNumOfParticles()
HepMC3Event::AddParticle
void AddParticle(HEPParticle *particle)
Generated on Mon Jan 4 2021 09:07:26 for HepMC3 event record library by
1.8.5