modification in task to filter events
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / ChargedHadrons / dNdPt / AlidNdPtTrackDumpTask.h
CommitLineData
a26e43aa 1#ifndef ALIDNDPTTRACKDUMPTASK_H
2#define ALIDNDPTTRACKDUMPTASK_H
3
4//------------------------------------------------------------------------------
5// Task to dump track information
6// TPC constrained and TP+ITS combined
7// for outliers analysis.
8//
9// Author: J.Otwinowski 19/06/2011
10//------------------------------------------------------------------------------
11
12class AliESDEvent;
13class AliMCEvent;
14class AlidNdPtEventCuts;
15class AlidNdPtAcceptanceCuts;
16class AliESDtrackCuts;
17class AlidNdPt;
18class AlidNdPtAnalysis;
19class AlidNdPtCorrection;
20class AliMagFMaps;
21class AliESDEvent;
22class AliMCEvent;
91326969 23class AliKFParticle;
24class AliESDv0;
a26e43aa 25class TList;
99496190 26class TObjArray;
a26e43aa 27class TTree;
28class TTreeSRedirector;
29
30#include "AliTriggerAnalysis.h"
31#include "AliAnalysisTaskSE.h"
bdd49ee6 32#include "AlidNdPtHelper.h"
a26e43aa 33
34class AlidNdPtTrackDumpTask : public AliAnalysisTaskSE {
35 public:
36
37
38 AlidNdPtTrackDumpTask(const char *name = "AlidNdPtTrackDumpTask");
39 virtual ~AlidNdPtTrackDumpTask();
40
41 virtual void UserCreateOutputObjects();
42 virtual void UserExec(Option_t *option);
43 virtual void Terminate(Option_t *);
44 virtual Bool_t Notify();
45 virtual void FinishTaskOutput();
46 void SetUseMCInfo(Bool_t info) { fUseMCInfo = info; }
47 Bool_t IsUseMCInfo() const { return fUseMCInfo; }
48
49 // Process events
298fa346 50 virtual void ProcessAll(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
51 virtual void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
91326969 52 virtual void ProcessV0(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
a26e43aa 53
54 void SetEventCuts(AlidNdPtEventCuts* const cuts) { fdNdPtEventCuts = cuts; }
55 void SetAcceptanceCuts(AlidNdPtAcceptanceCuts* const cuts) { fdNdPtAcceptanceCuts = cuts; }
56 void SetRecAcceptanceCuts(AlidNdPtAcceptanceCuts* const cuts) { fdNdPtRecAcceptanceCuts = cuts; }
57 void SetTrackCuts(AliESDtrackCuts* const cuts) { fEsdTrackCuts = cuts; }
58 void SetTrigger(const AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
59 void SetAnalysisMode(const AlidNdPtHelper::AnalysisMode mode) { fAnalysisMode = mode; }
60
61 AlidNdPtEventCuts* GetEventCuts() const { return fdNdPtEventCuts; }
62 AlidNdPtAcceptanceCuts* GetAcceptanceCuts() const { return fdNdPtAcceptanceCuts; }
63 AlidNdPtAcceptanceCuts* GetRecAcceptanceCuts() const { return fdNdPtRecAcceptanceCuts; }
64 AliESDtrackCuts* GetTrackCuts() const { return fEsdTrackCuts; }
65 AliTriggerAnalysis::Trigger GetTrigger() const { return fTrigger; }
66 AlidNdPtHelper::AnalysisMode GetAnalysisMode() const { return fAnalysisMode; }
67
68 TString GetCentralityEstimator() const {return fCentralityEstimator; }
69 void SetCentralityEstimator(TString centEst="V0M") { fCentralityEstimator = centEst; }
70
71 Bool_t IsFromConversion(const Int_t label, AliStack *const stack);
72 Bool_t IsFromMaterial(const Int_t label, AliStack *const stack);
73 Bool_t IsFromStrangeness(const Int_t label, AliStack *const stack);
74 TParticle *GetMother(TParticle *const particle, AliStack *const stack);
75
76 Bool_t ConstrainTPCInner(AliExternalTrackParam *const tpcInnerC, const AliESDVertex* vtx, Double_t b[3]);
77 Bool_t ConstrainTrackInner(AliExternalTrackParam *const trackInnerC, const AliESDVertex* vtx, Double_t mass, Double_t b[3]);
78
91326969 79 // v0s selection
80 Int_t GetKFParticle(AliESDv0 *const v0, AliESDEvent * const event, AliKFParticle & kfparticle);
81 Bool_t IsV0Downscaled(AliESDv0 *const v0);
99496190 82 Bool_t IsHighDeDxParticle(AliESDtrack * const track);
91326969 83
84 void SetLowPtTrackDownscaligF(Double_t fact) { fLowPtTrackDownscaligF = fact; }
85 void SetLowPtV0DownscaligF(Double_t fact) { fLowPtV0DownscaligF = fact; }
a26e43aa 86
298fa346 87 void SetProcessAll(Bool_t proc) { fProcessAll = proc; }
88
a26e43aa 89 private:
90
91 AliESDEvent *fESD; //! ESD event
92 AliMCEvent *fMC; //! MC event
93 AliESDfriend *fESDfriend; //! ESDfriend event
94 TList* fOutput; //! list send on output slot 0
95 TIterator *fPitList; //! iterator over the output objetcs
96
97 Bool_t fUseMCInfo; //! use MC information
98
99 AlidNdPtEventCuts *fdNdPtEventCuts; //! event cuts
100 AlidNdPtAcceptanceCuts *fdNdPtAcceptanceCuts; //! acceptance cuts
101 AlidNdPtAcceptanceCuts *fdNdPtRecAcceptanceCuts; //! additional recontruction acceptance cuts (not used for MC truth)
102 AliESDtrackCuts *fEsdTrackCuts; //! esd track cuts
103 AliTriggerAnalysis::Trigger fTrigger; //! trigger settings
104 AlidNdPtHelper::AnalysisMode fAnalysisMode; //! analysis mode TPC only, TPC + ITS
105
a26e43aa 106 TTreeSRedirector* fTreeSRedirector; //! temp tree to dump output
107
108 TString fCentralityEstimator; //! use centrality can be "VOM" (default), "FMD", "TRK", "TKL", "CL0", "CL1", "V0MvsFMD", "TKLvsV0M", "ZEMvsZDC"
109
91326969 110 Double_t fLowPtTrackDownscaligF; // low pT track downscaling factor
111 Double_t fLowPtV0DownscaligF; // low pT V0 downscaling factor
298fa346 112 Double_t fProcessAll; // Calculate all track properties including MC
a26e43aa 113
114 AlidNdPtTrackDumpTask(const AlidNdPtTrackDumpTask&); // not implemented
115 AlidNdPtTrackDumpTask& operator=(const AlidNdPtTrackDumpTask&); // not implemented
116
117 ClassDef(AlidNdPtTrackDumpTask, 1); // example of analysis
118};
119
120#endif