AliPhysics  e59a9ba (e59a9ba)
 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 TROOT;
35 class TSystem;
36 class TFile;
37 class TH1F;
38 class TH2F;
39 class TProfile;
40 
41 class AliAnalysisTaskCRCZDC : public AliAnalysisTaskSE {
42 
43 public:
44 
45  enum kAnalysisInput{kESD=1, kAOD=2};
47  AliAnalysisTaskCRCZDC(const char *name, TString RPtype = "", Bool_t QAon = kFALSE, TString DataSet="2010", UInt_t seed=666, Bool_t bCandidates=kFALSE);
48  virtual ~AliAnalysisTaskCRCZDC();
49  virtual void InitializeRunArrays();
50 
51  // Implementation of interface methods
52  virtual void UserCreateOutputObjects();
53  virtual void UserExec(Option_t *option);
54  virtual void Terminate(Option_t *option);
55 
56  void SetAnalysisType(TString type) { this->fAnalysisType = type; }
57  TString GetAnalysisType() const { return this->fAnalysisType; }
58 
59  void SetRPType(TString rptype) { this->fRPType = rptype; }
60  TString GetRPType() const { return this->fRPType; }
61 
62  void SetMinMult(Int_t multmin) {this->fMinMult = multmin; }
63  Int_t GetMinMult() const {return this->fMinMult; }
64  void SetMaxMult(Int_t multmax) {this->fMaxMult = multmax; }
65  Int_t GetMaxMult() const {return this->fMaxMult; }
66 
67  void SetSubeventEtaRange(Double_t minA, Double_t maxA, Double_t minB, Double_t maxB)
68  {this->fMinA = minA; this->fMaxA = maxA; this->fMinB = minB; this->fMaxB = maxB; }
69  Double_t GetMinA() const {return this->fMinA;}
70  Double_t GetMaxA() const {return this->fMaxA;}
71  Double_t GetMinB() const {return this->fMinB;}
72  Double_t GetMaxB() const {return this->fMaxB;}
73 
74  void DefineDeadZone( Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax )
75  {this->fExcludedEtaMin = etaMin; this->fExcludedEtaMax = etaMax;
76  this->fExcludedPhiMin = phiMin; this->fExcludedPhiMax = phiMax; }
77 
78  void SetCutsEvent(AliFlowEventCuts* cutsEvent) {fCutsEvent=cutsEvent;}
80  void SetCutsRP(AliFlowTrackCuts* cutsRP);
81  AliFlowTrackCuts* GetCutsRP() const {return fCutsRP;} //to be reimplemented
82  void SetCutsPOI(AliFlowTrackCuts* cutsPOI);
83  AliFlowTrackCuts* GetCutsPOI() const {return fCutsPOI;} //to be reimplemented
84 
85  void SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr; }
86  AliCFManager* GetCFManager1() const {return this->fCFManager1; }
87  void SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr; }
88  AliCFManager* GetCFManager2() const {return this->fCFManager2; }
89  TList* GetQAList() const {return fQAList; }
90  void SetQAOn(Bool_t kt) {fQAon = kt; }
91  Bool_t GetQAOn() const {return fQAon; }
92 
93  void SetShuffleTracks(Bool_t b) {fShuffleTracks=b;}
94 
95  // setters for common constants
96  void SetNbinsMult( Int_t i ) { fNbinsMult = i; }
97  void SetNbinsPt( Int_t i ) { fNbinsPt = i; }
98  void SetNbinsPhi( Int_t i ) { fNbinsPhi = i; }
99  void SetNbinsEta( Int_t i ) { fNbinsEta = i; }
100  void SetNbinsQ( Int_t i ) { fNbinsQ = i; }
101  void SetNbinsMass( Int_t i ) { fNbinsMass = i; }
102 
103  void SetMultMin( Double_t i ) { fMultMin = i; }
104  void SetMultMax( Double_t i ) { fMultMax = i; }
105  void SetPtMin( Double_t i ) { fPtMin = i; }
106  void SetPtMax( Double_t i ) { fPtMax = i; }
107  void SetPhiMin( Double_t i ) { fPhiMin = i; }
108  void SetPhiMax( Double_t i ) { fPhiMax = i; }
109  void SetEtaMin( Double_t i ) { fEtaMin = i; }
110  void SetEtaMax( Double_t i ) { fEtaMax = i; }
111  void SetQMin( Double_t i ) { fQMin = i; }
112  void SetQMax( Double_t i ) { fQMax = i; }
113  void SetMassMin( Double_t i ) { fMassMin = i; }
114  void SetMassMax( Double_t i ) { fMassMax = i; }
117  void SetCutTPC(Bool_t cut) {fCutTPC = cut;}
118  // end setters common constants
119 
120  // setters for adding by hand flow values (afterburner)
121  void SetAfterburnerOn(Bool_t b=kTRUE) {fAfterburnerOn=b;}
123  void SetPtDifferentialV2( TF1 *gPtV2) {
124  fDifferentialV2 = gPtV2;}
125  void SetFlow( Double_t v1, Double_t v2, Double_t v3=0.0, Double_t v4=0.0, Double_t v5=0.0)
126  {fV1=v1;fV2=v2;fV3=v3;fV4=v4;fV5=v5;}
127 
128  virtual void SetDebugLevel(Int_t level) {fDebug = level;}
129  void SetInput(int input) {fAnalysisInput = input;}
130  void SetMCInput() {fIsMCInput = kTRUE;}
131  void SetUseMCCen( Bool_t kB ) { fUseMCCen = kB; }
132  void SetRejectPileUp( Bool_t kB ) { fRejectPileUp = kB; }
133  void SetCentralityRange(Float_t centrlow=0., Float_t centrup=100.) {fCentrLowLim=centrlow;
134  fCentrUpLim=centrup;}
135  void SetCentralityEstimator(TString centrest = "V0M") {fCentrEstimator=centrest;}
136  void SetDataSet(TString DataSet) {fDataSet = DataSet;}
137  void SetZDCGainAlpha( Float_t a ) { fZDCGainAlpha = a; }
138 
139 private:
142 
143  TString fAnalysisType; // can be MC, ESD or AOD
144  TString fRPType; // can be Global or Tracklet or FMD
145  AliCFManager* fCFManager1; // correction framework manager
146  AliCFManager* fCFManager2; // correction framework manager
148  AliFlowTrackCuts* fCutsRP; //cuts for RPs
149  AliFlowTrackCuts* fCutsPOI; //cuts for POIs
150  TList* fCutContainer; //contains the cut objects
151  TList* fQAList; // QA histogram list
152  AliAnalysisUtils* fAnalysisUtil;
153  Int_t fMinMult; // Minimum multiplicity from tracks selected using CORRFW
154  Int_t fMaxMult; // Maximum multiplicity from tracks selected using CORRFW
155  Double_t fMinA; // Minimum of eta range for subevent A
156  Double_t fMaxA; // Maximum of eta range for subevent A
157  Double_t fMinB; // Minimum of eta range for subevent B
158  Double_t fMaxB; // Maximum of eta range for subevent B
159 
160  // mc event handlers
161  AliGenEventHeader* fGenHeader;
162  AliGenPythiaEventHeader* fPythiaGenHeader;
163  AliGenHijingEventHeader* fHijingGenHeader;
165 
166  Bool_t fQAon; // flag to set the filling of the QA hostograms
167  Bool_t fLoadCandidates; // true if reciving candidates collection
168 
169  // setters for common constants
170  //histogram sizes
171  Int_t fNbinsMult; // histogram size
172  Int_t fNbinsPt; // histogram size
173  Int_t fNbinsPhi; // histogram size
174  Int_t fNbinsEta; // histogram size
175  Int_t fNbinsQ; // histogram size
176  Int_t fNbinsMass; // histogram size
177 
178  // Histograms limits
179  Double_t fMultMin; // histogram limit
180  Double_t fMultMax; // histogram limit
181  Double_t fPtMin; // histogram limit
182  Double_t fPtMax; // histogram limit
183  Double_t fPhiMin; // histogram limit
184  Double_t fPhiMax; // histogram limit
185  Double_t fEtaMin; // histogram limit
186  Double_t fEtaMax; // histogram limit
187  Double_t fQMin; // histogram limit
188  Double_t fQMax; // histogram limit
189  Double_t fMassMin; // histogram limit
190  Double_t fMassMax; // histogram limit
191  Double_t fHistWeightvsPhiMin; //histogram limit
192  Double_t fHistWeightvsPhiMax; //histogram limit
193  // end common constants
194 
195  // Excluding a range
196  Double_t fExcludedEtaMin; // excluded region limit
197  Double_t fExcludedEtaMax; // excluded region limit
198  Double_t fExcludedPhiMin; // excluded region limit
199  Double_t fExcludedPhiMax; // excluded region limit
200  // End of excluding a range
201 
202  // values afterburner
203  Bool_t fAfterburnerOn; // do we afterburn?
204  Int_t fNonFlowNumberOfTrackClones; // number of times to clone the particles (nonflow)
205  Double_t fV1; // Add Flow. Must be in range [0,0.5].
206  Double_t fV2; // Add Flow. Must be in range [0,0.5].
207  Double_t fV3; // Add Flow. Must be in range [0,0.5].
208  Double_t fV4; // Add Flow. Must be in range [0,0.5].
209  Double_t fV5; // Add Flow. Must be in range [0,0.5].
210  TF1 *fDifferentialV2; // pt-differential v2
211 
212  AliFlowEvent* fFlowEvent; //flowevent
213  Bool_t fShuffleTracks; //serve the tracks shuffled
214 
215  TRandom3* fMyTRandom3; // TRandom3 generator
216 
217  //******************************************************************************************************
218 
219  Int_t fAnalysisInput; // analysis input
220  Bool_t fIsMCInput; // true when input is MC
221  Bool_t fUseMCCen; // use GetZNCentroidInPbPb, with correction from MC
222  Float_t fCentrLowLim; // centrality lower limit
223  Float_t fCentrUpLim; // centrality upper limit
224  TString fCentrEstimator; // string for the centrality estimator
226  //
227  TList *fOutput;
228  //
229  TH1F *fhZNCPM[5];
230  TH1F *fhZNAPM[5];
231  TH1F *fhZPCPM[5];
232  TH1F *fhZPAPM[5];
233  TH1F *fhZEM[2];
234  TH1F *fhZNCPMlg[5];
235  TH1F *fhZNAPMlg[5];
236  TH1F *fhZPCPMlg[5];
237  TH1F *fhZPAPMlg[5];
238  TH1F *fhTDCraw[6];
239  TH1F *fhTDC[6];
240  //
241  TH1F *fhZNCPMQiPMC[4];
242  TH1F *fhZNAPMQiPMC[4];
243  TH1F *fhZPCPMQiPMC[4];
244  TH1F *fhZPAPMQiPMC[4];
245  //
246  TH2F *fhZNCvsZNA;
247  TH2F *fhZPCvsZPA;
249  TH2F *fhZNCvsZPC;
250  TH2F *fhZNAvsZPA;
251  TH2F *fhZNvsZP;
252  TH2F *fhZNvsVZERO;
253  TH2F *fhZDCvsVZERO;
255  TH2F *fhZDCvsNclu1;
256  TH2F *fhDebunch;
259  TH2F *fhPMCvsPMQ[4];
260  //
261  TH1F *fhAsymm;
262  TH2F *fhZNAvsAsymm;
263  TH2F *fhZNCvsAsymm;
264  //
269  //
274  //
275  TH1F *fhZNCpmcLR;
276  TH1F *fhZNApmcLR;
277  TH1F *fhZPCpmcLR;
278  TH1F *fhZPApmcLR;
279 
280  const static Int_t fCRCMaxnRun = 211;
281  const static Int_t fCRCnTow = 8;
282  Int_t fCRCnRun;
283  Float_t fZDCGainAlpha;
284  TString fDataSet;
288  AliStack* fStack;
289  TH1F *fPtSpecGen[10];
290  TH1F *fPtSpecFB32[10];
291  TH1F *fPtSpecFB96[10];
292  TH1F *fPtSpecFB128[10];
293  TH1F *fPtSpecFB768[10];
294  Bool_t fCutTPC;
295  TH1F *fCenDis;
296  TClonesArray* fMCStack;
297 
299 
300 };
301 
302 #endif
303 
TH1F * fhZPCpmcLR
ZNA PMC low res. chain.
void SetNonFlowNumberOfTrackClones(Int_t n)
TH2F * fhZDCCvsZDCCA
ZPC vs ZPA;.
AliFlowTrackCuts * GetCutsPOI() const
TH2F * fhZNvsVZERO
ZNC+ZNA vs ZPC+ZPA;.
void SetAfterburnerOn(Bool_t b=kTRUE)
TH1F * fhZPCPMlg[5]
ZNA PM low res.
Int_t fRunList[fCRCMaxnRun]
TH2F * fhZNCpmcvscentr
ZPA vs. centrality.
void SetHistWeightvsPhiMax(Double_t i)
void SetSubeventEtaRange(Double_t minA, Double_t maxA, Double_t minB, Double_t maxB)
TH2F * fhZDCvsTracklets
ZDC vs VZERO;.
static const Int_t fCRCnTow
TH1F * fhZNCPMQiPMC[4]
corrected TDC histos
TH2F * fhZNCvsZPC
ZDCC vs ZDCCA.
TH2F * fhZPCpmcvscentr
ZNA vs. centrality.
TH1F * fPtSpecFB32[10]
PtSpecGen.
void DefineDeadZone(Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax)
virtual void SetDebugLevel(Int_t level)
TH1F * fhZNApmcLR
ZPA PMC low res. chain.
TH2F * fhZNCvsAsymm
ZNA vs asymmetry.
void SetCutsPOI(AliFlowTrackCuts *cutsPOI)
void SetMaxMult(Int_t multmax)
virtual void UserExec(Option_t *option)
void SetCentralityRange(Float_t centrlow=0., Float_t centrup=100.)
TH2F * fhZNCvscentrality
ZNC vs asymmetry.
TH1F * fhZPCPMQiPMC[4]
PMQi/PMC for ZNA.
TH1F * fhZPCPM[5]
ZNA PM high res.
void SetCFManager1(AliCFManager *cfmgr)
void SetCutsRP(AliFlowTrackCuts *cutsRP)
TH2F * fhZPCvsZPA
ZNC vs ZNA;.
TH2F * fhZNCvsZNA
PMQi/PMC for ZPA.
TH2F * fhDebunch
ZDC vs N_cluster layer 1;.
TH1F * fhAsymm
PMC vs sum PMQi.
TH1F * fhTDC[6]
raw TDC histos
void SetDataSet(TString DataSet)
TH1F * fhTDCraw[6]
ZPA PM low res.
TH2F * fhZNApmcvscentr
ZNC vs. centrality.
TH2F * fhZNAvsZPA
ZNC vs ZPC;.
void SetAnalysisType(TString type)
TH1F * fhZNAPM[5]
ZNC PM high res.
void SetMinMult(Int_t multmin)
virtual void UserCreateOutputObjects()
TH1F * fhZPAPMQiPMC[4]
PMQi/PMC for ZPC.
TH2F * fhZDCvsNclu1
ZDC vs N_tracklets;.
AliFlowEventCuts * fCutsEvent
TH1F * fhZPApmcLR
ZPC PMC low res. chain.
TProfile * fhnTowerGain[fCRCMaxnRun][fCRCnTow]
Run list.
AliStack * fStack
Q Vectors list per run.
AliFlowTrackCuts * fCutsPOI
ClassDef(AliAnalysisTaskCRCZDC, 4)
MC stack.
TString GetAnalysisType() const
TH2F * fhZPAvscentrality
ZPC vs. centrality.
AliGenEventHeader * fGenHeader
TList * fCRCQVecListRun[fCRCMaxnRun]
towers gain
TH1F * fPtSpecFB128[10]
PtSpecRec FB96.
virtual void Terminate(Option_t *option)
TH2F * fhZPApmcvscentr
ZPC vs. centrality.
AliAnalysisTaskCRCZDC & operator=(const AliAnalysisTaskCRCZDC &dud)
TH2F * fhZPCvscentrality
ZNA vs. centrality.
TH2F * fhZNAcentroid
ZNC centroid.
TClonesArray * fMCStack
centrality distribution
static const Int_t fCRCMaxnRun
ZPA PMC low res. chain.
AliCFManager * GetCFManager2() const
TH1F * fPtSpecFB96[10]
PtSpecRec FB32.
TH1F * fhZNAPMQiPMC[4]
PMQi/PMC for ZNC.
AliFlowEventCuts * GetCutsEvent() const
TH2F * fhZDCvsVZERO
ZN vs VZERO;.
TH1F * fhZPAPMlg[5]
ZPC PM low res.
TH2F * fhZNAvsAsymm
ZN asymmetry.
TH2F * fhZNAvscentrality
ZNC vs. centrality.
TH1F * fhZPAPM[5]
ZPC PM high res.
TH1F * fhZNCPM[5]
list send on output slot 0
Bool_t fCutTPC
PtSpecRec FB768.
void SetHistWeightvsPhiMin(Double_t i)
TH2F * fhPMCvsPMQ[4]
ZNA centroid.
TH1F * fhZNCpmcLR
ZPA vs. centrality.
TH1F * fPtSpecFB768[10]
PtSpecRec FB128.
TH1F * fhZNAPMlg[5]
ZNC PM low res.
TH1F * fhZEM[2]
ZPA PM high res.
void SetCentralityEstimator(TString centrest="V0M")
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)
AliAnalysisUtils * fAnalysisUtil
Event selection.
void SetCFManager2(AliCFManager *cfmgr)
TH2F * fhZNCcentroid
Debunch;.
TH2F * fhZNvsZP
ZNA vs ZPA;.
AliGenHijingEventHeader * fHijingGenHeader
AliFlowTrackCuts * GetCutsRP() const
TH1F * fhZNCPMlg[5]
ZEM PM high res.
void SetPtDifferentialV2(TF1 *gPtV2)
AliGenPythiaEventHeader * fPythiaGenHeader
void SetRPType(TString rptype)
void SetCutsEvent(AliFlowEventCuts *cutsEvent)