]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliHFEtrdPIDqa.h
Add missing classes (first try)
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEtrdPIDqa.h
CommitLineData
c04c80e6 1/**************************************************************************
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
6* *
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**************************************************************************/
15//
16// QA class for TRD PID
17// Evaluate TRD PID using well identified reference tracks
18// For more information see implementation file
19//
20#ifndef ALIHFETRDPIDQA_H
21#define ALIHFETRDPIDQA_H
22
23#ifndef ROOT_TNamed
24#include <TNamed.h>
25#endif
26
27#ifndef ROOT_THnSparse
28#include <THnSparse.h>
29#endif
30
31class TCollection;
32class TF1;
33class TGraph;
34class TH1;
35class TList;
36class TObjArray;
37
38class AliAODTrack;
39class AliESDtrack;
40class AliVTrack;
41class AliHFEpidTRD;
42
43class AliHFEtrdPIDqa : public TNamed{
44 public:
45 AliHFEtrdPIDqa();
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();
52
53 void ProcessTracks(TObjArray * const l, Int_t species);
54 void ProcessTrack(AliVTrack *track, Int_t species);
55
56 void Init();
57 void FinishAnalysis();
58 void StoreResults(const Char_t *filename = "HFEtrdPIDqa.root");
59 void SaveThresholdParameters(const Char_t * filename = "TRD.Thresholds.root");
60
61 void DrawTracklet(Int_t tracklet);
62 void ClearLists();
63
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 //---------------------------------------------------
71 protected:
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
76 // variables too
77 enum QuantitiesCommon_t{
78 kSpecies = 0,
79 kP = 1,
80 kNTracklets = 2,
81 kQuantitiesCommon = 3
82 };
83 enum QuantitiesLike_t{
84 kElectronLike = 3,
85 kQuantitiesLike = 4
86 };
87 enum QuantitiesQAtrack_t{
88 kNonZeroTrackletCharge = 3,
89 kNClusters = 4,
90 kQuantitiesQA = 5
91 };
92 enum QuantitiesdEdx_t{
93 kdEdx = 3,
94 kQuantitiesdEdx = 4
95 };
96 enum QuantitiesTruncMean_t{
97 kTPCdEdx = 3,
98 kTRDdEdxMethod1 = 4,
99 kTRDdEdxMethod2 = 5,
100 kQuantitiesTruncMean = 6
101 };
102
103 void ProcessTrackESD(AliESDtrack *track, Int_t species);
104 void ProcessTrackAOD(AliAODTrack * const track, Int_t species);
105
106 void FillTRDLikelihoods(AliESDtrack *track, Int_t species);
107 void FillTRDQAplots(AliESDtrack *track, Int_t species);
108
109 void AnalyseNTracklets(Int_t nTracklets);
110 Int_t GetThresholdBin(TH1 * const input, Double_t efficiency);
111 Bool_t CalculateEfficiency(TH1 * const input, Int_t threshbin, Double_t *params);
112 TF1 *MakeThresholds(TGraph *input);
113
114 void CreateLikelihoodHistogram();
115 void CreateQAHistogram();
116 void CreatedEdxHistogram();
117 void CreateHistoTruncatedMean();
118
119 private:
120 enum{
121 kNElectronEffs = 6
122 };
123 static const Double_t fgkElectronEff[kNElectronEffs]; // Electron efficiency bins
124 static const Int_t fgkNBinsCommon[kQuantitiesCommon]; // Number of bins for common quantities
125 static const Double_t fgkMinBinCommon[kQuantitiesCommon]; // Bin Limits for common quantities (lower limit)
126 static const Double_t fgkMaxBinCommon[kQuantitiesCommon]; // Bin Limits for common quantities (upper limit)
127 AliHFEpidTRD *fTRDpid; // HFE PID for TRD
128 THnSparseF *fLikeTRD; // Histo for Likelihoods
129 THnSparseF *fQAtrack; // QA histo for quantities based on track level
130 THnSparseF *fQAdEdx; // QA for tracklet charge
131 THnSparseF *fTRDtruncMean; // QA for truncated mean
132
133 // List for Histograms:
134 TList *fPionEfficiencies; //! List for Pion efficiencies
135 TList *fProtonEfficiencies; //! List for Proton efficiencies
136 TList *fKaonEfficiencies; //! List for Kaon efficiencies
137
138 TList *fThresholds; //! List for Threshold Graphs
139
140 ClassDef(AliHFEtrdPIDqa, 2) // QA class for TRD PID
141};
142#endif
143