]>
Commit | Line | Data |
---|---|---|
1c5acb87 | 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 */ | |
5 | ||
6 | /* $Id: AliAODPWG4Particle.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 "AliVParticle.h" | |
20 | ||
21 | class AliAODPWG4Particle : public AliVParticle { | |
477d6cee | 22 | |
1c5acb87 | 23 | public: |
477d6cee | 24 | AliAODPWG4Particle(); |
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); | |
30 | ||
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; | |
50 | ||
51 | // | |
52 | //Dummy | |
53 | virtual Short_t Charge() const { return 0;} | |
54 | virtual const Double_t* PID() const { return NULL;} | |
55 | // | |
56 | ||
a3aebfff | 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 ; } | |
63 | virtual Bool_t GetDispBit(void) const {return fDisp ; } | |
64 | virtual Bool_t GetTOFBit(void) const {return fTof ; } | |
65 | virtual Bool_t GetChargedBit(void) const {return fCharged ; } | |
66 | virtual Int_t DistToBad() const {return fBadDist ; } | |
477d6cee | 67 | |
a3aebfff | 68 | virtual void SetLabel(Int_t l) { fLabel = l ; } |
69 | virtual void SetCaloLabel (Int_t a, Int_t b) { fCaloLabel [0] = a; fCaloLabel [1] = b ; } | |
70 | virtual void SetTrackLabel(Int_t a, Int_t b) { fTrackLabel[0] = a; fTrackLabel[1] = b ; } | |
1c5acb87 | 71 | |
a3aebfff | 72 | virtual void SetPdg(Int_t pdg) { fPdg = pdg ; } |
73 | virtual void SetTag(Int_t tag) { fTag = tag ; } | |
74 | virtual void SetDetector(TString d) { fDetector = d ; } | |
75 | virtual void SetDispBit(Bool_t disp) { fDisp = disp ; } | |
76 | virtual void SetTOFBit(Bool_t tof) { fTof = tof ;} | |
77 | virtual void SetChargedBit(Bool_t ch) { fCharged = ch ; } | |
78 | virtual void SetDistToBad(Int_t dist) { fBadDist=dist ;} | |
1c5acb87 | 79 | |
a3aebfff | 80 | TLorentzVector * Momentum() const { return fMomentum ; } |
81 | virtual void SetMomentum(TLorentzVector *lv) { fMomentum = lv ; } | |
477d6cee | 82 | |
83 | Bool_t IsPIDOK(const Int_t ipid, const Int_t pdgwanted) const; | |
1c5acb87 | 84 | |
85 | private: | |
477d6cee | 86 | TLorentzVector* fMomentum; // Photon 4-momentum vector |
a3aebfff | 87 | Int_t fPdg ; // id of particle |
88 | Int_t fTag ; // tag of particle (decay, fragment, prompt photon) | |
89 | Int_t fLabel ; // MC label | |
90 | Int_t fCaloLabel[2]; // CaloCluster index, 1 for photons, 2 for pi0. | |
91 | Int_t fTrackLabel[2]; // Track lable, 1 for pions, 2 for conversion photons | |
92 | TString fDetector ; // Detector where particle was measured. | |
93 | Bool_t fDisp ; //Dispersion bit | |
94 | Bool_t fTof ; //TOF bit | |
95 | Bool_t fCharged ; //Charged bit | |
96 | Int_t fBadDist ; //Distance to bad module in module units | |
477d6cee | 97 | |
98 | ClassDef(AliAODPWG4Particle,1); | |
1c5acb87 | 99 | }; |
100 | ||
101 | inline Double_t AliAODPWG4Particle::Phi() const | |
102 | { | |
103 | // Return phi | |
104 | Double_t phi = fMomentum->Phi(); | |
105 | if (phi < 0.) phi += 2. * TMath::Pi(); | |
106 | return phi; | |
107 | } | |
108 | ||
109 | #endif //ALIAODPWG4PARTICLE_H |