AliPhysics  e6d2b2b (e6d2b2b)
AliAnalysisTaskFilteredTree.h
Go to the documentation of this file.
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 
12 class AliESDEvent;
13 class AliMCEvent;
16 class AliESDtrackCuts;
17 class AliMagFMaps;
18 class AliESDEvent;
19 class AliMCEvent;
20 class AliKFParticle;
21 class AliESDv0;
22 class AliExternalTrackParam;
23 class AliESDtrack;
24 class AliESDfriendTrack;
25 class AliESDVertex;
26 class AliStack;
27 class TList;
28 class TObjArray;
29 class TTree;
30 class TTreeSRedirector;
31 class TParticle;
32 class TH3D;
33 #include <string>
34 
35 #include "AliTriggerAnalysis.h"
36 #include "AliAnalysisTaskSE.h"
37 
39  public:
40 
44 
45  AliAnalysisTaskFilteredTree(const char *name = "AliAnalysisTaskFilteredTree");
47 
48  virtual void UserCreateOutputObjects();
49  virtual void UserExec(Option_t *option);
50  virtual void Terminate(Option_t *);
51  virtual Bool_t Notify();
52  virtual void FinishTaskOutput();
53  void SetUseMCInfo(Bool_t info) { fUseMCInfo = info; }
54  Bool_t IsUseMCInfo() const { return (fMC)?kTRUE:kFALSE; }
55  void SetUseESDfriends(Bool_t friends) { fUseESDfriends = friends; }
57 
58  // Process events
59  void ProcessAll(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
60  void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
61  void ProcessV0(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
62  void ProcessdEdx(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
63  void ProcessLaser(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
64  void ProcessMCEff(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0);
65  void ProcessCosmics(AliESDEvent *const esdEvent=0, AliESDfriend* esdFriend=0);
66  void ProcessMC(); //TODO - not yet finished/tested/enabled
67 
68  void ProcessITSTPCmatchOut(AliESDEvent *const esdEvent=0, AliESDfriend *const esdFriend=0);
69  void ProcessTrackMatch(AliESDEvent *const esdEvent=0, AliESDfriend *const esdFriend=0);
70 
74  void SetTrackCuts(AliESDtrackCuts* const cuts) { fEsdTrackCuts = cuts; }
75  void SetTrigger(const AliTriggerAnalysis::Trigger trigger) { fTrigger = trigger; }
77 
81  AliESDtrackCuts* GetTrackCuts() const { return fEsdTrackCuts; }
82  AliTriggerAnalysis::Trigger GetTrigger() const { return fTrigger; }
84 
86  void SetCentralityEstimator(TString centEst="V0M") { fCentralityEstimator = centEst; }
87 
88  Bool_t IsFromConversion(Int_t label, AliStack *const stack);
89  Bool_t IsFromMaterial(Int_t label, AliStack *const stack);
90  Bool_t IsFromStrangeness(Int_t label, AliStack *const stack);
91  TParticle *GetMother(TParticle *const particle, AliStack *const stack);
92 
93  Bool_t ConstrainTPCInner(AliExternalTrackParam *const tpcInnerC, const AliESDVertex* vtx, Double_t b[3]);
94  Bool_t ConstrainTrackInner(AliExternalTrackParam *const trackInnerC, const AliESDVertex* vtx, Double_t mass, Double_t b[3]);
95 
96  // v0s selection
97  Int_t GetKFParticle(AliESDv0 *const v0, AliESDEvent * const event, AliKFParticle & kfparticle);
98  Bool_t IsV0Downscaled(AliESDv0 *const v0);
99  Bool_t IsHighDeDxParticle(AliESDtrack * const track);
100 
104 
105  void SetProcessCosmics(Bool_t flag) { fProcessCosmics = flag; }
107  //
110 
111 
112  void SetProcessAll(Bool_t proc) { fProcessAll = proc; }
113  static Int_t GetMCTrueTrackMult(AliMCEvent *const mcEvent, AliFilteredTreeEventCuts *const evtCuts, AliFilteredTreeAcceptanceCuts *const accCuts);
114 
115  void SetFillTrees(Bool_t filltree) { fFillTree = filltree ;}
117 
118  void FillHistograms(AliESDtrack* const ptrack, AliExternalTrackParam* const ptpcInnerC, Double_t centralityF, Double_t chi2TPCInnerC);
119  Int_t GetNearestTrack(const AliExternalTrackParam * trackMatch, Int_t indexSkip, AliESDEvent*event, Int_t trackType, Int_t paramType, AliExternalTrackParam & paramNearest);
120  static void SetDefaultAliasesV0(TTree *treeV0);
121  static void SetDefaultAliasesHighPt(TTree *treeV0);
122  Int_t GetMCInfoTrack(Int_t label, std::map<std::string,float> &trackInfoF, std::map<std::string,TObject*> &trackInfoO); //TODO- test before enabling
123  Int_t GetMCInfoKink(Int_t label, std::map<std::string,float> &kinkInfoF, std::map<std::string,TObject*> &kinkInfoO); // TODO
124  static Int_t GetMCTrackDiff(const TParticle &particle, const AliExternalTrackParam &param, TClonesArray &trackRefArray, TVectorF &mcDiff); //TODO test before enabling
125  private:
126 
128  AliMCEvent *fMC;
129  AliESDfriend *fESDfriend;
131  TIterator *fPitList;
132 
133  Bool_t fUseMCInfo; // use MC information
134  Bool_t fUseESDfriends; // use esd friends
135  Bool_t fReducePileUp; // downscale the information for the pile-up TPC tracks
136  Bool_t fFillTree; // do not fill trees
137 
140  AliFilteredTreeAcceptanceCuts *fFilteredTreeRecAcceptanceCuts; // additional recontruction acceptance cuts (not used for MC truth)
141  AliESDtrackCuts *fEsdTrackCuts; // esd track cuts
142  AliTriggerAnalysis::Trigger fTrigger; // trigger settings
143  EAnalysisMode fAnalysisMode; // analysis mode TPC only, TPC + ITS
144 
145  TTreeSRedirector* fTreeSRedirector;
146 
147  TString fCentralityEstimator; // use centrality can be "VOM" (default), "FMD", "TRK", "TKL", "CL0", "CL1", "V0MvsFMD", "TKLvsV0M", "ZEMvsZDC"
148 
149  Double_t fLowPtTrackDownscaligF; // low pT track downscaling factor
150  Double_t fLowPtV0DownscaligF; // low pT V0 downscaling factor
151  Double_t fFriendDownscaling; // friend info downscaling )absolute value used), Modes>=1 downscaling in respect to the amount of tracks, Mode<=-1 (downscaling in respect to the data volume)
152  Double_t fProcessAll; // Calculate all track properties including MC
153 
154  Bool_t fProcessCosmics; // look for cosmic pairs from random trigger
155  Bool_t fProcessITSTPCmatchOut; // swittch to process ITS/TPC standalone tracks
156 
163 
167 
171 
175  TObjString fCurrentFileName; // cached value of current file name
176  AliESDtrack* fDummyTrack;
177 
178  AliAnalysisTaskFilteredTree(const AliAnalysisTaskFilteredTree&); // not implemented
180  ClassDef(AliAnalysisTaskFilteredTree, 1); // example of analysis
181 };
182 
183 #endif
void ProcessV0(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0)
AliFilteredTreeEventCuts * GetEventCuts() const
void SetAnalysisMode(EAnalysisMode mode)
TTree * fdEdxTree
list send on output slot 0
void SetEventCuts(AliFilteredTreeEventCuts *const cuts)
double Double_t
Definition: External.C:58
static void SetDefaultAliasesHighPt(TTree *treeV0)
TTree * fLaserTree
list send on output slot 0
void ProcessITSTPCmatchOut(AliESDEvent *const esdEvent=0, AliESDfriend *const esdFriend=0)
Int_t GetMCInfoTrack(Int_t label, std::map< std::string, float > &trackInfoF, std::map< std::string, TObject * > &trackInfoO)
Bool_t IsFromConversion(Int_t label, AliStack *const stack)
void SetCentralityEstimator(TString centEst="V0M")
Bool_t ConstrainTPCInner(AliExternalTrackParam *const tpcInnerC, const AliESDVertex *vtx, Double_t b[3])
Bool_t IsFromMaterial(Int_t label, AliStack *const stack)
Bool_t fUseMCInfo
iterator over the output objetcs
void SetTrackCuts(AliESDtrackCuts *const cuts)
Bool_t ConstrainTrackInner(AliExternalTrackParam *const trackInnerC, const AliESDVertex *vtx, Double_t mass, Double_t b[3])
AliFilteredTreeAcceptanceCuts * GetRecAcceptanceCuts() const
Double_t mass
AliFilteredTreeEventCuts * fFilteredTreeEventCuts
TH3D * fPtResCentPtTPCITS
sigma(pt)/pt vs Cent vs Pt for prim. TPC contrained to vertex tracks
AliTriggerAnalysis::Trigger fTrigger
void SetTrigger(const AliTriggerAnalysis::Trigger trigger)
void SetAcceptanceCuts(AliFilteredTreeAcceptanceCuts *const cuts)
AliFilteredTreeAcceptanceCuts * fFilteredTreeRecAcceptanceCuts
TTree * fV0Tree
list send on output slot 0
void ProcessAll(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0)
AliTriggerAnalysis::Trigger GetTrigger() const
static Int_t GetMCTrackDiff(const TParticle &particle, const AliExternalTrackParam &param, TClonesArray &trackRefArray, TVectorF &mcDiff)
AliStack * stack
TH3D * fPtResEtaPtTPCc
sigma(pt)/pt vs Eta vs Pt for prim. TPC tracks
Bool_t IsV0Downscaled(AliESDv0 *const v0)
virtual void UserExec(Option_t *option)
TH3D * fPtResEtaPtTPCITS
sigma(pt)/pt vs Eta vs Pt for prim. TPC contrained to vertex tracks
void SetRecAcceptanceCuts(AliFilteredTreeAcceptanceCuts *const cuts)
TH3D * fPtResCentPtTPCc
sigma(pt)/pt vs Cent vs Pt for prim. TPC tracks
TH3D * fPtResEtaPtTPC
sigma(pt)/pt vs Phi vs Pt for prim. TPC+ITS tracks
int Int_t
Definition: External.C:63
AliFilteredTreeAcceptanceCuts * fFilteredTreeAcceptanceCuts
TString fCentralityEstimator
temp tree to dump output
Definition: External.C:252
void ProcessTrackMatch(AliESDEvent *const esdEvent=0, AliESDfriend *const esdFriend=0)
void ProcessCosmics(AliESDEvent *const esdEvent=0, AliESDfriend *esdFriend=0)
TTree * fCosmicPairsTree
list send on output slot 0
void ProcessdEdx(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0)
Int_t mode
Definition: anaM.C:41
TH3D * fPtResPhiPtTPCc
sigma(pt)/pt vs Phi vs Pt for prim. TPC tracks
AliESDtrackCuts * GetTrackCuts() const
Int_t GetNearestTrack(const AliExternalTrackParam *trackMatch, Int_t indexSkip, AliESDEvent *event, Int_t trackType, Int_t paramType, AliExternalTrackParam &paramNearest)
Int_t GetMCInfoKink(Int_t label, std::map< std::string, float > &kinkInfoF, std::map< std::string, TObject * > &kinkInfoO)
TH3D * fPtResPhiPtTPC
list send on output slot 0
AliAnalysisTaskFilteredTree & operator=(const AliAnalysisTaskFilteredTree &)
TObjString fCurrentFileName
sigma(pt)/pt vs Cent vs Pt for prim. TPC+ITS tracks
TH3D * fPtResCentPtTPC
sigma(pt)/pt vs Eta vs Pt for prim. TPC+ITS tracks
void FillHistograms(AliESDtrack *const ptrack, AliExternalTrackParam *const ptpcInnerC, Double_t centralityF, Double_t chi2TPCInnerC)
TTree * fMCEffTree
list send on output slot 0
TParticle * GetMother(TParticle *const particle, AliStack *const stack)
Int_t GetKFParticle(AliESDv0 *const v0, AliESDEvent *const event, AliKFParticle &kfparticle)
AliAnalysisTaskFilteredTree(const char *name="AliAnalysisTaskFilteredTree")
const char Option_t
Definition: External.C:48
void ProcessLaser(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0)
static Int_t GetMCTrueTrackMult(AliMCEvent *const mcEvent, AliFilteredTreeEventCuts *const evtCuts, AliFilteredTreeAcceptanceCuts *const accCuts)
void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0)
bool Bool_t
Definition: External.C:53
Bool_t IsFromStrangeness(Int_t label, AliStack *const stack)
static void SetDefaultAliasesV0(TTree *treeV0)
AliFilteredTreeAcceptanceCuts * GetAcceptanceCuts() const
TIterator * fPitList
list send on output slot 0
Bool_t IsHighDeDxParticle(AliESDtrack *const track)
TH3D * fPtResPhiPtTPCITS
sigma(pt)/pt vs Phi vs Pt for prim. TPC contrained to vertex tracks
void ProcessMCEff(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0, AliESDfriend *const esdFriend=0)