1 #ifndef ALIAODPWG4PARTICLE_H
\r
2 #define ALIAODPWG4PARTICLE_H
\r
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
\r
4 * See cxx source for full Copyright notice */
\r
6 /* $Id: AliAODPWG4Particle.h $ */
\r
8 //-------------------------------------------------------------------------
\r
9 // Copy of AOD photon class, adapted for particle identification
\r
10 // and correlations analysis
\r
11 // Author: Yves Schutz, CERN, Gustavo Conesa, INFN
\r
12 //-------------------------------------------------------------------------
\r
15 #include <TLorentzVector.h>
\r
18 //-- Analysis system
\r
19 #include "AliVParticle.h"
\r
21 class AliAODPWG4Particle : public AliVParticle {
\r
24 AliAODPWG4Particle();
\r
25 AliAODPWG4Particle(Double_t px, Double_t py, Double_t pz, Double_t e);
\r
26 AliAODPWG4Particle(TLorentzVector & p);
\r
28 virtual ~AliAODPWG4Particle();
\r
29 virtual void Clear(const Option_t* /*opt*/);
\r
31 AliAODPWG4Particle(const AliAODPWG4Particle& photon);
\r
32 AliAODPWG4Particle& operator=(const AliAODPWG4Particle& photon);
\r
34 //enumerated type for various b-tags of electrons
\r
35 enum btagTypes {kDVMTag0, kDVMTag1, kDVMTag2, kTransverseIPTag, kUnknownTag};
\r
37 void SetBTagBit(Int_t &tag, const UInt_t set) const {
\r
38 // Set bit of type set (btagTypes) in tag
\r
42 Bool_t CheckBTagBit(const Int_t tag, const UInt_t test) const {
\r
43 // Check if in fBtag the bit test (btagTypes) is set.
\r
44 if (tag & (1<<test) ) return kTRUE ;
\r
45 else return kFALSE ;
\r
48 // AliVParticle methods
\r
49 virtual Double_t Px() const { return fMomentum->Px(); }
\r
50 virtual Double_t Py() const { return fMomentum->Py(); }
\r
51 virtual Double_t Pz() const { return fMomentum->Pz(); }
\r
52 virtual Double_t Pt() const { return fMomentum->Pt(); }
\r
53 virtual Double_t P() const { return fMomentum->P(); }
\r
54 virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
\r
55 virtual Double_t OneOverPt() const { return 1. / fMomentum->Pt(); }
\r
56 virtual Double_t Phi() const;
\r
57 virtual Double_t Theta() const { return fMomentum->Theta(); }
\r
58 virtual Double_t E() const { return fMomentum->E(); }
\r
59 virtual Double_t M() const { return fMomentum->M(); }
\r
60 virtual Double_t Eta() const { return fMomentum->Eta(); }
\r
61 virtual Double_t Y() const { return fMomentum->Rapidity();}
\r
62 virtual Double_t Xv() const {return -999.;} // put reasonable values here
\r
63 virtual Double_t Yv() const {return -999.;} //
\r
64 virtual Double_t Zv() const {return -999.;} //
\r
65 virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
\r
66 virtual void Print(Option_t* /*option*/) const;
\r
70 virtual Short_t Charge() const { return 0;}
\r
71 virtual const Double_t* PID() const { return NULL;}
\r
74 virtual Int_t GetPdg() const {return fPdg ; }
\r
75 virtual Int_t GetTag() const {return fTag ; }
\r
76 virtual Int_t GetBtag() const {return fBtag ; }
\r
77 virtual Int_t GetLabel() const {return fLabel ; }
\r
78 virtual Int_t GetCaloLabel (Int_t i) const {return fCaloLabel[i] ; }
\r
79 virtual Int_t GetTrackLabel(Int_t i) const {return fTrackLabel[i] ; }
\r
80 virtual TString GetDetector() const {return fDetector ; }
\r
81 virtual Bool_t GetDispBit(void) const {return fDisp ; }
\r
82 virtual Bool_t GetTOFBit(void) const {return fTof ; }
\r
83 virtual Bool_t GetChargedBit(void) const {return fCharged ; }
\r
84 virtual Int_t DistToBad() const {return fBadDist ; }
\r
85 virtual Int_t GetInputFileIndex() const {return fInputFileIndex ; }
\r
86 virtual Int_t GetFiducialArea() const {return fFidArea;}
\r
88 virtual Bool_t IsTagged() const {return fTagged ; }
\r
90 virtual void SetLabel(Int_t l) { fLabel = l ; }
\r
91 virtual void SetCaloLabel (Int_t a, Int_t b) { fCaloLabel [0] = a; fCaloLabel [1] = b ; }
\r
92 virtual void SetTrackLabel(Int_t a, Int_t b) { fTrackLabel[0] = a; fTrackLabel[1] = b ; }
\r
93 virtual void SetTrackLabel(Int_t a, Int_t b, Int_t c, Int_t d)
\r
94 { fTrackLabel[0] = a; fTrackLabel[1] = b ; fTrackLabel[2] = c; fTrackLabel[3] = d; }
\r
96 virtual void SetPdg(Int_t pdg) { fPdg = pdg ; }
\r
97 virtual void SetTag(Int_t tag) { fTag = tag ; }
\r
98 virtual void SetTagged(Bool_t tag) { fTagged = tag ; }
\r
99 virtual void SetBtag(Int_t tag) { fBtag = tag ; }
\r
100 virtual void SetDetector(TString d) { fDetector = d ; }
\r
101 virtual void SetDispBit(Bool_t disp) { fDisp = disp ; }
\r
102 virtual void SetTOFBit(Bool_t tof) { fTof = tof ;}
\r
103 virtual void SetChargedBit(Bool_t ch) { fCharged = ch ; }
\r
104 virtual void SetDistToBad(Int_t dist) { fBadDist=dist ;}
\r
105 virtual void SetInputFileIndex(Int_t i){ fInputFileIndex = i;}
\r
106 virtual void SetFiducialArea(Int_t a) {fFidArea=a;}
\r
108 TLorentzVector * Momentum() const { return fMomentum ; }
\r
109 virtual void SetMomentum(TLorentzVector *lv) { fMomentum = lv ; }
\r
111 Bool_t IsPIDOK(const Int_t ipid, const Int_t pdgwanted) const;
\r
112 Double_t GetPairMass(AliAODPWG4Particle * p)const{ return (*(p->fMomentum)+*fMomentum).M(); }
\r
114 Int_t PdgCode() const {return 0;}
\r
117 TLorentzVector* fMomentum; // Photon 4-momentum vector
\r
118 Int_t fPdg ; // id of particle
\r
119 Int_t fTag ; // tag of particle (decay, fragment, prompt photon), MC
\r
120 Int_t fBtag; // tag particle from B.
\r
121 Int_t fLabel ; // MC label
\r
122 Int_t fCaloLabel[2]; // CaloCluster index, 1 for photons, 2 for pi0.
\r
123 Int_t fTrackLabel[4]; // Track lable, 1 for pions, 2 for conversion photons
\r
124 TString fDetector ; // Detector where particle was measured.
\r
125 Bool_t fDisp ; // Dispersion bit
\r
126 Bool_t fTof ; // TOF bit
\r
127 Bool_t fCharged ; // Charged bit
\r
128 Bool_t fTagged ; // If photon tagged (pi0 decay)
\r
129 Int_t fBadDist ; // Distance to bad module in module units
\r
130 Int_t fFidArea ; // Type of fiducial area hit by this photon
\r
131 Int_t fInputFileIndex;// 0, standard input, 1 first input added.
\r
132 // Only possible one for now, more in future?
\r
134 ClassDef(AliAODPWG4Particle, 4);
\r
137 inline Double_t AliAODPWG4Particle::Phi() const
\r
140 Double_t phi = fMomentum->Phi();
\r
141 if (phi < 0.) phi += TMath::TwoPi();
\r
145 #endif //ALIAODPWG4PARTICLE_H
\r