correct for omission
[u/mrichter/AliRoot.git] / STEER / AliAODPWG4Particle.h
CommitLineData
8a587055 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
5\r
6/* $Id: AliAODPWG4Particle.h $ */\r
7\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
13\r
14//-- ROOT system --\r
15#include <TLorentzVector.h>\r
16class TString;\r
17\r
18//-- Analysis system\r
19#include "AliVParticle.h"\r
20\r
21class AliAODPWG4Particle : public AliVParticle {\r
22 \r
23 public:\r
24 AliAODPWG4Particle();\r
25 AliAODPWG4Particle(Double_t px, Double_t py, Double_t pz, Double_t e);\r
032002d9 26 AliAODPWG4Particle(TLorentzVector & p);\r
27 \r
8a587055 28 virtual ~AliAODPWG4Particle();\r
032002d9 29 virtual void Clear(const Option_t* /*opt*/);\r
30\r
8a587055 31 AliAODPWG4Particle(const AliAODPWG4Particle& photon); \r
32 AliAODPWG4Particle& operator=(const AliAODPWG4Particle& photon);\r
33\r
34 //enumerated type for various b-tags of electrons\r
35 enum btagTypes {kDVMTag0, kDVMTag1, kDVMTag2, kTransverseIPTag, kUnknownTag};\r
36\r
37 void SetBTagBit(Int_t &tag, const UInt_t set) const {\r
38 // Set bit of type set (btagTypes) in tag \r
39 tag |= (1<<set) ;\r
40 }\r
41\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
46 }\r
47\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
67 \r
68 //\r
69 //Dummy\r
70 virtual Short_t Charge() const { return 0;}\r
71 virtual const Double_t* PID() const { return NULL;}\r
72 //\r
73 \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
477a0971 86 virtual Int_t GetFiducialArea() const {return fFidArea;}\r
87\r
88 virtual Bool_t IsTagged() const {return fTagged ; }\r
8a587055 89 \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 \r
94 virtual void SetPdg(Int_t pdg) { fPdg = pdg ; }\r
95 virtual void SetTag(Int_t tag) { fTag = tag ; }\r
477a0971 96 virtual void SetTagged(Bool_t tag) { fTagged = tag ; }\r
8a587055 97 virtual void SetBtag(Int_t tag) { fBtag = tag ; }\r
98 virtual void SetDetector(TString d) { fDetector = d ; }\r
99 virtual void SetDispBit(Bool_t disp) { fDisp = disp ; } \r
100 virtual void SetTOFBit(Bool_t tof) { fTof = tof ;} \r
101 virtual void SetChargedBit(Bool_t ch) { fCharged = ch ; }\r
102 virtual void SetDistToBad(Int_t dist) { fBadDist=dist ;} \r
103 virtual void SetInputFileIndex(Int_t i){ fInputFileIndex = i;}\r
477a0971 104 virtual void SetFiducialArea(Int_t a) {fFidArea=a;}\r
8a587055 105 \r
106 TLorentzVector * Momentum() const { return fMomentum ; }\r
107 virtual void SetMomentum(TLorentzVector *lv) { fMomentum = lv ; }\r
108 \r
109 Bool_t IsPIDOK(const Int_t ipid, const Int_t pdgwanted) const;\r
477a0971 110 Double_t GetPairMass(AliAODPWG4Particle * p)const{ return (*(p->fMomentum)+*fMomentum).M(); }\r
6a8e543a 111 // Dummy\r
112 Int_t PdgCode() const {return 0;}\r
8a587055 113 \r
114 private:\r
115 TLorentzVector* fMomentum; // Photon 4-momentum vector\r
116 Int_t fPdg ; // id of particle\r
117 Int_t fTag ; // tag of particle (decay, fragment, prompt photon), MC\r
118 Int_t fBtag; // tag particle from B.\r
119 Int_t fLabel ; // MC label\r
120 Int_t fCaloLabel[2]; // CaloCluster index, 1 for photons, 2 for pi0.\r
121 Int_t fTrackLabel[2]; // Track lable, 1 for pions, 2 for conversion photons \r
122 TString fDetector ; // Detector where particle was measured.\r
123 Bool_t fDisp ; // Dispersion bit\r
124 Bool_t fTof ; // TOF bit\r
125 Bool_t fCharged ; // Charged bit\r
477a0971 126 Bool_t fTagged ; // If photon tagged (pi0 decay)\r
8a587055 127 Int_t fBadDist ; // Distance to bad module in module units\r
477a0971 128 Int_t fFidArea ; // Type of fiducial area hit by this photon\r
8a587055 129 Int_t fInputFileIndex;// 0, standard input, 1 first input added. \r
130 // Only possible one for now, more in future?\r
131 \r
477a0971 132 ClassDef(AliAODPWG4Particle,3);\r
8a587055 133};\r
134\r
135inline Double_t AliAODPWG4Particle::Phi() const\r
136{\r
137 // Return phi\r
138 Double_t phi = fMomentum->Phi();\r
477a0971 139 if (phi < 0.) phi += TMath::TwoPi();\r
8a587055 140 return phi;\r
141}\r
142\r
143#endif //ALIAODPWG4PARTICLE_H\r