]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/AliAODDimuon.h
Added missing getters (Andrea)
[u/mrichter/AliRoot.git] / PWG3 / AliAODDimuon.h
1 #ifndef AliAODDimuon_H
2 #define AliAODDimuon_H
3
4 /* AliAODDimuon: a class for AODs for the MUON Arm of the ALICE Experiment
5  * Author: P. Cortese, Universita' del Piemonte Orientale in Alessandria and
6  * INFN of Torino - Italy
7  */
8
9 /* 2007/07/07 v0.00 Initial version */
10 /* 2007/12/06 v0.01 Introduction of AliAODEventInfo */
11 /* 2007/12/18 v0.02 Corrected CostCS for Like-Sign, added CostKh, CostHe and xf*/
12
13 #include "TRef.h"
14 #include "AliVParticle.h"
15 #include "TLorentzVector.h"
16 #include "AliAODTrack.h"
17 #include "AliAODEvent.h"
18 #include "AliAODEventInfo.h"
19
20 class AliAODDimuon: public AliVParticle {
21 public:
22   AliAODDimuon();
23   AliAODDimuon(const AliAODDimuon& dimu);
24   AliAODDimuon(TObject *mu0, TObject *mu1, TObject *evpoint=0);
25   ~AliAODDimuon();
26
27   // Data members
28   TRef mu[2];   // Pointers to the reconstructed muons
29   TRef ei;      // Pointer to the EventInfo object
30   TLorentzVector *p; //! TLorentzVector of dimuon momentum (not stored into file)
31
32   // Methods to access kinematics
33   virtual Double_t Px() const;
34   virtual Double_t Py() const;
35   virtual Double_t Pz() const;
36   virtual Bool_t PxPyPz(Double_t* p) const { p[0]=Px(); p[1]=Py(); p[2]=Pz(); return 1;}
37   virtual Double_t Pt() const;
38   virtual Double_t P() const;
39
40   virtual Double_t OneOverPt() const {return Pt()>0 ? 1./Pt() : -999999999;}
41   virtual Double_t Phi() const;
42   virtual Double_t Theta() const;
43
44   virtual Double_t E() const;
45   virtual Double_t M() const;
46   
47   virtual Double_t Eta() const;
48   virtual Double_t Y() const;
49   
50   virtual Short_t Charge() const;
51
52   // Dimuon vertex will be implemented when the muon track covariance matrix 
53   // at vertex will be included in the ESD (and AOD)
54   // It would require also the information about magnetic field when filling AOD
55   virtual Double_t Xv() const {return -999999999;}
56   virtual Double_t Yv() const {return -999999999;}
57   virtual Double_t Zv() const {return -999999999;}
58   virtual Bool_t XvYvZv(Double_t* v) const { v[0]=-999999999; v[1]=-999999999; v[2]=-999999999; return 0;}
59
60   Double_t P();
61   Double_t Phi();
62   Double_t Theta();
63   Double_t M();
64   Double_t Eta();
65   Double_t Y();
66
67   // Added functions
68   Double_t xf();     // Feynman x
69   Double_t CostCS(); // Cosinus of the Collins-Soper polar decay angle
70   Double_t CostHe(); // Cosinus of the Helicity polar decay angle
71   Int_t AnyPt();
72   Int_t LowPt();
73   Int_t HighPt();
74   Double_t MaxChi2Match();
75   // PID
76   virtual const Double_t *PID() const {return 0;} // return PID object (to be defined, still)
77
78   // Additional getters
79   AliAODTrack* GetMu(Int_t imu=0){return (imu==0||imu==1)&&(mu[imu]!=0) ? (AliAODTrack*)mu[imu].GetObject() : 0; } // Get a pointer to a muon
80   AliAODTrack* Mu(Int_t imu=0){return (imu==0||imu==1)&&(mu[imu]!=0) ? (AliAODTrack*)mu[imu].GetObject() : 0; } // Get a pointer to a muon
81   AliAODEventInfo* MuonHeader(){return (ei!=0) ? (AliAODEventInfo*)ei.GetObject() : 0; } // Get a pointer to the AliAODEventInfo
82
83   // Useful constants
84   Double_t MProton; //! Proton mass (not stored into file)
85
86 private:
87   Int_t CheckPointers() const;
88   void BookP();
89   ClassDef(AliAODDimuon,1)  // AliAODDimuon track
90 };
91
92 #endif