AliPhysics  7273240 (7273240)
 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 TProfile3D;
44 class TH3D;
45 class TH3F;
46 
48 
49 public:
50 
51  enum kAnalysisInput{kESD=1, kAOD=2};
53  AliAnalysisTaskCRCZDC(const char *name, TString RPtype = "", Bool_t QAon = kFALSE, UInt_t seed=666, Bool_t bCandidates=kFALSE);
54  virtual ~AliAnalysisTaskCRCZDC();
55 
56  enum DataSet { k2010,
60  };
61 
62  virtual void InitializeRunArrays();
63 
64  // Implementation of interface methods
65  virtual void UserCreateOutputObjects();
66  virtual void UserExec(Option_t *option);
67  virtual void Terminate(Option_t *option);
68 
69  void SetAnalysisType(TString type) { this->fAnalysisType = type; }
70  TString GetAnalysisType() const { return this->fAnalysisType; }
71 
72  void SetRPType(TString rptype) { this->fRPType = rptype; }
73  TString GetRPType() const { return this->fRPType; }
74 
75  void SetMinMult(Int_t multmin) {this->fMinMult = multmin; }
76  Int_t GetMinMult() const {return this->fMinMult; }
77  void SetMaxMult(Int_t multmax) {this->fMaxMult = multmax; }
78  Int_t GetMaxMult() const {return this->fMaxMult; }
79 
80  void SetSubeventEtaRange(Double_t minA, Double_t maxA, Double_t minB, Double_t maxB)
81  {this->fMinA = minA; this->fMaxA = maxA; this->fMinB = minB; this->fMaxB = maxB; }
82  Double_t GetMinA() const {return this->fMinA;}
83  Double_t GetMaxA() const {return this->fMaxA;}
84  Double_t GetMinB() const {return this->fMinB;}
85  Double_t GetMaxB() const {return this->fMaxB;}
86 
87  void DefineDeadZone( Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax )
88  {this->fExcludedEtaMin = etaMin; this->fExcludedEtaMax = etaMax;
89  this->fExcludedPhiMin = phiMin; this->fExcludedPhiMax = phiMax; }
90 
91  void SetCutsEvent(AliFlowEventCuts* cutsEvent) {fCutsEvent=cutsEvent;}
93  void SetCutsRP(AliFlowTrackCuts* cutsRP);
94  AliFlowTrackCuts* GetCutsRP() const {return fCutsRP;} //to be reimplemented
95  void SetCutsPOI(AliFlowTrackCuts* cutsPOI);
96  AliFlowTrackCuts* GetCutsPOI() const {return fCutsPOI;} //to be reimplemented
97 
98  void SetCFManager1(AliCFManager* cfmgr) {this->fCFManager1 = cfmgr; }
99  AliCFManager* GetCFManager1() const {return this->fCFManager1; }
100  void SetCFManager2(AliCFManager* cfmgr) {this->fCFManager2 = cfmgr; }
101  AliCFManager* GetCFManager2() const {return this->fCFManager2; }
102  TList* GetQAList() const {return fQAList; }
103  void SetQAOn(Bool_t kt) {fQAon = kt; }
104  Bool_t GetQAOn() const {return fQAon; }
105 
107 
108  // setters for common constants
109  void SetNbinsMult( Int_t i ) { fNbinsMult = i; }
110  void SetNbinsPt( Int_t i ) { fNbinsPt = i; }
111  void SetNbinsPhi( Int_t i ) { fNbinsPhi = i; }
112  void SetNbinsEta( Int_t i ) { fNbinsEta = i; }
113  void SetNbinsQ( Int_t i ) { fNbinsQ = i; }
114  void SetNbinsMass( Int_t i ) { fNbinsMass = i; }
115 
116  void SetMultMin( Double_t i ) { fMultMin = i; }
117  void SetMultMax( Double_t i ) { fMultMax = i; }
118  void SetPtMin( Double_t i ) { fPtMin = i; }
119  void SetPtMax( Double_t i ) { fPtMax = i; }
120  void SetPhiMin( Double_t i ) { fPhiMin = i; }
121  void SetPhiMax( Double_t i ) { fPhiMax = i; }
122  void SetEtaMin( Double_t i ) { fEtaMin = i; }
123  void SetEtaMax( Double_t i ) { fEtaMax = i; }
124  void SetQMin( Double_t i ) { fQMin = i; }
125  void SetQMax( Double_t i ) { fQMax = i; }
126  void SetMassMin( Double_t i ) { fMassMin = i; }
127  void SetMassMax( Double_t i ) { fMassMax = i; }
130  void SetCutTPC(Bool_t cut) {fCutTPC = cut;}
131  // end setters common constants
132 
133  // setters for adding by hand flow values (afterburner)
136  void SetPtDifferentialV2( TF1 *gPtV2) {
137  fDifferentialV2 = gPtV2;}
138  void SetFlow( Double_t v1, Double_t v2, Double_t v3=0.0, Double_t v4=0.0, Double_t v5=0.0)
139  {fV1=v1;fV2=v2;fV3=v3;fV4=v4;fV5=v5;}
140 
141  virtual void SetDebugLevel(Int_t level) {fDebug = level;}
142  void SetInput(int input) {fAnalysisInput = input;}
143  void SetMCInput() {fIsMCInput = kTRUE;}
144  void SetUseMCCen( Bool_t kB ) { fUseMCCen = kB; }
145  void SetRejectPileUp( Bool_t kB ) { fRejectPileUp = kB; }
146  void SetCentralityRange(Float_t centrlow=0., Float_t centrup=100.) {fCentrLowLim=centrlow;
147  fCentrUpLim=centrup;}
148  void SetCentralityEstimator(TString centrest = "V0M") {fCentrEstimator=centrest;}
149  void SetDataSet(DataSet cDataSet) {fDataSet = cDataSet;}
151  void SetTowerEqList(TList* const kList) {this->fTowerEqList = (TList*)kList->Clone();};
152  TList* GetTowerEqList() const {return this->fTowerEqList;};
153  virtual Int_t GetCenBin(Double_t Centrality);
154  Double_t GetWDist(const AliVVertex* v0, const AliVVertex* v1);
155  Bool_t plpMV(const AliAODEvent* aod);
156 
157 private:
160 
161  TString fAnalysisType; // can be MC, ESD or AOD
162  TString fRPType; // can be Global or Tracklet or FMD
163  AliCFManager* fCFManager1; // correction framework manager
164  AliCFManager* fCFManager2; // correction framework manager
166  AliFlowTrackCuts* fCutsRP; //cuts for RPs
167  AliFlowTrackCuts* fCutsPOI; //cuts for POIs
168  TList* fCutContainer; //contains the cut objects
169  TList* fQAList; // QA histogram list
170  AliAnalysisUtils* fAnalysisUtil;
171  Int_t fMinMult; // Minimum multiplicity from tracks selected using CORRFW
172  Int_t fMaxMult; // Maximum multiplicity from tracks selected using CORRFW
173  Double_t fMinA; // Minimum of eta range for subevent A
174  Double_t fMaxA; // Maximum of eta range for subevent A
175  Double_t fMinB; // Minimum of eta range for subevent B
176  Double_t fMaxB; // Maximum of eta range for subevent B
177 
178  // mc event handlers
179  AliGenEventHeader* fGenHeader;
180  AliGenPythiaEventHeader* fPythiaGenHeader;
181  AliGenHijingEventHeader* fHijingGenHeader;
183 
184  Bool_t fQAon; // flag to set the filling of the QA hostograms
185  Bool_t fLoadCandidates; // true if reciving candidates collection
186 
187  // setters for common constants
188  //histogram sizes
189  Int_t fNbinsMult; // histogram size
190  Int_t fNbinsPt; // histogram size
191  Int_t fNbinsPhi; // histogram size
192  Int_t fNbinsEta; // histogram size
193  Int_t fNbinsQ; // histogram size
194  Int_t fNbinsMass; // histogram size
195 
196  // Histograms limits
197  Double_t fMultMin; // histogram limit
198  Double_t fMultMax; // histogram limit
199  Double_t fPtMin; // histogram limit
200  Double_t fPtMax; // histogram limit
201  Double_t fPhiMin; // histogram limit
202  Double_t fPhiMax; // histogram limit
203  Double_t fEtaMin; // histogram limit
204  Double_t fEtaMax; // histogram limit
205  Double_t fQMin; // histogram limit
206  Double_t fQMax; // histogram limit
207  Double_t fMassMin; // histogram limit
208  Double_t fMassMax; // histogram limit
209  Double_t fHistWeightvsPhiMin; //histogram limit
210  Double_t fHistWeightvsPhiMax; //histogram limit
211  // end common constants
212 
213  // Excluding a range
214  Double_t fExcludedEtaMin; // excluded region limit
215  Double_t fExcludedEtaMax; // excluded region limit
216  Double_t fExcludedPhiMin; // excluded region limit
217  Double_t fExcludedPhiMax; // excluded region limit
218  // End of excluding a range
219 
220  // values afterburner
221  Bool_t fAfterburnerOn; // do we afterburn?
222  Int_t fNonFlowNumberOfTrackClones; // number of times to clone the particles (nonflow)
223  Double_t fV1; // Add Flow. Must be in range [0,0.5].
224  Double_t fV2; // Add Flow. Must be in range [0,0.5].
225  Double_t fV3; // Add Flow. Must be in range [0,0.5].
226  Double_t fV4; // Add Flow. Must be in range [0,0.5].
227  Double_t fV5; // Add Flow. Must be in range [0,0.5].
228  TF1 *fDifferentialV2; // pt-differential v2
229 
230  AliFlowEvent* fFlowEvent; //flowevent
231  Bool_t fShuffleTracks; //serve the tracks shuffled
232 
233  TRandom3* fMyTRandom3; // TRandom3 generator
234 
235  //******************************************************************************************************
236 
237  Int_t fAnalysisInput; // analysis input
238  Bool_t fIsMCInput; // true when input is MC
239  Bool_t fUseMCCen; // use GetZNCentroidInPbPb, with correction from MC
240  Float_t fCentrLowLim; // centrality lower limit
241  Float_t fCentrUpLim; // centrality upper limit
242  TString fCentrEstimator; // string for the centrality estimator
244  //
246  //
247  TH1F *fhZNCPM[5];
248  TH1F *fhZNAPM[5];
249  TH1F *fhZPCPM[5];
250  TH1F *fhZPAPM[5];
251  TH1F *fhZEM[2];
252  TH1F *fhZNCPMlg[5];
253  TH1F *fhZNAPMlg[5];
254  TH1F *fhZPCPMlg[5];
255  TH1F *fhZPAPMlg[5];
256  TH1F *fhTDCraw[6];
257  TH1F *fhTDC[6];
258  //
259  TH1F *fhZNCPMQiPMC[4];
260  TH1F *fhZNAPMQiPMC[4];
261  TH1F *fhZPCPMQiPMC[4];
262  TH1F *fhZPAPMQiPMC[4];
263  //
278  //
279  TH1F *fhAsymm;
282  //
287  //
292  //
293  TH1F *fhZNCpmcLR;
294  TH1F *fhZNApmcLR;
295  TH1F *fhZPCpmcLR;
296  TH1F *fhZPApmcLR;
297 
298  const static Int_t fCRCMaxnRun = 211;
299  const static Int_t fCRCnTow = 8;
300  const static Int_t fnCen = 10;
305 // TProfile *fhnTowerGain[fCRCnTow]; //! towers gain
306 // TProfile3D *fhnTowerGainVtx[fnCen][fCRCnTow]; //! towers gain vtx
308  TProfile *fZNCTower[fCRCMaxnRun];
309  TProfile *fZNATower[fCRCMaxnRun];
310  TClonesArray* fStack;
312  TH1F *fPtSpecGen[10];
313  TH1F *fPtSpecFB32[10];
314  TH1F *fPtSpecFB96[10];
315  TH1F *fPtSpecFB128[10];
316  TH1F *fPtSpecFB768[10];
318  TH1F *fCenDis;
319  AliMultSelection* fMultSelection;
320  AliCentrality* fCentrality;
321  TList *fTowerEqList; // list with weights
324 
326 
327 };
328 
329 #endif
330 
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;.
ClassDef(AliAnalysisTaskCRCZDC, 6)
void SetAfterburnerOn(Bool_t b=kTRUE)
double Double_t
Definition: External.C:58
Definition: External.C:260
TH1F * fhZPCPMlg[5]
ZNA PM low res.
Int_t fRunList[fCRCMaxnRun]
TH2F * fhZNCpmcvscentr
ZPA vs. centrality.
void SetHistWeightvsPhiMax(Double_t i)
Definition: External.C:236
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
TH1F * fPtSpecGen[10]
list with pt spectra
TH2F * fhZNCvsZPC
ZDCC vs ZDCCA.
void SetTowerEqList(TList *const kList)
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)
virtual Int_t GetCenBin(Double_t Centrality)
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
TH1F * fhTDCraw[6]
ZPA PM low res.
TH2F * fhZNApmcvscentr
ZNC vs. centrality.
TH2F * fhZNAvsZPA
ZNC vs ZPC;.
void SetAnalysisType(TString type)
int Int_t
Definition: External.C:63
TH1F * fhZNAPM[5]
ZNC PM high res.
unsigned int UInt_t
Definition: External.C:33
void SetMinMult(Int_t multmin)
float Float_t
Definition: External.C:68
AliMultSelection * fMultSelection
centrality distribution
Definition: External.C:252
virtual void UserCreateOutputObjects()
TH1F * fhZPAPMQiPMC[4]
PMQi/PMC for ZPC.
Definition: External.C:212
TProfile * fZNCTower[fCRCMaxnRun]
Q Vectors list per run.
TH2F * fhZDCvsNclu1
ZDC vs N_tracklets;.
TList * GetTowerEqList() const
AliFlowEventCuts * fCutsEvent
TH1F * fhZPApmcLR
ZPC PMC low res. chain.
Bool_t plpMV(const AliAODEvent *aod)
AliFlowTrackCuts * fCutsPOI
TString GetAnalysisType() const
TH2F * fhZPAvscentrality
ZPC vs. centrality.
AliGenEventHeader * fGenHeader
TList * fCRCQVecListRun[fCRCMaxnRun]
Run list.
TH1F * fPtSpecFB128[10]
PtSpecRec FB96.
AliCentrality * fCentrality
MultSelection (RUN2 centrality estimator)
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 * fStack
ZNA tower spectra.
static const Int_t fCRCMaxnRun
ZPA PMC low res. chain.
AliCFManager * GetCFManager2() const
void SetDataSet(DataSet cDataSet)
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.
const char Option_t
Definition: External.C:48
TH2F * fhZNAvsAsymm
ZN asymmetry.
TH2F * fhZNAvscentrality
ZNC vs. centrality.
bool Bool_t
Definition: External.C:53
TH1F * fhZPAPM[5]
ZPC PM high res.
TH1F * fhZNCPM[5]
list send on output slot 0
Double_t GetWDist(const AliVVertex *v0, const AliVVertex *v1)
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)
TProfile * fZNATower[fCRCMaxnRun]
ZNC tower spectra.
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)