]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/SPECTRA/AliAnalysisTaskCheckPerformanceCascade.h
added ration ITS global/TPC
[u/mrichter/AliRoot.git] / PWG2 / SPECTRA / AliAnalysisTaskCheckPerformanceCascade.h
index af4f92eab463631f9d867c5497fb65b915cef241..0e13760953bab11cae56391d39322e3885b3c3e8 100644 (file)
@@ -3,17 +3,21 @@
 
 /*  See cxx source for full Copyright notice */
 
-//-----------------------------------------------------------------
-//              AliAnalysisTaskCheckPerformanceCascade class
-//            This task is for a performance study of cascade identification.
-//            It works with MC info and ESD/AOD tree.
-//            Origin : A.Maire Mar2009, antonin.maire@ires.in2p3.fr
-//-----------------------------------------------------------------
+// //-----------------------------------------------------------------
+// //        AliAnalysisTaskCheckPerformanceCascade class
+// //            This task is for a performance study of cascade identification.
+// //            It works with MC info and ESD.
+// //              Use with AOD tree = under development
+// //            Origin   : A.Maire Mar2009, antonin.maire@ires.in2p3.fr
+// //            Modified : A.Maire Jan2010, antonin.maire@ires.in2p3.fr
+// //-----------------------------------------------------------------
 
 class TList;
 class TH1F;
 class TH2F;
 class AliESDEvent;
+class AliESDpid;
+class AliCFContainer;
 
 #include "AliAnalysisTaskSE.h"
 
@@ -22,21 +26,48 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
  
   AliAnalysisTaskCheckPerformanceCascade();
   AliAnalysisTaskCheckPerformanceCascade(const char *name );
-  virtual ~AliAnalysisTaskCheckPerformanceCascade() {}
+  virtual ~AliAnalysisTaskCheckPerformanceCascade();
   
   //virtual void   ConnectInputData(Option_t *);
   virtual void   UserCreateOutputObjects();
   virtual void   UserExec(Option_t *option);
+  virtual Int_t  DoESDTrackWithTPCrefitMultiplicity(const AliESDEvent *lESDevent);
   virtual void   Terminate(Option_t *);
   
   void SetDebugLevelCascade(Int_t lDebugCascade = 0)          {fDebugCascade = lDebugCascade;}
   void SetCollidingSystems (Short_t collidingSystems = 0)     {fCollidingSystems = collidingSystems;}
   void SetAnalysisType     (const char* analysisType = "ESD") {fAnalysisType = analysisType;}
   
+  void SetRelaunchV0CascVertexers    (Bool_t rerunV0CascVertexers       = 0    ) { fkRerunV0CascVertexers       =  rerunV0CascVertexers;   }
+  void SetQualityCutZprimVtxPos      (Bool_t qualityCutZprimVtxPos      = kTRUE) { fkQualityCutZprimVtxPos      =  qualityCutZprimVtxPos;     }
+  void SetQualityCutNoTPConlyPrimVtx (Bool_t qualityCutNoTPConlyPrimVtx = kTRUE) { fkQualityCutNoTPConlyPrimVtx =  qualityCutNoTPConlyPrimVtx;}
+  void SetQualityCutTPCrefit         (Bool_t qualityCutTPCrefit         = kTRUE) { fkQualityCutTPCrefit         =  qualityCutTPCrefit;        }
+  void SetQualityCut80TPCcls         (Bool_t qualityCut80TPCcls         = kTRUE) { fkQualityCut80TPCcls         =  qualityCut80TPCcls;        }
+  void SetExtraSelections            (Bool_t extraSelections            = 0    ) { fkExtraSelections            =  extraSelections;           }
+
  private:
