+#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;
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
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
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