]>
Commit | Line | Data |
---|---|---|
06351446 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * See cxx source for full Copyright notice * | |
4 | **************************************************************************/ | |
5 | ||
6 | // | |
7 | // Class AliRsnPairParticle | |
8 | // | |
9 | // Implementation of a pair of tracks, for several purposes | |
10 | // - computing the total 4-momentum & inv. mass for output histos filling | |
11 | // - evaluating cut checks on the pair of particles | |
12 | // | |
13 | // author: Martin Vala (martin.vala@cern.ch) | |
14 | // revised by: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it) | |
15 | // | |
16 | ||
17 | #ifndef ALIRSNPAIRPARTICLE_H | |
18 | #define ALIRSNPAIRPARTICLE_H | |
19 | ||
20 | #include <TMath.h> | |
21 | ||
22 | #include "AliRsnDaughter.h" | |
23 | #include "AliRsnMCInfo.h" | |
24 | ||
25 | class AliRsnPairParticle : public TObject | |
26 | { | |
aec0ec32 | 27 | public: |
06351446 | 28 | |
29 | AliRsnPairParticle(); | |
30 | AliRsnPairParticle(const AliRsnPairParticle &obj); | |
31 | AliRsnPairParticle& operator=(const AliRsnPairParticle &obj); | |
32 | virtual ~AliRsnPairParticle(); | |
33 | ||
aec0ec32 | 34 | Double_t GetInvMass(Double_t m1, Double_t m2); |
35 | Double_t GetInvMassMC(Double_t m1, Double_t m2); | |
36 | ||
37 | Double_t GetEtot(Double_t m1, Double_t m2) const; | |
e2bafbbc | 38 | Double_t GetP2() const {return (fPTot[0]*fPTot[0] + fPTot[1]*fPTot[1] + fPTot[2]*fPTot[2]);} |
39 | Double_t GetPt2() const {return (fPTot[0]*fPTot[0] + fPTot[1]*fPTot[1]);} | |
40 | Double_t GetP() const {return TMath::Sqrt(GetP2());} | |
41 | Double_t GetPx() const {return fPTot[0];} | |
42 | Double_t GetPy() const {return fPTot[1];} | |
43 | Double_t GetPz() const {return fPTot[2];} | |
44 | Double_t GetPt() const {return TMath::Sqrt(GetPt2());} | |
aec0ec32 | 45 | Double_t GetPhi() const {return TMath::Pi() + TMath::ATan2(-fPTot[1], -fPTot[0]);} |
46 | Double_t GetTheta() const {if(fPTot[2]==0.0){return TMath::PiOver2();}else{return TMath::ACos(fPTot[2]/GetP());}} | |
47 | Double_t GetEta() const {return -TMath::Log(TMath::ATan(0.5*GetTheta()));} | |
48 | Double_t GetY(Double_t m1, Double_t m2) const {return 0.5*TMath::Log((GetEtot(m1,m2)+fPTot[2])/(GetEtot(m1,m2)-fPTot[2]));} | |
e2bafbbc | 49 | |
aec0ec32 | 50 | Double_t GetEtotMC(Double_t m1, Double_t m2) const; |
e2bafbbc | 51 | Double_t GetP2MC() const {return (fPTotMC[0]*fPTotMC[0] + fPTotMC[1]*fPTotMC[1] + fPTotMC[2]*fPTotMC[2]);} |
52 | Double_t GetPt2MC() const {return (fPTotMC[0]*fPTotMC[0] + fPTotMC[1]*fPTotMC[1]);} | |
53 | Double_t GetPMC() const {return TMath::Sqrt(GetP2MC());} | |
54 | Double_t GetPxMC() const {return fPTotMC[0];} | |
55 | Double_t GetPyMC() const {return fPTotMC[1];} | |
56 | Double_t GetPzMC() const {return fPTotMC[2];} | |
57 | Double_t GetPtMC() const {return TMath::Sqrt(GetPt2MC());} | |
aec0ec32 | 58 | Double_t GetPhiMC() const {return TMath::Pi() + TMath::ATan2(-fPTotMC[1], -fPTotMC[0]);} |
59 | Double_t GetThetaMC() const {if(fPTotMC[2]==0.0){return TMath::PiOver2();}else{return TMath::ACos(fPTotMC[2]/GetPMC());}} | |
60 | Double_t GetEtaMC() const {return -TMath::Log(TMath::ATan(0.5*GetThetaMC()));} | |
61 | Double_t GetYMC(Double_t m1, Double_t m2) const {return 0.5*TMath::Log((GetEtotMC(m1,m2)+fPTotMC[2])/(GetEtotMC(m1,m2)-fPTotMC[2]));} | |
62 | ||
e2bafbbc | 63 | Double_t GetAngle() const; |
64 | ||
65 | AliRsnDaughter* GetDaughter(const Int_t &index) const {return fDaughter[index];} | |
66 | ||
67 | Bool_t IsLabelEqual() {return abs(fDaughter[0]->Label()) == abs(fDaughter[1]->Label());} | |
68 | Bool_t IsIndexEqual() {return (fDaughter[0]->Index() == fDaughter[1]->Index());} | |
69 | Bool_t IsTruePair(Int_t refPDG = 0); | |
70 | ||
71 | void SetPair(AliRsnDaughter *daughter1, AliRsnDaughter *daughter2); | |
aec0ec32 | 72 | void PrintInfo(const Option_t *option = ""); |
06351446 | 73 | |
aec0ec32 | 74 | private: |
06351446 | 75 | |
76 | Double_t fPTot[3]; // total momentum computed with rec. values | |
77 | Double_t fPTotMC[3]; // total momentum computed with MC values | |
78 | Double_t fPTrack[2][3]; // rec. momentum of single tracks | |
79 | Double_t fPTrackMC[2][3]; // MC momentum of single tracks | |
80 | ||
06351446 | 81 | Int_t fMotherLabel[2]; // GEANT label of tracks |
82 | Int_t fMotherPDG[2]; // PDG code of mother of tracks | |
83 | ||
84 | AliRsnDaughter *fDaughter[2]; // elements of the pair | |
85 | ||
aec0ec32 | 86 | ClassDef(AliRsnPairParticle,1) |
06351446 | 87 | }; |
88 | ||
89 | #endif |