]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/STRANGENESS/Cascades/AliAnalysisTaskCheckCascadePbPb.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / Cascades / AliAnalysisTaskCheckCascadePbPb.h
1 #ifndef ALIANALYSISTASKCHECKCASCADEPBPB_H
2 #define ALIANALYSISTASKCHECKCASCADEPBPB_H
3
4 /*  See cxx source for full Copyright notice */
5
6 //-----------------------------------------------------------------
7 //            AliAnalysisTaskCheckCascadePbPb class
8 //              Origin AliAnalysisTaskCheckCascade
9 //              This task has four roles :
10 //                1. QAing the Cascades from ESD and AOD
11 //                   Origin:  AliAnalysisTaskESDCheckV0 by Boris Hippolyte Nov2007, hippolyt@in2p3.fr
12 //                2. Prepare the plots which stand as raw material for yield extraction (wi/wo PID)
13 //                3. Supply an AliCFContainer meant to define the optimised topological selections
14 //                4. Rough azimuthal correlation study (Eta, Phi)
15 //                Adapted to Cascade : A.Maire Mar2008, antonin.maire@ires.in2p3.fr
16 //                Modified :           A.Maire Mar2010, antonin.maire@ires.in2p3.fr
17 //                Modified for PbPb analysis: M. Nicassio Feb 2011, maria.nicassio@ba.infn.it
18 //-----------------------------------------------------------------
19
20 class TList;
21 class TH1F;
22 class TH2F;
23 class TH3F;
24 class TVector3;
25 class THnSparse;
26  
27 class AliESDEvent;
28 class AliPhysicsSelection;
29 class AliCFContainer;
30 class AliPIDResponse;
31
32 #include "TString.h"
33
34 #include "AliAnalysisTaskSE.h"
35
36 class AliAnalysisTaskCheckCascadePbPb : public AliAnalysisTaskSE {
37  public:
38   AliAnalysisTaskCheckCascadePbPb();
39   AliAnalysisTaskCheckCascadePbPb(const char *name);
40   virtual ~AliAnalysisTaskCheckCascadePbPb();
41   
42   virtual void   UserCreateOutputObjects();
43   virtual void   UserExec(Option_t *option);
44 /*        void   DoAngularCorrelation(const Char_t   *lCascType, 
45                                             Double_t  lInvMassCascade, 
46                                       const Int_t    *lArrTrackID,
47                                             TVector3 &lTVect3MomXi, 
48                                             Double_t  lEtaXi);*/
49   virtual Int_t  DoESDTrackWithTPCrefitMultiplicity(const AliESDEvent *lESDevent);
50   virtual void   Terminate(Option_t *);
51   
52   void SetAnalysisType               (const char* analysisType          = "ESD") { fAnalysisType                = analysisType;               }
53   void SetRelaunchV0CascVertexers    (Bool_t rerunV0CascVertexers       = 0    ) { fkRerunV0CascVertexers       = rerunV0CascVertexers;       }
54   void SetQualityCutZprimVtxPos      (Bool_t qualityCutZprimVtxPos      = kTRUE) { fkQualityCutZprimVtxPos      = qualityCutZprimVtxPos;      }
55   void SetQualityCutNoTPConlyPrimVtx (Bool_t qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx = qualityCutNoTPConlyPrimVtx; }
56   void SetQualityCutTPCrefit         (Bool_t qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit         = qualityCutTPCrefit;         }
57   void SetQualityCutnTPCcls          (Bool_t qualityCutnTPCcls          = kTRUE) { fkQualityCutnTPCcls          = qualityCutnTPCcls;          }
58   void SetQualityCutMinnTPCcls       (Int_t minnTPCcls                  = 70   ) { fMinnTPCcls                  = minnTPCcls;                 }
59   void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections            = extraSelections;            }
60   void SetCentralityLowLim           (Float_t centrlowlim               = 0.   ) { fCentrLowLim                 = centrlowlim;                }  
61   void SetCentralityUpLim            (Float_t centruplim                = 100. ) { fCentrUpLim                  = centruplim;                 }
62   void SetCentralityEst              (TString   centrest                = "V0M") { fCentrEstimator              = centrest;                   }
63   void SetUseCleaning                (Bool_t   usecleaning              = kTRUE) { fkUseCleaning                = usecleaning;                }
64   void SetVertexRange                (Float_t vtxrange                  = 0.   ) { fVtxRange                    = vtxrange;                   }
65   void SetMinptCutOnDaughterTracks   (Float_t minptdaughtrks            = 0.   ) { fMinPtCutOnDaughterTracks    = minptdaughtrks;             }
66   void SetEtaCutOnDaughterTracks     (Float_t etadaughtrks              = 0.   ) { fEtaCutOnDaughterTracks      = etadaughtrks;               }
67   //Setters for the V0 and cascade Vertexer Parameters
68   void SetV0VertexerMaxChisquare           (Double_t lParameter){ fV0VertexerSels[0] = lParameter; }
69   void SetV0VertexerDCAFirstToPV           (Double_t lParameter){ fV0VertexerSels[1] = lParameter; }
70   void SetV0VertexerDCASecondtoPV          (Double_t lParameter){ fV0VertexerSels[2] = lParameter; }
71   void SetV0VertexerDCAV0Daughters         (Double_t lParameter){ fV0VertexerSels[3] = lParameter; }
72   void SetV0VertexerCosinePA               (Double_t lParameter){ fV0VertexerSels[4] = lParameter; }
73   void SetV0VertexerMinRadius              (Double_t lParameter){ fV0VertexerSels[5] = lParameter; }
74   void SetV0VertexerMaxRadius              (Double_t lParameter){ fV0VertexerSels[6] = lParameter; }
75   void SetCascVertexerMaxChisquare         (Double_t lParameter){ fCascadeVertexerSels[0] = lParameter; }
76   void SetCascVertexerMinV0ImpactParameter (Double_t lParameter){ fCascadeVertexerSels[1] = lParameter; }
77   void SetCascVertexerV0MassWindow         (Double_t lParameter){ fCascadeVertexerSels[2] = lParameter; }
78   void SetCascVertexerDCABachToPV          (Double_t lParameter){ fCascadeVertexerSels[3] = lParameter; }
79   void SetCascVertexerDCACascadeDaughters  (Double_t lParameter){ fCascadeVertexerSels[4] = lParameter; }
80   void SetCascVertexerCascadeCosinePA      (Double_t lParameter){ fCascadeVertexerSels[5] = lParameter; }
81   void SetCascVertexerCascadeMinRadius     (Double_t lParameter){ fCascadeVertexerSels[6] = lParameter; }
82   void SetCascVertexerCascadeMaxRadius     (Double_t lParameter){ fCascadeVertexerSels[7] = lParameter; } 
83
84
85
86  private:
87         // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
88         // your data member object is created on the worker nodes and streaming is not needed.
89         // http://root.cern.ch/download/doc/11InputOutput.pdf, page 14
90
91
92         TString         fAnalysisType;                  // "ESD" or "AOD" analysis type 
93         AliESDtrackCuts *fESDtrackCuts;                 // ESD track cuts used for primary track definition
94         //TPaveText       *fPaveTextBookKeeping;          // TString to store all the relevant info necessary for book keeping (v0 cuts, cascade cuts, quality cuts, ...)
95         AliPIDResponse *fPIDResponse;                   //! PID response object
96
97         Bool_t          fkRerunV0CascVertexers;         // Boolean : kTRUE = relaunch both V0 + Cascade vertexers
98         Bool_t          fkQualityCutZprimVtxPos;        // Boolean : kTRUE = cut on the prim.vtx  z-position
99         Bool_t          fkQualityCutNoTPConlyPrimVtx;   // Boolean : kTRUE = prim vtx should be SPD or Tracking vertex
100         Bool_t          fkQualityCutTPCrefit;           // Boolean : kTRUE = ask for TPCrefit for the 3 daughter tracks
101         Bool_t          fkQualityCutnTPCcls;            // Boolean : kTRUE = ask for at least n TPC clusters for each daughter track
102         Int_t           fMinnTPCcls;                    // minimum number of TPC cluster for daughter tracks
103         Bool_t          fkExtraSelections;              // Boolean : kTRUE = apply tighter selections, before starting the analysis
104         Float_t         fCentrLowLim;                   // Lower limit for centrality percentile selection
105         Float_t         fCentrUpLim;                    // Upper limit for centrality percentile selection
106         TString         fCentrEstimator;                // string for the centrality estimator
107         Bool_t          fkUseCleaning;                  // Boolean : kTRUE = uses all the cleaning criteria of centrality selections (vertex cut + outliers) otherwise only outliers
108         Float_t         fVtxRange;                      // to select events with |zvtx|<fVtxRange cm
109         Float_t         fMinPtCutOnDaughterTracks;      // minimum pt cut on daughter tracks
110         Float_t         fEtaCutOnDaughterTracks;        // pseudorapidity cut on daughter tracks
111        
112         Double_t        fV0VertexerSels[7];             // Array to store the 7 values for the different selections V0 related (if fkRerunV0CascVertexers)
113         Double_t        fCascadeVertexerSels[8];        // Array to store the 8 values for the different selections Casc. related (if fkRerunV0CascVertexers)
114
115         TList      *fListHistCascade;                   //! List of Cascade histograms
116         
117         // - General histos (filled before the trigger selection)
118         TH2F    *fHistEvtsInCentralityBinsvsNtracks;    //! Events in centrality bins vs N ESDtracks
119         TH1F    *fHistCascadeMultiplicityBeforeEvSel;   //! Cascade multiplicity distribution
120          
121         // - General histos (filled for any triggered event)
122         TH1F    *fHistCascadeMultiplicityForCentrEvt;              //! Cascade multiplicity distribution
123         TH1F    *fHistTrackMultiplicityForCentrEvt;                //! Track multiplicity distribution (without any cut = include ITS stand-alone + global tracks)
124         TH1F    *fHistTPCrefitTrackMultiplicityForCentrEvt;        //! Track multiplicity distribution for tracks with TPCrefit
125         
126         // - General histos (filled for events selected in this analysis (|z(prim. vtx)| < 10 cm + prim vtx = SPD or Tracking) )
127         TH1F    *fHistCascadeMultiplicityForSelEvt;     //! Cascade multiplicity distribution
128         TH1F    *fHistPosBestPrimaryVtxXForSelEvt;      //! (best) primary vertex position distribution in x 
129         TH1F    *fHistPosBestPrimaryVtxYForSelEvt;      //! (best) primary vertex position distribution in y
130         TH1F    *fHistPosBestPrimaryVtxZForSelEvt;      //! (best) primary vertex position distribution in z
131         
132         
133         
134
135         // - Characteristics for event with >1 cascade : Track Multiplicity, TPC clusters + Prim. vertex positions
136         TH1F    *fHistTPCrefitTrackMultiplicityForCascadeEvt;   //! TPCrefit Track multiplicity distribution for event with >1 cascade candidate (NB: after quality sel. within the task)
137
138         TH1F    *fHistPosV0TPCClusters;                 //! TPC clusters distribution for Positive V0 daughter track
139         TH1F    *fHistNegV0TPCClusters;                 //! TPC clusters distribution for Negative V0 daughter track
140         TH1F    *fHistBachTPCClusters;                  //! TPC clusters distribution for Bachelor             track
141
142         TH1F    *fHistVtxStatus;                        //! Is there a tracking vertex in the cascade event ?
143
144                 // Vtx coming from the full tracking, for events containing at least a cascade
145         TH1F    *fHistPosTrkgPrimaryVtxXForCascadeEvt;  //! primary vertex position distribution in x 
146         TH1F    *fHistPosTrkgPrimaryVtxYForCascadeEvt;  //! primary vertex position distribution in y
147         TH1F    *fHistPosTrkgPrimaryVtxZForCascadeEvt;  //! primary vertex position distribution in z
148         TH1F    *fHistTrkgPrimaryVtxRadius;             //! primary vertex (3D) radius distribution 
149
150                 // Best primary Vtx available, for events containing at least a cascade
151         TH1F    *fHistPosBestPrimaryVtxXForCascadeEvt;  //! (best) primary vertex position distribution in x 
152         TH1F    *fHistPosBestPrimaryVtxYForCascadeEvt;  //! (best) primary vertex position distribution in y
153         TH1F    *fHistPosBestPrimaryVtxZForCascadeEvt;  //! (best) primary vertex position distribution in z
154         TH1F    *fHistBestPrimaryVtxRadius;             //! (best) primary vertex radius distribution 
155
156                 // Correlation Best Vtx / Full Tracking Vtx
157         TH2F    *f2dHistTrkgPrimVtxVsBestPrimVtx;       //!  Radius of prim. Vtx from tracks Vs Radius of best Prim. Vtx
158
159
160 // PART 1 : Adavanced QA
161 // - Typical histos on the variables used for the selection of cascades
162         TH1F    *fHistEffMassXi;                        //! reconstructed cascade effective mass
163         TH1F    *fHistChi2Xi;                           //! chi2 value
164         TH1F    *fHistDcaXiDaughters;                   //! dca between Xi's daughters
165         TH1F    *fHistDcaBachToPrimVertex;              //! dca of the bachelor track to primary vertex
166         TH1F    *fHistXiCosineOfPointingAngle;          //! cosine of Xi pointing angle in a cascade
167         TH1F    *fHistXiRadius;                         //! (transverse) radius of the cascade vertex 
168                 
169         // - Histos about ~ the "V0 selection part" of the cascade,  coming by inheritance from AliESDv0
170         TH1F    *fHistMassLambdaAsCascDghter;           //! Test Invariant Mass of Lambda coming from Cascade
171         TH1F    *fHistV0Chi2Xi;                         //! V0 chi2 distribution, for the V0 associated to a cascade
172         TH1F    *fHistDcaV0DaughtersXi;                 //! Dca between V0 daughters, for the V0 associated to a cascade
173         TH1F    *fHistDcaV0ToPrimVertexXi;              //! Dca of V0 to primary vertex, for the V0 associated to a cascade     
174         TH1F    *fHistV0CosineOfPointingAngle;          //! Cosine of V0 pointing angle, for the V0 associated to a cascade
175         TH1F    *fHistV0RadiusXi;                       //! V0 (transverse) distance distribution, for the V0 associated to a cascade
176
177         TH1F    *fHistDcaPosToPrimVertexXi;             //! Dca of V0 positive daughter to primary vertex, for the V0 associated to a cascade
178         TH1F    *fHistDcaNegToPrimVertexXi;             //! Dca of V0 negative daughter to primary vertex, for the V0 associated to a cascade
179         
180
181         // - Effective mass histos for cascades.
182         TH1F    *fHistMassXiMinus;                      //! reconstructed cascade effective mass, under Xi- hyp.
183         TH1F    *fHistMassXiPlus;                       //! reconstructed cascade effective mass, under Xi+ hyp.
184         TH1F    *fHistMassOmegaMinus;                   //! reconstructed cascade effective mass, under Omega- hyp.
185         TH1F    *fHistMassOmegaPlus;                    //! reconstructed cascade effective mass, under Omega+ hyp.
186         
187         TH1F    *fHistMassWithCombPIDXiMinus;           //! reconstructed Xi- effective mass, with bach. comb PID
188         TH1F    *fHistMassWithCombPIDXiPlus;            //! reconstructed Xi+ effective mass, with bach. comb PID
189         TH1F    *fHistMassWithCombPIDOmegaMinus;        //! reconstructed Omega- effective mass, with bach. comb PID
190         TH1F    *fHistMassWithCombPIDOmegaPlus;         //! reconstructed Omega+ effective mass, with bach. comb PID
191
192         // - Complements for QA
193         TH1F    *fHistXiTransvMom;                      //! Xi transverse momentum, around the mass peak of Xi-/+ 
194         TH1F    *fHistXiTotMom;                         //! Xi momentum norm, around the mass peak of Xi-/+
195         
196         TH1F    *fHistBachTransvMomXi;                  //! bachelor transverse momentum, for cand. around the mass peak of Xi-/+
197         TH1F    *fHistBachTotMomXi;                     //! bachelor momentum norm, for cand. around the mass peak of Xi-/+
198         TH1F    *fHistPosTransvMomXi;                   //! positive daughter transverse momentum, for cand. around the mass peak of Xi-/+
199         TH1F    *fHistNegTransvMomXi;                   //! negative daughter transverse momentum, for cand. around the mass peak of Xi-/+
200
201         TH1F    *fHistChargeXi;                         //! Charge sign of the cascade candidate
202         TH1F    *fHistV0toXiCosineOfPointingAngle;      //! Cos. of Pointing angle between the V0 mom and the Xi-V0 vtx line
203   
204         TH1F    *fHistRapXi;                            //! rapidity of Xi candidates, around the mass peak of Xi-/+
205         TH1F    *fHistRapOmega;                         //! rapidity of Omega candidates, around the mass peak of Omega-/+
206         TH1F    *fHistEtaXi;                            //! eta distrib. of all the cascade candidates, around the mass peak of Xi-/+
207         TH1F    *fHistThetaXi;                          //! theta distrib. of all the cascade candidates, around the mass peak of Xi-/+
208         TH1F    *fHistPhiXi;                            //! phi distrib. of all the cascade candidates, around the mass peak of Xi-/+
209         
210         TH2F    *f2dHistArmenteros;                     //! alpha(casc. cand.) Vs PtArm(casc. cand.)
211         
212         TH2F    *f2dHistEffMassLambdaVsEffMassXiMinus;  //! Xi- Eff mass Vs V0 Eff mass, under Xi- hyp.
213         TH2F    *f2dHistEffMassXiVsEffMassOmegaMinus;   //! Xi- Eff mass Vs Omega- Eff mass, for negative cascades
214         TH2F    *f2dHistEffMassLambdaVsEffMassXiPlus;   //! Xi+ Eff mass Vs V0 Eff mass, under Xi+ hyp.
215         TH2F    *f2dHistEffMassXiVsEffMassOmegaPlus;    //! Xi+ Eff mass Vs Omega+ Eff mass, for positive cascades
216         
217         TH2F    *f2dHistXiRadiusVsEffMassXiMinus;       //! transv. casc. decay radius Vs Xi- Eff mass, under Xi- hyp.
218         TH2F    *f2dHistXiRadiusVsEffMassXiPlus;        //! transv. casc. decay radius Vs Xi+ Eff mass, under Xi+ hyp.
219         TH2F    *f2dHistXiRadiusVsEffMassOmegaMinus;    //! transv. casc. decay radius Vs Omega- Eff mass, under Omega- hyp.
220         TH2F    *f2dHistXiRadiusVsEffMassOmegaPlus;     //! transv. casc. decay radius Vs Omega+ Eff mass, under Omega+ hyp.
221         
222         TH2F    *f2dHistTPCdEdxOfCascDghters;           //! TPC Bethe-Bloch curve, populated with the cascade daughters
223         
224         
225         // PART 2 : TH3F needed for pt spectrum and yield extraction
226         // Without any PID
227 /*      TH3F    *f3dHistXiPtVsEffMassVsYXiMinus;        //! casc. transv. momemtum Vs Xi- Eff mass Vs Y
228         TH3F    *f3dHistXiPtVsEffMassVsYXiPlus;         //! casc. transv. momemtum Vs Xi+ Eff mass Vs Y
229         TH3F    *f3dHistXiPtVsEffMassVsYOmegaMinus;     //! casc. transv. momemtum Vs Omega- Eff mass Vs Y
230         TH3F    *f3dHistXiPtVsEffMassVsYOmegaPlus;      //! casc. transv. momemtum Vs Omega+ Eff mass Vs Y
231 */      
232         // Compilation of all PID plots (3D = casc. transv. momemtum Vs Casc Eff mass Vs Y), stored into an AliCFContainer
233         AliCFContainer  *fCFContCascadePIDXiMinus;      //! for Xi-   : Container to store any 3D histos with the different PID flavours
234         AliCFContainer  *fCFContCascadePIDXiPlus;       //! for Xi+   : Container to store any 3D histos with the different PID flavours
235         AliCFContainer  *fCFContCascadePIDOmegaMinus;   //! for Omega-: Container to store any 3D histos with the different PID flavours
236         AliCFContainer  *fCFContCascadePIDOmegaPlus;    //! for Omega+: Container to store any 3D histos with the different PID flavours
237         
238         
239         
240         // PART 3 : Towards the optimisation of topological selections / systematics
241         AliCFContainer  *fCFContCascadeCuts;            //! Container meant to store all the relevant distributions corresponding to the cut variables
242         
243         
244         // PART 4 :  Azimuthal correlation study
245 /*      THnSparseF      *fHnSpAngularCorrXiMinus;       //! Delta Phi(Casc,any trck) Vs Delta Eta(Casc,any trck) Vs Casc Pt Vs Pt of the tracks Vs Eff Mass
246         THnSparseF      *fHnSpAngularCorrXiPlus;        //! Delta Phi(Casc,any trck) Vs Delta Eta(Casc,any trck) Vs Casc Pt Vs Pt of the tracks Vs Eff Mass
247         THnSparseF      *fHnSpAngularCorrOmegaMinus;    //! Delta Phi(Casc,any trck) Vs Delta Eta(Casc,any trck) Vs Casc Pt Vs Pt of the tracks Vs Eff Mass
248         THnSparseF      *fHnSpAngularCorrOmegaPlus;     //! Delta Phi(Casc,any trck) Vs Delta Eta(Casc,any trck) Vs Casc Pt Vs Pt of the tracks Vs Eff Mass
249 */
250         TH1F *fV0Ampl;                                  //! histo to check the V0 amplitude distribution  
251
252         TH2F    *fHistDcaXiDaughtersvsInvMass;          //! cut variables vs inv. mass
253         TH2F    *fHistDcaBachToPrimVertexvsInvMass;     //! cut variables vs inv. mass
254         TH2F    *fHistXiCosineOfPointingAnglevsInvMass; //! cut variables vs inv. mass
255         TH2F    *fHistMassLambdaAsCascDghtervsInvMass;  //! cut variables vs inv. mass
256         TH2F    *fHistDcaV0DaughtersXivsInvMass;        //! cut variables vs inv. mass
257         TH2F    *fHistDcaV0ToPrimVertexXivsInvMass;     //! cut variables vs inv. mass
258
259         // Control plots for reco pseudorapidity of daughter tracks (Xi- only)
260
261         TH1F    *fHistEtaBachXiM;                       //! bachelor pseudorapidity
262         TH1F    *fHistEtaPosXiM;                        //! positive daughter pseudorapidity
263         TH1F    *fHistEtaNegXiM;                        //! negative daughter pseudorapidity
264
265
266
267   AliAnalysisTaskCheckCascadePbPb(const AliAnalysisTaskCheckCascadePbPb&);            // not implemented
268   AliAnalysisTaskCheckCascadePbPb& operator=(const AliAnalysisTaskCheckCascadePbPb&); // not implemented
269   
270   ClassDef(AliAnalysisTaskCheckCascadePbPb, 7);
271 };
272
273 #endif