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 */
6 /* $Id: AliAODParticleCorrelation.h $ */
8 //-------------------------------------------------------------------------
9 // Copy of AOD photon class, adapted for particle identification
10 // and correlations analysis
11 // Author: Yves Schutz, CERN, Gustavo Conesa, INFN
12 //-------------------------------------------------------------------------
15 #include <TLorentzVector.h>
19 #include "AliAODJet.h"
20 #include "AliVParticle.h"
22 class AliAODParticleCorrelation : public AliVParticle {
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);
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;
54 virtual Short_t Charge() const { return 0;}
55 virtual const Double_t* PID() const { return NULL;}
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 ; }
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 ; }
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);}
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);}
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);}
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);}
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);}
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);}
94 virtual void SetLeadingDetector(TString d) {fLeadingDetector = d ; }
95 virtual TString GetLeadingDetector() const {return fLeadingDetector ; }
97 virtual TLorentzVector GetLeading() const { return fLeading;}
98 virtual void SetLeading(TLorentzVector lead) {fLeading = lead;}
100 virtual TLorentzVector GetCorrelatedJet() const { return fCorrJet;}
101 virtual void SetCorrelatedJet(TLorentzVector jet) {fCorrJet = jet;}
103 virtual TLorentzVector GetCorrelatedBackground() const { return fCorrBkg;}
104 virtual void SetCorrelatedBackground(TLorentzVector bkg) {fCorrBkg = bkg;}
106 void SetRefJet(AliAODJet* jet) { fRefJet = jet;}
107 //AliAODJet* GetJet() {return ((AliAODJet*) fRefJet);}
108 TRef GetRefJet() {return fRefJet;}
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
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
123 TRefArray* fRefBackgroundTracks; // array of references to the tracks for background stimation
124 TRefArray* fRefBackgroundClusters; // array of references to the clusters for background stimation
126 TString fLeadingDetector; // Detector where leading particle was measured.
127 TLorentzVector fLeading; // Leading Particle 4-momentum vector
129 TLorentzVector fCorrJet; // Jet 4-momentum vector
130 TLorentzVector fCorrBkg; // Background 4-momentum vector
132 TRef fRefJet; // Rerence to jet found with JETAN and correlated with particle
134 ClassDef(AliAODParticleCorrelation,1);
137 inline Double_t AliAODParticleCorrelation::Phi() const
140 Double_t phi = fMomentum->Phi();
141 if (phi < 0.) phi += 2. * TMath::Pi();