Belle II Software  release-06-00-14
BParticle Class Reference

The Class for Masterclass particle information This class provides the data structure of the particle that are used by Belle II Masterclass application. More...

#include <BParticle.h>

Inheritance diagram for BParticle:
Collaboration diagram for BParticle:

Public Member Functions

 BParticle ()
 Default constructor.
 
 BParticle (const BParticle &)=default
 Constructor using the particle.
 
 BParticle (float px, float py, float pz, float energy, float charge, SIMPLEPID pid)
 Constructor of fthe particle. More...
 
 ~BParticle ()
 Default destructor.
 
float px () const
 
float py () const
 
float pz () const
 z More...
 
float e () const
 
float GetMomentum () const
 Get the momentum of the particle. More...
 
float GetTransverseMomentum () const
 Get the transverse momentum of the particle. More...
 
float charge () const
 Get the particle charge. More...
 
SIMPLEPID pid () const
 Get the particle identity. More...
 
float GetMass (SIMPLEPID pid)
 Get the mass of the particle with the identity. More...
 
float GetMass ()
 Get the mass of the particle. More...
 
void SetEnergyFromMass (float mass)
 Recalculate energy from particle mass and momentum. More...
 
void SetEnergyFromPid ()
 Recalculate energy from particle identity and momentum.
 
void SetPid (SIMPLEPID pid)
 Set particle identity. More...
 
int InMassRange (float mlower, float mupper)
 Test if the mass is in range. More...
 
BParticle operator+ (const BParticle &b)
 Adds to particles.
 
BParticleoperator= (const BParticle &p)
 Assign a particle.
 

Private Attributes

float m_px
 x component of the particle momentum
 
float m_py
 y component of the particle momentum
 
float m_pz
 z component of the particle momentum
 
float m_e
 energy of the particle
 
float m_charge
 charge of the particle
 
SIMPLEPID m_pid
 particle identity
 

Detailed Description

The Class for Masterclass particle information This class provides the data structure of the particle that are used by Belle II Masterclass application.

Definition at line 18 of file BParticle.h.

Constructor & Destructor Documentation

◆ BParticle()

BParticle ( float  px,
float  py,
float  pz,
float  energy,
float  charge,
SIMPLEPID  pid 
)

Constructor of fthe particle.

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

Definition at line 12 of file BParticle.cc.

14 {
15  m_px = px;
16  m_py = py;
17  m_pz = pz;
18  m_e = e;
19  m_charge = charge;
20  m_pid = pid;
21 }
SIMPLEPID pid() const
Get the particle identity.
Definition: BParticle.h:86
float m_e
energy of the particle
Definition: BParticle.h:24
SIMPLEPID m_pid
particle identity
Definition: BParticle.h:26
float m_py
y component of the particle momentum
Definition: BParticle.h:22
float m_charge
charge of the particle
Definition: BParticle.h:25
float px() const
Definition: BParticle.h:52
float charge() const
Get the particle charge.
Definition: BParticle.h:79
float m_pz
z component of the particle momentum
Definition: BParticle.h:23
float e() const
Definition: BParticle.h:64
float m_px
x component of the particle momentum
Definition: BParticle.h:21
float py() const
Definition: BParticle.h:56
float pz() const
z
Definition: BParticle.h:60

Member Function Documentation

◆ charge()

float charge ( ) const
inline

Get the particle charge.

Returns
particle unit charge

Definition at line 79 of file BParticle.h.

79 { return m_charge; };

◆ e()

float e ( ) const
inline
Returns
particle energy GeV

Definition at line 64 of file BParticle.h.

◆ GetMass() [1/2]

float GetMass ( )

Get the mass of the particle.

Returns
mass of the particle GeV/c2

Definition at line 46 of file BParticle.cc.

◆ GetMass() [2/2]

float GetMass ( SIMPLEPID  pid)

Get the mass of the particle with the identity.

Parameters
pidparticle identity
Returns
mass of the particle GeV/c2

Definition at line 24 of file BParticle.cc.

◆ GetMomentum()

float GetMomentum ( ) const
inline

Get the momentum of the particle.

Returns
particle momentum GeV/c

Definition at line 69 of file BParticle.h.

◆ GetTransverseMomentum()

float GetTransverseMomentum ( ) const
inline

Get the transverse momentum of the particle.

Returns
transverse particle momentum GeV/c

Definition at line 74 of file BParticle.h.

◆ InMassRange()

int InMassRange ( float  mlower,
float  mupper 
)
inline

Test if the mass is in range.

Parameters
mlowerlower limit of the range
mupperupper limit of the range

Definition at line 124 of file BParticle.h.

◆ pid()

SIMPLEPID pid ( ) const
inline

Get the particle identity.

Returns
the particle identity

Definition at line 86 of file BParticle.h.

◆ px()

float px ( ) const
inline
Returns
x component of the particle momentum GeV/c

Definition at line 52 of file BParticle.h.

◆ py()

float py ( ) const
inline
Returns
y component of the particle momentum GeV/c

Definition at line 56 of file BParticle.h.

◆ pz()

float pz ( ) const
inline

z

Returns
z component of the particle momentum GeV/c

Definition at line 60 of file BParticle.h.

◆ SetEnergyFromMass()

void SetEnergyFromMass ( float  mass)

Recalculate energy from particle mass and momentum.

Parameters
massof the particle

Definition at line 53 of file BParticle.cc.

◆ SetPid()

void SetPid ( SIMPLEPID  pid)
inline

Set particle identity.

Parameters
pid- particle identity

Definition at line 116 of file BParticle.h.


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