]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/PartCorrBase/AliAODPWG4Particle.h
Using large-file extension version of fopen.
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / 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
26 AliAODPWG4Particle(TLorentzVector & p); \r
27 virtual ~AliAODPWG4Particle();\r
28 AliAODPWG4Particle(const AliAODPWG4Particle& photon); \r
29 AliAODPWG4Particle& operator=(const AliAODPWG4Particle& photon);\r
30\r
31 //enumerated type for various b-tags of electrons\r
32 enum btagTypes {kDVMTag0, kDVMTag1, kDVMTag2, kTransverseIPTag, kUnknownTag};\r
33\r
34 void SetBTagBit(Int_t &tag, const UInt_t set) const {\r
35 // Set bit of type set (btagTypes) in tag \r
36 tag |= (1<<set) ;\r
37 }\r
38\r
39 Bool_t CheckBTagBit(const Int_t tag, const UInt_t test) const {\r
40 // Check if in fBtag the bit test (btagTypes) is set. \r
41 if (tag & (1<<test) ) return kTRUE ;\r
42 else return kFALSE ;\r
43 }\r
44\r
45 // AliVParticle methods\r
46 virtual Double_t Px() const { return fMomentum->Px(); }\r
47 virtual Double_t Py() const { return fMomentum->Py(); }\r
48 virtual Double_t Pz() const { return fMomentum->Pz(); }\r
49 virtual Double_t Pt() const { return fMomentum->Pt(); }\r
50 virtual Double_t P() const { return fMomentum->P(); }\r
51 virtual Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }\r
52 virtual Double_t OneOverPt() const { return 1. / fMomentum->Pt(); }\r
53 virtual Double_t Phi() const;\r
54 virtual Double_t Theta() const { return fMomentum->Theta(); }\r
55 virtual Double_t E() const { return fMomentum->E(); }\r
56 virtual Double_t M() const { return fMomentum->M(); }\r
57 virtual Double_t Eta() const { return fMomentum->Eta(); }\r
58 virtual Double_t Y() const { return fMomentum->Rapidity();}\r
59 virtual Double_t Xv() const {return -999.;} // put reasonable values here\r
60 virtual Double_t Yv() const {return -999.;} //\r
61 virtual Double_t Zv() const {return -999.;} //\r
62 virtual Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; } \r
63 virtual void Print(Option_t* /*option*/) const;\r
64 \r
65 //\r
66 //Dummy\r
67 virtual Short_t Charge() const { return 0;}\r
68 virtual const Double_t* PID() const { return NULL;}\r
69 //\r
70 \r
71 virtual Int_t GetPdg() const {return fPdg ; }\r
72 virtual Int_t GetTag() const {return fTag ; }\r
73 virtual Int_t GetBtag() const {return fBtag ; }\r
74 virtual Int_t GetLabel() const {return fLabel ; }\r
75 virtual Int_t GetCaloLabel (Int_t i) const {return fCaloLabel[i] ; }\r
76 virtual Int_t GetTrackLabel(Int_t i) const {return fTrackLabel[i] ; }\r
77 virtual TString GetDetector() const {return fDetector ; }\r
78 virtual Bool_t GetDispBit(void) const {return fDisp ; }\r
79 virtual Bool_t GetTOFBit(void) const {return fTof ; }\r
80 virtual Bool_t GetChargedBit(void) const {return fCharged ; }\r
81 virtual Int_t DistToBad() const {return fBadDist ; } \r
82 virtual Int_t GetInputFileIndex() const {return fInputFileIndex ; }\r
83 \r
84 virtual void SetLabel(Int_t l) { fLabel = l ; }\r
85 virtual void SetCaloLabel (Int_t a, Int_t b) { fCaloLabel [0] = a; fCaloLabel [1] = b ; }\r
86 virtual void SetTrackLabel(Int_t a, Int_t b) { fTrackLabel[0] = a; fTrackLabel[1] = b ; }\r
87 \r
88 virtual void SetPdg(Int_t pdg) { fPdg = pdg ; }\r
89 virtual void SetTag(Int_t tag) { fTag = tag ; }\r
90 virtual void SetBtag(Int_t tag) { fBtag = tag ; }\r
91 virtual void SetDetector(TString d) { fDetector = d ; }\r
92 virtual void SetDispBit(Bool_t disp) { fDisp = disp ; } \r
93 virtual void SetTOFBit(Bool_t tof) { fTof = tof ;} \r
94 virtual void SetChargedBit(Bool_t ch) { fCharged = ch ; }\r
95 virtual void SetDistToBad(Int_t dist) { fBadDist=dist ;} \r
96 virtual void SetInputFileIndex(Int_t i){ fInputFileIndex = i;}\r
97 \r
98 TLorentzVector * Momentum() const { return fMomentum ; }\r
99 virtual void SetMomentum(TLorentzVector *lv) { fMomentum = lv ; }\r
100 \r
101 Bool_t IsPIDOK(const Int_t ipid, const Int_t pdgwanted) const;\r
102 \r
103 private:\r
104 TLorentzVector* fMomentum; // Photon 4-momentum vector\r
105 Int_t fPdg ; // id of particle\r
106 Int_t fTag ; // tag of particle (decay, fragment, prompt photon), MC\r
107 Int_t fBtag; // tag particle from B.\r
108 Int_t fLabel ; // MC label\r
109 Int_t fCaloLabel[2]; // CaloCluster index, 1 for photons, 2 for pi0.\r
110 Int_t fTrackLabel[2]; // Track lable, 1 for pions, 2 for conversion photons \r
111 TString fDetector ; // Detector where particle was measured.\r
112 Bool_t fDisp ; // Dispersion bit\r
113 Bool_t fTof ; // TOF bit\r
114 Bool_t fCharged ; // Charged bit\r
115 Int_t fBadDist ; // Distance to bad module in module units\r
116 Int_t fInputFileIndex;// 0, standard input, 1 first input added. \r
117 // Only possible one for now, more in future?\r
118 \r
119 ClassDef(AliAODPWG4Particle,2);\r
120};\r
121\r
122inline Double_t AliAODPWG4Particle::Phi() const\r
123{\r
124 // Return phi\r
125 Double_t phi = fMomentum->Phi();\r
126 if (phi < 0.) phi += 2. * TMath::Pi();\r
127 return phi;\r
128}\r
129\r
130#endif //ALIAODPWG4PARTICLE_H\r