-       Int_t   fDebugCascade;                  // Denug Flag for this task devoted to cascade
-       TString fAnalysisType;                  // "ESD" or "AOD" analysis type 
-       Short_t fCollidingSystems;              // 0 = pp collisions or 1 = AA collisions
+        // Note : In ROOT, "//!" means "do not stream the data from Master node to Worker node" ...
+        // your data member object is created on the worker nodes and streaming is not needed.
+        // http://root.cern.ch/download/doc/11InputOutput.pdf, page 14
+
+        Int_t           fDebugCascade;          // Denug Flag for this task devoted to cascade
+        TString         fAnalysisType;          // "ESD" or "AOD" analysis type        
+        Short_t         fCollidingSystems;      // 0 = pp collisions or 1 = AA collisions
+
+        AliESDpid       *fESDpid;        // Tool data member to manage the TPC Bethe-Bloch info
+        //TPaveText       *fPaveTextBookKeeping;          // TString to store all the relevant info necessary for book keeping (v0 cuts, cascade cuts, quality cuts, ...)
+
+        Bool_t          fkRerunV0CascVertexers;         // Boolean : kTRUE = relaunch both V0 + Cascade vertexers
+        Bool_t          fkQualityCutZprimVtxPos;        // Boolean : kTRUE = cut on the prim.vtx  z-position
+        Bool_t          fkQualityCutNoTPConlyPrimVtx;   // Boolean : kTRUE = prim vtx should be SPD or Tracking vertex
+        Bool_t          fkQualityCutTPCrefit;           // Boolean : kTRUE = ask for TPCrefit for the 3 daughter tracks
+        Bool_t          fkQualityCut80TPCcls;           // Boolean : kTRUE = ask for 80 TPC clusters for each daughter track
+        Bool_t          fkExtraSelections;              // Boolean : kTRUE = apply tighter selections, before starting the analysis
+        
+        Double_t        fAlephParameters[5];            // Array to store the 5 param values for the TPC Bethe-Bloch parametrisation
+        Double_t        fV0Sels[7];                     // Array to store the 7 values for the different selections V0 related (if fkRerunV0CascVertexers)
+        Double_t        fCascSels[8];                   // Array to store the 8 values for the different selections Casc. related (if fkRerunV0CascVertexers)
+
        
        TList   *fListHistCascade;              //! List of Cascade histograms
                // - Histos 
@@ -52,17 +83,12 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        //--------------
        // Xi-
        TH1F    *fHistEtaGenCascXiMinus;                //! MC Pseudo-rapidity of any generated Xi- (no cuts in acceptance)
-       
-       // - Plots for |y(MC)| < 1
-       TH1F    *fHistYGenCascMidRapXiMinus;            //! MC rapidity of Xi- generated within |y(MC)| < 1
-       TH1F    *fHistEtaGenCascMidRapXiMinus;          //! MC Eta of Xi-      generated within |y(MC)| < 1
-       TH1F    *fHistThetaGenCascMidRapXiMinus;        //! MC theta of Xi-    generated within |y(MC)| < 1
-       TH1F    *fHistPtGenCascMidRapXiMinus;           //! MC Pt of Xi-       generated within |y(MC)| < 1
-       
+       TH2F    *f2dHistGenPtVsGenYGenXiMinus;          //! MC Pt Vs MC Y of generated Xi- 
+               
        // - Histos planned for Xi- emitted within the acceptance (cuts in theta + pt of daughters)
        //      = findable cascades
        TH1F    *fHistThetaGenCascXiMinus;              //! MC Theta angle of the generated Xi-
-       TH1F    *fHistPtFdblGenCascXiMinus;             //! MC Pt of the cascade, Xi-
+       TH2F    *f2dHistGenPtVsGenYFdblXiMinus;         //! MC Pt Vs MC y of the findable Xi-
        
        TH1F    *fHistThetaLambdaXiMinus;               //! MC Theta angle of the Lambda daughter of the generated Xi-
        TH1F    *fHistThetaBachXiMinus;                 //! MC Theta angle of the Bachelor (pi-)
@@ -79,16 +105,11 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        //--------------
        // Xi+
        TH1F    *fHistEtaGenCascXiPlus;                 //! MC Pseudo-rapidity of any generated Xi+ (no cuts in acceptance)
-       
-       // - Plots for |y(MC)| < 1
-       TH1F    *fHistYGenCascMidRapXiPlus;             //! MC rapidity of Xi+ generated within |y(MC)| < 1
-       TH1F    *fHistEtaGenCascMidRapXiPlus;           //! MC Eta of Xi+      generated within |y(MC)| < 1
-       TH1F    *fHistThetaGenCascMidRapXiPlus;         //! MC theta of Xi+    generated within |y(MC)| < 1
-       TH1F    *fHistPtGenCascMidRapXiPlus;            //! MC Pt of Xi+       generated within |y(MC)| < 1
-               
+       TH2F    *f2dHistGenPtVsGenYGenXiPlus;           //! MC Pt Vs MC Y of generated Xi+ 
+                       
        // - Histos planned for Xi+ emitted within the acceptance (cuts in theta + pt of daughters)
        TH1F    *fHistThetaGenCascXiPlus;               //! MC Theta angle of the generated Xi+
