Belle II Software  release-08-01-10
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.
 
BParticleoperator+= (const BParticle &)
 Operator to add particle.
 
 BParticle (float px, float py, float pz, float energy, float charge, SIMPLEPID pid, float logL_e=0, float logL_mu=0, float logL_pi=0, float logL_k=0, float logL_p=0, float logL_d=0)
 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 logL_e () const
 Get the log likelihood for electron hypothesis. More...
 
float logL_mu () const
 Get the log likelihood for muon hypothesis. More...
 
float logL_pi () const
 Get the log likelihood for pion hypothesis. More...
 
float logL_k () const
 Get the log likelihood for kaon hypothesis. More...
 
float logL_p () const
 Get the log likelihood for proton hypothesis. More...
 
float logL_d () const
 Get the log likelihood for deuteron hypothesis. More...
 
float GetLogL (SIMPLEPID pid)
 Get the log likelihood for a particle hypothesis. More...
 
float GetPID (SIMPLEPID pid)
 Get the log likelihood ratio for a particle hypothesis with respect to all other hypotheses. More...
 
float GetBinPID (SIMPLEPID pid1, SIMPLEPID pid2)
 Get the binary log likelihood ratio for a particle hypothesis with respect to a second hypothesis. 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...
 
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
 
float m_logL_e
 log likelihood of the electron hypothesis
 
float m_logL_mu
 log likelihood of the muon hypothesis
 
float m_logL_pi
 log likelihood of the pion hypothesis
 
float m_logL_k
 log likelihood of the kaon hypothesis
 
float m_logL_p
 log likelihood of the proton hypothesis
 
float m_logL_d
 log likelihood of the deuteron hypothesis
 

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,
float  logL_e = 0,
float  logL_mu = 0,
float  logL_pi = 0,
float  logL_k = 0,
float  logL_p = 0,
float  logL_d = 0 
)

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
logL_e- log likelihood of the electron hypothesis
logL_mu- log likelihood of the muon hypothesis
logL_pi- log likelihood of the pion hypothesis
logL_k- log likelihood of the kaon hypothesis
logL_p- log likelihood of the proton hypothesis
logL_d- log likelihood of the deuteron hypothesis

Definition at line 13 of file BParticle.cc.

16 {
17  m_px = px;
18  m_py = py;
19  m_pz = pz;
20  m_e = e;
21  m_charge = charge;
22  m_pid = pid;
23  m_logL_e = logL_e;
26  m_logL_k = logL_k;
27  m_logL_p = logL_p;
28  m_logL_d = logL_d;
29 }
float m_logL_pi
log likelihood of the pion hypothesis
Definition: BParticle.h:29
SIMPLEPID pid() const
Get the particle identity.
Definition: BParticle.h:101
float m_logL_p
log likelihood of the proton hypothesis
Definition: BParticle.h:31
float logL_pi() const
Get the log likelihood for pion hypothesis.
Definition: BParticle.h:116
float m_e
energy of the particle
Definition: BParticle.h:24
SIMPLEPID m_pid
particle identity
Definition: BParticle.h:26
float m_logL_mu
log likelihood of the muon hypothesis
Definition: BParticle.h:28
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:67
float m_logL_e
log likelihood of the electron hypothesis
Definition: BParticle.h:27
float charge() const
Get the particle charge.
Definition: BParticle.h:94
float logL_p() const
Get the log likelihood for proton hypothesis.
Definition: BParticle.h:126
float m_pz
z component of the particle momentum
Definition: BParticle.h:23
float logL_e() const
Get the log likelihood for electron hypothesis.
Definition: BParticle.h:106
float e() const
Definition: BParticle.h:79
float logL_mu() const
Get the log likelihood for muon hypothesis.
Definition: BParticle.h:111
float m_px
x component of the particle momentum
Definition: BParticle.h:21
float logL_k() const
Get the log likelihood for kaon hypothesis.
Definition: BParticle.h:121
float py() const
Definition: BParticle.h:71
float m_logL_k
log likelihood of the kaon hypothesis
Definition: BParticle.h:30
float m_logL_d
log likelihood of the deuteron hypothesis
Definition: BParticle.h:32
float logL_d() const
Get the log likelihood for deuteron hypothesis.
Definition: BParticle.h:131
float pz() const
z
Definition: BParticle.h:75

