Update
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / AlidNdEtaCorrectionTask.h
CommitLineData
0f67a57c 1/* $Id$ */
2
3#ifndef AlidNdEtaCorrectionTask_H
4#define AlidNdEtaCorrectionTask_H
5
6#include "AliAnalysisTask.h"
7#include <TString.h>
770a1f1d 8#include "AliPWG0Helper.h"
68fa248f 9#include "AliESDtrackCuts.h"
0f67a57c 10
0f67a57c 11class dNdEtaAnalysis;
12class AlidNdEtaCorrection;
1c15d51a 13class TH1;
0f67a57c 14class TH1F;
15class AliESDEvent;
16class TParticlePDG;
54b096ef 17class TH2F;
a7f69e56 18class TH3F;
54b096ef 19class TProfile;
0f67a57c 20
21class AlidNdEtaCorrectionTask : public AliAnalysisTask {
22 public:
1c15d51a 23 AlidNdEtaCorrectionTask();
24 AlidNdEtaCorrectionTask(const char* opt);
0f67a57c 25 virtual ~AlidNdEtaCorrectionTask();
26
27 virtual void ConnectInputData(Option_t *);
28 virtual void CreateOutputObjects();
29 virtual void Exec(Option_t*);
30 virtual void Terminate(Option_t *);
31
32 void SetTrackCuts(AliESDtrackCuts* cuts) { fEsdTrackCuts = cuts; }
770a1f1d 33 void SetAnalysisMode(AliPWG0Helper::AnalysisMode mode) { fAnalysisMode = mode; }
3d7758c1 34 void SetOnlyPrimaries(Bool_t flag = kTRUE) { fOnlyPrimaries = flag; }
70fdd197 35 void SetTrigger(AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
69b09e3b 36 void SetFillPhi(Bool_t flag = kTRUE) { fFillPhi = flag; }
37 void SetDeltaPhiCut(Float_t cut) { fDeltaPhiCut = cut; }
1d107532 38 void SetSymmetrize(Bool_t flag = kTRUE) { fSymmetrize = flag; }
81be4ee8 39 void SetMultAxisEta1(Bool_t flag = kTRUE) { fMultAxisEta1 = flag; }
40 void SetDiffTreatment(AliPWG0Helper::DiffTreatment diffTreatment) { fDiffTreatment = diffTreatment; }
41 void SetSkipParticles(Bool_t flag = kTRUE) { fSystSkipParticles = flag; }
0fc41645 42
43 void SetOption(const char* opt) { fOption = opt; }
68fa248f 44 void SetPtMin(Float_t ptMin) {fPtMin = ptMin;}
45 void SetWeightSecondaries(Bool_t flag) { fWeightSecondaries = flag;}
46 Double_t GetSecondaryCorrection(Double_t pt);
47 Double_t GetLinearInterpolationValue(Double_t x1, Double_t y1, Double_t x2, Double_t y2, Double_t pt);
0f67a57c 48
49 protected:
50 Bool_t SignOK(TParticlePDG* particle);
51
52 AliESDEvent *fESD; //! ESD object
53 TList* fOutput; //! list send on output slot 0
54
55 TString fOption; // option string
770a1f1d 56 AliPWG0Helper::AnalysisMode fAnalysisMode; // detector that is used for analysis
70fdd197 57 AliTriggerAnalysis::Trigger fTrigger; // trigger used in the analysis
69b09e3b 58 Bool_t fFillPhi; // if true phi is filled as 3rd coordinate in all maps
59 Float_t fDeltaPhiCut; // cut in delta phi (only SPD)
1d107532 60 Bool_t fSymmetrize; // move all negative to positive eta
81be4ee8 61 Bool_t fMultAxisEta1; // restrict multiplicity count to |eta| < 1
62 AliPWG0Helper::DiffTreatment fDiffTreatment; // how to identify SD events (see AliPWG0Helper::GetEventProcessType)
69b09e3b 63
0f67a57c 64 Int_t fSignMode; // if 0 process all particles, if +-1 process only particles with that sign
3d7758c1 65 Bool_t fOnlyPrimaries; // only process primaries (syst. studies)
69b09e3b 66 Int_t fStatError; // statistical error evaluation: if set to 1 we only count unique primaries (binomial errors are valid), for 2 all the rest
81be4ee8 67 Bool_t fSystSkipParticles; // if true skips particles (systematic study)
0f67a57c 68
69 AliESDtrackCuts* fEsdTrackCuts; // Object containing the parameters of the esd track cuts
70
71 AlidNdEtaCorrection* fdNdEtaCorrection; //! contains the intermediate histograms (on each slave)
72
73 dNdEtaAnalysis* fdNdEtaAnalysisMC; //! analysis from MC (only triggered, vertex events)
74 dNdEtaAnalysis* fdNdEtaAnalysisESD; //! analysis from ESD (not yet corrected!)
75
76 // control histograms
77 TH1F* fPIDParticles; //! pid of primary particles
78 TH1F* fPIDTracks; //! pid of reconstructed tracks
1c15d51a 79
54b096ef 80 TH2F* fVertexCorrelation; //! ESD z-vtx vs MC z-vtx
a7f69e56 81 TH3F* fVertexCorrelationShift; //! (MC z-vtx - ESD z-vtx) vs MC z-vtx vs n# rec tracks
54b096ef 82 TProfile* fVertexProfile; //! Profile of MC z-vtx - ESD z-vtx vs. MC z-vtx
1c15d51a 83 TH1F* fVertexShift; //! (MC z-vtx - ESD z-vtx) in +- 10 cm
a7f69e56 84 TH2F* fVertexShiftNorm; //! (MC z-vtx - ESD z-vtx) / (sigma_ESD-z-vtx) vs. no. rec tracks
0f67a57c 85
3d7758c1 86 TH2F* fEtaCorrelation; //! ESD eta vs MC eta
51f6de65 87 TH2F* fEtaCorrelationShift; //! (MC eta - ESD eta) vs MC eta
3d7758c1 88 TProfile* fEtaProfile; //! Profile of MC eta - ESD eta vs. MC eta
1c15d51a 89 TH1F* fEtaResolution; //! MC eta - ESD eta in |eta| < 1
69b09e3b 90 TH2F* fDeltaPhiCorrelation; //! delta phi ESD vs. MC
1c15d51a 91
69b09e3b 92 TH2F* fpTResolution; //! (MC pT - ESD pT) / MC pT vs. MC pT in |eta| < 0.9
1c15d51a 93
94 AliESDtrackCuts* fEsdTrackCutsPrim; //! control histograms for primaries
95 AliESDtrackCuts* fEsdTrackCutsSec; //! control histograms for secondaries
3d7758c1 96
96fcc8a7 97 // histograms for systematic studies (must be enabled with option)
98
1c15d51a 99 TH1* fTemp1; //! temp histogram for quick study of variables
100 TH1* fTemp2; //! temp histogram for quick study of variables
96fcc8a7 101
4ef701a0 102 TH1F* fMultAll; //! primary particles in |eta| < 1 and pT > 0.2 in all events
103 TH1F* fMultTr; //! primary particles in |eta| < 1 and pT > 0.2 in triggered events
104 TH1F* fMultVtx; //! primary particles in |eta| < 1 and pT > 0.2 in triggered events with vertex
105
69b09e3b 106 TH2* fDeltaPhi[8]; //! delta phi of primaries, secondaries, other (= unclear cases)
4ef701a0 107
69b09e3b 108 TH2F* fEventStats; //! some stats on number of events, see CreateOutputObjects for a detailed definition
50ec344d 109
69b09e3b 110 AlidNdEtaCorrection* fdNdEtaCorrectionSpecial[4]; //! correction maps used for systematic studies, may contain:
111 // for specific process type (ND, SD, DD), enable with option: process-types
112 // for particle species (pi, K, p, rest), enable with: particle-species
68fa248f 113 AliESDtrackCuts* fEsdTrackCutsCheck; //! Object containing the parameters of the esd track cuts
114 TH2F* fEtaCorrelationAllESD; //! ESD eta vs MC eta
115 TH2F* fpTCorrelation; //! ESD pT vs MC pT in |eta| < 0.9
116 TH2F* fpTCorrelationShift; //! (MC pT - ESD pT) vs MC pT in |eta| < 0.9
117 TH2F* fpTCorrelationAllESD; //! ESD pT vs MC pT in |eta| < 0.9
118 TH2F* fpTCorrelationShiftAllESD; //! (MC pT - ESD pT) vs MC pT in |eta| < 0.9
119 Float_t fPtMin; // ptMin for kOneTrack
120 TH1F* fPtMC; //! pT histogram for MC information for selected tracks
121 TH1F* fEtaMC; //! eta histogram for MC information for selected tracks
122 TH1F* fPtESD; //! pT histogram for ESD information for selected tracks
123 TH1F* fEtaESD; //! eta histogram for ESD information for selected tracks
124 TH1F* fVtxMC; //! vtx_z histogram for MC information for all events
125 TH1F* fNumberEventMC; //! number of accepted event histogram for MC information for all events
126 TH1F* fNumberEvent; //! number of accepted event histogram for reco information for all events
127 Int_t fEventNumber; // number of the event - useful when running on one file, on one worker
128 Bool_t fWeightSecondaries; // is true if calculating corrections to be applied to real data (secondaries correction should be on)
96fcc8a7 129
0f67a57c 130 private:
131 AlidNdEtaCorrectionTask(const AlidNdEtaCorrectionTask&);
132 AlidNdEtaCorrectionTask& operator=(const AlidNdEtaCorrectionTask&);
133
68fa248f 134 ClassDef(AlidNdEtaCorrectionTask, 2);
0f67a57c 135};
136
137#endif