12 #include "TClonesArray.h"
14 enum SIMPLEPID {PHOTON, ELECTRON, PION, MUON, KAON, PROTON, JPSI, D, DSTAR, B, PHI, LAMBDA0, ALL };
64 float e()
const {
return m_e; };
124 int InMassRange(
float mlower,
float mupper) {
float m =
GetMass();
if (m >= mlower && m <= mupper)
return 1;
else return 0; };
157 int SelectParticles(TClonesArray* pin ,
int charge, SIMPLEPID type, TClonesArray* pout);
159 int 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...
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.
BParticle & operator=(const BParticle &p)
Assign a particle.
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_py
y component of the particle momentum
float m_charge
charge of the particle
void SetEnergyFromPid()
Recalculate energy from particle identity and momentum.
~BParticle()
Default destructor.
BParticle(const BParticle &)=default
Constructor using the particle.
float charge() const
Get the particle charge.
float m_pz
z component of the particle momentum
float m_px
x component of the particle momentum
BParticle()
Default constructor.
int InMassRange(float mlower, float mupper)
Test if the mass is in range.
float GetMass()
Get the mass of the particle.
BParticle operator+(const BParticle &b)
Adds to particles.