]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/PartCorrBase/AliAODPWG4Particle.h
Default OCDB entries for TPC/Calib/QA and TPC/Calib/Raw
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliAODPWG4Particle.h
CommitLineData
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>
16class TString;
17
18//-- Analysis system
19#include "AliVParticle.h"
20
21class 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 ; }
591cc579 59 virtual Int_t GetBtag() const {return fBtag ; }
a3aebfff 60 virtual Int_t GetLabel() const {return fLabel ; }
61 virtual Int_t GetCaloLabel (Int_t i) const {return fCaloLabel[i] ; }
62 virtual Int_t GetTrackLabel(Int_t i) const {return fTrackLabel[i] ; }
63 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 ; }
477d6cee 68
a3aebfff 69 virtual void SetLabel(Int_t l) { fLabel = l ; }
70 virtual void SetCaloLabel (Int_t a, Int_t b) { fCaloLabel [0] = a; fCaloLabel [1] = b ; }
71 virtual void SetTrackLabel(Int_t a, Int_t b) { fTrackLabel[0] = a; fTrackLabel[1] = b ; }
1c5acb87 72
a3aebfff 73 virtual void SetPdg(Int_t pdg) { fPdg = pdg ; }
74 virtual void SetTag(Int_t tag) { fTag = tag ; }
591cc579 75 virtual void SetBtag(Int_t tag) { fBtag = tag ; }
a3aebfff 76 virtual void SetDetector(TString d) { fDetector = d ; }
77 virtual void SetDispBit(Bool_t disp) { fDisp = disp ; }
78 virtual void SetTOFBit(Bool_t tof) { fTof = tof ;}
79 virtual void SetChargedBit(Bool_t ch) { fCharged = ch ; }
80 virtual void SetDistToBad(Int_t dist) { fBadDist=dist ;}
1c5acb87 81
a3aebfff 82 TLorentzVector * Momentum() const { return fMomentum ; }
83 virtual void SetMomentum(TLorentzVector *lv) { fMomentum = lv ; }
477d6cee 84
85 Bool_t IsPIDOK(const Int_t ipid, const Int_t pdgwanted) const;
1c5acb87 86
87 private:
477d6cee 88 TLorentzVector* fMomentum; // Photon 4-momentum vector
a3aebfff 89 Int_t fPdg ; // id of particle
591cc579 90 Int_t fTag ; // tag of particle (decay, fragment, prompt photon), MC
91 Int_t fBtag; // tag particle from B.
a3aebfff 92 Int_t fLabel ; // MC label
93 Int_t fCaloLabel[2]; // CaloCluster index, 1 for photons, 2 for pi0.
94 Int_t fTrackLabel[2]; // Track lable, 1 for pions, 2 for conversion photons
95 TString fDetector ; // Detector where particle was measured.
96 Bool_t fDisp ; //Dispersion bit
97 Bool_t fTof ; //TOF bit
98 Bool_t fCharged ; //Charged bit
99 Int_t fBadDist ; //Distance to bad module in module units
477d6cee 100
591cc579 101 ClassDef(AliAODPWG4Particle,2);
1c5acb87 102};
103
104inline Double_t AliAODPWG4Particle::Phi() const
105{
106 // Return phi
107 Double_t phi = fMomentum->Phi();
108 if (phi < 0.) phi += 2. * TMath::Pi();
109 return phi;
110}
111
112#endif //ALIAODPWG4PARTICLE_H