AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskCRCZDC.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 /**********************************
5  * analysis task for CRC with ZDC *
6  * *
7  * author: Jacopo Margutti *
8  * (margutti@nikhef.nl) *
9  **********************************/
10 
11 #ifndef AliAnalysisTaskCRCZDC_H
12 #define AliAnalysisTaskCRCZDC_H
13 
14 #include "AliAnalysisTaskSE.h"
15 #include "AliFlowTrackSimple.h"
16 
17 class AliCFManager;
18 class AliFlowEventCuts;
19 class AliFlowTrackCuts;
21 class AliFlowEvent;
22 class AliFlowVector;
23 class TList;
24 class TF1;
25 class TRandom3;
26 class AliAnalysisTaskSE;
27 class TString;
28 class AliESDpid;
29 class AliGenEventHeader;
30 class AliGenPythiaEventHeader;
31 class AliGenHijingEventHeader;
32 class AliFlowTrack;
33 class AliAnalysisUtils;
34 class AliMultSelection;
35 class AliCentrality;
36 class AliStack;
37 class TROOT;
38 class TSystem;
39 class TFile;
40 class TH1F;
41 class TH2F;
42 class TProfile;
43 class TProfile2D;
44 class TProfile3D;
45 class TH3D;
46 class TH3F;
47 
49 
50 public:
51 
52  enum kAnalysisInput{kESD=1, kAOD=2};
54  AliAnalysisTaskCRCZDC(const char *name, TString RPtype = "", Bool_t QAon = kFALSE, UInt_t seed=666, Bool_t bCandidates=kFALSE);
55  virtual ~AliAnalysisTaskCRCZDC();
56 
57  enum DataSet { k2010,
63  };
64 
70  };
71 
72  enum AnalysisType {
79  };
80 
81  virtual void InitializeRunArrays();
82 
83  // Implementation of interface methods
84  virtual void UserCreateOutputObjects();
85  virtual void UserExec(Option_t *option);
86  virtual void Terminate(Option_t *option);
87 
88  void SetAnalysisType(AnalysisType type) { this->fAnalysisType = type; }
89 
90  void SetRPType(TString rptype) { this->fRPType = rptype; }
91  TString GetRPType() const { return this->fRPType; }
92 
93  void SetMinMult(Int_t multmin) {this->fMinMult = multmin; }
94  Int_t GetMinMult() const {return this->fMinMult; }
95  void SetMaxMult(Int_t multmax) {this->fMaxMult = multmax; }
96  Int_t GetMaxMult() const {return this->fMaxMult; }
97 
98  void SetSubeventEtaRange(Double_t minA, Double_t maxA, Double_t minB, Double_t maxB)
99  {this->fMinA = minA; this->fMaxA = maxA; this->fMinB = minB; this->fMaxB = maxB; }
100  Double_t GetMinA() const {return this->fMinA;}
101  Double_t GetMaxA() const {return this->fMaxA;}
102  Double_t GetMinB() const {return this->fMinB;}
103  Double_t GetMaxB() const {return this->fMaxB;}
104 
105  void DefineDeadZone( Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax )
106  {this->fExcludedEtaMin = etaMin; this->fExcludedEtaMax = etaMax;
107  this->fExcludedPhiMin = phiMin; this->fExcludedPhiMax = phiMax; }
108 
109  void SetCutsEvent(AliFlowEventCuts* cutsEvent) {fCutsEvent=cutsEvent;}
111  void SetCutsRP(AliFlowTrackCuts* cutsRP);
112  AliFlowTrackCuts* GetCutsRP() const {return fCutsRP;} //to be reimplemented
113  void SetCutsPOI(AliFlowTrackCuts* cutsPOI);
114  AliFlowTrackCuts* GetCutsPOI() const {return fCutsPOI;} //to be reimplemented
115 
116  void SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr; }
117  AliCFManager* GetCFManager1() const {return this->fCFManager1; }
118  void SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr; }
119  AliCFManager* GetCFManager2() const {return this->fCFManager2; }
120  TList* GetQAList() const {return fQAList; }
121  void SetQAOn(Bool_t kt) {fQAon = kt; }
122  Bool_t GetQAOn() const {return fQAon; }
124 
126 
127  // setters for common constants
128  void SetNbinsMult( Int_t i ) { fNbinsMult = i; }
129  void SetNbinsPt( Int_t i ) { fNbinsPt = i; }
130  void SetNbinsPhi( Int_t i ) { fNbinsPhi = i; }
131  void SetNbinsEta( Int_t i ) { fNbinsEta = i; }
132  void SetNbinsQ( Int_t i ) { fNbinsQ = i; }
133  void SetNbinsMass( Int_t i ) { fNbinsMass = i; }
134 
135  void SetMultMin( Double_t i ) { fMultMin = i; }
136  void SetMultMax( Double_t i ) { fMultMax = i; }
137  void SetPtMin( Double_t i ) { fPtMin = i; }
138  void SetPtMax( Double_t i ) { fPtMax = i; }
139  void SetPhiMin( Double_t i ) { fPhiMin = i; }
140  void SetPhiMax( Double_t i ) { fPhiMax = i; }
141  void SetEtaMin( Double_t i ) { fEtaMin = i; }
142  void SetEtaMax( Double_t i ) { fEtaMax = i; }
143  void SetQMin( Double_t i ) { fQMin = i; }
144  void SetQMax( Double_t i ) { fQMax = i; }
145  void SetMassMin( Double_t i ) { fMassMin = i; }
146  void SetMassMax( Double_t i ) { fMassMax = i; }
149  void SetCutTPC(Bool_t cut) {fCutTPC = cut;}
150  // end setters common constants
151 
152  // setters for adding by hand flow values (afterburner)
155  void SetPtDifferentialV2( TF1 *gPtV2) {
156  fDifferentialV2 = gPtV2;}
157  void SetFlow( Double_t v1, Double_t v2, Double_t v3=0.0, Double_t v4=0.0, Double_t v5=0.0)
158  {fV1=v1;fV2=v2;fV3=v3;fV4=v4;fV5=v5;}
159 
160  virtual void SetDebugLevel(Int_t level) {fDebug = level;}
161  void SetInput(int input) {fAnalysisInput = input;}
162  void SetMCInput() {fIsMCInput = kTRUE;}
163  void SetUseMCCen( Bool_t kB ) { fUseMCCen = kB; }
164  void SetRejectPileUp( Bool_t kB ) { fRejectPileUp = kB; }
168  void SetCentralityRange(Float_t centrlow=0., Float_t centrup=100.) {fCentrLowLim=centrlow;
169  fCentrUpLim=centrup;}
171  void SetDataSet(DataSet cDataSet) {fDataSet = cDataSet;}
173  void SetTowerEqList(TList* const kList) {this->fTowerEqList = (TList*)kList->Clone(); fUseTowerEq=kTRUE;};
174  TList* GetTowerEqList() const {return this->fTowerEqList;};
175  void SetBadTowerCalibList(TList* const kList) {this->fBadTowerCalibList = (TList*)kList->Clone(); fUseBadTowerCalib=kTRUE;};
177  void SetVZEROGainEqList(TList* const kList) {this->fVZEROGainEqList = (TList*)kList->Clone();};
178  TList* GetVZEROGainEqList() const {return this->fVZEROGainEqList;};
179  void SetVZEROQVecRecList(TList* const kList) {this->fVZEROQVecRecList = (TList*)kList->Clone();};
180  TList* GetVZEROQVecRecList() const {return this->fVZEROQVecRecList;};
181  void SetZDCSpectraCorrList(TList* const kList) {this->fZDCSpectraCorrList = (TList*)kList->Clone(); fUseZDCSpectraCorr=kTRUE;};
183 
184  virtual Int_t GetCenBin(Double_t Centrality);
185  Double_t GetWDist(const AliVVertex* v0, const AliVVertex* v1);
186  Bool_t plpMV(const AliAODEvent* aod);
187  Double_t GetBadTowerResp(Double_t Et, TH2D* BadTowerCalibHist);
188  void SetWhichVZERORings(int minVZC, int maxVZC, int minVZA, int maxVZA) {fMinRingVZC = minVZC; fMaxRingVZC = maxVZC; fMinRingVZA = minVZA; fMaxRingVZA = maxVZA;}
189 
190 private:
193 
194  AnalysisType fAnalysisType; // can be MC, ESD or AOD
195  TString fRPType; // can be Global or Tracklet or FMD
196  AliCFManager* fCFManager1; // correction framework manager
197  AliCFManager* fCFManager2; // correction framework manager
199  AliFlowTrackCuts* fCutsRP; //cuts for RPs
200  AliFlowTrackCuts* fCutsPOI; //cuts for POIs
201  TList* fCutContainer; //contains the cut objects
202  TList* fQAList; // QA histogram list
203  AliAnalysisUtils* fAnalysisUtil;
204  Int_t fMinMult; // Minimum multiplicity from tracks selected using CORRFW
205  Int_t fMaxMult; // Maximum multiplicity from tracks selected using CORRFW
206  Double_t fMinA; // Minimum of eta range for subevent A
207  Double_t fMaxA; // Maximum of eta range for subevent A
208  Double_t fMinB; // Minimum of eta range for subevent B
209  Double_t fMaxB; // Maximum of eta range for subevent B
210 
211  // mc event handlers
212  AliGenEventHeader* fGenHeader;
213  AliGenPythiaEventHeader* fPythiaGenHeader;
214  AliGenHijingEventHeader* fHijingGenHeader;
216 
217  Bool_t fQAon; // flag to set the filling of the QA hostograms
218  Bool_t fLoadCandidates; // true if reciving candidates collection
219 
220  // setters for common constants
221  //histogram sizes
222  Int_t fNbinsMult; // histogram size
223  Int_t fNbinsPt; // histogram size
224  Int_t fNbinsPhi; // histogram size
225  Int_t fNbinsEta; // histogram size
226  Int_t fNbinsQ; // histogram size
227  Int_t fNbinsMass; // histogram size
228 
229  // Histograms limits
230  Double_t fMultMin; // histogram limit
231  Double_t fMultMax; // histogram limit
232  Double_t fPtMin; // histogram limit
233  Double_t fPtMax; // histogram limit
234  Double_t fPhiMin; // histogram limit
235  Double_t fPhiMax; // histogram limit
236  Double_t fEtaMin; // histogram limit
237  Double_t fEtaMax; // histogram limit
238  Double_t fQMin; // histogram limit
239  Double_t fQMax; // histogram limit
240  Double_t fMassMin; // histogram limit
241  Double_t fMassMax; // histogram limit
242  Double_t fHistWeightvsPhiMin; //histogram limit
243  Double_t fHistWeightvsPhiMax; //histogram limit
244  // end common constants
245 
246  // Excluding a range
247  Double_t fExcludedEtaMin; // excluded region limit
248  Double_t fExcludedEtaMax; // excluded region limit
249  Double_t fExcludedPhiMin; // excluded region limit
250  Double_t fExcludedPhiMax; // excluded region limit
251  // End of excluding a range
252 
253  // values afterburner
254  Bool_t fAfterburnerOn; // do we afterburn?
255  Int_t fNonFlowNumberOfTrackClones; // number of times to clone the particles (nonflow)
256  Double_t fV1; // Add Flow. Must be in range [0,0.5].
257  Double_t fV2; // Add Flow. Must be in range [0,0.5].
258  Double_t fV3; // Add Flow. Must be in range [0,0.5].
259  Double_t fV4; // Add Flow. Must be in range [0,0.5].
260  Double_t fV5; // Add Flow. Must be in range [0,0.5].
261  TF1 *fDifferentialV2; // pt-differential v2
262 
263  AliFlowEvent* fFlowEvent; //flowevent
264  Bool_t fShuffleTracks; //serve the tracks shuffled
265 
266  TRandom3* fMyTRandom3; // TRandom3 generator
267 
268  //******************************************************************************************************
269 
270  Int_t fAnalysisInput; // analysis input
271  Bool_t fIsMCInput; // true when input is MC
272  Bool_t fUseMCCen; // use GetZNCentroidInPbPb, with correction from MC
273  Float_t fCentrLowLim; // centrality lower limit
274  Float_t fCentrUpLim; // centrality upper limit
275  CentrEstimator fCentrEstimator; // string for the centrality estimator
279  //
281  //
282  TH1F *fhZNCPM[5];
283  TH1F *fhZNAPM[5];
284  //
285  TH1F *fhZNCPMQiPMC[4];
286  TH1F *fhZNAPMQiPMC[4];
287  //
296  //
297  TH1F *fhAsymm;
300  //
305 
310 
317 
318  const static Int_t fCRCMaxnRun = 211;
319 
320 // TH3D *fhZNSpectraRbR[fCRCMaxnRun]; //! ZNA vs. centrality
321 
322  const static Int_t fCRCnTow = 5;
323  const static Int_t fnCen = 10;
328 // TProfile *fhnTowerGain[fCRCnTow]; //! towers gain
332  TClonesArray* fStack;
334  TH1F *fPtSpecGen[2][10];
335  TH1F *fPtSpecFB32[2][10];
336  TH1F *fPtSpecFB96[2][10];
337  TH1F *fPtSpecFB128[2][10];
338  TH1F *fPtSpecFB768[2][10];
340  TH1F *fCenDis;
341  TH1F *fPileUpCount;
345  TProfile2D *fVZEROMult;
346 
347  AliMultSelection* fMultSelection;
349  TList *fTowerEqList; // list with weights
353  TList *fBadTowerCalibList; // list with original calib files
365  const static Int_t fkVZEROnHar = 4;
366 // TProfile3D *fVZEROQVectorRecQx[fkVZEROnHar]; //!
367 // TProfile3D *fVZEROQVectorRecQy[fkVZEROnHar]; //!
370  const static Int_t fkVZEROnQAplots = 8;
378 
379  // TrackQA
381  const static Int_t fKNFBs = 4;
385  TProfile2D* fTrackQADphi[fKNFBs][4];
389 
390  ClassDef(AliAnalysisTaskCRCZDC,11);
391 
392 };
393 
394 #endif
void SetNonFlowNumberOfTrackClones(Int_t n)
TH2F * fhZDCCvsZDCCA
ZNC vs ZNA;.
AliFlowTrackCuts * GetCutsPOI() const
static const Int_t fkVZEROnQAplots
TH2F * fhZNvsVZERO
ZNC+ZNA vs ZPC+ZPA;.
TH1F * fPtSpecFB128[2][10]
PtSpecRec FB96.
TH3D * fhZNSpectraCor
ZNA vs. centrality.
void SetAfterburnerOn(Bool_t b=kTRUE)
double Double_t
Definition: External.C:58
Definition: External.C:260
TList * GetZDCSpectraCorrList() const
TH1F * fPileUpCount
centrality distribution
void SetRejectPileUpTight(Bool_t kB)
Int_t fRunList[fCRCMaxnRun]
void SetHistWeightvsPhiMax(Double_t i)
Definition: External.C:236
void SetSubeventEtaRange(Double_t minA, Double_t maxA, Double_t minB, Double_t maxB)
static const Int_t fCRCnTow
TH1F * fhZNCPMQiPMC[4]
ZNA PM high res.
TH2F * fhZNCvsZPC
ZDCC vs ZDCCA.
void SetTowerEqList(TList *const kList)
static const Int_t fkVZEROnHar
void SetZDCSpectraCorrList(TList *const kList)
void DefineDeadZone(Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax)
virtual void SetDebugLevel(Int_t level)
TH2F * fhZNCvsAsymm
ZNA vs asymmetry.
TH3D * fhZNCenDis[2]
ZDC vs VZERO;.
void SetCutsPOI(AliFlowTrackCuts *cutsPOI)
void SetMaxMult(Int_t multmax)
TH1F * fPtSpecFB768[2][10]
PtSpecRec FB128.
TH1F * fPtSpecGen[2][10]
list with pt spectra
virtual void UserExec(Option_t *option)
void SetCentralityRange(Float_t centrlow=0., Float_t centrup=100.)
TH2F * fhZNCvscentrality
ZNC vs asymmetry.
TList * GetVZEROQVecRecList() const
void SetCFManager1(AliCFManager *cfmgr)
virtual Int_t GetCenBin(Double_t Centrality)
void SetVZEROQVecRecList(TList *const kList)
void SetCutsRP(AliFlowTrackCuts *cutsRP)
TH3D * fTrackQADCAxy[fKNFBs][4]
TH2F * fhZNCvsZNA
PMQi/PMC for ZNA.
TH1F * fhAsymm
ZN centroid vs centrality.
TH3D * fhZNBCCorr
ZNA vs. centrality.
TH2F * fhZNAvsZPA
ZNC vs ZPC;.
int Int_t
Definition: External.C:63
TH1F * fhZNAPM[5]
ZNC PM high res.
TProfile3D * fVZEROQVectorRecQxStored[fkVZEROnHar]
TF1 * fMultTOFLowCut
centrality distribution
void SetResetNegativeZDC(Bool_t kB)
unsigned int UInt_t
Definition: External.C:33
void SetWhichVZERORings(int minVZC, int maxVZC, int minVZA, int maxVZA)
void SetMinMult(Int_t multmin)
float Float_t
Definition: External.C:68
AliMultSelection * fMultSelection
Definition: External.C:252
Definition: External.C:228
virtual void UserCreateOutputObjects()
Definition: External.C:212
TH3D * fhZNSpectra
ZNA vs. centrality.
TList * GetTowerEqList() const
AliFlowEventCuts * fCutsEvent
TH1F * fPileUpMultSelCount
centrality distribution
Bool_t fUseTowerEq
MultSelection (RUN2 centrality estimator)
Bool_t plpMV(const AliAODEvent *aod)
AliFlowTrackCuts * fCutsPOI
TH2F * fhZPAvscentrality
ZNC vs. centrality.
TProfile3D * fVZEROQVectorRecQyStored[fkVZEROnHar]
AliGenEventHeader * fGenHeader
TProfile2D * fTrackQADphi[fKNFBs][4]
void SetVZEROGainEqList(TList *const kList)
TProfile * fZNCTower[fCRCMaxnRun][fCRCnTow]
Q Vectors list per run.
TList * fCRCQVecListRun[fCRCMaxnRun]
Run list.
virtual void Terminate(Option_t *option)
AliAnalysisTaskCRCZDC & operator=(const AliAnalysisTaskCRCZDC &dud)
TProfile * fZNATower[fCRCMaxnRun][fCRCnTow]
ZNC tower spectra.
TH2F * fhZPCvscentrality
ZNA vs. centrality.
TClonesArray * fStack
ZNA tower spectra.
void SetAnalysisType(AnalysisType type)
void SetCorrectPhiTracklets(Bool_t kB)
TList * GetBadTowerCalibList() const
TH2D * fTrackQApT[fKNFBs][4]
TProfile2D * fVZEROQVectorRecFinal[fkVZEROnHar][fkVZEROnQAplots]
static const Int_t fCRCMaxnRun
AliCFManager * GetCFManager2() const
void SetDataSet(DataSet cDataSet)
Double_t GetBadTowerResp(Double_t Et, TH2D *BadTowerCalibHist)
TH3D * fQATrackTPCNcls
ZNA vs. centrality.
TH1F * fhZNAPMQiPMC[4]
PMQi/PMC for ZNC.
AliFlowEventCuts * GetCutsEvent() const
TH3D * fTrackQADCAz[fKNFBs][4]
TH2F * fhZDCvsVZERO
ZN vs VZERO;.
void SetCentralityEstimator(CentrEstimator centrest)
TH1F * fPtSpecFB96[2][10]
PtSpecRec FB32.
TH3D * fhZNSpectraPow
ZNA vs. centrality.
const char Option_t
Definition: External.C:48
void SetBadTowerCalibList(TList *const kList)
TH2F * fhZNAvsAsymm
ZN asymmetry.
TH2F * fhZNAvscentrality
ZNC vs. centrality.
bool Bool_t
Definition: External.C:53
TH1F * fPtSpecFB32[2][10]
PtSpecGen.
TH1F * fhZNCPM[5]
list send on output slot 0
Double_t GetWDist(const AliVVertex *v0, const AliVVertex *v1)
Bool_t SelectPileup(AliAODEvent *aod)
Bool_t fCutTPC
PtSpecRec FB768.
void SetHistWeightvsPhiMin(Double_t i)
AliCFManager * GetCFManager1() const
AliFlowTrackCuts * fCutsRP
void SetFlow(Double_t v1, Double_t v2, Double_t v3=0.0, Double_t v4=0.0, Double_t v5=0.0)
Bool_t fUseBadTowerCalib
list for storing calib files
AliAnalysisUtils * fAnalysisUtil
Event selection.
void SetCFManager2(AliCFManager *cfmgr)
TList * GetVZEROGainEqList() const
TH2F * fhZNvsZP
ZNA vs ZPA;.
AliGenHijingEventHeader * fHijingGenHeader
AliFlowTrackCuts * GetCutsRP() const
void SetPtDifferentialV2(TF1 *gPtV2)
AliGenPythiaEventHeader * fPythiaGenHeader
void SetRPType(TString rptype)
void SetCutsEvent(AliFlowEventCuts *cutsEvent)