]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG3/hfe/AliHFEtrdPIDqa.h
Possibility to keep only D mesons that have a c or b quark as a grandmother (Francesc...
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEtrdPIDqa.h
index b4e7b6f6e96a8801429d882ea10ebad13de54392..731e982413e05a3f34c0d6cb0fe34e216d063d4a 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef ALIHFETRDPIDQA_H
+#define ALIHFETRDPIDQA_H
+
 /**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/
+
+/* $Id$ */ 
+
 //
 // QA class for TRD PID
 // Evaluate TRD PID using well identified reference tracks
 // For more information see implementation file
 //
-#ifndef ALIHFETRDPIDQA_H
-#define ALIHFETRDPIDQA_H
-
 #ifndef ROOT_TNamed
 #include <TNamed.h>
 #endif
 #include <THnSparse.h>
 #endif
 
+#ifndef ROOT_TH2
+#include <TH2.h>
+#endif
+
+#ifndef ALIHFECOLLECTION_H
+#include "AliHFEcollection.h"
+#endif
+
+class TBrowser;
 class TCollection;
 class TF1;
 class TGraph;
 class TH1;
+//class TH2;
 class TList;
 class TObjArray;
 
@@ -49,24 +62,37 @@ class AliHFEtrdPIDqa : public TNamed{
     virtual void Copy(TObject &o) const;
     virtual Long64_t Merge(TCollection *coll);
     virtual ~AliHFEtrdPIDqa();
+   
+    virtual void Browse(TBrowser *b);
+    virtual Bool_t IsFolder() const { return kTRUE; }
 
     void ProcessTracks(TObjArray * const  l, Int_t species);
     void ProcessTrack(AliVTrack *track, Int_t species);
 
     void Init();
     void FinishAnalysis();
+    void ShowMessages() { fShowMessage = kTRUE; }
     void StoreResults(const Char_t *filename = "HFEtrdPIDqa.root");
     void SaveThresholdParameters(const Char_t * filename = "TRD.Thresholds.root");
 
-    void DrawTracklet(Int_t tracklet);
+    void DrawTracklet(Int_t tracklet, Double_t pmin = 0., Double_t pmax = 0., Bool_t doFit = kFALSE);
     void ClearLists();
 
+    Double_t EvalPionEfficiency(Int_t ntls, Int_t eEff, Double_t p);
+    Double_t EvalProtonEfficiency(Int_t ntls, Int_t eEff, Double_t p);
+    Double_t EvalThreshold(Int_t ntls, Int_t eEff, Double_t p);
+
     //---------------------------------------------------
     // Getters for Histograms
-    THnSparseF *GetLikelihoodHistogram() const { return fLikeTRD; }
-    THnSparseF *GetQAHistogram() const { return fQAtrack; }
-    THnSparseF *GetdEdxHistogram() const { return fQAdEdx; }
-    THnSparseF *GetHistoTruncMean() const { return fTRDtruncMean; }
+    THnSparseF *GetLikelihoodHistogram() const { return fHistos ? dynamic_cast<THnSparseF *>(fHistos->Get("fLikeTRD")) : NULL; }
+    THnSparseF *GetQAHistogram() const { return fHistos ? dynamic_cast<THnSparseF *>(fHistos->Get("fQAtrack")) : NULL; }
+    THnSparseF *GetdEdxHistogram() const { return fHistos ? dynamic_cast<THnSparseF *>(fHistos->Get("fQAdEdx")) : NULL; }
+    THnSparseF *GetHistoTruncMean() const { return fHistos ? dynamic_cast<THnSparseF *>(fHistos->Get("fTRDtruncMean")) : NULL; }
+    TH2 *GetSliceChargePions(Bool_t pions = kTRUE) const { 
+      const Char_t * species = pions ? "Pions" : "Electrons";
+      return fHistos ? dynamic_cast<TH2 *>(fHistos->Get(Form("fTRDslices%s", species))) : NULL; 
+    }
+    AliHFEcollection *GetHistos() const { return fHistos; }
     //---------------------------------------------------
   protected:
     // Description of the containers we use to store basic information
@@ -127,10 +153,7 @@ class AliHFEtrdPIDqa : public TNamed{
     static const Double_t fgkMinBinCommon[kQuantitiesCommon];   // Bin Limits for common quantities (lower limit)
     static const Double_t fgkMaxBinCommon[kQuantitiesCommon];   // Bin Limits for common quantities (upper limit)
     AliHFEpidTRD *fTRDpid;        // HFE PID for TRD
-    THnSparseF *fLikeTRD;         // Histo for Likelihoods
-    THnSparseF *fQAtrack;         // QA histo for quantities based on track level
-    THnSparseF *fQAdEdx;          // QA for tracklet charge
-    THnSparseF *fTRDtruncMean;    // QA for truncated mean
+    AliHFEcollection *fHistos;    // Histogram collection
 
     // List for Histograms:
     TList *fPionEfficiencies;     //! List for Pion efficiencies
@@ -138,8 +161,10 @@ class AliHFEtrdPIDqa : public TNamed{
     TList *fKaonEfficiencies;     //! List for Kaon efficiencies
 
     TList *fThresholds;           //! List for Threshold Graphs
+
+    Bool_t fShowMessage;         // Display debug messages
   
-  ClassDef(AliHFEtrdPIDqa, 2)     // QA class for TRD PID 
+  ClassDef(AliHFEtrdPIDqa, 3)     // QA class for TRD PID 
 };
 #endif