]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/GammaConv/AliConversionPhotonBase.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliConversionPhotonBase.h
CommitLineData
2eedd4ed 1#ifndef ALICONVERSIONPHOTONBASE_H
2#define ALICONVERSIONPHOTONBASE_H
3
4#include "TMath.h"
5#include "TParticle.h"
6#include "AliStack.h"
7#include "AliLog.h"
8#include "TObject.h"
0a2b2b4b 9#include "AliMCEvent.h"
10#include "AliESDEvent.h"
11#include "AliKFParticle.h"
12#include "TParticle.h"
13#include <vector>
14#include "AliESDpid.h"
15#include "TF1.h"
16#include "TRandom3.h"
17#include "AliPID.h"
18#include "AliESDtrack.h"
19#include "AliKFVertex.h"
20#include "AliMCEventHandler.h"
21#include "AliESDtrackCuts.h"
22#include "AliGenCocktailEventHeader.h"
23#include "TList.h"
24
2eedd4ed 25
26using namespace std;
27
28class AliConversionPhotonBase {
29
30 public:
31
32 //Constructors
33 AliConversionPhotonBase();
34
35 //Copy Constructor
36 AliConversionPhotonBase(const AliConversionPhotonBase & g);
37 //assignment operator
38 AliConversionPhotonBase & operator = (const AliConversionPhotonBase & g);
39
40 //Destructor
41 virtual ~AliConversionPhotonBase();
42
43 ///Set the tag for decay meson
44 void SetTag( Bool_t tagged ) { fTagged = tagged; }
45 Bool_t IsTagged(){return fTagged;}
46
47 //Get the Chi2 of particle
48 void SetChi2perNDF(Float_t chi2) {fChi2perNDF = chi2;}
49 Float_t GetChi2perNDF() const {return fChi2perNDF;}
50
4803eb1f 51
2eedd4ed 52 ///Track labels
53 void SetLabelPositive(Int_t label){fLabel[0] = label;}
54 void SetLabelNegative(Int_t label){fLabel[1] = label;}
55 void SetTrackLabels(Int_t label1, Int_t label2){fLabel[0] = label1; fLabel[1] = label2;}
56 Int_t GetTrackLabelPositive() const{return fLabel[0];}
57 Int_t GetTrackLabelNegative() const {return fLabel[1];}
58 Int_t GetTrackLabel(Int_t i) const {return fLabel[i];}
3b77b2d1 59 virtual Int_t GetLabel(Int_t i) const { return GetTrackLabel(i); };
60 virtual Int_t GetLabel1() const { return GetTrackLabelPositive(); };
61 virtual Int_t GetLabel2() const { return GetTrackLabelNegative(); };
2eedd4ed 62
63 // MC Label
64
65 void SetMCLabel(Int_t* label){fMCLabel[0]=label[0];fMCLabel[1]=label[1];}
66 void SetMCLabelPositive(Int_t label){fMCLabel[0]=label;}
67 void SetMCLabelNegative(Int_t label){fMCLabel[1]=label;}
68 Int_t GetMCLabel(Int_t i) const{return fMCLabel[i];}
69 Int_t GetMCLabelPositive() const{return fMCLabel[0];}
70 Int_t GetMCLabelNegative() const{return fMCLabel[1];}
71 Int_t GetMCParticleLabel(AliStack *fMCStack);
72
73 // GetMCParticle
74
92efd725 75 Bool_t IsTruePhoton(AliStack *fMCStack);
2eedd4ed 76 TParticle *GetMCParticle(AliStack *fMCStack);
77 TParticle *GetPositiveMCDaughter(AliStack *fMCStack){return GetMCDaughter(fMCStack,0);};
78 TParticle *GetNegativeMCDaughter(AliStack *fMCStack){return GetMCDaughter(fMCStack,1);};
79 TParticle *GetMCDaughter(AliStack *fMCStack,Int_t label);
80
81 // V0Index
3b77b2d1 82 Int_t GetV0Index() const {return fV0Index;}
83 void SetV0Index(Int_t index) {fV0Index=index;}
2eedd4ed 84
85 // Conversion Point
86 void SetConversionPoint(Double_t convpoint[3]){fConversionPoint[0]=convpoint[0];fConversionPoint[1]=convpoint[1];fConversionPoint[2]=convpoint[2];}
87 void GetConversionPoint(Double_t convpoint[3]){convpoint[0]=fConversionPoint[0];convpoint[1]=fConversionPoint[1];convpoint[2]=fConversionPoint[2];}
3b77b2d1 88 Double_t GetConversionRadius() const {return TMath::Sqrt(fConversionPoint[0]*fConversionPoint[0]+fConversionPoint[1]*fConversionPoint[1]);}
89 Double_t GetConversionX() const {return fConversionPoint[0];}
90 Double_t GetConversionY() const {return fConversionPoint[1];}
91 Double_t GetConversionZ() const {return fConversionPoint[2];}
4803eb1f 92 void GetDistanceOfClossetApproachToPrimVtx(const AliVVertex* primVertex, Float_t * dca);
93 void DeterminePhotonQuality(AliVTrack* negTrack, AliVTrack* posTrack);
94 UChar_t GetPhotonQuality() const {return fQuality;}
2eedd4ed 95 // Armenteros Qt Alpha
96 void GetArmenterosQtAlpha(Double_t qtalpha[2]){qtalpha[0]=fArmenteros[0];qtalpha[1]=fArmenteros[1];}
3b77b2d1 97 Double_t GetArmenterosQt() const {return fArmenteros[0];}
98 Double_t GetArmenterosAlpha() const {return fArmenteros[1];}
2eedd4ed 99
100 // virtual functions to be implemented in KF/AOD classes
101
102 virtual Double_t GetPhotonMass() const = 0;
103 virtual Double_t GetPhotonPt()const = 0;
104 virtual Double_t GetPhotonP() const = 0;
105 virtual Double_t GetPhotonEta() const = 0;
69b05e50 106 virtual Double_t GetPhotonPhi() const =0;
e5b6e8a6 107// virtual Double_t GetPhotonTheta() const =0;
3b77b2d1 108 virtual Double_t GetPx() const = 0;
109 virtual Double_t GetPy() const = 0;
110 virtual Double_t GetPz() const = 0;
4803eb1f 111
3b77b2d1 112
113 Float_t GetMass() const { return fIMass; }
114 void SetMass( Float_t mass) { fIMass = mass; }
2eedd4ed 115
92efd725 116 Float_t GetPsiPair() const {return fPsiPair;}
117 void SetPsiPair(Float_t PsiPair){fPsiPair=PsiPair;}
2eedd4ed 118
4803eb1f 119
2eedd4ed 120 protected:
121
122 Int_t fLabel[2]; // Electron/Positron Track Label
123 Int_t fV0Index; // Index of the V0
124 Int_t fMCLabel[2]; // Electron/Positron MC Label
125 Float_t fChi2perNDF; // Chi2perNDF
126 Double_t fArmenteros[2]; // Armenteros Paramters
2eedd4ed 127 Double_t fConversionPoint[3]; // Conversion Point
128 Bool_t fTagged; // Is it tagged as decay pion (only for gammas)
92efd725 129 Float_t fIMass; // Invariant Mass of dilepton pair
130 Float_t fPsiPair; // Psi Pair Value
4803eb1f 131 UChar_t fQuality; //Photon Quality:
132 //0: garbage,
133 //1: both tracks TPC only,
134 //2: 1 track TPC only
135 //3: both tracks more than 1 ITS cluster
136 ClassDef(AliConversionPhotonBase,5);
2eedd4ed 137};
138
139
140#endif
141
142
143