4 //Ali HBT Particle: simplified class TParticle
5 //Simplified in order to minimize the size of object
6 // - we want to keep a lot of such a objects in memory
9 #include <TLorentzVector.h>
11 #include <TDatabasePDG.h>
15 class AliHBTParticle : public TObject
19 // ****** constructors and destructor
21 AliHBTParticle(const AliHBTParticle& in);
23 AliHBTParticle(Int_t pdg, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
24 Double_t vx, Double_t vy, Double_t vz, Double_t time);
26 AliHBTParticle(Int_t pdg, Float_t prob, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
27 Double_t vx, Double_t vy, Double_t vz, Double_t time);
29 AliHBTParticle(const TParticle& p,Int_t idx);
31 virtual ~AliHBTParticle(){};
33 void SetPIDprobability(Int_t pdg, Float_t prob = 1.0);
34 Float_t GetPIDprobability(Int_t pdg);
36 Int_t GetPdgCode () const { return (fPids)?fPids[fPdgIdx]:0;}
37 Int_t GetPid () const { return GetPdgCode();}
38 Float_t GetPidProb () const { return (fPidProb)?fPidProb[fPdgIdx]:0;}
40 Int_t GetUID () const { return fIdxInEvent;}
42 void SetPdgCode(Int_t pdg, Float_t prob = 1.0);
43 Double_t GetCalcMass () const { return fCalcMass; }
44 Double_t GetMass () { return (GetPDG())?GetPDG()->Mass():-1.;}
46 TParticlePDG* GetPDG (){return TDatabasePDG::Instance()->GetParticle(GetPdgCode());}
48 Int_t Beauty () { return GetPDG()->Beauty(); }
49 Int_t Charm () { return GetPDG()->Charm(); }
50 Int_t Strangeness () { return GetPDG()->Strangeness();}
51 void ProductionVertex(TLorentzVector &v) { v.SetXYZT(fVx,fVy,fVz,fVt);}
54 Double_t Vx () const { return fVx;}
55 Double_t Vy () const { return fVy;}
56 Double_t Vz () const { return fVz;}
57 Double_t T () const { return fVt;}
59 Double_t Px () const { return fPx; } //X coordinate of the momentum
60 Double_t Py () const { return fPy; } //Y coordinate of the momentum
61 Double_t Pz () const { return fPz; } //Z coordinate of the momentum
62 Double_t P () const //momentum
63 { return TMath::Sqrt(fPx*fPx+fPy*fPy+fPz*fPz); }
65 void Momentum(TLorentzVector &v) { v.SetPxPyPzE(fPx,fPy,fPz,fE);}
67 Double_t Pt () const //transverse momentum
68 { return TMath::Sqrt(fPx*fPx+fPy*fPy); }
69 Double_t Energy() const { return fE; }
72 Double_t Eta () const { if (P() != fPz) return 0.5*TMath::Log((P()+fPz)/(P()-fPz));
76 Double_t Y () const { if (fE != fPz) return 0.5*TMath::Log((fE+fPz)/(fE-fPz));
79 Double_t Phi () const { return kPI+TMath::ATan2(-fPy,-fPx); }
81 Double_t Theta () const { return (fPz==0)?kPI/2:TMath::ACos(fPz/P()); }
86 void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
87 {fPx=px; fPy=py; fPz=pz; fE=e;}
88 void SetMomentum(const TLorentzVector& p)
89 {SetMomentum(p.Px(),p.Py(),p.Pz(),p.Energy());}
91 void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz, Double_t t)
92 {fVx=vx; fVy=vy; fVz=vz; fVt=t;}
93 void SetProductionVertex(const TLorentzVector& v)
94 {SetProductionVertex(v.X(),v.Y(),v.Z(),v.T());}
95 const Char_t* GetName() const;
98 static void SetDebug(Int_t dbg=1){fgDebug=dbg;}
99 static Int_t GetDebug(){return fgDebug;}
100 static Int_t fgDebug; //debug printout level
103 Int_t GetPidSlot(Int_t pdg) const;//returns position of the given PID in fPids (and fPidProb) array.
106 Char_t fPdgIdx; // index of PDG code of the particle in fPids
107 Int_t fIdxInEvent; // index of a particle: the same particle can appear in the event
108 // many times with different pid's. Idx allows to check that they are the same particles
109 Int_t fNPids; // number of non-zero proboble Pids
110 Int_t *fPids; // [fNPids] Array with PIDs
111 Float_t *fPidProb; // [fNPids] PIDs probabilities
112 Double_t fCalcMass; // Calculated mass
114 Double_t fPx; // x component of momentum
115 Double_t fPy; // y component of momentum
116 Double_t fPz; // z component of momentum
117 Double_t fE; // Energy
119 Double_t fVx; // x of production vertex
120 Double_t fVy; // y of production vertex
121 Double_t fVz; // z of production vertex
122 Double_t fVt; // t of production vertex
124 ClassDef(AliHBTParticle,2) // TParticle vertex particle information