RecoParameters for the PHOS cosmic runs.
[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 ; }
7cd4e982 68 virtual Int_t GetInputFileIndex() const {return fInputFileIndex ; }
69
a3aebfff 70 virtual void SetLabel(Int_t l) { fLabel = l ; }
71 virtual void SetCaloLabel (Int_t a, Int_t b) { fCaloLabel [0] = a; fCaloLabel [1] = b ; }
72 virtual void SetTrackLabel(Int_t a, Int_t b) { fTrackLabel[0] = a; fTrackLabel[1] = b ; }
1c5acb87 73
7cd4e982 74 virtual void SetPdg(Int_t pdg) { fPdg = pdg ; }
75 virtual void SetTag(Int_t tag) { fTag = tag ; }
76 virtual void SetBtag(Int_t tag) { fBtag = tag ; }
77 virtual void SetDetector(TString d) { fDetector = d ; }
78 virtual void SetDispBit(Bool_t disp) { fDisp = disp ; }
79 virtual void SetTOFBit(Bool_t tof) { fTof = tof ;}
80 virtual void SetChargedBit(Bool_t ch) { fCharged = ch ; }
81 virtual void SetDistToBad(Int_t dist) { fBadDist=dist ;}
82 virtual void SetInputFileIndex(Int_t i){ fInputFileIndex = i;}
83
a3aebfff 84 TLorentzVector * Momentum() const { return fMomentum ; }
85 virtual void SetMomentum(TLorentzVector *lv) { fMomentum = lv ; }
477d6cee 86
87 Bool_t IsPIDOK(const Int_t ipid, const Int_t pdgwanted) const;
1c5acb87 88
89 private:
477d6cee 90 TLorentzVector* fMomentum; // Photon 4-momentum vector
a3aebfff 91 Int_t fPdg ; // id of particle
591cc579 92 Int_t fTag ; // tag of particle (decay, fragment, prompt photon), MC
93 Int_t fBtag; // tag particle from B.
a3aebfff 94 Int_t fLabel ; // MC label
95 Int_t fCaloLabel[2]; // CaloCluster index, 1 for photons, 2 for pi0.
96 Int_t fTrackLabel[2]; // Track lable, 1 for pions, 2 for conversion photons
97 TString fDetector ; // Detector where particle was measured.
7cd4e982 98 Bool_t fDisp ; // Dispersion bit
99 Bool_t fTof ; // TOF bit
100 Bool_t fCharged ; // Charged bit
101 Int_t fBadDist ; // Distance to bad module in module units
102 Int_t fInputFileIndex;// 0, standard input, 1 first input added.
103 // Only possible one for now, more in future?
104
591cc579 105 ClassDef(AliAODPWG4Particle,2);
1c5acb87 106};
107
108inline Double_t AliAODPWG4Particle::Phi() const
109{
110 // Return phi
111 Double_t phi = fMomentum->Phi();
112 if (phi < 0.) phi += 2. * TMath::Pi();
113 return phi;
114}
115
116#endif //ALIAODPWG4PARTICLE_H