9#include "masterclass/dataobjects/BParticle.h"
14 float charge, SIMPLEPID pid,
15 float logL_e,
float logL_mu,
float logL_pi,
float logL_k,
float logL_p,
float logL_d)
64 for (
int i = 0; i < 6; i++) {
65 sum += exp(
GetLogL(SIMPLEPID(i)));
80 case PHOTON:
return 0;
81 case ELECTRON:
return 0.00051;
82 case PION:
return 0.139;
83 case MUON:
return 0.105;
84 case KAON:
return 0.497;
85 case PROTON:
return 0.938;
86 case JPSI:
return 3.1;
88 case DSTAR:
return 2.01;
90 case PHI:
return 1.02;
91 case LAMBDA0:
return 1.115683;
92 case DEUTERON:
return 1.8756;
108 if (mass < 0)
return;
118int SelectParticles(TClonesArray* pin,
int charge, SIMPLEPID type, TClonesArray* pout)
124 if (p->charge() == charge && p->pid() == type) {
125 TClonesArray& list = *pout;
132int CombineParticles(TClonesArray* plist1, TClonesArray* plist2,
int same,
float masslow,
float massup, SIMPLEPID pid,
141 for (TIter next2 = (plist1 != plist2
142 && same == 0) ? TIter(plist2) : TIter(next1) ;
const BParticle* p2 =
dynamic_cast<BParticle*
>(next2());) {
144 if (p.InMassRange(masslow, massup)) {
146 TClonesArray& list = *pout;
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.
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 m_e
energy of the particle
SIMPLEPID m_pid
particle identity
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.
float m_logL_e
log likelihood of the electron hypothesis
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.
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.