#ifndef ALIHBTPARTICLE #define ALIHBTPARTICLE //Ali HBT Particle: simplified class TParticle //Simplified in order to minimize the size of object // - we want to keep a lot of such a objects in memory #include #include #include #include class TParticle; class AliHBTParticle : public TObject { public: // ****** constructors and destructor AliHBTParticle(); AliHBTParticle(Int_t pdg, Double_t px, Double_t py, Double_t pz, Double_t etot, Double_t vx, Double_t vy, Double_t vz, Double_t time); AliHBTParticle(const TParticle& p); virtual ~AliHBTParticle(){}; Int_t GetPdgCode () const { return fPdgCode; } Double_t GetCalcMass () const { return fCalcMass; } Double_t GetMass () { return GetPDG()->Mass();} TParticlePDG* GetPDG (){return TDatabasePDG::Instance()->GetParticle(fPdgCode);} Int_t Beauty () { return GetPDG()->Beauty(); } Int_t Charm () { return GetPDG()->Charm(); } Int_t Strangeness () { return GetPDG()->Strangeness();} void ProductionVertex(TLorentzVector &v) { v.SetXYZT(fVx,fVy,fVz,fVt);} Double_t Vx () const { return fVx;} Double_t Vy () const { return fVy;} Double_t Vz () const { return fVz;} Double_t T () const { return fVt;} Double_t Px () const { return fPx; } //X coordinate of the momentum Double_t Py () const { return fPy; } //Y coordinate of the momentum Double_t Pz () const { return fPz; } //Z coordinate of the momentum Double_t P () const //momentum { return TMath::Sqrt(fPx*fPx+fPy*fPy+fPz*fPz); } void Momentum(TLorentzVector &v) { v.SetPxPyPzE(fPx,fPy,fPz,fE);} Double_t Pt () const //transverse momentum { return TMath::Sqrt(fPx*fPx+fPy*fPy); } Double_t Energy() const { return fE; } //Pseudo Rapidity Double_t Eta () const { if (P() != fPz) return 0.5*TMath::Log((P()+fPz)/(P()-fPz)); else return 1.e30;} //Rapidity Double_t Y () const { if (fE != fPz) return 0.5*TMath::Log((fE+fPz)/(fE-fPz)); else return 1.e30;} Double_t Phi () const { return kPI+TMath::ATan2(-fPy,-fPx); } Double_t Theta () const { return (fPz==0)?kPI/2:TMath::ACos(fPz/P()); } // setters void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e) {fPx=px; fPy=py; fPz=pz; fE=e;} void SetMomentum(const TLorentzVector& p) {SetMomentum(p.Px(),p.Py(),p.Pz(),p.Energy());} void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz, Double_t t) {fVx=vx; fVy=vy; fVz=vz; fVt=t;} void SetProductionVertex(const TLorentzVector& v) {SetProductionVertex(v.X(),v.Y(),v.Z(),v.T());} const Char_t* GetName() const; protected: Int_t fPdgCode; // PDG code of the particle Double_t fCalcMass; // Calculated mass Double_t fPx; // x component of momentum Double_t fPy; // y component of momentum Double_t fPz; // z component of momentum Double_t fE; // Energy Double_t fVx; // x of production vertex Double_t fVy; // y of production vertex Double_t fVz; // z of production vertex Double_t fVt; // t of production vertex public: ClassDef(AliHBTParticle,1) // TParticle vertex particle information }; #endif