Adding more bins in QA (Alis)
[u/mrichter/AliRoot.git] / PWGPP / AliAnalysisTaskFilteredTree.h
CommitLineData
1059f583 1#ifndef ALIDNDPTTRACKDUMPTASK_H
2#define ALIDNDPTTRACKDUMPTASK_H
3
4//------------------------------------------------------------------------------
5// Task to dump track information
6// TPC constrained and TPC+ITS combined
7// for outliers analysis.
8//
9// Author: J.Otwinowski 19/06/2011
10//------------------------------------------------------------------------------
11
12class AliESDEvent;
13class AliMCEvent;
14class AliFilteredTreeEventCuts;
15class AliFilteredTreeAcceptanceCuts;
16class AliESDtrackCuts;
17class AliMagFMaps;
18class AliESDEvent;
19class AliMCEvent;
20class AliKFParticle;
21class AliESDv0;
08c5e656 22class AliExternalTrackParam;
23class AliESDtrack;
24class AliESDVertex;
25class AliStack;
1059f583 26class TList;
27class TObjArray;
28class TTree;
29class TTreeSRedirector;
08c5e656 30class TParticle;
73442c55 31class TH3D;
1059f583 32
33#include "AliTriggerAnalysis.h"
34#include "AliAnalysisTaskSE.h"
35
36class AliAnalysisTaskFilteredTree : public AliAnalysisTaskSE {
37 public:
38
39 enum EAnalysisMode { kInvalidAnalysisMode=-1,
40 kTPCITSAnalysisMode=0,
41 kTPCAnalysisMode=1 };
42
43 AliAnalysisTaskFilteredTree(const char *name = "AliAnalysisTaskFilteredTree");
44 virtual ~AliAnalysisTaskFilteredTree();
45
46 virtual void UserCreateOutputObjects();
47 virtual void UserExec(Option_t *option);
48 virtual void Terminate(Option_t *);
49 virtual Bool_t Notify();
50 virtual void FinishTaskOutput();
51 void SetUseMCInfo(Bool_t info) { fUseMCInfo = info; }
b4c82bc9 52 Bool_t IsUseMCInfo() const { return (fMC)?kTRUE:kFALSE; }
1059f583 53 void SetUseESDfriends(Bool_t friends) { fUseESDfriends = friends; }
54 Bool_t IsUseESDfriends() const { return fUseESDfriends; }
55
56 // Process events
57 void ProcessAll(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
58 void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
59 void ProcessV0(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
60 void ProcessdEdx(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
61 void ProcessLaser(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
62 void ProcessMCEff(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
63 void ProcessCosmics(AliESDEvent *const esdEvent=0);
64
65 void SetEventCuts(AliFilteredTreeEventCuts* const cuts) { fFilteredTreeEventCuts = cuts; }
66 void SetAcceptanceCuts(AliFilteredTreeAcceptanceCuts* const cuts) { fFilteredTreeAcceptanceCuts = cuts; }
67 void SetRecAcceptanceCuts(AliFilteredTreeAcceptanceCuts* const cuts) { fFilteredTreeRecAcceptanceCuts = cuts; }
68 void SetTrackCuts(AliESDtrackCuts* const cuts) { fEsdTrackCuts = cuts; }
69 void SetTrigger(const AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
70 void SetAnalysisMode(const EAnalysisMode mode) { fAnalysisMode = mode; }
71
72 AliFilteredTreeEventCuts* GetEventCuts() const { return fFilteredTreeEventCuts; }
73 AliFilteredTreeAcceptanceCuts* GetAcceptanceCuts() const { return fFilteredTreeAcceptanceCuts; }
74 AliFilteredTreeAcceptanceCuts* GetRecAcceptanceCuts() const { return fFilteredTreeRecAcceptanceCuts; }
75 AliESDtrackCuts* GetTrackCuts() const { return fEsdTrackCuts; }
76 AliTriggerAnalysis::Trigger GetTrigger() const { return fTrigger; }
77 EAnalysisMode GetAnalysisMode() const { return fAnalysisMode; }
78
79 TString GetCentralityEstimator() const {return fCentralityEstimator; }
80 void SetCentralityEstimator(TString centEst="V0M") { fCentralityEstimator = centEst; }
81
82 Bool_t IsFromConversion(const Int_t label, AliStack *const stack);
83 Bool_t IsFromMaterial(const Int_t label, AliStack *const stack);
84 Bool_t IsFromStrangeness(const Int_t label, AliStack *const stack);
85 TParticle *GetMother(TParticle *const particle, AliStack *const stack);
86
87 Bool_t ConstrainTPCInner(AliExternalTrackParam *const tpcInnerC, const AliESDVertex* vtx, Double_t b[3]);
88 Bool_t ConstrainTrackInner(AliExternalTrackParam *const trackInnerC, const AliESDVertex* vtx, Double_t mass, Double_t b[3]);
89
90 // v0s selection
91 Int_t GetKFParticle(AliESDv0 *const v0, AliESDEvent * const event, AliKFParticle & kfparticle);
92 Bool_t IsV0Downscaled(AliESDv0 *const v0);
93 Bool_t IsHighDeDxParticle(AliESDtrack * const track);
94
95 void SetLowPtTrackDownscaligF(Double_t fact) { fLowPtTrackDownscaligF = fact; }
96 void SetLowPtV0DownscaligF(Double_t fact) { fLowPtV0DownscaligF = fact; }
97
98 void SetProcessCosmics(Bool_t flag) { fProcessCosmics = flag; }
99 Bool_t GetProcessCosmics() { return fProcessCosmics; }
100
101 void SetProcessAll(Bool_t proc) { fProcessAll = proc; }
102 static Int_t GetMCTrueTrackMult(AliMCEvent *const mcEvent, AliFilteredTreeEventCuts *const evtCuts, AliFilteredTreeAcceptanceCuts *const accCuts);
103
30530964 104 void SetFillTrees(Bool_t filltree) { fFillTree = filltree ;}
105 Bool_t GetFillTrees() { return fFillTree ;}
106
107 void FillHistograms(AliESDtrack* const ptrack, AliExternalTrackParam* const ptpcInnerC, const Double_t centralityF, const Double_t chi2TPCInnerC);
108
1059f583 109 private:
110
111 AliESDEvent *fESD; //! ESD event
112 AliMCEvent *fMC; //! MC event
113 AliESDfriend *fESDfriend; //! ESDfriend event
114 TList* fOutput; //! list send on output slot 0
115 TIterator *fPitList; //! iterator over the output objetcs
116
117 Bool_t fUseMCInfo; // use MC information
30530964 118 Bool_t fUseESDfriends; // use esd friends
119 Bool_t fReducePileUp; // downscale the information for the pile-up TPC tracks
120 Bool_t fFillTree; // do not fill trees
1059f583 121
122 AliFilteredTreeEventCuts *fFilteredTreeEventCuts; // event cuts
123 AliFilteredTreeAcceptanceCuts *fFilteredTreeAcceptanceCuts; // acceptance cuts
124 AliFilteredTreeAcceptanceCuts *fFilteredTreeRecAcceptanceCuts; // additional recontruction acceptance cuts (not used for MC truth)
125 AliESDtrackCuts *fEsdTrackCuts; // esd track cuts
126 AliTriggerAnalysis::Trigger fTrigger; // trigger settings
127 EAnalysisMode fAnalysisMode; // analysis mode TPC only, TPC + ITS
128
129 TTreeSRedirector* fTreeSRedirector; //! temp tree to dump output
130
131 TString fCentralityEstimator; // use centrality can be "VOM" (default), "FMD", "TRK", "TKL", "CL0", "CL1", "V0MvsFMD", "TKLvsV0M", "ZEMvsZDC"
132
133 Double_t fLowPtTrackDownscaligF; // low pT track downscaling factor
134 Double_t fLowPtV0DownscaligF; // low pT V0 downscaling factor
135 Double_t fProcessAll; // Calculate all track properties including MC
136
137 Bool_t fProcessCosmics; // look for cosmic pairs from random trigger
138
139 TTree* fHighPtTree; //! list send on output slot 0
140 TTree* fV0Tree; //! list send on output slot 0
141 TTree* fdEdxTree; //! list send on output slot 0
142 TTree* fLaserTree; //! list send on output slot 0
143 TTree* fMCEffTree; //! list send on output slot 0
144 TTree* fCosmicPairsTree; //! list send on output slot 0
145
30530964 146 TH3D* fPtResPhiPtTPC; //! sigma(pt)/pt vs Phi vs Pt for prim. TPC tracks
147 TH3D* fPtResPhiPtTPCc; //! sigma(pt)/pt vs Phi vs Pt for prim. TPC contrained to vertex tracks
148 TH3D* fPtResPhiPtTPCITS; //! sigma(pt)/pt vs Phi vs Pt for prim. TPC+ITS tracks
149
150 TH3D* fPtResEtaPtTPC; //! sigma(pt)/pt vs Eta vs Pt for prim. TPC tracks
151 TH3D* fPtResEtaPtTPCc; //! sigma(pt)/pt vs Eta vs Pt for prim. TPC contrained to vertex tracks
152 TH3D* fPtResEtaPtTPCITS; //! sigma(pt)/pt vs Eta vs Pt for prim. TPC+ITS tracks
153
154 TH3D* fPtResCentPtTPC; //! sigma(pt)/pt vs Cent vs Pt for prim. TPC tracks
155 TH3D* fPtResCentPtTPCc; //! sigma(pt)/pt vs Cent vs Pt for prim. TPC contrained to vertex tracks
156 TH3D* fPtResCentPtTPCITS; //! sigma(pt)/pt vs Cent vs Pt for prim. TPC+ITS tracks
157
1059f583 158 AliAnalysisTaskFilteredTree(const AliAnalysisTaskFilteredTree&); // not implemented
159 AliAnalysisTaskFilteredTree& operator=(const AliAnalysisTaskFilteredTree&); // not implemented
160
161 ClassDef(AliAnalysisTaskFilteredTree, 1); // example of analysis
162};
163
164#endif