Belle II Software development
BEvent Class Reference

The Class for Masterclass event parameters. More...

#include <BEvent.h>

Inheritance diagram for BEvent:

Public Member Functions

 BEvent ()
 Default constructor.
 
 ~BEvent ()
 Default destructor.
 
virtual void Clear (Option_t *="")
 Clear the array of particles.
 
void EventNo (int evtno)
 Set the current event number.
 
int EventNo ()
 Get the current event number.
 
void AddTrack (float px, float py, float pz, float e, float charge, SIMPLEPID pid)
 Add the track to the event.
 
void AddTrack (float px, float py, float pz, float e, float charge, SIMPLEPID pid, float logL_e, float logL_mu, float logL_pi, float logL_k, float logL_p, float logL_d)
 Add the track to the event.
 
int NParticles ()
 Get the number of particles in the event.
 
TClonesArray * GetParticleList ()
 Get the array of particles in the event.
 

Private Attributes

int m_evno
 current event number
 
int m_nprt
 number of particles in the event
 
TClonesArray * m_particles
 array of particles
 

Detailed Description

The Class for Masterclass event parameters.

This class provides the data structure to write out the data files used for Belle II Masterclass application.

Definition at line 19 of file BEvent.h.

Constructor & Destructor Documentation

◆ BEvent()

BEvent ( )

Default constructor.

Definition at line 12 of file BEvent.cc.

12 :
13 m_evno{0},
14 m_nprt{0}
15{
16 m_particles = new TClonesArray("BParticle", 500);
17}
TClonesArray * m_particles
array of particles
Definition: BEvent.h:23
int m_nprt
number of particles in the event
Definition: BEvent.h:22
int m_evno
current event number
Definition: BEvent.h:21

◆ ~BEvent()

~BEvent ( )

Default destructor.

Definition at line 19 of file BEvent.cc.

20{
21 delete m_particles;
22}

Member Function Documentation

◆ AddTrack() [1/2]

void AddTrack ( float  px,
float  py,
float  pz,
float  e,
float  charge,
SIMPLEPID  pid 
)

Add the track to the event.

Parameters
px- x component of the particle momentum
py- y component of the particle momentum
pz- z component of the particle momentum
e- energy of the particle
charge- unit charge of the particle
pid- particle identity - hypothesis with the highest maximum likelihood

Definition at line 34 of file BEvent.cc.

36{
37 new ((*m_particles)[m_nprt++]) BParticle(px, py, pz, e, charge, pid);
38}
The Class for Masterclass particle information This class provides the data structure of the particle...
Definition: BParticle.h:18

◆ AddTrack() [2/2]

void AddTrack ( float  px,
float  py,
float  pz,
float  e,
float  charge,
SIMPLEPID  pid,
float  logL_e,
float  logL_mu,
float  logL_pi,
float  logL_k,
float  logL_p,
float  logL_d 
)

Add the track to the event.

Parameters
px- x component of the particle momentum
py- y component of the particle momentum
pz- z component of the particle momentum
e- energy of the particle
charge- unit charge of the particle
pid- particle identity - hypothesis with the highest maximum likelihood
logL_e- log likelihood for electron hypothesis
logL_mu- log likelihood for muon hypothesis
logL_pi- log likelihood for pion hypothesis
logL_k- log likelihood for kaon hypothesis
logL_p- log likelihood for proton hypothesis
logL_d- log likelihood for deuteron hypothesis

Definition at line 40 of file BEvent.cc.

43{
44 new ((*m_particles)[m_nprt++]) BParticle(px, py, pz, e, charge, pid, logL_e, logL_mu, logL_pi, logL_k, logL_p, logL_d);
45}

◆ Clear()

void Clear ( Option_t *  = "")
virtual

Clear the array of particles.

Definition at line 57 of file BEvent.cc.

58{
59 m_particles->Clear();
60 m_nprt = 0;
61}

◆ EventNo() [1/2]

int EventNo ( )

Get the current event number.

Definition at line 29 of file BEvent.cc.

30{
31 return m_evno;
32}

◆ EventNo() [2/2]

void EventNo ( int  evtno)

Set the current event number.

Definition at line 24 of file BEvent.cc.

25{
26 m_evno = evt;
27}

◆ GetParticleList()

TClonesArray * GetParticleList ( )

Get the array of particles in the event.

Returns
array of particles

Definition at line 52 of file BEvent.cc.

53{
54 return m_particles;
55}

◆ NParticles()

int NParticles ( )

Get the number of particles in the event.

Returns
number of particles in the event

Definition at line 47 of file BEvent.cc.

48{
49 return m_nprt;
50}

Member Data Documentation

◆ m_evno

int m_evno
private

current event number

Definition at line 21 of file BEvent.h.

◆ m_nprt

int m_nprt
private

number of particles in the event

Definition at line 22 of file BEvent.h.

◆ m_particles

TClonesArray* m_particles
private

array of particles

Definition at line 23 of file BEvent.h.


The documentation for this class was generated from the following files: