]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/SPECTRA/AliAnalysisTaskCheckPerformanceCascade.h
Comments and colors added to DQM histograms if problems occur. A threshold for the...
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliAnalysisTaskCheckPerformanceCascade.h
1 #ifndef ALIANALYSISTASKCHECKPERFORMANCECASCADE_H
2 #define ALIANALYSISTASKCHECKPERFORMANCECASCADE_H
3
4 /*  See cxx source for full Copyright notice */
5
6 // //-----------------------------------------------------------------
7 // //        AliAnalysisTaskCheckPerformanceCascade class
8 // //            This task is for a performance study of cascade identification.
9 // //            It works with MC info and ESD.
10 // //              Use with AOD tree = under development
11 // //            Origin   : A.Maire Mar2009, antonin.maire@ires.in2p3.fr
12 // //            Modified : A.Maire Jan2010, antonin.maire@ires.in2p3.fr
13 // //-----------------------------------------------------------------
14
15 class TList;
16 class TH1F;
17 class TH2F;
18 class AliESDEvent;
19 class AliESDpid;
20 class AliCFContainer;
21
22 #include "AliAnalysisTaskSE.h"
23
24 class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
25  public:
26  
27   AliAnalysisTaskCheckPerformanceCascade();
28   AliAnalysisTaskCheckPerformanceCascade(const char *name );
29   virtual ~AliAnalysisTaskCheckPerformanceCascade();
30   
31   //virtual void   ConnectInputData(Option_t *);
32   virtual void   UserCreateOutputObjects();
33   virtual void   UserExec(Option_t *option);
34   virtual Int_t  DoESDTrackWithTPCrefitMultiplicity(const AliESDEvent *lESDevent);
35   virtual void   Terminate(Option_t *);
36   
37   void SetDebugLevelCascade(Int_t lDebugCascade = 0)          {fDebugCascade = lDebugCascade;}
38   void SetCollidingSystems (Short_t collidingSystems = 0)     {fCollidingSystems = collidingSystems;}
39   void SetAnalysisType     (const char* analysisType = "ESD") {fAnalysisType = analysisType;}
40   
41   void SetRelaunchV0CascVertexers    (Bool_t rerunV0CascVertexers       = 0    ) { fkRerunV0CascVertexers       =  rerunV0CascVertexers;   }
42   void SetQualityCutZprimVtxPos      (Bool_t qualityCutZprimVtxPos      = kTRUE) { fkQualityCutZprimVtxPos      =  qualityCutZprimVtxPos;     }
43   void SetQualityCutNoTPConlyPrimVtx (Bool_t qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx =  qualityCutNoTPConlyPrimVtx;}
44   void SetQualityCutTPCrefit         (Bool_t qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit         =  qualityCutTPCrefit;        }
45   void SetQualityCut80TPCcls         (Bool_t qualityCut80TPCcls         = kTRUE) { fkQualityCut80TPCcls         =  qualityCut80TPCcls;        }
46   void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections            =  extraSelections;           }
47
48  private:
49         // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
50         // your data member object is created on the worker nodes and streaming is not needed.
51         // http://root.cern.ch/download/doc/11InputOutput.pdf, page 14
52
53         Int_t           fDebugCascade;          // Denug Flag for this task devoted to cascade
54         TString         fAnalysisType;          // "ESD" or "AOD" analysis type 
55         Short_t         fCollidingSystems;      // 0 = pp collisions or 1 = AA collisions
56
57         AliESDpid       *fESDpid;        // Tool data member to manage the TPC Bethe-Bloch info
58         //TPaveText       *fPaveTextBookKeeping;          // TString to store all the relevant info necessary for book keeping (v0 cuts, cascade cuts, quality cuts, ...)
59
60         Bool_t          fkRerunV0CascVertexers;         // Boolean : kTRUE = relaunch both V0 + Cascade vertexers
61         Bool_t          fkQualityCutZprimVtxPos;        // Boolean : kTRUE = cut on the prim.vtx  z-position
62         Bool_t          fkQualityCutNoTPConlyPrimVtx;   // Boolean : kTRUE = prim vtx should be SPD or Tracking vertex
63         Bool_t          fkQualityCutTPCrefit;           // Boolean : kTRUE = ask for TPCrefit for the 3 daughter tracks
64         Bool_t          fkQualityCut80TPCcls;           // Boolean : kTRUE = ask for 80 TPC clusters for each daughter track
65         Bool_t          fkExtraSelections;              // Boolean : kTRUE = apply tighter selections, before starting the analysis
66         
67         Double_t        fAlephParameters[5];            // Array to store the 5 param values for the TPC Bethe-Bloch parametrisation
68         Double_t        fV0Sels[7];                     // Array to store the 7 values for the different selections V0 related (if fkRerunV0CascVertexers)
69         Double_t        fCascSels[8];                   // Array to store the 8 values for the different selections Casc. related (if fkRerunV0CascVertexers)
70
71         
72         TList   *fListHistCascade;              //! List of Cascade histograms
73                 // - Histos 
74         TH1F    *fHistMCTrackMultiplicity;      //! MC Track multiplicity
75         
76         
77         // proton
78         TH1F    *fHistEtaGenProton;                     //! MC Pseudo-rapidity of any generated p+ (no cuts in acceptance)
79         TH1F    *fHistEtaGenAntiProton;                 //! MC Pseudo-rapidity of any generated p+ (no cuts in acceptance)
80
81 // Part 1 - Generated cascades
82         
83         //--------------
84         // Xi-
85         TH1F    *fHistEtaGenCascXiMinus;                //! MC Pseudo-rapidity of any generated Xi- (no cuts in acceptance)
86         TH2F    *f2dHistGenPtVsGenYGenXiMinus;          //! MC Pt Vs MC Y of generated Xi- 
87                 
88         // - Histos planned for Xi- emitted within the acceptance (cuts in theta + pt of daughters)
89         //      = findable cascades
90         TH1F    *fHistThetaGenCascXiMinus;              //! MC Theta angle of the generated Xi-
91         TH2F    *f2dHistGenPtVsGenYFdblXiMinus;         //! MC Pt Vs MC y of the findable Xi-
92         
93         TH1F    *fHistThetaLambdaXiMinus;               //! MC Theta angle of the Lambda daughter of the generated Xi-
94         TH1F    *fHistThetaBachXiMinus;                 //! MC Theta angle of the Bachelor (pi-)
95         
96         TH1F    *fHistThetaMesDghterXiMinus;            //! MC Theta angle of the mesonic  V0 daughter in the generated cascade, pi-
97         TH1F    *fHistThetaBarDghterXiMinus;            //! MC Theta angle of the baryonic V0 daughter in the generated cascade, p+
98         
99         TH1F    *fHistPtBachXiMinus;                    //! MC Pt of the Bachelor (pi-)                         (Control Plot)
100         TH1F    *fHistPtMesDghterXiMinus;               //! MC Pt of the meson daughter of the 'Lambda0', pi-   (Control Plot)
101         TH1F    *fHistPtBarDghterXiMinus;               //! MC Pt of the baryon daughter of the 'Lambda0', p+   (Control Plot)
102         
103         
104         
105         //--------------
106         // Xi+
107         TH1F    *fHistEtaGenCascXiPlus;                 //! MC Pseudo-rapidity of any generated Xi+ (no cuts in acceptance)
108         TH2F    *f2dHistGenPtVsGenYGenXiPlus;           //! MC Pt Vs MC Y of generated Xi+ 
109                         
110         // - Histos planned for Xi+ emitted within the acceptance (cuts in theta + pt of daughters)
111         TH1F    *fHistThetaGenCascXiPlus;               //! MC Theta angle of the generated Xi+
112         TH2F    *f2dHistGenPtVsGenYFdblXiPlus;          //! MC Pt Vs MC y of the findable Xi+
113         
114         TH1F    *fHistThetaLambdaXiPlus;                //! MC Theta angle of the anti-Lambda daughter of the generated Xi+
115         TH1F    *fHistThetaBachXiPlus;                  //! MC Theta angle of the Bachelor (pi+)
116         
117         TH1F    *fHistThetaMesDghterXiPlus;             //! MC Theta angle of the mesonic  V0 daughter in the generated cascade, pi+
118         TH1F    *fHistThetaBarDghterXiPlus;             //! MC Theta angle of the baryonic V0 daughter in the generated cascade, p-
119         
120         TH1F    *fHistPtBachXiPlus;                     //! MC Pt of the Bachelor (pi+)                       (Control Plot)
121         TH1F    *fHistPtMesDghterXiPlus;                //! MC Pt of the meson daughter of the 'Lambda0', pi+ (Control Plot)
122         TH1F    *fHistPtBarDghterXiPlus;                //! MC Pt of the baryon daughter of the 'Lambda0', p- (Control Plot)
123         
124         
125         
126         //--------------
127         // Omega-
128         TH1F    *fHistEtaGenCascOmegaMinus;             //! MC Pseudo-rapidity of any generated Omega- (no cuts in acceptance)
129         TH2F    *f2dHistGenPtVsGenYGenOmegaMinus;       //! MC Pt Vs MC Y of generated Omega-   
130         
131         // - Histos planned for Omega- emitted within the acceptance (cuts in theta + pt of daughters)
132         TH1F    *fHistThetaGenCascOmegaMinus;           //! MC Theta angle of the generated Omega-
133         TH2F    *f2dHistGenPtVsGenYFdblOmegaMinus;      //! MC Pt Vs MC y of the findable Omega-
134         
135         TH1F    *fHistThetaLambdaOmegaMinus;            //! MC Theta angle of the Lambda daughter of the generated Omega-
136         TH1F    *fHistThetaBachOmegaMinus;              //! MC Theta angle of the Bachelor (K-)
137         
138         TH1F    *fHistThetaMesDghterOmegaMinus;         //! MC Theta angle of the mesonic  V0 daughter in the generated cascade, pi-
139         TH1F    *fHistThetaBarDghterOmegaMinus;         //! MC Theta angle of the baryonic V0 daughter in the generated cascade, p+
140         
141         TH1F    *fHistPtBachOmegaMinus;                 //! MC Pt of the Bachelor (K-)                   (Control Plot)
142         TH1F    *fHistPtMesDghterOmegaMinus;            //! MC Pt of the meson daughter of the 'Lambda0', pi- (Control Plot)
143         TH1F    *fHistPtBarDghterOmegaMinus;            //! MC Pt of the baryon daughter of the 'Lambda0', p+ (Control Plot)
144         
145         
146         
147         //--------------
148         // Omega+
149         TH1F    *fHistEtaGenCascOmegaPlus;              //! MC Pseudo-rapidity of any generated Omega+ (no cuts in acceptance)
150         TH2F    *f2dHistGenPtVsGenYGenOmegaPlus;        //! MC Pt Vs MC Y of generated Omega+   
151                 
152         // - Histos planned for Omega+ emitted within the acceptance (cuts in theta + pt of daughters)
153         TH1F    *fHistThetaGenCascOmegaPlus;            //! MC Theta angle of the generated Omega+
154         TH2F    *f2dHistGenPtVsGenYFdblOmegaPlus;       //! MC Pt Vs MC y of the findable Omega+
155         
156         TH1F    *fHistThetaLambdaOmegaPlus;             //! MC Theta angle of the anti-Lambda daughter of the generated Omega+
157         TH1F    *fHistThetaBachOmegaPlus;               //! MC Theta angle of the Bachelor (K+)
158         
159         TH1F    *fHistThetaMesDghterOmegaPlus;          //! MC Theta angle of the mesonic  V0 daughter in the generated cascade, pi+
160         TH1F    *fHistThetaBarDghterOmegaPlus;          //! MC Theta angle of the baryonic V0 daughter in the generated cascade, p-
161         
162         TH1F    *fHistPtBachOmegaPlus;                  //! MC Pt of the Bachelor (K+) (Control Plot)
163         TH1F    *fHistPtMesDghterOmegaPlus;             //! MC Pt of the meson daughter of the 'Lambda0', pi+ (Control Plot)
164         TH1F    *fHistPtBarDghterOmegaPlus;             //! MC Pt of the baryon daughter of the 'Lambda0', p- (Control Plot)
165         
166         
167         
168 // Part 2 - Any reconstructed cascades + reconstructed cascades associated with MC
169         // 2.1 - Effective mass and PID
170         // - Effective mass histos for all the cascade candidates
171         TH1F    *fHistMassXiMinus;                      //! reconstructed cascade effective mass, under Xi- hyp.
172         TH1F    *fHistMassXiPlus;                       //! reconstructed cascade effective mass, under Xi+ hyp.
173         TH1F    *fHistMassOmegaMinus;                   //! reconstructed cascade effective mass, under Omega- hyp.
174         TH1F    *fHistMassOmegaPlus;                    //! reconstructed cascade effective mass, under Omega+ hyp.
175         
176         // - Effective mass histos with reconstruction combined PID
177         TH1F    *fHistMassWithCombPIDXiMinus;           //! reconstructed Xi- effective mass, with bach. comb PID
178         TH1F    *fHistMassWithCombPIDXiPlus;            //! reconstructed Xi+ effective mass, with bach. comb PID
179         TH1F    *fHistMassWithCombPIDOmegaMinus;        //! reconstructed Omega- effective mass, with bach. comb PID
180         TH1F    *fHistMassWithCombPIDOmegaPlus;         //! reconstructed Omega+ effective mass, with bach. comb PID
181         
182         // - PID Probability versus MC Pt(bachelor track)
183         TH2F    *f2dHistPIDprobaKaonVsMCPtBach;         //! Comb. PID probability for the bach. to be a Kaon Vs MC pt(bach)
184         TH2F    *f2dHistPIDprobaPionVsMCPtBach;         //! Comb. PID probability for the bach. to be a Pion Vs MC pt(bach)     
185
186         // - Effective mass histos with perfect MC PID
187         TH1F    *fHistMassWithMcPIDXiMinus;             //! reconstructed Xi- effective mass, with MC bach. PID
188         TH1F    *fHistMassWithMcPIDXiPlus;              //! reconstructed Xi+ effective mass, with MC bach. PID
189         TH1F    *fHistMassWithMcPIDOmegaMinus;          //! reconstructed Omega- effective mass, with MC bach. PID
190         TH1F    *fHistMassWithMcPIDOmegaPlus;           //! reconstructed Omega+ effective mass, with MC bach. PID
191
192         
193         // 2.2 - Associated candidates
194         // - Effective mass histos for the cascade candidates associated with MC, without PID info
195         TH1F    *fHistAsMCMassXiMinus;                  //! reconstr. cascade effective mass, under Xi- hyp. for Associated cand.
196         TH1F    *fHistAsMCMassXiPlus;                   //! reconstr. cascade effective mass, under Xi+ hyp. for Associated cand.
197         TH1F    *fHistAsMCMassOmegaMinus;               //! reconstr. cascade effective mass, under Omega- hyp. for Associated cand.
198         TH1F    *fHistAsMCMassOmegaPlus;                //! reconstr. cascade effective mass, under Omega+ hyp. for Associated cand.
199         
200         // -  Generated Pt Vs generated Y of the cascade candidates associated with MC 
201         //     + having the proper maximum proba of combined PID for the bachelor
202         TH2F    *f2dHistAsMCandCombPIDGenPtVsGenYXiMinus;       //! Pt(gen) Vs Y(gen) from the MC Xi- associated with Reco cand + with PID info
203         TH2F    *f2dHistAsMCandCombPIDGenPtVsGenYXiPlus;        //! Pt(gen) Vs Y(gen) from the MC Xi+ associated with Reco cand + with PID info
204         TH2F    *f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus;    //! Pt(gen) Vs Y(gen) from the MC Omega- associated with Reco cand + with PID info
205         TH2F    *f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus;     //! Pt(gen) Vs Y(gen) from the MC Omega+ associated with Reco cand + with PID info
206         
207         // - Generated Pt Vs generated Y, for the cascade candidates associated with MC, without PID info
208         TH2F    *f2dHistAsMCGenPtVsGenYXiMinus;         //! gen. Pt Vs gen. Rap. from the MC Xi- associated with a reconstr. cascade
209         TH2F    *f2dHistAsMCGenPtVsGenYXiPlus;          //! gen. Pt Vs gen. Rap. from the MC Xi+ associated with a reconstr. cascade
210         TH2F    *f2dHistAsMCGenPtVsGenYOmegaMinus;      //! gen. Pt Vs gen. Rap. from the MC Omega- associated with a reconstr. cascade
211         TH2F    *f2dHistAsMCGenPtVsGenYOmegaPlus;       //! gen. Pt Vs gen. Rap. from the MC Omega+ associated with a reconstr. cascade
212         
213         // - Generated Eta of the the cascade candidates associated with MC, without PID info
214         TH1F    *fHistAsMCGenEtaXiMinus;                //! generated Eta from the MC Xi- associated with a reconstr. cascade
215         TH1F    *fHistAsMCGenEtaXiPlus;                 //! generated Eta from the MC Xi+ associated with a reconstr. cascade
216         TH1F    *fHistAsMCGenEtaOmegaMinus;             //! generated Eta from the MC Omega- associated with a reconstr. cascade
217         TH1F    *fHistAsMCGenEtaOmegaPlus;              //! generated Eta from the MC Omega+ associated with a reconstr. cascade
218         
219         // - Resolution in Pt as function of generated Pt
220         TH2F    *f2dHistAsMCResPtXiMinus;               //! resolution in Pt as function of gen. Pt, for Xi-
221         TH2F    *f2dHistAsMCResPtXiPlus;                //! resolution in Pt as function of gen. Pt, for Xi-
222         TH2F    *f2dHistAsMCResPtOmegaMinus;            //! resolution in Pt as function of gen. Pt, for Omega-
223         TH2F    *f2dHistAsMCResPtOmegaPlus;             //! resolution in Pt as function of gen. Pt, for Omega+
224         
225         // - Resolution in R(2D) as function of generated R
226         TH2F    *f2dHistAsMCResRXiMinus;                //! resolution in transv. R = f(transv. gen. R), for Xi-
227         TH2F    *f2dHistAsMCResRXiPlus;                 //! resolution in transv. R = f(transv. gen. R), for Xi+
228         TH2F    *f2dHistAsMCResROmegaMinus;             //! resolution in transv. R = f(transv. gen. R), for Omega-
229         TH2F    *f2dHistAsMCResROmegaPlus;              //! resolution in transv. R = f(transv. gen. R), for Omega+
230         
231         // - Compilation of all PID plots (3D = casc. transv. momemtum Vs Casc Eff mass Vs Y), stored into an AliCFContainer
232         AliCFContainer  *fCFContCascadePIDAsXiMinus;      //! for Xi-   : Container to store any 3D histos with the different PID flavours
233         AliCFContainer  *fCFContCascadePIDAsXiPlus;       //! for Xi+   : Container to store any 3D histos with the different PID flavours
234         AliCFContainer  *fCFContCascadePIDAsOmegaMinus;   //! for Omega-: Container to store any 3D histos with the different PID flavours
235         AliCFContainer  *fCFContCascadePIDAsOmegaPlus;    //! for Omega+: Container to store any 3D histos with the different PID flavours
236         
237         // - Towards the optimisation of topological selections/ systematics (on associated candidates)
238         AliCFContainer  *fCFContAsCascadeCuts;            //! Container meant to store all the relevant distributions corresponding to the cut variables
239         
240   AliAnalysisTaskCheckPerformanceCascade(const AliAnalysisTaskCheckPerformanceCascade&);            // not implemented
241   AliAnalysisTaskCheckPerformanceCascade& operator=(const AliAnalysisTaskCheckPerformanceCascade&); // not implemented
242   
243   ClassDef(AliAnalysisTaskCheckPerformanceCascade, 4);
244 };
245
246 #endif