Added a new class for the AOD information
[u/mrichter/AliRoot.git] / PWG4 / GammaConv / AliAnalysisTaskGammaConversion.h
CommitLineData
d7d7e825 1#ifndef ALIANALYSISTASKGAMMACONVERSION_H
2#define ALIANALYSISTASKGAMMACONVERSION_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////
8//---------------------------------------------
9// Class used to do analysis on conversion pairs
10//---------------------------------------------
11////////////////////////////////////////////////
12
13#include "AliAnalysisTaskSE.h"
14#include <vector>
15#include "AliV0Reader.h"
16#include "AliGammaConversionAODObject.h"
17
18class TNtuple;
19class AliGammaConversionHistograms;
20class AliESDv0;
21class AliKFParticle;
22class AliESDInputHandler;
23class AliESDEvent;
24class AliAODEvent;
25class TList;
26class AliStack;
27class AliESDtrackCuts;
28
29
30class AliAnalysisTaskGammaConversion : public AliAnalysisTaskSE
31{
32 public:
33 AliAnalysisTaskGammaConversion();
34 AliAnalysisTaskGammaConversion(const char* name);
35 virtual ~AliAnalysisTaskGammaConversion() ;// virtual destructor
36
37 // Implementation of interface methods
38 virtual void UserCreateOutputObjects();
39 virtual void Init();
40 virtual void LocalInit() {Init();}
41 virtual void Exec(Option_t *option);
42 virtual void Terminate(Option_t *option);
43 virtual void ConnectInputData(Option_t *);
44
45 void ProcessMCData();
46 void ProcessV0sNoCut();
47 void ProcessV0s();
48 void ProcessGammasForNeutralMesonAnalysis();
49
50 // AOD
51 TString GetAODBranchName() const {return fAODBranchName;}
52 void SetAODBranchName(TString name) {fAODBranchName = name ;}
53 void FillAODWithConversionGammas();
54 // end AOD
55
56
57 // for GammaJetAnalysis
58 void ProcessGammasForGammaJetAnalysis();
59 void CreateListOfChargedParticles();
60 Double_t GetMinimumDistanceToCharge(Int_t);
61 void CalculateJetCone(Int_t,Int_t);
62 Int_t GetIndexHighestPtGamma();
63 void SetESDtrackCuts();
64 // end of Gamma Jet
65
66 void SetMinPtForGammaJet(Double_t minPtForGammaJet){fMinPtForGammaJet=minPtForGammaJet;}
67 void SetMinIsoConeSize(Double_t minIsoConeSize){fMinIsoConeSize=minIsoConeSize;}
68 void SetMinPtIsoCone(Double_t minPtIsoCone){fMinPtIsoCone=minPtIsoCone;}
69 void SetMinPtGamChargedCorr(Double_t minPtGamChargedCorr){fMinPtGamChargedCorr=minPtGamChargedCorr;}
70 void SetMinPtJetCone(Double_t minPtJetCone){fMinPtJetCone=minPtJetCone;}
71
72 void SetHistograms(AliGammaConversionHistograms *const histograms){fHistograms=histograms;}
73 void SetDoMCTruth(Bool_t flag){fDoMCTruth=flag;}
74 void SetDoNeutralMeson(Bool_t flag){fDoNeutralMeson=flag;}
75 void SetDoJet(Bool_t flag){fDoJet=flag;}
76 void SetDoChic(Bool_t flag){fDoChic=flag;}
77
78 void SetElectronMass(Double_t electronMass){fElectronMass = electronMass;}
79 void SetGammaMass(Double_t gammaMass){fGammaMass = gammaMass;}
80 void SetGammaWidth(Double_t gammaWidth){fGammaWidth = gammaWidth;}
81 void SetPi0Mass(Double_t pi0Mass){fPi0Mass = pi0Mass;}
82 void SetPi0Width(Double_t pi0Width){fPi0Width = pi0Width;}
83 void SetEtaMass(Double_t etaMass){fEtaMass = etaMass;}
84 void SetEtaWidth(Double_t etaWidth){fEtaWidth = etaWidth;}
85 void SetMinOpeningAngleGhostCut(Double_t ghostCut){fMinOpeningAngleGhostCut = ghostCut;}
86 void SetV0Reader(AliV0Reader* const reader){fV0Reader=reader;}
87 void SetCalculateBackground(Bool_t bg){fCalculateBackground=bg;}
88 void CalculateBackground();
89 void SetWriteNtuple(Bool_t writeNtuple){fWriteNtuple = writeNtuple;}
90 void FillNtuple();
91 Double_t GetMCOpeningAngle(TParticle* const daughter0, TParticle* const daughter1) const;
92 void CheckV0Efficiency();
93
94
95 //////////////////Chi_c Analysis////////////////////////////
96 void GetPID(AliESDtrack *track, Stat_t &pid, Stat_t &weight);
97 double GetSigmaToVertex(AliESDtrack* t);
98 void ElectronBackground(TString hBg, vector <TLorentzVector> e);
99 void FillAngle(TString histoName,vector <TLorentzVector> tlVeNeg, vector <TLorentzVector> tlVePos);
100 void FillElectronInvMass(TString histoName, vector <TLorentzVector> negativeElectron,
101 vector <TLorentzVector> positiveElectron);
102 void FillGammaElectronInvMass(TString histoMass,TString histoDiff,vector <AliKFParticle> fKFGammas,
103 vector <TLorentzVector> tlVeNeg,vector<TLorentzVector> tlVePos);
104 void CleanWithAngleCuts(vector <AliESDtrack*> negativeElectrons,
105 vector <AliESDtrack*> positiveElectrons, vector <AliKFParticle> gammas);
106 vector <TLorentzVector> GetTLorentzVector(vector <AliESDtrack*> esdTrack);
107 void ProcessGammaElectronsForChicAnalysis();
108 ///////////////////////////////////////////////////////////////
109
110
111
112 private:
113 AliAnalysisTaskGammaConversion(const AliAnalysisTaskGammaConversion&); // Not implemented
114 AliAnalysisTaskGammaConversion& operator=(const AliAnalysisTaskGammaConversion&); // Not implemented
115
116 AliV0Reader* fV0Reader; // The V0 reader object
117
118 AliStack * fStack; // pointer to the MC particle stack
119 AliESDEvent* fESDEvent; //pointer to the ESDEvent
120 TList * fOutputContainer ; // Histogram container
121
122 AliGammaConversionHistograms *fHistograms; // Pointer to the histogram handling class
123
124 Bool_t fDoMCTruth; // Flag to switch on/off MC truth
125 Bool_t fDoNeutralMeson;
126 Bool_t fDoJet;
127 Bool_t fDoChic;
128
129 vector<TParticle*> fMCAllGammas; // vector containing all MC gammas
130 vector<TParticle*> fMCPi0s; //vector containing all MC Pi0s
131 vector<TParticle*> fMCEtas; //vector containing all MC Etas
132 vector<TParticle*> fMCGammaChic; //vector containing all MC Chi_c's
133
134 vector<AliKFParticle> fKFReconstructedGammas; // vector containing all reconstructed gammas
135 vector<Bool_t> fIsTrueReconstructedGammas; // vector containing information if this was a true gamma or not (follows the index of fKFReconstructedGammas)
136 vector<Int_t> fElectronv1; // vector containing index of electron 1
137 vector<Int_t> fElectronv2; // vector containing index of electron 2
138
139 ///////Chi_c Analysis///////////////////////////
140 vector<AliESDtrack*> fCurrentEventPosElectron; // comment here
141 vector<AliESDtrack*> fPreviousEventPosElectron; //comment here
142 vector<AliESDtrack*> fCurrentEventNegElectron; //comment here
143 vector<AliESDtrack*> fPreviousEventNegElectron; //comment here
144 vector<AliKFParticle> fKFReconstructedGammasCut; //comment here
145 vector<TLorentzVector> fPreviousEventTLVNegElectron; //comment here
146 vector<TLorentzVector> fPreviousEventTLVPosElectron; //comment here
147 //////////////////////////////////////////////////
148
149 //mass defines
150 Double_t fElectronMass; //electron mass
151 Double_t fGammaMass; //gamma mass
152 Double_t fPi0Mass; //pi0mass
153 Double_t fEtaMass; //eta mass
154
155 // width defines
156 Double_t fGammaWidth; //gamma width cut
157 Double_t fPi0Width; // pi0 width cut
158 Double_t fEtaWidth; // eta width cut
159
160 Double_t fMinOpeningAngleGhostCut; // minimum angle cut
161
162 AliESDtrackCuts* fEsdTrackCuts; // Object containing the parameters of the esd track cuts
163
164 Bool_t fCalculateBackground; //flag to set backgrount calculation on/off
165 Bool_t fWriteNtuple; // flag to set if writing to ntuple on/off
166 TNtuple *fGammaNtuple; // Ntuple for gamma values
167 TNtuple *fNeutralMesonNtuple;// NTuple for mesons
168
169 Int_t fTotalNumberOfAddedNtupleEntries; // number of added ntuple entries
170
171 vector<AliESDtrack*> fChargedParticles;
172 vector<Int_t> fChargedParticlesId;
173
174 Double_t fGammaPtHighest;
175 Double_t fMinPtForGammaJet;
176 Double_t fMinIsoConeSize;
177 Double_t fMinPtIsoCone;
178 Double_t fMinPtGamChargedCorr;
179 Double_t fMinPtJetCone;
180 Int_t fLeadingChargedIndex;
181
182 TClonesArray* fAODBranch ; //! selected particles branch
183 TString fAODBranchName; // New AOD branch name
184
185 vector<AliGammaConversionAODObject> fAODObjects;
186
187 ClassDef(AliAnalysisTaskGammaConversion, 4); // Analysis task for gamma conversions
188};
189
190#endif //ALIANALYSISTASKGAMMA_H