]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckPerformanceCascadepp276.h
First commit of the pp 2.76 TeV cascade analysis code
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / Cascades / AliAnalysisTaskCheckPerformanceCascadepp276.h
1 #ifndef ALIANALYSISTASKCHECKPERFORMANCECASCADEPP276_H
2 #define ALIANALYSISTASKCHECKPERFORMANCECASCADEPP276_H
3
4 /*  See cxx source for full Copyright notice */
5
6 // //-----------------------------------------------------------------
7 // //        AliAnalysisTaskCheckPerformanceCascadePbPb class
8 // //            This task is for a performance study of cascade identification.
9 // //            It works with MC info and ESD and AOD tree 
10 // //            Origin   : A.Maire Jan2010, antonin.maire@ires.in2p3.fr
11 // //            Modified : M.Nicassio Feb2011, maria.nicassio@ba.infn.it
12 // //-----------------------------------------------------------------
13
14 class TList;
15 class TH1F;
16 class TH2F;
17 class TH3F; 
18
19 class AliESDEvent;
20 class AliESDtrackCuts;
21 class AliPhysicsSelection;
22 class AliCFContainer;
23 class AliPIDResponse;
24
25 #include "AliAnalysisTaskSE.h"
26
27 class AliAnalysisTaskCheckPerformanceCascadepp276 : public AliAnalysisTaskSE {
28  public:
29  
30   AliAnalysisTaskCheckPerformanceCascadepp276();
31   AliAnalysisTaskCheckPerformanceCascadepp276(const char *name );
32   virtual ~AliAnalysisTaskCheckPerformanceCascadepp276();
33   
34   virtual void   UserCreateOutputObjects();
35   virtual void   UserExec(Option_t *option);
36   virtual void   Terminate(Option_t *);
37   
38   void SetAnalysisType     (const char* analysisType    = "ESD") { fAnalysisType     = analysisType;}
39   
40   void SetRelaunchV0CascVertexers    (Bool_t rerunV0CascVertexers       = 0    ) { fkRerunV0CascVertexers        = rerunV0CascVertexers;      }
41   void SetQualityCutZprimVtxPos      (Bool_t qualityCutZprimVtxPos      = kTRUE) { fkQualityCutZprimVtxPos       = qualityCutZprimVtxPos;     }
42   void SetRejectEventPileUp          (Bool_t rejectPileUp               = kTRUE) { fkRejectEventPileUp           = rejectPileUp;              }
43   void SetQualityCutNoTPConlyPrimVtx (Bool_t qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx  = qualityCutNoTPConlyPrimVtx;}
44   void SetQualityCutTPCrefit         (Bool_t qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit          = qualityCutTPCrefit;        }
45   void SetQualityCutnTPCcls          (Bool_t qualityCutnTPCcls          = kTRUE) { fkQualityCutnTPCcls           = qualityCutnTPCcls;         }
46   void SetSDDSelection               (Bool_t sddOnSelection             = kTRUE) { fkSDDonSelection              = sddOnSelection;            }
47   void SetQualityCutMinnTPCcls       (Int_t minnTPCcls                  = 70   ) { fMinnTPCcls                   = minnTPCcls;                }
48   void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections             = extraSelections;           }
49   void SetVertexRange                (Float_t vtxrange                  = 0.   ) { fVtxRange                     = vtxrange;                  }
50   void SetApplyAccCut                (Bool_t acccut                     = kFALSE){ fApplyAccCut                  = acccut;                    }    
51   void SetMinptCutOnDaughterTracks   (Float_t minptdaughtrks            = 0.   ) { fMinPtCutOnDaughterTracks     = minptdaughtrks;            }
52   void SetEtaCutOnDaughterTracks     (Float_t etadaughtrks              = 0.   ) { fEtaCutOnDaughterTracks       = etadaughtrks;              }
53
54  private:
55         // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
56         // your data member object is created on the worker nodes and streaming is not needed.
57         // http://root.cern.ch/download/doc/11InputOutput.pdf, page 14
58
59         TString         fAnalysisType;          // "ESD" or "AOD" analysis type 
60         AliESDtrackCuts *fESDtrackCuts;         // ESD track cuts used for primary track definition
61       //TPaveText       *fPaveTextBookKeeping;  // TString to store all the relevant info necessary for book keeping (v0 cuts, cascade cuts, quality cuts, ...)
62         AliPIDResponse *fPIDResponse;           //! PID response object        
63
64         Bool_t          fkRerunV0CascVertexers;         // Boolean : kTRUE = relaunch both V0 + Cascade vertexers
65         Bool_t          fkQualityCutZprimVtxPos;        // Boolean : kTRUE = cut on the prim.vtx  z-position
66         Bool_t          fkRejectEventPileUp;            // Boolean : kTRUE = enable the rejection of events tagged as pile-up by SPD (AliESDEvent::IsPileupFromSPD)
67         Bool_t          fkQualityCutNoTPConlyPrimVtx;   // Boolean : kTRUE = prim vtx should be SPD or Tracking vertex
68         Bool_t          fkQualityCutTPCrefit;           // Boolean : kTRUE = ask for TPCrefit for the 3 daughter tracks
69         Bool_t          fkQualityCutnTPCcls;           // Boolean : kTRUE = ask for 80 TPC clusters for each daughter track
70         Bool_t          fkSDDonSelection;               // Boolean : kTRUE = select events with SDD on
71         Int_t           fMinnTPCcls;                    // Boolean : set the value for the minimum numeber of TPC clusters
72         Bool_t          fkExtraSelections;              // Boolean : kTRUE = apply tighter selections, before starting the analysis
73         Float_t         fVtxRange;                      // to select events with |zvtx|<fVtxRange cm
74         Bool_t          fApplyAccCut;                   // flag to apply acceptance cuts to MC cascades       
75         Float_t         fMinPtCutOnDaughterTracks;      // minimum pt cut on daughter tracks
76         Float_t         fEtaCutOnDaughterTracks;        // pseudorapidity cut on daughter tracks 
77         
78         Double_t        fV0Sels[7];                     // Array to store the 7 values for the different selections V0 related (if fkRerunV0CascVertexers)
79         Double_t        fCascSels[8];                   // Array to store the 8 values for the different selections Casc. related (if fkRerunV0CascVertexers)
80         
81         TList   *fListHistCascade;              //! List of Cascade histograms
82          // - General Plots
83          // Cascade multiplicity plots
84          TH1F *fHistCascadeMultiplicityBeforeAnySel;
85          TH1F *fHistCascadeMultiplicityAfterSDDSel;
86          TH1F *fHistCascadeMultiplicityAfterPhysicsSel;
87          TH1F *fHistCascadeMultiplicityAfterVertexCutSel;
88          TH1F *fHistCascadeMultiplicityForSelEvtNoTPCOnly;
89          TH1F *fHistCascadeMultiplicityForSelEvtNoTPCOnlyNoPileup;
90          TH1F *fHistnXiPlusPerEvTot;                  // After any event selections, in all the eta and pt range
91          TH1F *fHistnXiMinusPerEvTot;                 // After any event selections, in all the eta and pt range
92          TH1F *fHistnOmegaPlusPerEvTot;               // After any event selections, in all the eta and pt range
93          TH1F *fHistnOmegaMinusPerEvTot;              // After any event selections, in all the eta and pt range
94          TH1F *fHistnXiPlusPerEv;                     // After any event selections, in the detector acceptance and over a pt minimum
95          TH1F *fHistnXiMinusPerEv;                    // After any event selections, in the detector acceptance and over a pt minimum
96          TH1F *fHistnOmegaPlusPerEv;                  // After any event selections, in the detector acceptance and over a pt minimum
97          TH1F *fHistnOmegaMinusPerEv;                 // After any event selections, in the detector acceptance and over a pt minimum
98          TH1F *fHistnAssoXiMinus;                     // For the Reconstructed-Associated cascades 
99          TH1F *fHistnAssoXiPlus;                      // For the Reconstructed-Associated cascades 
100          TH1F *fHistnAssoOmegaMinus;                  // For the Reconstructed-Associated cascades 
101          TH1F *fHistnAssoOmegaPlus;                   // For the Reconstructed-Associated cascades 
102          // Tracks multiplicity plots
103          TH1F *fHistTrackMultiplicityBeforeAnySel;
104          TH1F *fHistTrackMultiplicityAfterSDDSel;
105          TH1F * fHistTrackMultiplicityAfterPhysicsSel;
106          TH1F *fHistTrackMultiplicityAfterVertexCutSel;
107          TH1F *fHistTrackMultiplicityForSelEvtNoTPCOnly;
108          TH1F *fHistTrackMultiplicityForSelEvtNoTPCOnlyNoPileup;
109          // Vertex position plots (BestVertex)
110          TH1F *fHistPVx;                              // After SDD and Physics event selectione but before any other event selections
111          TH1F *fHistPVy;                              // After SDD and Physics event selectione but before any other event selections
112          TH1F *fHistPVz;                              // After SDD and Physics event selectione but before any other event selections
113          TH1F *fHistPVxAnalysis;                      // After any event selections 
114          TH1F *fHistPVyAnalysis;                      // After any event selections
115          TH1F *fHistPVzAnalysis;                      // After any event selections
116          // - Plots before Physics Selection
117          TH3D *f3dHistGenPtVsGenYvsNtracksXiMinus;    // After the SDD event selection (For efficinecy calculation)
118          TH3D *f3dHistGenPtVsGenctauvsYXiMinus;       // After the SDD event selection (For efficinecy calculation)
119          TH3D *f3dHistGenPtVsGenYvsNtracksXiPlus;     // After the SDD event selection (For efficinecy calculation)
120          TH3D *f3dHistGenPtVsGenctauvsYXiPlus;        // After the SDD event selection (For efficinecy calculation)
121          TH3D *f3dHistGenPtVsGenYvsNtracksOmegaMinus; // After the SDD event selection (For efficinecy calculation)
122          TH3D *f3dHistGenPtVsGenctauvsYOmegaMinus;    // After the SDD event selection (For efficinecy calculation)
123          TH3D *f3dHistGenPtVsGenYvsNtracksOmegaPlus;  // After the SDD event selection (For efficinecy calculation)
124          TH3D *f3dHistGenPtVsGenctauvsYOmegaPlus;     // After the SDD event selection (For efficinecy calculation)
125
126          // - Generated cascade plots
127          // After all the event selections 
128          //Xi-
129          TH1F *fHistEtaGenCascXiMinus;                // In all the eta and pt range (as they are generated)
130          TH1F *fHistThetaGenCascXiMinus;              // In all the eta and pt range (as they are generated)
131          TH3D *f3dHistGenPtVsGenYvsNtracksXiMinusPhysEff;    // 
132          TH3D *f3dHistGenPtVsGenctauvsYXiMinusPhysEff;       // 
133          TH2D *f2dHistGenPtVsGenYFdblXiMinus;         // In the detector acceptance and over a pt minimum (Findable particle)
134          TH1F *fHistThetaLambdaXiMinus;               // In the detector acceptance and over a pt minimum (Findable particle)
135          TH1F *fHistThetaBachXiMinus;                 // In the detector acceptance and over a pt minimum (Findable particle)
136          TH1F *fHistThetaMesDghterXiMinus;            // In the detector acceptance and over a pt minimum (Findable particle)
137          TH1F *fHistThetaBarDghterXiMinus;            // In the detector acceptance and over a pt minimum (Findable particle)
138          TH1F *fHistPtBachXiMinus;                    // In the detector acceptance and over a pt minimum (Findable particle)
139          TH1F *fHistPtMesDghterXiMinus;               // In the detector acceptance and over a pt minimum (Findable particle)
140          TH1F *fHistPtBarDghterXiMinus;               // In the detector acceptance and over a pt minimum (Findable particle)
141          //Xi+
142          TH1F *fHistEtaGenCascXiPlus;                 // In all the eta and pt range (as they are generated)
143          TH1F *fHistThetaGenCascXiPlus;               // In all the eta and pt range (as they are generated)
144          TH3D *f3dHistGenPtVsGenYvsNtracksXiPlusPhysEff;    // 
145          TH3D *f3dHistGenPtVsGenctauvsYXiPlusPhysEff;       // 
146          TH2D *f2dHistGenPtVsGenYFdblXiPlus;          // In the detector acceptance and over a pt minimum (Findable particle)
147          TH1F *fHistThetaLambdaXiPlus;                // In the detector acceptance and over a pt minimum (Findable particle)
148          TH1F *fHistThetaBachXiPlus;                  // In the detector acceptance and over a pt minimum (Findable particle)
149          TH1F *fHistThetaMesDghterXiPlus;             // In the detector acceptance and over a pt minimum (Findable particle)
150          TH1F *fHistThetaBarDghterXiPlus;             // In the detector acceptance and over a pt minimum (Findable particle)
151          TH1F *fHistPtBachXiPlus;                     // In the detector acceptance and over a pt minimum (Findable particle)
152          TH1F *fHistPtMesDghterXiPlus;                // In the detector acceptance and over a pt minimum (Findable particle)
153          TH1F *fHistPtBarDghterXiPlus;                // In the detector acceptance and over a pt minimum (Findable particle)
154          //Omega-
155          TH1F *fHistEtaGenCascOmegaMinus;             // In all the eta and pt range (as they are generated)
156          TH1F *fHistThetaGenCascOmegaMinus;           // In all the eta and pt range (as they are generated)
157          TH3D *f3dHistGenPtVsGenYvsNtracksOmegaMinusPhysEff;    // 
158          TH3D *f3dHistGenPtVsGenctauvsYOmegaMinusPhysEff;       //
159          TH2D *f2dHistGenPtVsGenYFdblOmegaMinus;      // In the detector acceptance and over a pt minimum (Findable particle)
160          TH1F *fHistThetaLambdaOmegaMinus;            // In the detector acceptance and over a pt minimum (Findable particle)
161          TH1F *fHistThetaBachOmegaMinus;              // In the detector acceptance and over a pt minimum (Findable particle)
162          TH1F *fHistThetaMesDghterOmegaMinus;         // In the detector acceptance and over a pt minimum (Findable particle)
163          TH1F *fHistThetaBarDghterOmegaMinus;         // In the detector acceptance and over a pt minimum (Findable particle)
164          TH1F *fHistPtBachOmegaMinus;                 // In the detector acceptance and over a pt minimum (Findable particle)
165          TH1F *fHistPtMesDghterOmegaMinus;            // In the detector acceptance and over a pt minimum (Findable particle)
166          TH1F *fHistPtBarDghterOmegaMinus;            // In the detector acceptance and over a pt minimum (Findable particle)
167          //Omega+      
168          TH1F *fHistEtaGenCascOmegaPlus;              // In all the eta and pt range (as they are generated)
169          TH1F *fHistThetaGenCascOmegaPlus;            // In all the eta and pt range (as they are generated)
170          TH3D *f3dHistGenPtVsGenYvsNtracksOmegaPlusPhysEff;    // 
171          TH3D *f3dHistGenPtVsGenctauvsYOmegaPlusPhysEff;       //
172          TH2D *f2dHistGenPtVsGenYFdblOmegaPlus;       // In the detector acceptance and over a pt minimum (Findable particle)
173          TH1F *fHistThetaLambdaOmegaPlus;             // In the detector acceptance and over a pt minimum (Findable particle)
174          TH1F *fHistThetaBachOmegaPlus;               // In the detector acceptance and over a pt minimum (Findable particle)
175          TH1F *fHistThetaMesDghterOmegaPlus;          // In the detector acceptance and over a pt minimum (Findable particle)
176          TH1F *fHistThetaBarDghterOmegaPlus;          // In the detector acceptance and over a pt minimum (Findable particle)
177          TH1F *fHistPtBachOmegaPlus;                  // In the detector acceptance and over a pt minimum (Findable particle)
178          TH1F *fHistPtMesDghterOmegaPlus;             // In the detector acceptance and over a pt minimum (Findable particle)
179          TH1F *fHistPtBarDghterOmegaPlus;             // In the detector acceptance and over a pt minimum (Findable particle)
180
181          // - Associated to MC cascade plots
182          TH1F *fHistMassXiMinus;                      // For the Reconstructed-Associated cascades
183          TH1F *fHistMassXiPlus;                       // For the Reconstructed-Associated cascades
184          TH1F *fHistMassOmegaMinus;                   // For the Reconstructed-Associated cascades
185          TH1F *fHistMassOmegaPlus;                    // For the Reconstructed-Associated cascades
186          // Effective mass histos with combined PID
187          TH1F *fHistMassWithCombPIDXiMinus;
188          TH1F *fHistMassWithCombPIDXiPlus;
189          TH1F *fHistMassWithCombPIDOmegaMinus;
190          TH1F *fHistMassWithCombPIDOmegaPlus;
191          // PID Probability versus MC Pt(bachelor track)
192          TH2F *f2dHistPIDprobaKaonVsMCPtBach; 
193          TH2F *f2dHistPIDprobaPionVsMCPtBach;
194          // Effective mass histos with perfect MC PID on the bachelor
195          TH1F *fHistMassWithMcPIDXiMinus; 
196          TH1F *fHistMassWithMcPIDXiPlus;
197          TH1F *fHistMassWithMcPIDOmegaMinus; 
198          TH1F *fHistMassWithMcPIDOmegaPlus;
199          // Effective mass histos for the cascade candidates associated with MC
200          TH1F *fHistAsMCMassXiMinus;
201          TH1F *fHistAsMCMassXiPlus;
202          TH1F *fHistAsMCMassOmegaMinus;
203          TH1F *fHistAsMCMassOmegaPlus;
204          // Generated Pt Vs generated y, for the cascade candidates associated with MC + Info Comb. PID
205          TH2F *f2dHistAsMCandCombPIDGenPtVsGenYXiMinus;
206          TH2F *f2dHistAsMCandCombPIDGenPtVsGenYXiPlus;
207          TH2F *f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus;
208          TH2F *f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus;
209          // Generated Pt Vs generated y, for the cascade candidates associated with MC
210          TH2F *f2dHistAsMCGenPtVsGenYXiMinus;
211          TH2F *f2dHistAsMCGenPtVsGenYXiPlus;
212          TH2F *f2dHistAsMCGenPtVsGenYOmegaMinus;
213          TH2F *f2dHistAsMCGenPtVsGenYOmegaPlus;
214          // Generated Eta of the the cascade candidates associated with MC
215          TH1F *fHistAsMCGenEtaXiMinus;
216          TH1F *fHistAsMCGenEtaXiPlus;
217          TH1F *fHistAsMCGenEtaOmegaMinus;
218          TH1F *fHistAsMCGenEtaOmegaPlus;
219          // Resolution in Pt as function of generated Pt
220          TH2F *f2dHistAsMCResPtXiMinus;
221          TH2F *f2dHistAsMCResPtXiPlus;
222          TH2F *f2dHistAsMCResPtOmegaMinus;
223          TH2F *f2dHistAsMCResPtOmegaPlus;
224          // Resolution in R(2D) as function of generated R
225          TH2F *f2dHistAsMCResRXiMinus;
226          TH2F *f2dHistAsMCResRXiPlus;
227          TH2F *f2dHistAsMCResROmegaMinus;
228          TH2F *f2dHistAsMCResROmegaPlus;
229          // Resolution in phi as function of generated Pt
230          TH2F *f2dHistAsMCResPhiXiMinus;
231          TH2F *f2dHistAsMCResPhiXiPlus;
232          TH2F *f2dHistAsMCResPhiOmegaMinus;
233          TH2F *f2dHistAsMCResPhiOmegaPlus;
234          // Correlation between proton (antiproton) daughter MC pt and Xi/Omega MC pt (to apply Geat/Fluka correction)
235          TH2F *f2dHistAsMCptProtonMCptXiMinus;
236          TH2F *f2dHistAsMCptAntiprotonMCptXiPlus;
237          TH2F *f2dHistAsMCptProtonMCptOmegaMinus;
238          TH2F *f2dHistAsMCptAntiprotonMCptOmegaPlus;
239          // QA plots
240          TH1F *fHistV0toXiCosineOfPointingAngle;
241          TH2F *fHistV0CosineOfPointingAnglevsPtXi;
242          TH2F *fHistV0CosineOfPointingAnglevsPtOmega;
243
244          // Containers                       
245          AliCFContainer  *fCFContCascadePIDAsXiMinus;
246          AliCFContainer  *fCFContCascadePIDAsXiPlus;
247          AliCFContainer  *fCFContCascadePIDAsOmegaMinus;
248          AliCFContainer  *fCFContCascadePIDAsOmegaPlus;
249          AliCFContainer  *fCFContAsCascadeCuts;
250
251
252
253   AliAnalysisTaskCheckPerformanceCascadepp276(const AliAnalysisTaskCheckPerformanceCascadepp276&);            // not implemented
254   AliAnalysisTaskCheckPerformanceCascadepp276& operator=(const AliAnalysisTaskCheckPerformanceCascadepp276&); // not implemented
255   
256   ClassDef(AliAnalysisTaskCheckPerformanceCascadepp276, 8);
257 };
258
259 #endif