]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnPairParticle.h
New classes required for revision of package
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnPairParticle.h
index 07753220e9ac8bdecd91b38f0420fe70a1d0df08..05cc02a08a99f77a65bfbe35a938ee5bfd8d4502 100644 (file)
@@ -1,17 +1,13 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               *
- **************************************************************************/
-
 //
 // Class AliRsnPairParticle
 //
 // Implementation of a pair of tracks, for several purposes
 // - computing the total 4-momentum & inv. mass for output histos filling
 // - evaluating cut checks on the pair of particles
+// - evaluating any kind of kinematic value over their sum
 //
-// author: Martin Vala (martin.vala@cern.ch)
-// revised by: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
+// authors: Martin Vala (martin.vala@cern.ch)
+//          Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
 //
 
 #ifndef ALIRSNPAIRPARTICLE_H
@@ -20,7 +16,6 @@
 #include <TMath.h>
 
 #include "AliRsnDaughter.h"
-#include "AliRsnMCInfo.h"
 
 class AliRsnPairParticle : public TObject
 {
@@ -43,8 +38,9 @@ class AliRsnPairParticle : public TObject
     Double_t          GetPz() const {return fPTot[2];}
     Double_t          GetPt() const {return TMath::Sqrt(GetPt2());}
     Double_t          GetPhi() const {return TMath::Pi() + TMath::ATan2(-fPTot[1], -fPTot[0]);}
-    Double_t          GetTheta() const {if(fPTot[2]==0.0){return TMath::PiOver2();}else{return TMath::ACos(fPTot[2]/GetP());}}
-    Double_t          GetEta() const {return -TMath::Log(TMath::ATan(0.5*GetTheta()));}
+    Double_t          GetTheta() const {if (fPTot[2]==0.0){return TMath::PiOver2();}
+      else{return TMath::ACos(fPTot[2]/GetP());}}
+    Double_t          GetEta() const {return -TMath::Log(TMath::Tan(0.5*GetTheta()));}
     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]));}
 
     Double_t          GetEtotMC(Double_t m1, Double_t m2) const;
@@ -56,20 +52,24 @@ class AliRsnPairParticle : public TObject
     Double_t          GetPzMC() const {return fPTotMC[2];}
     Double_t          GetPtMC() const {return TMath::Sqrt(GetPt2MC());}
     Double_t          GetPhiMC() const {return TMath::Pi() + TMath::ATan2(-fPTotMC[1], -fPTotMC[0]);}
-    Double_t          GetThetaMC() const {if(fPTotMC[2]==0.0){return TMath::PiOver2();}else{return TMath::ACos(fPTotMC[2]/GetPMC());}}
-    Double_t          GetEtaMC() const {return -TMath::Log(TMath::ATan(0.5*GetThetaMC()));}
+    Double_t          GetThetaMC() const {if (fPTotMC[2]==0.0){return TMath::PiOver2();}
+      else{return TMath::ACos(fPTotMC[2]/GetPMC());}}
+    Double_t          GetEtaMC() const {return -TMath::Log(TMath::Tan(0.5*GetThetaMC()));}
     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]));}
 
     Double_t          GetAngle() const;
 
     AliRsnDaughter*   GetDaughter(const Int_t &index) const {return fDaughter[index];}
 
-    Bool_t            IsLabelEqual() {return abs(fDaughter[0]->Label()) == abs(fDaughter[1]->Label());}
-    Bool_t            IsIndexEqual() {return (fDaughter[0]->Index() == fDaughter[1]->Index());}
+    Bool_t            IsLabelEqual() {return abs(fDaughter[0]->GetLabel()) == abs(fDaughter[1]->GetLabel());}
+    Bool_t            IsIndexEqual() {return (fDaughter[0]->GetID() == fDaughter[1]->GetID());}
     Bool_t            IsTruePair(Int_t refPDG = 0);
+    Int_t             CommonMother();
 
     void              SetPair(AliRsnDaughter *daughter1, AliRsnDaughter *daughter2);
-    void              PrintInfo(const Option_t *option = "");
+    void              ResetPair();
+    void              RotateTrack(Int_t i, Double_t angle, Bool_t isDegrees = kTRUE);
+    void              PrintInfo(const Option_t *option = "ALL");
 
   private: