]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIUNICORPAIR_H | |
2 | #define ALIUNICORPAIR_H | |
3 | ||
4 | /* Copyright(c) 1998-2048, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | /* $Id$ */ | |
7 | ||
8 | // Author: Dariusz Miskowiec <mailto:d.miskowiec@gsi.de> 2002 | |
9 | ||
10 | //============================================================================= | |
11 | // particle (track) pair | |
12 | //============================================================================= | |
13 | ||
14 | #include <cmath> | |
15 | #include <TObject.h> | |
16 | #include <TLorentzVector.h> | |
17 | ||
18 | //============================================================================= | |
19 | class AliUnicorPair : public TObject { | |
20 | ||
21 | public: | |
22 | AliUnicorPair() : fP0(), fP1(), fP(), fQ(), fBeta(), fBetat(), fBetaz(), fUbeta(), | |
23 | fUbetat(), fUbetaz(), fCMp(), fCMq(), fBuf() {} // constructor | |
24 | virtual ~AliUnicorPair() {} // destructor | |
25 | void Set0(double m,double p,double theta,double phi) {fP0.SetXYZM(0,0,p,m); fP0.SetTheta(theta); fP0.SetPhi(phi);} | |
26 | void Set1(double m,double p,double theta,double phi) {fP1.SetXYZM(0,0,p,m); fP1.SetTheta(theta); fP1.SetPhi(phi);} | |
27 | void SetMXYZ0(double m,double px,double py,double pz) {fP0.SetXYZM(px,py,pz,m);} | |
28 | void SetMXYZ1(double m,double px,double py,double pz) {fP1.SetXYZM(px,py,pz,m);} | |
29 | void CalcLAB() {fCMp=fP=fP0+fP1; fCMq=fQ=fP1-fP0; fBeta=fP.BoostVector(); | |
30 | fBetaz.SetXYZ(0,0,fBeta.Z()); fBetat=fBeta; fBetat.SetZ(0); | |
31 | fUbeta=fBeta.Unit(); fUbetat=fBetat.Unit(); fUbetaz=fBetaz.Unit();} | |
32 | double Rapidity() const {return fP.Rapidity();} | |
33 | double Pt() const {return fP.Pt();} | |
34 | double Phi() const {return fP.Phi();} | |
35 | double DTheta() const {return fP1.Theta()-fP0.Theta();} | |
36 | double DPhi() const {return TVector2::Phi_mpi_pi(fP1.Phi()-fP0.Phi());} | |
37 | void CalcPairCM() {fCMp.Boost(-fBeta); fCMq.Boost(-fBeta);} | |
38 | void CalcLcmsCM() {fCMp.Boost(-fBetaz); fCMq.Boost(-fBetaz);} | |
39 | void Swap() {fBuf=fP0; fP0=fP1; fP1=fBuf; fQ=-fQ; fCMq=-fCMq;} | |
40 | double Minv() const {return fP.M();} | |
41 | double Qinv2() const {return -fQ.M2();} | |
42 | double QCM() const {return fCMq.Vect().Mag();} | |
43 | double QCMpar() const {return fCMq.Vect()*fUbeta;} | |
44 | double QCMper() const {return sqrt(fabs(QCM()*QCM()-QCMpar()*QCMpar()));} | |
45 | double QCMout() const {return +fCMq.Vect().X()*fUbetat.X()+fCMq.Vect().Y()*fUbetat.Y();} | |
46 | double QCMside() const {return -fCMq.Vect().X()*fUbetat.Y()+fCMq.Vect().Y()*fUbetat.X();} | |
47 | double QCMlong() const {return fCMq.Vect().Z();} | |
48 | double QCMTheta() const {return fCMq.Theta();} | |
49 | double QCMPhi() const {return fCMq.Phi();} | |
50 | double QCMPhiOut() const {return atan2(QCMside(),QCMout());} // phi w.r.t. out | |
51 | ||
52 | protected: | |
53 | TLorentzVector fP0; // LAB four-momentum of track 0 | |
54 | TLorentzVector fP1; // LAB four-momentum of track 1 | |
55 | TLorentzVector fP; // LAB total four-momentum | |
56 | TLorentzVector fQ; // LAB four-momentum difference | |
57 | TVector3 fBeta; // LAB pair velocity | |
58 | TVector3 fBetat; // LAB pair velocity transverse | |
59 | TVector3 fBetaz; // LAB pair velocity along z | |
60 | TVector3 fUbeta; // LAB pair velocity direction | |
61 | TVector3 fUbetat; // LAB pair velocity transverse direction | |
62 | TVector3 fUbetaz; // LAB pair velocity along z direction (hm) | |
63 | TLorentzVector fCMp; // CM total four-momentum | |
64 | TLorentzVector fCMq; // CM four-momentum difference | |
65 | TLorentzVector fBuf; // dummy buffer for swapping | |
66 | ||
67 | ClassDef(AliUnicorPair,1) | |
68 | }; | |
69 | //============================================================================= | |
70 | #endif |