3 #ifndef AlidNdEtaCorrectionTask_H
4 #define AlidNdEtaCorrectionTask_H
6 #include "AliAnalysisTask.h"
8 #include "AliPWG0Helper.h"
9 #include "AliESDtrackCuts.h"
12 class AlidNdEtaCorrection;
21 class AlidNdEtaCorrectionTask : public AliAnalysisTask {
23 AlidNdEtaCorrectionTask();
24 AlidNdEtaCorrectionTask(const char* opt);
25 virtual ~AlidNdEtaCorrectionTask();
27 virtual void ConnectInputData(Option_t *);
28 virtual void CreateOutputObjects();
29 virtual void Exec(Option_t*);
30 virtual void Terminate(Option_t *);
32 void SetTrackCuts(AliESDtrackCuts* cuts) { fEsdTrackCuts = cuts; }
33 void SetAnalysisMode(AliPWG0Helper::AnalysisMode mode) { fAnalysisMode = mode; }
34 void SetOnlyPrimaries(Bool_t flag = kTRUE) { fOnlyPrimaries = flag; }
35 void SetTrigger(AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
36 void SetFillPhi(Bool_t flag = kTRUE) { fFillPhi = flag; }
37 void SetDeltaPhiCut(Float_t cut) { fDeltaPhiCut = cut; }
38 void SetSymmetrize(Bool_t flag = kTRUE) { fSymmetrize = flag; }
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; }
43 void SetOption(const char* opt) { fOption = opt; }
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);
50 Bool_t SignOK(TParticlePDG* particle);
52 AliESDEvent *fESD; //! ESD object
53 TList* fOutput; //! list send on output slot 0
55 TString fOption; // option string
56 AliPWG0Helper::AnalysisMode fAnalysisMode; // detector that is used for analysis
57 AliTriggerAnalysis::Trigger fTrigger; // trigger used in the analysis
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)
60 Bool_t fSymmetrize; // move all negative to positive eta
61 Bool_t fMultAxisEta1; // restrict multiplicity count to |eta| < 1
62 AliPWG0Helper::DiffTreatment fDiffTreatment; // how to identify SD events (see AliPWG0Helper::GetEventProcessType)
64 Int_t fSignMode; // if 0 process all particles, if +-1 process only particles with that sign
65 Bool_t fOnlyPrimaries; // only process primaries (syst. studies)
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
67 Bool_t fSystSkipParticles; // if true skips particles (systematic study)
69 AliESDtrackCuts* fEsdTrackCuts; // Object containing the parameters of the esd track cuts
71 AlidNdEtaCorrection* fdNdEtaCorrection; //! contains the intermediate histograms (on each slave)
73 dNdEtaAnalysis* fdNdEtaAnalysisMC; //! analysis from MC (only triggered, vertex events)
74 dNdEtaAnalysis* fdNdEtaAnalysisESD; //! analysis from ESD (not yet corrected!)
77 TH1F* fPIDParticles; //! pid of primary particles
78 TH1F* fPIDTracks; //! pid of reconstructed tracks
80 TH2F* fVertexCorrelation; //! ESD z-vtx vs MC z-vtx
81 TH3F* fVertexCorrelationShift; //! (MC z-vtx - ESD z-vtx) vs MC z-vtx vs n# rec tracks
82 TProfile* fVertexProfile; //! Profile of MC z-vtx - ESD z-vtx vs. MC z-vtx
83 TH1F* fVertexShift; //! (MC z-vtx - ESD z-vtx) in +- 10 cm
84 TH2F* fVertexShiftNorm; //! (MC z-vtx - ESD z-vtx) / (sigma_ESD-z-vtx) vs. no. rec tracks
86 TH2F* fEtaCorrelation; //! ESD eta vs MC eta
87 TH2F* fEtaCorrelationShift; //! (MC eta - ESD eta) vs MC eta
88 TProfile* fEtaProfile; //! Profile of MC eta - ESD eta vs. MC eta
89 TH1F* fEtaResolution; //! MC eta - ESD eta in |eta| < 1
90 TH2F* fDeltaPhiCorrelation; //! delta phi ESD vs. MC
92 TH2F* fpTResolution; //! (MC pT - ESD pT) / MC pT vs. MC pT in |eta| < 0.9
94 AliESDtrackCuts* fEsdTrackCutsPrim; //! control histograms for primaries
95 AliESDtrackCuts* fEsdTrackCutsSec; //! control histograms for secondaries
97 // histograms for systematic studies (must be enabled with option)
99 TH1* fTemp1; //! temp histogram for quick study of variables
100 TH1* fTemp2; //! temp histogram for quick study of variables
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
106 TH2* fDeltaPhi[8]; //! delta phi of primaries, secondaries, other (= unclear cases)
108 TH2F* fEventStats; //! some stats on number of events, see CreateOutputObjects for a detailed definition
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
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)
131 AlidNdEtaCorrectionTask(const AlidNdEtaCorrectionTask&);
132 AlidNdEtaCorrectionTask& operator=(const AlidNdEtaCorrectionTask&);
134 ClassDef(AlidNdEtaCorrectionTask, 2);