]>
Commit | Line | Data |
---|---|---|
7148817a | 1 | // Author: Dariusz Miskowiec <mailto:d.miskowiec@gsi.de> 2002 |
2 | ||
3 | #ifndef ALIDPAIR_H | |
4 | #define ALIDPAIR_H | |
5 | ||
6 | #include <TObject.h> | |
7 | #include "TLorentzVector.h" | |
8 | ||
9 | //============================================================================= | |
10 | class AliDPair : public TObject { | |
11 | ||
12 | protected: | |
13 | TLorentzVector p0; // LAB four-momentum of track 0 | |
14 | TLorentzVector p1; // LAB four-momentum of track 1 | |
15 | TLorentzVector p; // LAB total four-momentum | |
16 | TLorentzVector q; // LAB four-momentum difference | |
17 | TVector3 beta; // LAB pair velocity | |
18 | TVector3 betat; // LAB pair velocity transverse | |
19 | TVector3 betaz; // LAB pair velocity along z | |
20 | TVector3 ubeta; // LAB pair velocity direction | |
21 | TVector3 ubetat; // LAB pair velocity transverse direction | |
22 | TVector3 ubetaz; // LAB pair velocity along z direction (hm) | |
23 | TLorentzVector CMp; // CM total four-momentum | |
24 | TLorentzVector CMq; // CM four-momentum difference | |
25 | TLorentzVector buf; // dummy buffer for swapping | |
26 | ||
27 | public: | |
28 | AliDPair(); // constructor | |
29 | virtual ~AliDPair() {printf("AliDPair object deleted\n");} | |
30 | void Set0(double m,double p,double theta,double phi) {p0.SetXYZM(0,0,p,m); p0.SetTheta(theta); p0.SetPhi(phi);} | |
31 | void Set1(double m,double p,double theta,double phi) {p1.SetXYZM(0,0,p,m); p1.SetTheta(theta); p1.SetPhi(phi);} | |
32 | void SetMXYZ0(double m,double px,double py,double pz) {p0.SetXYZM(px,py,pz,m);} | |
33 | void SetMXYZ1(double m,double px,double py,double pz) {p1.SetXYZM(px,py,pz,m);} | |
34 | void CalcLAB() {p=p0+p1; q=p1-p0; beta=p.BoostVector(); | |
35 | betaz.SetXYZ(0,0,beta.Z()); betat=beta; betat.SetZ(0); | |
36 | ubeta=beta.Unit(); ubetat=betat.Unit(); ubetaz=betaz.Unit();} | |
37 | double Rapidity() {return p.Rapidity();} | |
38 | double Pt() {return p.Pt();} | |
39 | double Phi() {return p.Phi();} | |
40 | double DTheta() {return p1.Theta()-p0.Theta();} | |
41 | double DPhi() {return TVector2::Phi_mpi_pi(p1.Phi()-p0.Phi());} | |
42 | void CalcPairCM() {CMp=p; CMp.Boost(-beta); CMq=q; CMq.Boost(-beta);} | |
43 | void CalcLcmsCM() {CMp=p; CMp.Boost(-betaz); CMq=q; CMq.Boost(-betaz);} | |
44 | void Swap() {buf=p0; p0=p1; p1=buf; q=-q; CMq=-CMq;} | |
45 | double Minv() {return p.M();} | |
46 | double Qinv2() {return -q.M2();} | |
47 | double QCM() {return CMq.Vect().Mag();} | |
48 | double QCMpar() {return CMq.Vect()*ubeta;} | |
2f720eae | 49 | double QCMper() {return TMath::Sqrt(TMath::Abs(QCM()*QCM()-QCMpar()*QCMpar()));} |
7148817a | 50 | double QCMout() {return +CMq.Vect().X()*ubetat.X()+CMq.Vect().Y()*ubetat.Y();} |
51 | double QCMside() {return -CMq.Vect().X()*ubetat.Y()+CMq.Vect().Y()*ubetat.X();} | |
52 | double QCMlong() {return CMq.Vect().Z();} | |
53 | double QCMTheta() {return CMq.Theta();} | |
54 | double QCMPhi() {return CMq.Phi();} | |
55 | double QCMPhiOut() {return TMath::ATan2(QCMside(),QCMout());} // phi w.r.t. out | |
56 | ||
57 | ClassDef(AliDPair,1) | |
58 | }; | |
59 | //============================================================================= | |
60 | #endif |