// ----------------------------------------------------------------------------- // ----- R3BPrimPart ----- // ----- Created 12-07-2011 by D.Kresan ----- // ----------------------------------------------------------------------------- #include #include "R3BPrimPart.h" ClassImp(R3BPrimPart) // ----------------------------------------------------------------------------- R3BPrimPart::R3BPrimPart() { fPdg = 0; fPx = 0.; fPy = 0.; fPz = 0.; fX = 0.; fY = 0.; fZ = 0.; fT = 0.; fA = 0.; fM = 0.; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- R3BPrimPart::R3BPrimPart(Int_t pdg, Double_t px, Double_t py, Double_t pz, Double_t x, Double_t y, Double_t z, Double_t t, Double_t A, Double_t M) { fPdg = pdg; fPx = px; fPy = py; fPz = pz; fX = x; fY = y; fZ = z; fT = t; fA = A; fM = M; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- R3BPrimPart::~R3BPrimPart() { } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- Int_t R3BPrimPart::GetPdgCode() const { return fPdg; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- void R3BPrimPart::Momentum(TVector3 &mom) const { mom.SetXYZ(fPx, fPy, fPz); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- void R3BPrimPart::Position(TVector3 &pos) const { pos.SetXYZ(fX, fY, fZ); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- Double_t R3BPrimPart::GetT() const { return fT; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- Double_t R3BPrimPart::GetA() const { return fA; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- Double_t R3BPrimPart::GetM() const { return fM; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- Double_t R3BPrimPart::GetE() const { TVector3 mom; Momentum(mom); return sqrt(mom.Mag2() + GetM2()); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- Double_t R3BPrimPart::GetM2() const { return fM*fM; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- Double_t R3BPrimPart::GetBeta() const { TVector3 mom; Momentum(mom); return mom.Mag()/GetE(); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- Double_t R3BPrimPart::GetGamma() const { return 1./sqrt(1.-pow(GetBeta(),2)); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- void R3BPrimPart::SetPz(const Double_t& pz) { fPz = pz; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- void R3BPrimPart::SetA(const Double_t& a) { fA = a; } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- void R3BPrimPart::SetM(const Double_t& m) { fM = m; } // -----------------------------------------------------------------------------