-       TH1F    *fHistPtFdblGenCascXiPlus;              //! MC Pt of the cascade, Xi+
+       TH2F    *f2dHistGenPtVsGenYFdblXiPlus;          //! MC Pt Vs MC y of the findable Xi+
        
        TH1F    *fHistThetaLambdaXiPlus;                //! MC Theta angle of the anti-Lambda daughter of the generated Xi+
        TH1F    *fHistThetaBachXiPlus;                  //! MC Theta angle of the Bachelor (pi+)
@@ -105,16 +126,11 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        //--------------
        // Omega-
        TH1F    *fHistEtaGenCascOmegaMinus;             //! MC Pseudo-rapidity of any generated Omega- (no cuts in acceptance)
-       
-       // - Plots for |y(MC)| < 1
-       TH1F    *fHistYGenCascMidRapOmegaMinus;         //! MC rapidity of Omega- generated within |y(MC)| < 1
-       TH1F    *fHistEtaGenCascMidRapOmegaMinus;       //! MC Eta of Omega-      generated within |y(MC)| < 1
-       TH1F    *fHistThetaGenCascMidRapOmegaMinus;     //! MC theta of Omega-    generated within |y(MC)| < 1
-       TH1F    *fHistPtGenCascMidRapOmegaMinus;        //! MC Pt of Omega-       generated within |y(MC)| < 1
+       TH2F    *f2dHistGenPtVsGenYGenOmegaMinus;       //! MC Pt Vs MC Y of generated Omega-   
        
        // - Histos planned for Omega- emitted within the acceptance (cuts in theta + pt of daughters)
        TH1F    *fHistThetaGenCascOmegaMinus;           //! MC Theta angle of the generated Omega-
-       TH1F    *fHistPtFdblGenCascOmegaMinus;          //! MC Pt of the cascade, Omega-
+       TH2F    *f2dHistGenPtVsGenYFdblOmegaMinus;      //! MC Pt Vs MC y of the findable Omega-
        
        TH1F    *fHistThetaLambdaOmegaMinus;            //! MC Theta angle of the Lambda daughter of the generated Omega-
        TH1F    *fHistThetaBachOmegaMinus;              //! MC Theta angle of the Bachelor (K-)
@@ -131,16 +147,11 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        //--------------
        // Omega+
        TH1F    *fHistEtaGenCascOmegaPlus;              //! MC Pseudo-rapidity of any generated Omega+ (no cuts in acceptance)
+       TH2F    *f2dHistGenPtVsGenYGenOmegaPlus;        //! MC Pt Vs MC Y of generated Omega+   
                
-       // - Plots for |y(MC)| < 1
-       TH1F    *fHistYGenCascMidRapOmegaPlus;          //! MC rapidity of Omega+ generated within |y(MC)| < 1
-       TH1F    *fHistEtaGenCascMidRapOmegaPlus;        //! MC Eta of Omega+      generated within |y(MC)| < 1
-       TH1F    *fHistThetaGenCascMidRapOmegaPlus;      //! MC theta of Omega+    generated within |y(MC)| < 1
-       TH1F    *fHistPtGenCascMidRapOmegaPlus;         //! MC Pt of Omega+       generated within |y(MC)| < 1
-       
        // - Histos planned for Omega+ emitted within the acceptance (cuts in theta + pt of daughters)
        TH1F    *fHistThetaGenCascOmegaPlus;            //! MC Theta angle of the generated Omega+
-       TH1F    *fHistPtFdblGenCascOmegaPlus;           //! MC Pt of the cascade, Omega+
+       TH2F    *f2dHistGenPtVsGenYFdblOmegaPlus;       //! MC Pt Vs MC y of the findable Omega+
        
        TH1F    *fHistThetaLambdaOmegaPlus;             //! MC Theta angle of the anti-Lambda daughter of the generated Omega+
        TH1F    *fHistThetaBachOmegaPlus;               //! MC Theta angle of the Bachelor (K+)
@@ -155,6 +166,7 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        
        
 // Part 2 - Any reconstructed cascades + reconstructed cascades associated with MC
+       // 2.1 - Effective mass and PID
        // - Effective mass histos for all the cascade candidates
        TH1F    *fHistMassXiMinus;                      //! reconstructed cascade effective mass, under Xi- hyp.
        TH1F    *fHistMassXiPlus;                       //! reconstructed cascade effective mass, under Xi+ hyp.
@@ -166,6 +178,10 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        TH1F    *fHistMassWithCombPIDXiPlus;            //! reconstructed Xi+ effective mass, with bach. comb PID
        TH1F    *fHistMassWithCombPIDOmegaMinus;        //! reconstructed Omega- effective mass, with bach. comb PID
        TH1F    *fHistMassWithCombPIDOmegaPlus;         //! reconstructed Omega+ effective mass, with bach. comb PID
