]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0Flow.h
Added flat RP chi2 to QA
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_PbPb / AliAnalysisTaskPi0Flow.h
CommitLineData
ada6b882 1#ifndef AliAnalysisTaskPi0Flow_cxx
2#define AliAnalysisTaskPi0Flow_cxx
3
b8bea077 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
ada6b882 7// Analysis task to fill histograms with PHOS ESD or AOD clusters and cells
8// Authors : Dmitri Peressounko
9// Date : 28.05.2011
10// Modified: 03.08.2012 Henrik Qvigstad
91b112bd 11/* $Id$ */
ada6b882 12
13class TObjArray;
14class TH1F;
15class TH2I;
16class TH2F;
17class TH3F;
18class TF1 ;
19class AliStack ;
20class AliESDtrackCuts;
21class AliPHOSGeometry;
22class AliESDEvent ;
23class AliPHOSCalibData;
24class AliESDtrack ;
25class AliESDCaloCluster ;
b509e3a5 26class AliPHOSEPFlattener;
ada6b882 27
28#include "TArrayD.h"
29
30#include "AliAnalysisTaskSE.h"
31
32class AliAnalysisTaskPi0Flow : public AliAnalysisTaskSE {
33public:
34 enum Period { kUndefinedPeriod, kLHC10h, kLHC11h };
35
36public:
37 AliAnalysisTaskPi0Flow(const char *name = "AliAnalysisTaskPi0Flow", Period period = kUndefinedPeriod);
38 virtual ~AliAnalysisTaskPi0Flow();
39
40 virtual void UserCreateOutputObjects();
41 virtual void UserExec(Option_t *option);
4c5399e6 42 /* virtual void Terminate(Option_t *); */
ada6b882 43
44 void SetPeriod(Period period) { fPeriod = period;}
45
85394e40 46 void SetCentralityBinning(const TArrayD& edges, const TArrayI& nMixed);
ada6b882 47 void SetEventMixingRPBinning(UInt_t nBins) { fNEMRPBins = nBins; }
10a684bf 48 void SetMaxAbsVertexZ(Float_t z) { fMaxAbsVertexZ = z; }
6a1a4e92 49 void SetManualV0EPCalc(Bool_t manCalc = true) {fManualV0EPCalc = manCalc;}
ada6b882 50
51 void SetPHOSBadMap(Int_t mod,TH2I * badMapHist);
b509e3a5 52 //Where to read AODB object with EP calibration if not default
53 void SetEPcalibFileName(const TString filename) {fEPcalibFileName = filename; }
ada6b882 54
55private:
56 AliAnalysisTaskPi0Flow(const AliAnalysisTaskPi0Flow&); // not implemented
57 AliAnalysisTaskPi0Flow& operator=(const AliAnalysisTaskPi0Flow&); // not implemented
58
59 // Step 0:
60 AliVEvent* GetEvent();
61 AliStack* GetMCStack();
62
63 // Step 1:
64 void SetGeometry();
65 void SetMisalignment();
66 void SetV0Calibration(); //V0 calibration
67 void SetESDTrackCuts(); // AliESDtrack cuts ( for esd data )
68 void SetPHOSCalibData(); // phos re-calibration ( for esd data)
b509e3a5 69 void SetFlatteningData(); // phos flattening
ada6b882 70
71 // Step 2:
72 void SetVertex();
73 Bool_t RejectEventVertex();
74
75 // Step 4:
76 void SetCentrality();
77 Bool_t RejectCentrality();
78
79 // Step 5:
80 void EvalReactionPlane();
81 void EvalV0ReactionPlane();
82
83 // Step 7: QA PHOS cells
84 void FillPHOSCellQAHists();
85
86 // Step 8: Event Photons (PHOS Clusters) selection
87 void SelectPhotonClusters();
88 void FillSelectedClusterHistograms();
89
90 // Step 9: Consider pi0 (photon/cluster) pairs.
91 void ConsiderPi0s();
92
93 // Step 10; Mixing
94 void ConsiderPi0sMix();
95
96 // Step 11: Update lists
97 void UpdateLists();
98
99 Bool_t AreNeibors(Int_t id1,Int_t id2) ;
100 Double_t ApplyFlattening(Double_t phi, Double_t c) ; //Apply centrality-dependent flattening
101 Double_t ApplyFlatteningV0A(Double_t phi, Double_t c) ; //Apply centrality-dependent flattening
102 Double_t ApplyFlatteningV0C(Double_t phi, Double_t c) ; //Apply centrality-dependent flattening
103 Int_t ConvertToInternalRunNumber(Int_t run) ;
91b112bd 104 Double_t CoreEnergy(AliVCluster * clu, AliVCaloCells * cells);
ada6b882 105
106
107
108
109 void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
110 void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
111 void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key
112
113 TVector3 GetVertexVector(const AliVVertex* vertex);
114 Int_t GetCentralityBin(Float_t centralityV0M);
115 Int_t GetRPBin();
116
c9fb2807 117 void LogProgress(int step);
118 void LogSelection(int step, int internalRunNumber);
ada6b882 119
120 Bool_t IsGoodChannel(const char * det, Int_t mod,Int_t ix, Int_t iz); //Use addisional bad map for PHOS
121
122
123 void Reclusterize(AliVCluster * clu) ;
124 Double_t TestCPV(Double_t dx, Double_t dz, Double_t pt, Int_t charge);
125 Bool_t TestLambda(Double_t pt,Double_t l1,Double_t l2) ; //Evaluate Dispersion cuts for photons
126 Bool_t TestLambda2(Double_t pt,Double_t l1,Double_t l2) ; //Evaluate Dispersion cuts for photons
127
128 UInt_t GetNumberOfCentralityBins() { return fCentEdges.GetSize()-1; }
129 TList* GetCaloPhotonsPHOSList(UInt_t vtxBin, UInt_t centBin, UInt_t rpBin);
130
131
132
133
134private:
135 // constants:
136 static const Double_t kLogWeight= 4.5 ; // log weight for recalibration.
137 static const Double_t kAlphaCut=0.7 ;
138 static const Bool_t doESDReCalibration = kTRUE;
139 static const Int_t kNCenBins = 9; // see EvalV0ReactionPlane()
140
141 // cluster cut variables:
142 static const Double_t kMinClusterEnergy = 0.3;
143 static const Int_t kMinNCells = 3;
144 static const Double_t kMinM02 = 0.2;
145
146 // Binning, [vtx, centrality, reaction-plane]
147 static const Int_t kNVtxZBins = 1;
148 static const Double_t kCentCutoff = 90.; // Ignore Centrality over 90%
107849ac 149 TArrayD fCentEdges; // Centrality Bin Lower edges
150 TArrayI fCentNMixed; // Number of mixed events for each centrality bin
ada6b882 151 UInt_t fNEMRPBins;
152
ada6b882 153
10a684bf 154 // Behavior / cuts
ada6b882 155 Period fPeriod;
10a684bf 156 Float_t fMaxAbsVertexZ; // in cm
6a1a4e92 157 Bool_t fManualV0EPCalc;
ada6b882 158
10a684bf 159
ada6b882 160 TList * fOutputContainer; //final histogram container
161
162 TF1 *fNonLinCorr; // Non-linearity correction
163//TF1 * fRecent[5][12] ;//Recentering corrections
164 TH2I *fPHOSBadMap[6] ; //Container for PHOS bad channels map
165
166 // Run variables
167
168 // Step 0: Event Objects
169 // fEvent, fMCStack
170 AliVEvent* fEvent; //! Current event
171 AliESDEvent* fEventESD; //! Current event, if ESD.
172 AliAODEvent* fEventAOD; //! Current event, if AOD.
173 AliStack * fMCStack ;
174
175 // Step 1: Run Number, Misalignment Matrix, and Calibration
176 Int_t fRunNumber; // run number
177 Int_t fInternalRunNumber ; //Current internal run number
178 AliPHOSGeometry *fPHOSGeo; //! PHOS geometry
179 TProfile *fMultV0; // object containing VZERO calibration information
180 Float_t fV0Cpol,fV0Apol; // loaded by OADB
181 Float_t fMeanQ[kNCenBins][2][2]; // and recentering
182 Float_t fWidthQ[kNCenBins][2][2]; // ...
183 AliESDtrackCuts *fESDtrackCuts; // Track cut
184 AliPHOSCalibData *fPHOSCalibData; // PHOS calibration object
b509e3a5 185 TString fEPcalibFileName;
186 AliPHOSEPFlattener * fTPCFlat ; //Object for flattening of TPC
187 AliPHOSEPFlattener * fV0AFlat ; //Object for flattening of V0A
188 AliPHOSEPFlattener * fV0CFlat ; //Object for flattening of V0C
189
190
ada6b882 191 // Step 2: Vertex
192 Double_t fVertex[3];
193 TVector3 fVertexVector;
194 Int_t fVtxBin;
195
196 // Step 4: Centrality
197 Float_t fCentralityV0M ; //!Centrality of the currecnt event
198 Int_t fCentBin ; //! Current centrality bin
199
200 // Step 5: Reaction Plane
201 Bool_t fHaveTPCRP ; //! Is TPC RP defined?
202 Float_t fRP ; //!Reaction plane calculated with full TPC
203 Float_t fRPV0A ; //!Reaction plain calculated with A-side TPC: eta>0.15
204 Float_t fRPV0C ; //!Reaction plain calculated with C-side TPC: eta<-0.15
205 Int_t fEMRPBin; //! Event Mixing Reaction Plane Bin
206
207 // Step 8: Event Photons (PHOS Clusters) selection
208 TObjArray * fCaloPhotonsPHOS ; //PHOS photons in current event
209
210 // Step 11: Update lists for mixing.
211 TObjArray* fCaloPhotonsPHOSLists; //! array of TList, Containers for events with PHOS photons
212
213
214 ClassDef(AliAnalysisTaskPi0Flow, 1); // PHOS analysis task
215};
216
217#endif