1 #ifndef ALIAODPWG4PARTICLE_H
2 #define ALIAODPWG4PARTICLE_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 /* $Id: AliAODPWG4Particle.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 "AliVParticle.h"
21 class AliAODPWG4Particle : public AliVParticle {
25 AliAODPWG4Particle(Double_t px, Double_t py, Double_t pz, Double_t e);
26 AliAODPWG4Particle(TLorentzVector & p);
27 virtual ~AliAODPWG4Particle();
28 AliAODPWG4Particle(const AliAODPWG4Particle& photon);
29 AliAODPWG4Particle& operator=(const AliAODPWG4Particle& photon);
31 // AliVParticle methods
32 virtual Double_t Px() const { return fMomentum->Px(); }
33 virtual Double_t Py() const { return fMomentum->Py(); }
34 virtual Double_t Pz() const { return fMomentum->Pz(); }
35 virtual Double_t Pt() const { return fMomentum->Pt(); }
36 virtual Double_t P() const { return fMomentum->P(); }
37 virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
38 virtual Double_t OneOverPt() const { return 1. / fMomentum->Pt(); }
39 virtual Double_t Phi() const;
40 virtual Double_t Theta() const { return fMomentum->Theta(); }
41 virtual Double_t E() const { return fMomentum->E(); }
42 virtual Double_t M() const { return fMomentum->M(); }
43 virtual Double_t Eta() const { return fMomentum->Eta(); }
44 virtual Double_t Y() const { return fMomentum->Rapidity();}
45 virtual Double_t Xv() const {return -999.;} // put reasonable values here
46 virtual Double_t Yv() const {return -999.;} //
47 virtual Double_t Zv() const {return -999.;} //
48 virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
49 virtual void Print(Option_t* /*option*/) const;
53 virtual Short_t Charge() const { return 0;}
54 virtual const Double_t* PID() const { return NULL;}
57 virtual Int_t GetPdg() const {return fPdg ; }
58 virtual Int_t GetTag() const {return fTag ; }
59 virtual Int_t GetLabel() const {return fLabel ; }
60 virtual Int_t GetCaloLabel (Int_t i) const {return fCaloLabel[i];}
61 virtual Int_t GetTrackLabel(Int_t i) const {return fTrackLabel[i];}
62 virtual TString GetDetector() const {return fDetector ; }
64 virtual Bool_t GetDispBit(void) const {return fDisp;}
65 virtual Bool_t GetTOFBit(void) const {return fTof;}
66 virtual Bool_t GetChargedBit(void) const {return fCharged;}
67 virtual Int_t DistToBad() const {return fBadDist ;}
69 virtual void SetPdg(Int_t pdg) {fPdg = pdg ; }
70 virtual void SetTag(Int_t tag) {fTag = tag ; }
71 virtual void SetLabel(Int_t l) {fLabel = l ; }
72 virtual void SetCaloLabel (Int_t a, Int_t b) {fCaloLabel [0] = a; fCaloLabel [1] = b ; }
73 virtual void SetTrackLabel(Int_t a, Int_t b) {fTrackLabel[0] = a; fTrackLabel[1] = b ; }
74 virtual void SetDetector(TString d) {fDetector = d ; }
76 virtual void SetDispBit(Bool_t chi2){fDisp = chi2 ;}
77 virtual void SetTOFBit(Bool_t tof){fTof = tof ;}
78 virtual void SetChargedBit(Bool_t ch){fCharged = ch; }
79 virtual void SetDistToBad(Int_t dist){fBadDist=dist;}
81 TLorentzVector * Momentum() const {return fMomentum ; }
82 virtual void SetMomentum(TLorentzVector *lv) {fMomentum = lv ; }
84 Bool_t IsPIDOK(const Int_t ipid, const Int_t pdgwanted) const;
87 TLorentzVector* fMomentum; // Photon 4-momentum vector
88 Int_t fPdg; // id of particle
89 Int_t fTag; // tag of particle (decay, fragment, prompt photon)
90 Int_t fLabel; // MC label
91 Int_t fCaloLabel[2]; // CaloCluster index, 1 for photons, 2 for pi0.
92 Int_t fTrackLabel[2]; // Track lable, 1 for pions, 2 for conversion photons
93 TString fDetector; // Detector where particle was measured.
95 Bool_t fDisp ; //Dispersion bit
96 Bool_t fTof ; //TOF bit
97 Bool_t fCharged ; //Charged bit
98 Int_t fBadDist ; //Distance to bad module in module units
100 ClassDef(AliAODPWG4Particle,1);
103 inline Double_t AliAODPWG4Particle::Phi() const
106 Double_t phi = fMomentum->Phi();
107 if (phi < 0.) phi += 2. * TMath::Pi();
111 #endif //ALIAODPWG4PARTICLE_H