- V0s tree added
[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;
26class TTree;
27class TTreeSRedirector;
28
29#include "AliTriggerAnalysis.h"
30#include "AliAnalysisTaskSE.h"
bdd49ee6 31#include "AlidNdPtHelper.h"
a26e43aa 32
33class AlidNdPtTrackDumpTask : public AliAnalysisTaskSE {
34 public:
35
36
37 AlidNdPtTrackDumpTask(const char *name = "AlidNdPtTrackDumpTask");
38 virtual ~AlidNdPtTrackDumpTask();
39
40 virtual void UserCreateOutputObjects();
41 virtual void UserExec(Option_t *option);
42 virtual void Terminate(Option_t *);
43 virtual Bool_t Notify();
44 virtual void FinishTaskOutput();
45 void SetUseMCInfo(Bool_t info) { fUseMCInfo = info; }
46 Bool_t IsUseMCInfo() const { return fUseMCInfo; }
47
48 // Process events
49 virtual void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
91326969 50 virtual void ProcessV0(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
a26e43aa 51
52 void SetEventCuts(AlidNdPtEventCuts* const cuts) { fdNdPtEventCuts = cuts; }
53 void SetAcceptanceCuts(AlidNdPtAcceptanceCuts* const cuts) { fdNdPtAcceptanceCuts = cuts; }
54 void SetRecAcceptanceCuts(AlidNdPtAcceptanceCuts* const cuts) { fdNdPtRecAcceptanceCuts = cuts; }
55 void SetTrackCuts(AliESDtrackCuts* const cuts) { fEsdTrackCuts = cuts; }
56 void SetTrigger(const AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
57 void SetAnalysisMode(const AlidNdPtHelper::AnalysisMode mode) { fAnalysisMode = mode; }
58
59 AlidNdPtEventCuts* GetEventCuts() const { return fdNdPtEventCuts; }
60 AlidNdPtAcceptanceCuts* GetAcceptanceCuts() const { return fdNdPtAcceptanceCuts; }
61 AlidNdPtAcceptanceCuts* GetRecAcceptanceCuts() const { return fdNdPtRecAcceptanceCuts; }
62 AliESDtrackCuts* GetTrackCuts() const { return fEsdTrackCuts; }
63 AliTriggerAnalysis::Trigger GetTrigger() const { return fTrigger; }
64 AlidNdPtHelper::AnalysisMode GetAnalysisMode() const { return fAnalysisMode; }
65
66 TString GetCentralityEstimator() const {return fCentralityEstimator; }
67 void SetCentralityEstimator(TString centEst="V0M") { fCentralityEstimator = centEst; }
68
69 Bool_t IsFromConversion(const Int_t label, AliStack *const stack);
70 Bool_t IsFromMaterial(const Int_t label, AliStack *const stack);
71 Bool_t IsFromStrangeness(const Int_t label, AliStack *const stack);
72 TParticle *GetMother(TParticle *const particle, AliStack *const stack);
73
74 Bool_t ConstrainTPCInner(AliExternalTrackParam *const tpcInnerC, const AliESDVertex* vtx, Double_t b[3]);
75 Bool_t ConstrainTrackInner(AliExternalTrackParam *const trackInnerC, const AliESDVertex* vtx, Double_t mass, Double_t b[3]);
76
91326969 77 // v0s selection
78 Int_t GetKFParticle(AliESDv0 *const v0, AliESDEvent * const event, AliKFParticle & kfparticle);
79 Bool_t IsV0Downscaled(AliESDv0 *const v0);
80
81 void SetLowPtTrackDownscaligF(Double_t fact) { fLowPtTrackDownscaligF = fact; }
82 void SetLowPtV0DownscaligF(Double_t fact) { fLowPtV0DownscaligF = fact; }
a26e43aa 83
84 private:
85
86 AliESDEvent *fESD; //! ESD event
87 AliMCEvent *fMC; //! MC event
88 AliESDfriend *fESDfriend; //! ESDfriend event
89 TList* fOutput; //! list send on output slot 0
90 TIterator *fPitList; //! iterator over the output objetcs
91
92 Bool_t fUseMCInfo; //! use MC information
93
94 AlidNdPtEventCuts *fdNdPtEventCuts; //! event cuts
95 AlidNdPtAcceptanceCuts *fdNdPtAcceptanceCuts; //! acceptance cuts
96 AlidNdPtAcceptanceCuts *fdNdPtRecAcceptanceCuts; //! additional recontruction acceptance cuts (not used for MC truth)
97 AliESDtrackCuts *fEsdTrackCuts; //! esd track cuts
98 AliTriggerAnalysis::Trigger fTrigger; //! trigger settings
99 AlidNdPtHelper::AnalysisMode fAnalysisMode; //! analysis mode TPC only, TPC + ITS
100
101 TTree* fOutputSummary; //! tree to dump output
102 TTreeSRedirector* fTreeSRedirector; //! temp tree to dump output
103
104 TString fCentralityEstimator; //! use centrality can be "VOM" (default), "FMD", "TRK", "TKL", "CL0", "CL1", "V0MvsFMD", "TKLvsV0M", "ZEMvsZDC"
105
91326969 106 Double_t fLowPtTrackDownscaligF; // low pT track downscaling factor
107 Double_t fLowPtV0DownscaligF; // low pT V0 downscaling factor
a26e43aa 108
109 AlidNdPtTrackDumpTask(const AlidNdPtTrackDumpTask&); // not implemented
110 AlidNdPtTrackDumpTask& operator=(const AlidNdPtTrackDumpTask&); // not implemented
111
112 ClassDef(AlidNdPtTrackDumpTask, 1); // example of analysis
113};
114
115#endif