reduced default max entries for merging to avoid problems with memory
[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;
1059f583 31
32#include "AliTriggerAnalysis.h"
33#include "AliAnalysisTaskSE.h"
34
35class AliAnalysisTaskFilteredTree : public AliAnalysisTaskSE {
36 public:
37
38 enum EAnalysisMode { kInvalidAnalysisMode=-1,
39 kTPCITSAnalysisMode=0,
40 kTPCAnalysisMode=1 };
41
42 AliAnalysisTaskFilteredTree(const char *name = "AliAnalysisTaskFilteredTree");
43 virtual ~AliAnalysisTaskFilteredTree();
44
45 virtual void UserCreateOutputObjects();
46 virtual void UserExec(Option_t *option);
47 virtual void Terminate(Option_t *);
48 virtual Bool_t Notify();
49 virtual void FinishTaskOutput();
50 void SetUseMCInfo(Bool_t info) { fUseMCInfo = info; }
51 Bool_t IsUseMCInfo() const { return fUseMCInfo; }
52 void SetUseESDfriends(Bool_t friends) { fUseESDfriends = friends; }
53 Bool_t IsUseESDfriends() const { return fUseESDfriends; }
54
55 // Process events
56 void ProcessAll(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
57 void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
58 void ProcessV0(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
59 void ProcessdEdx(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
60 void ProcessLaser(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
61 void ProcessMCEff(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
62 void ProcessCosmics(AliESDEvent *const esdEvent=0);
63
64 void SetEventCuts(AliFilteredTreeEventCuts* const cuts) { fFilteredTreeEventCuts = cuts; }
65 void SetAcceptanceCuts(AliFilteredTreeAcceptanceCuts* const cuts) { fFilteredTreeAcceptanceCuts = cuts; }
66 void SetRecAcceptanceCuts(AliFilteredTreeAcceptanceCuts* const cuts) { fFilteredTreeRecAcceptanceCuts = cuts; }
67 void SetTrackCuts(AliESDtrackCuts* const cuts) { fEsdTrackCuts = cuts; }
68 void SetTrigger(const AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
69 void SetAnalysisMode(const EAnalysisMode mode) { fAnalysisMode = mode; }
70
71 AliFilteredTreeEventCuts* GetEventCuts() const { return fFilteredTreeEventCuts; }
72 AliFilteredTreeAcceptanceCuts* GetAcceptanceCuts() const { return fFilteredTreeAcceptanceCuts; }
73 AliFilteredTreeAcceptanceCuts* GetRecAcceptanceCuts() const { return fFilteredTreeRecAcceptanceCuts; }
74 AliESDtrackCuts* GetTrackCuts() const { return fEsdTrackCuts; }
75 AliTriggerAnalysis::Trigger GetTrigger() const { return fTrigger; }
76 EAnalysisMode GetAnalysisMode() const { return fAnalysisMode; }
77
78 TString GetCentralityEstimator() const {return fCentralityEstimator; }
79 void SetCentralityEstimator(TString centEst="V0M") { fCentralityEstimator = centEst; }
80
81 Bool_t IsFromConversion(const Int_t label, AliStack *const stack);
82 Bool_t IsFromMaterial(const Int_t label, AliStack *const stack);
83 Bool_t IsFromStrangeness(const Int_t label, AliStack *const stack);
84 TParticle *GetMother(TParticle *const particle, AliStack *const stack);
85
86 Bool_t ConstrainTPCInner(AliExternalTrackParam *const tpcInnerC, const AliESDVertex* vtx, Double_t b[3]);
87 Bool_t ConstrainTrackInner(AliExternalTrackParam *const trackInnerC, const AliESDVertex* vtx, Double_t mass, Double_t b[3]);
88
89 // v0s selection
90 Int_t GetKFParticle(AliESDv0 *const v0, AliESDEvent * const event, AliKFParticle & kfparticle);
91 Bool_t IsV0Downscaled(AliESDv0 *const v0);
92 Bool_t IsHighDeDxParticle(AliESDtrack * const track);
93
94 void SetLowPtTrackDownscaligF(Double_t fact) { fLowPtTrackDownscaligF = fact; }
95 void SetLowPtV0DownscaligF(Double_t fact) { fLowPtV0DownscaligF = fact; }
96
97 void SetProcessCosmics(Bool_t flag) { fProcessCosmics = flag; }
98 Bool_t GetProcessCosmics() { return fProcessCosmics; }
99
100 void SetProcessAll(Bool_t proc) { fProcessAll = proc; }
101 static Int_t GetMCTrueTrackMult(AliMCEvent *const mcEvent, AliFilteredTreeEventCuts *const evtCuts, AliFilteredTreeAcceptanceCuts *const accCuts);
102
103 private:
104
105 AliESDEvent *fESD; //! ESD event
106 AliMCEvent *fMC; //! MC event
107 AliESDfriend *fESDfriend; //! ESDfriend event
108 TList* fOutput; //! list send on output slot 0
109 TIterator *fPitList; //! iterator over the output objetcs
110
111 Bool_t fUseMCInfo; // use MC information
112 Bool_t fUseESDfriends; // use esd friends
113
114 AliFilteredTreeEventCuts *fFilteredTreeEventCuts; // event cuts
115 AliFilteredTreeAcceptanceCuts *fFilteredTreeAcceptanceCuts; // acceptance cuts
116 AliFilteredTreeAcceptanceCuts *fFilteredTreeRecAcceptanceCuts; // additional recontruction acceptance cuts (not used for MC truth)
117 AliESDtrackCuts *fEsdTrackCuts; // esd track cuts
118 AliTriggerAnalysis::Trigger fTrigger; // trigger settings
119 EAnalysisMode fAnalysisMode; // analysis mode TPC only, TPC + ITS
120
121 TTreeSRedirector* fTreeSRedirector; //! temp tree to dump output
122
123 TString fCentralityEstimator; // use centrality can be "VOM" (default), "FMD", "TRK", "TKL", "CL0", "CL1", "V0MvsFMD", "TKLvsV0M", "ZEMvsZDC"
124
125 Double_t fLowPtTrackDownscaligF; // low pT track downscaling factor
126 Double_t fLowPtV0DownscaligF; // low pT V0 downscaling factor
127 Double_t fProcessAll; // Calculate all track properties including MC
128
129 Bool_t fProcessCosmics; // look for cosmic pairs from random trigger
130
131 TTree* fHighPtTree; //! list send on output slot 0
132 TTree* fV0Tree; //! list send on output slot 0
133 TTree* fdEdxTree; //! list send on output slot 0
134 TTree* fLaserTree; //! list send on output slot 0
135 TTree* fMCEffTree; //! list send on output slot 0
136 TTree* fCosmicPairsTree; //! list send on output slot 0
137
138 AliAnalysisTaskFilteredTree(const AliAnalysisTaskFilteredTree&); // not implemented
139 AliAnalysisTaskFilteredTree& operator=(const AliAnalysisTaskFilteredTree&); // not implemented
140
141 ClassDef(AliAnalysisTaskFilteredTree, 1); // example of analysis
142};
143
144#endif