+       
+       // - PID Probability versus MC Pt(bachelor track)
+       TH2F    *f2dHistPIDprobaKaonVsMCPtBach;         //! Comb. PID probability for the bach. to be a Kaon Vs MC pt(bach)
+       TH2F    *f2dHistPIDprobaPionVsMCPtBach;         //! Comb. PID probability for the bach. to be a Pion Vs MC pt(bach)     
 
        // - Effective mass histos with perfect MC PID
        TH1F    *fHistMassWithMcPIDXiMinus;             //! reconstructed Xi- effective mass, with MC bach. PID
@@ -174,31 +190,27 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        TH1F    *fHistMassWithMcPIDOmegaPlus;           //! reconstructed Omega+ effective mass, with MC bach. PID
 
        
-       // - Effective mass histos for the cascade candidates associated with MC
+       // 2.2 - Associated candidates
+       // - Effective mass histos for the cascade candidates associated with MC, without PID info
        TH1F    *fHistAsMCMassXiMinus;                  //! reconstr. cascade effective mass, under Xi- hyp. for Associated cand.
        TH1F    *fHistAsMCMassXiPlus;                   //! reconstr. cascade effective mass, under Xi+ hyp. for Associated cand.
        TH1F    *fHistAsMCMassOmegaMinus;               //! reconstr. cascade effective mass, under Omega- hyp. for Associated cand.
        TH1F    *fHistAsMCMassOmegaPlus;                //! reconstr. cascade effective mass, under Omega+ hyp. for Associated cand.
        
-       // - Generated Pt of the cascade candidates associated with MC
-       TH1F    *fHistAsMCGenPtXiMinus;                 //! generated Pt from the MC Xi- associated with a reconstr. cascade
-       TH1F    *fHistAsMCGenPtXiPlus;                  //! generated Pt from the MC Xi+ associated with a reconstr. cascade
-       TH1F    *fHistAsMCGenPtOmegaMinus;              //! generated Pt from the MC Omega- associated with a reconstr. cascade
-       TH1F    *fHistAsMCGenPtOmegaPlus;               //! generated Pt from the MC Omega+ associated with a reconstr. cascade
-  
-       // - Generated Y of the cascade candidates associated with MC
-       TH1F    *fHistAsMCGenYXiMinus;                  //! generated Rap. from the MC Xi- associated with a reconstr. cascade
-       TH1F    *fHistAsMCGenYXiPlus;                   //! generated Rap. from the MC Xi+ associated with a reconstr. cascade
-       TH1F    *fHistAsMCGenYOmegaMinus;               //! generated Rap. from the MC Omega- associated with a reconstr. cascade
-       TH1F    *fHistAsMCGenYOmegaPlus;                //! generated Rap. from the MC Omega+ associated with a reconstr. cascade
-       
-       // - Generated Y Vs Generated Pt, for the cascade candidates associated with MC
-       TH2F    *f2dHistAsMCGenYVsGenPtXiMinus;         //! gen. Rap. Vs gen. Pt from the MC Xi- associated with a reconstr. cascade
-       TH2F    *f2dHistAsMCGenYVsGenPtXiPlus;          //! gen. Rap. Vs gen. Pt from the MC Xi+ associated with a reconstr. cascade
-       TH2F    *f2dHistAsMCGenYVsGenPtOmegaMinus;      //! gen. Rap. Vs gen. Pt from the MC Omega- associated with a reconstr. cascade
-       TH2F    *f2dHistAsMCGenYVsGenPtOmegaPlus;       //! gen. Rap. Vs gen. Pt from the MC Omega+ associated with a reconstr. cascade
-       
-       // - Generated Eta of the the cascade candidates associated with MC
+       // -  Generated Pt Vs generated Y of the cascade candidates associated with MC 
+       //     + having the proper maximum proba of combined PID for the bachelor
+       TH2F    *f2dHistAsMCandCombPIDGenPtVsGenYXiMinus;       //! Pt(gen) Vs Y(gen) from the MC Xi- associated with Reco cand + with PID info
+       TH2F    *f2dHistAsMCandCombPIDGenPtVsGenYXiPlus;        //! Pt(gen) Vs Y(gen) from the MC Xi+ associated with Reco cand + with PID info
+       TH2F    *f2dHistAsMCandCombPIDGenPtVsGenYOmegaMinus;    //! Pt(gen) Vs Y(gen) from the MC Omega- associated with Reco cand + with PID info
+       TH2F    *f2dHistAsMCandCombPIDGenPtVsGenYOmegaPlus;     //! Pt(gen) Vs Y(gen) from the MC Omega+ associated with Reco cand + with PID info
+       
+       // - Generated Pt Vs generated Y, for the cascade candidates associated with MC, without PID info
+       TH2F    *f2dHistAsMCGenPtVsGenYXiMinus;         //! gen. Pt Vs gen. Rap. from the MC Xi- associated with a reconstr. cascade
+       TH2F    *f2dHistAsMCGenPtVsGenYXiPlus;          //! gen. Pt Vs gen. Rap. from the MC Xi+ associated with a reconstr. cascade
+       TH2F    *f2dHistAsMCGenPtVsGenYOmegaMinus;      //! gen. Pt Vs gen. Rap. from the MC Omega- associated with a reconstr. cascade
+       TH2F    *f2dHistAsMCGenPtVsGenYOmegaPlus;       //! gen. Pt Vs gen. Rap. from the MC Omega+ associated with a reconstr. cascade
+       
+       // - Generated Eta of the the cascade candidates associated with MC, without PID info
        TH1F    *fHistAsMCGenEtaXiMinus;                //! generated Eta from the MC Xi- associated with a reconstr. cascade
        TH1F    *fHistAsMCGenEtaXiPlus;                 //! generated Eta from the MC Xi+ associated with a reconstr. cascade
        TH1F    *fHistAsMCGenEtaOmegaMinus;             //! generated Eta from the MC Omega- associated with a reconstr. cascade
