]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliAODParticleCorrelation.h
Depending on input type AOD reader will fill aod lists with the input of the handler...
[u/mrichter/AliRoot.git] / PWG4 / AliAODParticleCorrelation.h
1 #ifndef AliAODParticleCorrelation_H
2 #define AliAODParticleCorrelation_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliAODParticleCorrelation.h  $ */
7
8 //-------------------------------------------------------------------------
9 //     Copy of AOD photon class, adapted for particle identification
10 //     and correlations analysis
11 //     Author: Yves Schutz, CERN, Gustavo Conesa, INFN
12 //-------------------------------------------------------------------------
13
14 //-- ROOT system --
15 #include <TLorentzVector.h>
16 class TString;
17
18 //-- Analysis system
19 #include "AliAODJet.h"
20 #include "AliVParticle.h"
21
22 class AliAODParticleCorrelation : public AliVParticle {
23
24  public:
25     AliAODParticleCorrelation();
26     AliAODParticleCorrelation(Double_t px, Double_t py, Double_t pz, Double_t e);
27     AliAODParticleCorrelation(TLorentzVector & p);  
28     virtual ~AliAODParticleCorrelation();
29     AliAODParticleCorrelation(const AliAODParticleCorrelation& photon); 
30     AliAODParticleCorrelation& operator=(const AliAODParticleCorrelation& photon);
31
32     // AliVParticle methods
33     virtual Double_t Px()         const { return fMomentum->Px();      }
34     virtual Double_t Py()         const { return fMomentum->Py();      }
35     virtual Double_t Pz()         const { return fMomentum->Pz();      }
36     virtual Double_t Pt()         const { return fMomentum->Pt();      }
37     virtual Double_t P()          const { return fMomentum->P();       }
38     virtual Bool_t   PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
39     virtual Double_t OneOverPt()  const { return 1. / fMomentum->Pt(); }
40     virtual Double_t Phi()        const;
41     virtual Double_t Theta()      const { return fMomentum->Theta();   }
42     virtual Double_t E()          const { return fMomentum->E();       }
43     virtual Double_t M()          const { return fMomentum->M();       }
44     virtual Double_t Eta()        const { return fMomentum->Eta();     }
45     virtual Double_t Y()          const { return fMomentum->Rapidity();}
46     virtual Double_t Xv()         const {return -999.;} // put reasonable values here
47     virtual Double_t Yv()         const {return -999.;} //
48     virtual Double_t Zv()         const {return -999.;} //
49     virtual Bool_t   XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }  
50     virtual void     Print(Option_t* /*option*/) const;
51
52     //
53     //Dummy
54     virtual Short_t Charge()      const { return 0;}
55     virtual const Double_t* PID() const { return NULL;}
56     //
57
58     virtual Float_t GetR()   const {return fR ; }
59     virtual Int_t GetPdg()   const {return fPdg ; }
60     virtual Int_t GetTag()   const {return fTag ; }
61     virtual Int_t GetLabel()   const {return fLabel ; }
62     virtual TString GetDetector()   const {return fDetector ; }
63
64     virtual void SetR(Float_t r)   {fR = r ; }
65     virtual void SetPdg(Int_t pdg)   {fPdg = pdg ; }
66     virtual void SetTag(Int_t tag)   {fTag = tag ; }
67     virtual void SetLabel(Int_t l)   {fLabel = l ; }
68     virtual void SetDetector(TString d)   {fDetector = d ; }
69
70     virtual TRefArray* GetRefTracks()           const { return  fRefTracks;}
71     virtual void     AddTrack(TObject *tr) {fRefTracks->Add(tr);}
72     TObject* GetTrack(Int_t i) {return fRefTracks->At(i);}
73
74     virtual TRefArray* GetRefClusters()           const { return  fRefClusters;}
75     virtual void     AddCluster(TObject *tr) {fRefClusters->Add(tr);}
76     TObject* GetCluster(Int_t i) {return fRefClusters->At(i);}
77
78     virtual TRefArray* GetRefIsolationConeTracks()           const { return  fRefIsolationConeTracks;}
79     virtual void     AddIsolationConeTrack(TObject *tr) {fRefIsolationConeTracks->Add(tr);}
80     TObject* GetIsolationConeTrack(Int_t i) {return fRefIsolationConeTracks->At(i);}
81
82     virtual TRefArray* GetRefIsolationConeClusters()           const { return  fRefIsolationConeClusters;}
83     virtual void     AddIsolationConeCluster(TObject *tr) {fRefIsolationConeClusters->Add(tr);}
84     TObject* GetIsolationConeCluster(Int_t i) {return fRefIsolationConeClusters->At(i);}
85
86     virtual TRefArray* GetRefBackgroundTracks()           const { return  fRefBackgroundTracks;}
87     virtual void     AddBackgroundTrack(TObject *tr) {fRefBackgroundTracks->Add(tr);}
88     TObject* GetBackgroundTrack(Int_t i) {return fRefBackgroundTracks->At(i);}
89
90     virtual TRefArray* GetRefBackgroundClusters()           const { return  fRefBackgroundClusters;}
91     virtual void     AddBackgroundCluster(TObject *tr) {fRefBackgroundClusters->Add(tr);}
92     TObject* GetBackgroundCluster(Int_t i) {return fRefBackgroundClusters->At(i);}
93
94     virtual void SetLeadingDetector(TString d)   {fLeadingDetector = d ; }
95     virtual TString GetLeadingDetector()   const {return fLeadingDetector ; }
96     
97     virtual TLorentzVector  GetLeading()           const { return  fLeading;}
98     virtual void  SetLeading(TLorentzVector lead) {fLeading = lead;}
99
100     virtual TLorentzVector  GetCorrelatedJet()           const { return  fCorrJet;}
101     virtual void  SetCorrelatedJet(TLorentzVector jet) {fCorrJet = jet;}
102
103     virtual TLorentzVector  GetCorrelatedBackground()           const { return  fCorrBkg;}
104     virtual void  SetCorrelatedBackground(TLorentzVector bkg) {fCorrBkg = bkg;}
105
106     void SetRefJet(AliAODJet* jet)  { fRefJet = jet;}
107     //AliAODJet* GetJet() {return ((AliAODJet*) fRefJet);}
108     TRef GetRefJet() {return fRefJet;}
109
110  private:
111     TLorentzVector* fMomentum;           // Photon 4-momentum vector
112     Int_t           fPdg; // id of particle
113     Int_t           fTag; // tag of particle (decay, fragment, prompt photon)
114     Int_t           fLabel; // MC label
115     TString         fDetector; // Detector where particle was measured.
116     Float_t         fR ; // Isolation cone size
117     TRefArray*     fRefTracks;  // array of references to the tracks belonging to the jet / all selected hadrons  
118     TRefArray*     fRefClusters; // array of references to the clusters belonging to the jet / all selected hadrons  
119     
120     TRefArray*     fRefIsolationConeTracks;  // array of references to the tracks belonging to the cone around direct particle candidate  
121     TRefArray*     fRefIsolationConeClusters; // array of references to the clusters belonging to the  cone around direct particle candidate  
122
123     TRefArray*     fRefBackgroundTracks;  // array of references to the tracks for background stimation
124     TRefArray*     fRefBackgroundClusters; // array of references to the clusters for background stimation 
125
126     TString        fLeadingDetector; // Detector where leading particle was measured.
127     TLorentzVector fLeading;     // Leading Particle 4-momentum vector
128     
129     TLorentzVector fCorrJet;     // Jet  4-momentum vector
130     TLorentzVector fCorrBkg;     // Background  4-momentum vector
131
132     TRef           fRefJet; // Rerence to jet found with JETAN and correlated with particle
133
134     ClassDef(AliAODParticleCorrelation,1);
135 };
136
137 inline Double_t AliAODParticleCorrelation::Phi() const
138 {
139   // Return phi
140   Double_t phi = fMomentum->Phi();
141   if (phi < 0.) phi += 2. * TMath::Pi();
142   return phi;
143 }
144
145 #endif