3 //___________________________________________________________
4 /////////////////////////////////////////////////////////////
6 // class AliHBTParticle
8 // Ali HBT Particle: simplified class TParticle
9 // Simplified in order to minimize the size of object
10 // - we want to keep a lot of such a objects in memory
11 // Additionaly adjusted for HBT Analysies purposes
13 /////////////////////////////////////////////////////////////
16 #include <TLorentzVector.h>
18 #include <TDatabasePDG.h>
23 class AliHBTTrackPoints;
24 class AliHBTClusterMap;
26 class AliHBTParticle : public TObject
30 // ****** constructors and destructor
32 AliHBTParticle(const AliHBTParticle& in);
34 AliHBTParticle(Int_t pdg, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
35 Double_t vx, Double_t vy, Double_t vz, Double_t time);
37 AliHBTParticle(Int_t pdg, Float_t prob, Int_t idx, Double_t px, Double_t py, Double_t pz, Double_t etot,
38 Double_t vx, Double_t vy, Double_t vz, Double_t time);
40 AliHBTParticle(const TParticle& p,Int_t idx);
42 virtual ~AliHBTParticle();
44 AliHBTParticle& operator=(const AliHBTParticle& in);
46 void SetPIDprobability(Int_t pdg, Float_t prob = 1.0);
47 Float_t GetPIDprobability(Int_t pdg);
49 Int_t GetPdgCode () const { return (fPids)?fPids[fPdgIdx]:0;}
50 Int_t GetPid () const { return GetPdgCode();}
51 Float_t GetPidProb () const { return (fPidProb)?fPidProb[fPdgIdx]:0;}
53 Int_t GetUID () const { return fIdxInEvent;}
54 Int_t GetNumberOfPids () const { return fNPids;}
55 Int_t GetNthPid (Int_t idx) const;
56 Float_t GetNthPidProb (Int_t idx) const;
58 void SetPdgCode(Int_t pdg, Float_t prob = 1.0);
59 Double_t GetCalcMass () const { return fCalcMass; }
60 Double_t GetMass () { return (GetPDG())?GetPDG()->Mass():-1.;}
62 TParticlePDG* GetPDG (){return TDatabasePDG::Instance()->GetParticle(GetPdgCode());}
64 Int_t Beauty () { return GetPDG()->Beauty(); }
65 Int_t Charm () { return GetPDG()->Charm(); }
66 Int_t Strangeness () { return GetPDG()->Strangeness();}
67 void ProductionVertex(TLorentzVector &v) { v.SetXYZT(fVx,fVy,fVz,fVt);}
70 Double_t Vx () const { return fVx;}
71 Double_t Vy () const { return fVy;}
72 Double_t Vz () const { return fVz;}
73 Double_t T () const { return fVt;}
75 Double_t Px () const { return fPx; } //X coordinate of the momentum
76 Double_t Py () const { return fPy; } //Y coordinate of the momentum
77 Double_t Pz () const { return fPz; } //Z coordinate of the momentum
78 Double_t P () const //momentum
79 { return TMath::Sqrt(fPx*fPx+fPy*fPy+fPz*fPz); }
81 void Momentum(TLorentzVector &v) { v.SetPxPyPzE(fPx,fPy,fPz,fE);}
83 Double_t Pt () const //transverse momentum
84 { return TMath::Sqrt(fPx*fPx+fPy*fPy); }
85 Double_t Energy() const { return fE; }
88 Double_t Eta () const { if (P() != fPz) return 0.5*TMath::Log((P()+fPz)/(P()-fPz));
92 Double_t Y () const { if (fE != fPz) return 0.5*TMath::Log((fE+fPz)/(fE-fPz));
95 Double_t Phi () const { return TMath::Pi()+TMath::ATan2(-fPy,-fPx); }
97 Double_t Theta () const { return (fPz==0)?TMath::PiOver2():TMath::ACos(fPz/P()); }
101 void SetMomentum(Double_t px, Double_t py, Double_t pz, Double_t e)
102 {fPx=px; fPy=py; fPz=pz; fE=e;}
103 void SetMomentum(const TLorentzVector& p)
104 {SetMomentum(p.Px(),p.Py(),p.Pz(),p.Energy());}
106 void SetProductionVertex(Double_t vx, Double_t vy, Double_t vz, Double_t t)
107 {fVx=vx; fVy=vy; fVz=vz; fVt=t;}
108 void SetProductionVertex(const TLorentzVector& v)
109 {SetProductionVertex(v.X(),v.Y(),v.Z(),v.T());}
110 void SetCalcMass(Double_t mass) {fCalcMass = mass;}
112 void SetUID(Int_t id){fIdxInEvent = id;}
114 const Char_t* GetName() const;
117 void SetTrackPoints(AliHBTTrackPoints* tpts){fTrackPoints = tpts;}
118 AliHBTTrackPoints* GetTrackPoints() const {return fTrackPoints;}
119 void SetClusterMap(AliHBTClusterMap* cm){fClusterMap = cm;}
120 AliHBTClusterMap* GetClusterMap() const {return fClusterMap;}
122 static void SetDebug(Int_t dbg=1){fgDebug=dbg;}
123 static Int_t GetDebug(){return fgDebug;}
124 static Int_t fgDebug; //debug printout level
127 Int_t GetPidSlot(Int_t pdg) const;//returns position of the given PID in fPids (and fPidProb) array.
130 Char_t fPdgIdx; // index of PDG code of the particle in fPids
131 Int_t fIdxInEvent; // index of a particle: the same particle can appear in the event
132 // many times with different pid's. Idx allows to check that they are the same particles
133 Int_t fNPids; // number of non-zero proboble Pids
134 Int_t *fPids; // [fNPids] Array with PIDs
135 Float_t *fPidProb; // [fNPids] PIDs probabilities
136 Double_t fCalcMass; // Calculated mass
138 Double_t fPx; // x component of momentum
139 Double_t fPy; // y component of momentum
140 Double_t fPz; // z component of momentum
141 Double_t fE; // Energy
143 Double_t fVx; // x of production vertex
144 Double_t fVy; // y of production vertex
145 Double_t fVz; // z of production vertex
146 Double_t fVt; // t of production vertex
148 AliHBTTrackPoints* fTrackPoints; // track positions along trajectory - used by anti-merging cut
149 AliHBTClusterMap* fClusterMap; // bit map of cluters occupation; 1 if has cluter on given layer/padrow/...
151 ClassDef(AliHBTParticle,3) // TParticle vertex particle information