1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 // QA class for TRD PID
17 // Evaluate TRD PID using well identified reference tracks
18 // For more information see implementation file
20 #ifndef ALIHFETRDPIDQA_H
21 #define ALIHFETRDPIDQA_H
27 #ifndef ROOT_THnSparse
28 #include <THnSparse.h>
43 class AliHFEtrdPIDqa : public TNamed{
46 AliHFEtrdPIDqa(const Char_t *name);
47 AliHFEtrdPIDqa(const AliHFEtrdPIDqa &ref);
48 AliHFEtrdPIDqa &operator=(const AliHFEtrdPIDqa &ref);
49 virtual void Copy(TObject &o) const;
50 virtual Long64_t Merge(TCollection *coll);
51 virtual ~AliHFEtrdPIDqa();
53 void ProcessTracks(TObjArray * const l, Int_t species);
54 void ProcessTrack(AliVTrack *track, Int_t species);
57 void FinishAnalysis();
58 void StoreResults(const Char_t *filename = "HFEtrdPIDqa.root");
59 void SaveThresholdParameters(const Char_t * filename = "TRD.Thresholds.root");
61 void DrawTracklet(Int_t tracklet);
64 //---------------------------------------------------
65 // Getters for Histograms
66 THnSparseF *GetLikelihoodHistogram() const { return fLikeTRD; }
67 THnSparseF *GetQAHistogram() const { return fQAtrack; }
68 THnSparseF *GetdEdxHistogram() const { return fQAdEdx; }
69 THnSparseF *GetHistoTruncMean() const { return fTRDtruncMean; }
70 //---------------------------------------------------
72 // Description of the containers we use to store basic information
73 // we access in the Post Processing. For all containers we have a
74 // common part containing species, momentum and number of tracklets,
75 // and a specific part. For both containers we define the number of
77 enum QuantitiesCommon_t{
83 enum QuantitiesLike_t{
87 enum QuantitiesQAtrack_t{
88 kNonZeroTrackletCharge = 3,
92 enum QuantitiesdEdx_t{
98 enum QuantitiesTruncMean_t{
102 kQuantitiesTruncMean = 6
105 void ProcessTrackESD(AliESDtrack *track, Int_t species);
106 void ProcessTrackAOD(AliAODTrack * const track, Int_t species);
108 void FillTRDLikelihoods(AliESDtrack *track, Int_t species);
109 void FillTRDQAplots(AliESDtrack *track, Int_t species);
111 void AnalyseNTracklets(Int_t nTracklets);
112 Int_t GetThresholdBin(TH1 * const input, Double_t efficiency);
113 Bool_t CalculateEfficiency(TH1 * const input, Int_t threshbin, Double_t *params);
114 TF1 *MakeThresholds(TGraph *input);
116 void CreateLikelihoodHistogram();
117 void CreateQAHistogram();
118 void CreatedEdxHistogram();
119 void CreateHistoTruncatedMean();
125 static const Double_t fgkElectronEff[kNElectronEffs]; // Electron efficiency bins
126 static const Int_t fgkNBinsCommon[kQuantitiesCommon]; // Number of bins for common quantities
127 static const Double_t fgkMinBinCommon[kQuantitiesCommon]; // Bin Limits for common quantities (lower limit)
128 static const Double_t fgkMaxBinCommon[kQuantitiesCommon]; // Bin Limits for common quantities (upper limit)
129 AliHFEpidTRD *fTRDpid; // HFE PID for TRD
130 THnSparseF *fLikeTRD; // Histo for Likelihoods
131 THnSparseF *fQAtrack; // QA histo for quantities based on track level
132 THnSparseF *fQAdEdx; // QA for tracklet charge
133 THnSparseF *fTRDtruncMean; // QA for truncated mean
135 // List for Histograms:
136 TList *fPionEfficiencies; //! List for Pion efficiencies
137 TList *fProtonEfficiencies; //! List for Proton efficiencies
138 TList *fKaonEfficiencies; //! List for Kaon efficiencies
140 TList *fThresholds; //! List for Threshold Graphs
142 ClassDef(AliHFEtrdPIDqa, 2) // QA class for TRD PID