@@ -211,16 +223,24 @@ class AliAnalysisTaskCheckPerformanceCascade : public AliAnalysisTaskSE {
        TH2F    *f2dHistAsMCResPtOmegaPlus;             //! resolution in Pt as function of gen. Pt, for Omega+
        
        // - Resolution in R(2D) as function of generated R
-       TH2F    *f2dHistAsMCResRXiMinus;                //! resolution in transv. R as function of transv. gen. R, for Xi-
-       TH2F    *f2dHistAsMCResRXiPlus;                 //! resolution in transv. R as function of transv. gen. R, for Xi+
-       TH2F    *f2dHistAsMCResROmegaMinus;             //! resolution in transv. R as function of transv. gen. R, for Omega-
-       TH2F    *f2dHistAsMCResROmegaPlus;              //! resolution in transv. R as function of transv. gen. R, for Omega+
-       
+       TH2F    *f2dHistAsMCResRXiMinus;                //! resolution in transv. R = f(transv. gen. R), for Xi-
+       TH2F    *f2dHistAsMCResRXiPlus;                 //! resolution in transv. R = f(transv. gen. R), for Xi+
+       TH2F    *f2dHistAsMCResROmegaMinus;             //! resolution in transv. R = f(transv. gen. R), for Omega-
+       TH2F    *f2dHistAsMCResROmegaPlus;              //! resolution in transv. R = f(transv. gen. R), for Omega+
+        
+        // - Compilation of all PID plots (3D = casc. transv. momemtum Vs Casc Eff mass Vs Y), stored into an AliCFContainer
+       AliCFContainer  *fCFContCascadePIDAsXiMinus;      //! for Xi-   : Container to store any 3D histos with the different PID flavours
+       AliCFContainer  *fCFContCascadePIDAsXiPlus;       //! for Xi+   : Container to store any 3D histos with the different PID flavours
+       AliCFContainer  *fCFContCascadePIDAsOmegaMinus;   //! for Omega-: Container to store any 3D histos with the different PID flavours
+       AliCFContainer  *fCFContCascadePIDAsOmegaPlus;    //! for Omega+: Container to store any 3D histos with the different PID flavours
+       
+       // - Towards the optimisation of topological selections/ systematics (on associated candidates)
+       AliCFContainer  *fCFContAsCascadeCuts;            //! Container meant to store all the relevant distributions corresponding to the cut variables
        
   AliAnalysisTaskCheckPerformanceCascade(const AliAnalysisTaskCheckPerformanceCascade&);            // not implemented
   AliAnalysisTaskCheckPerformanceCascade& operator=(const AliAnalysisTaskCheckPerformanceCascade&); // not implemented
   
-  ClassDef(AliAnalysisTaskCheckPerformanceCascade, 1);
+  ClassDef(AliAnalysisTaskCheckPerformanceCascade, 4);
 };
 
 #endif