Member Function Documentation

◆ charge()

float charge ( ) const
inline

Get the particle charge.

Returns
particle unit charge

Definition at line 94 of file BParticle.h.

94 { return m_charge; };

◆ e()

float e ( ) const
inline
Returns
particle energy GeV

Definition at line 79 of file BParticle.h.

◆ GetBinPID()

float GetBinPID ( SIMPLEPID  pid1,
SIMPLEPID  pid2 
)

Get the binary log likelihood ratio for a particle hypothesis with respect to a second hypothesis.

Parameters
pid1particle identity
pid2particle identity
Returns
the binary log likelihood ratio for two particle hypotheses

Definition at line 71 of file BParticle.cc.

◆ GetLogL()

float GetLogL ( SIMPLEPID  pid)

Get the log likelihood for a particle hypothesis.

Parameters
pidparticle identity
Returns
the log likelihood for a particle hypothesis

Definition at line 48 of file BParticle.cc.

◆ GetMass() [1/2]

float GetMass ( )

Get the mass of the particle.

Returns
mass of the particle GeV/c2

Definition at line 99 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 76 of file BParticle.cc.

◆ GetMomentum()

float GetMomentum ( ) const
inline

Get the momentum of the particle.

Returns
particle momentum GeV/c

Definition at line 84 of file BParticle.h.

◆ GetPID()

float GetPID ( SIMPLEPID  pid)

Get the log likelihood ratio for a particle hypothesis with respect to all other hypotheses.

Parameters
pidparticle identity
Returns
the log likelihood ratio for a particle hypothesis

Definition at line 61 of file BParticle.cc.

◆ GetTransverseMomentum()

float GetTransverseMomentum ( ) const
inline

Get the transverse momentum of the particle.

Returns
transverse particle momentum GeV/c

Definition at line 89 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 189 of file BParticle.h.

◆ logL_d()

float logL_d ( ) const
inline

Get the log likelihood for deuteron hypothesis.

Returns
the log likelihood for deuteron hypothesis

Definition at line 131 of file BParticle.h.

◆ logL_e()

float logL_e ( ) const
inline

Get the log likelihood for electron hypothesis.

Returns
the log likelihood for electron hypothesis

Definition at line 106 of file BParticle.h.

◆ logL_k()

float logL_k ( ) const
inline

Get the log likelihood for kaon hypothesis.

Returns
the log likelihood for kaon hypothesis

Definition at line 121 of file BParticle.h.

◆ logL_mu()

float logL_mu ( ) const
inline

Get the log likelihood for muon hypothesis.

Returns
the log likelihood for muon hypothesis

Definition at line 111 of file BParticle.h.

◆ logL_p()

float logL_p ( ) const
inline

Get the log likelihood for proton hypothesis.

Returns
the log likelihood for proton hypothesis

Definition at line 126 of file BParticle.h.

◆ logL_pi()

float logL_pi ( ) const
inline

Get the log likelihood for pion hypothesis.

Returns
the log likelihood for pion hypothesis

Definition at line 116 of file BParticle.h.

◆ pid()

SIMPLEPID pid ( ) const
inline

Get the particle identity.

Returns
the particle identity

Definition at line 101 of file BParticle.h.

◆ px()

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

Definition at line 67 of file BParticle.h.

◆ py()

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

Definition at line 71 of file BParticle.h.

◆ pz()

float pz ( ) const
inline

z

Returns
z component of the particle momentum GeV/c

Definition at line 75 of file BParticle.h.

◆ SetEnergyFromMass()

void SetEnergyFromMass ( float  mass)

Recalculate energy from particle mass and momentum.

Parameters
massof the particle

Definition at line 106 of file BParticle.cc.

◆ SetPid()

void SetPid ( SIMPLEPID  pid)
inline

Set particle identity.

Parameters
pid- particle identity

Definition at line 181 of file BParticle.h.


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