12#include <TClonesArray.h>
14enum SIMPLEPID {PHOTON, ELECTRON, PION, MUON, KAON, PROTON, JPSI, D, DSTAR, B, PHI, LAMBDA0, DEUTERON, ALL };
79 float e()
const {
return m_e; };
150 float GetBinPID(SIMPLEPID pid1, SIMPLEPID pid2);
189 int InMassRange(
float mlower,
float mupper) {
float m =
GetMass();
if (m >= mlower && m <= mupper)
return 1;
else return 0; };
212int SelectParticles(TClonesArray* pin,
int charge, SIMPLEPID type, TClonesArray* pout);
214int CombineParticles(TClonesArray* plist1, TClonesArray* plist2,
int same,
float masslow,
float massup, SIMPLEPID pid,
The Class for Masterclass particle information This class provides the data structure of the particle...
float m_logL_pi
log likelihood of the pion hypothesis
void SetEnergyFromMass(float mass)
Recalculate energy from particle mass and momentum.
SIMPLEPID pid() const
Get the particle identity.
void SetPid(SIMPLEPID pid)
Set particle identity.
float m_logL_p
log likelihood of the proton hypothesis
float GetLogL(SIMPLEPID pid)
Get the log likelihood for a particle hypothesis.
float logL_pi() const
Get the log likelihood for pion hypothesis.
float GetPID(SIMPLEPID pid)
Get the log likelihood ratio for a particle hypothesis with respect to all other hypotheses.
float GetMomentum() const
Get the momentum of the particle.
float m_e
energy of the particle
SIMPLEPID m_pid
particle identity
float GetTransverseMomentum() const
Get the transverse momentum of the particle.
float m_logL_mu
log likelihood of the muon hypothesis
float m_py
y component of the particle momentum
float m_charge
charge of the particle
void SetEnergyFromPid()
Recalculate energy from particle identity and momentum.
BParticle & operator=(const BParticle &p)
Assign a particle.
float m_logL_e
log likelihood of the electron hypothesis
~BParticle()
Default destructor.
BParticle(const BParticle &)=default
Constructor using the particle.
BParticle & operator+=(const BParticle &)
Operator to add particle.
float charge() const
Get the particle charge.
float GetBinPID(SIMPLEPID pid1, SIMPLEPID pid2)
Get the binary log likelihood ratio for a particle hypothesis with respect to a second hypothesis.
float logL_p() const
Get the log likelihood for proton hypothesis.
float m_pz
z component of the particle momentum
float logL_e() const
Get the log likelihood for electron hypothesis.
float logL_mu() const
Get the log likelihood for muon hypothesis.
float m_px
x component of the particle momentum
float logL_k() const
Get the log likelihood for kaon hypothesis.
BParticle()
Default constructor.
int InMassRange(float mlower, float mupper)
Test if the mass is in range.
float m_logL_k
log likelihood of the kaon hypothesis
float GetMass()
Get the mass of the particle.
float m_logL_d
log likelihood of the deuteron hypothesis
float logL_d() const
Get the log likelihood for deuteron hypothesis.