]>
Commit | Line | Data |
---|---|---|
1ee39b3a | 1 | #ifndef ALITRDCHECKPID_H |
2 | #define ALITRDCHECKPID_H | |
3 | ||
4 | ////////////////////////////////////////////////////// | |
5 | // | |
6 | // PID performance checker of the TRD | |
7 | // | |
8 | // Author : Alex Wilk <wilka@uni-muenster.de> | |
9 | // Alex Bercuci <A.Bercuci@gsi.de> | |
10 | // Markus Fasel <M.Fasel@gsi.de> | |
11 | // | |
12 | /////////////////////////////////////////////////////// | |
13 | ||
14 | #ifndef ROOT_TAxis | |
15 | #include "TAxis.h" | |
16 | #endif | |
17 | ||
18 | #ifndef ALITRDRECOTASK_H | |
19 | #include "AliTRDrecoTask.h" | |
20 | #endif | |
21 | ||
2e6aa247 | 22 | #ifndef ALIPID_H |
23 | #include "AliPID.h" | |
24 | #endif | |
25 | ||
1ee39b3a | 26 | class AliTRDReconstructor; |
27 | class AliTRDpidUtil; | |
28 | class AliTRDcheckPID : public AliTRDrecoTask | |
29 | { | |
30 | public: | |
31 | // Plots registered for this task | |
32 | enum{ | |
2e6aa247 | 33 | kEfficiency = 0 // e Efficiency plot |
34 | ,kdEdx = 1 // dE/dx spectra | |
35 | ,kdEdxSlice = 2 // dE/dx spectra | |
36 | ,kPH = 3 // pulse height spectra | |
37 | ,kNClus = 4 // number of clusters per track | |
38 | ,kMomentum = 5 // momentum distribution | |
39 | ,kMomentumBin = 6 // momentum distribution | |
40 | ,kNTracklets = 7 // Number of tracklets per track | |
41 | ,kEfficiencyMu = 8 // mu Efficiency plot | |
42 | ,kEfficiencyPi = 9 // pi Efficiency plot | |
43 | ,kEfficiencyKa = 10 // K Efficiency plot | |
44 | ,kEfficiencyPr = 11 // pr Efficiency plot | |
45 | ,kNPlots = 12 // Number of plots for this tasks | |
1ee39b3a | 46 | }; |
47 | AliTRDcheckPID(); | |
48 | virtual ~AliTRDcheckPID(); | |
49 | ||
50 | virtual void CreateOutputObjects(); | |
51 | virtual Bool_t GetRefFigure(Int_t ifig); | |
b91fdd71 | 52 | virtual void Exec(Option_t *opt); |
1ee39b3a | 53 | virtual Bool_t PostProcess(); |
54 | ||
55 | TH1 *PlotLQ(const AliTRDtrackV1 *track = 0x0); | |
56 | TH1 *PlotNN(const AliTRDtrackV1 *track = 0x0); | |
57 | TH1 *PlotESD(const AliTRDtrackV1 *track = 0x0); | |
58 | TH1 *PlotdEdx(const AliTRDtrackV1 *track = 0x0); | |
59 | TH1 *PlotdEdxSlice(const AliTRDtrackV1 *track = 0x0); | |
60 | TH1 *PlotPH(const AliTRDtrackV1 *track = 0x0); | |
61 | TH1 *PlotNClus(const AliTRDtrackV1 *track = 0x0); | |
62 | TH1 *PlotNTracklets(const AliTRDtrackV1 *track = 0x0); | |
63 | TH1 *PlotMom(const AliTRDtrackV1 *track = 0x0); | |
64 | TH1 *PlotMomBin(const AliTRDtrackV1 *track = 0x0); | |
65 | ||
66 | void SetRequireMinNTracklets(Int_t mintracklets) { fMinNTracklets = mintracklets; } | |
67 | void SetRequireMaxNTracklets(Int_t maxtracklets) { fMaxNTracklets = maxtracklets; } | |
68 | ||
69 | TObjArray *GetGraphs() const { return fGraph; }; | |
2e6aa247 | 70 | static Char_t const* MethodName(Int_t id) { return fgMethod[id]; }; |
1ee39b3a | 71 | //TObjArray *GetHistos() { return fContainer; }; |
72 | virtual TObjArray *Histos(); | |
2e6aa247 | 73 | void EvaluateEfficiency(TObjArray* const histoContainer, TObjArray *results, Int_t species, Float_t electronEfficiency); |
1ee39b3a | 74 | inline void SetMomentumBinning(Int_t nBins, Double_t *bins); |
75 | inline Int_t FindBin(Int_t species, Double_t momentum); | |
76 | inline Bool_t IsInRange(Double_t momentum); | |
77 | ||
78 | private: | |
79 | AliTRDcheckPID(const AliTRDcheckPID&); // not implemented | |
80 | AliTRDcheckPID& operator=(const AliTRDcheckPID&); // not implemented | |
81 | ||
82 | Int_t CalcPDG(AliTRDtrackV1* track = 0x0); | |
83 | Bool_t CheckTrackQuality(const AliTRDtrackV1* track = 0x0) const; | |
2e6aa247 | 84 | static Char_t const *fgMethod[3]; // PID method name |
1ee39b3a | 85 | AliTRDReconstructor *fReconstructor; //! reconstructor needed for recalculation the PID |
86 | AliTRDpidUtil *fUtil; //! utility class for PID calculations | |
87 | TObjArray *fGraph; //! array of graphs filled in PostProcess | |
b91fdd71 | 88 | TObjArray *fPID; //! array of PID info/track for calibration |
2e6aa247 | 89 | TObjArray *fEfficiency[AliPID::kSPECIES]; //! array of histograms with efficiency |
1ee39b3a | 90 | TAxis *fMomentumAxis; //! helper mementum binning |
91 | Int_t fMinNTracklets; // minimum number of required Tracklets (for systematic studies) | |
92 | Int_t fMaxNTracklets; // maximum number of required Tracklets (for systematic studies) | |
2e6aa247 | 93 | ClassDef(AliTRDcheckPID, 2); // TRD PID checker |
1ee39b3a | 94 | }; |
95 | ||
96 | //________________________________________________________________________ | |
97 | inline void AliTRDcheckPID::SetMomentumBinning(Int_t nBins, Double_t *bins){ | |
98 | // | |
99 | // Set the Momentum Bins | |
100 | // | |
101 | if(fMomentumAxis) delete fMomentumAxis; | |
102 | fMomentumAxis = new TAxis(nBins, bins); | |
103 | } | |
104 | ||
105 | //________________________________________________________________________ | |
106 | inline Int_t AliTRDcheckPID::FindBin(Int_t species, Double_t momentum){ | |
107 | // | |
108 | // Find the Bin in the 2D Histogram | |
109 | // | |
110 | return species * fMomentumAxis->GetNbins() + (fMomentumAxis->FindBin(momentum) -1); | |
111 | } | |
112 | ||
113 | //________________________________________________________________________ | |
114 | inline Bool_t AliTRDcheckPID::IsInRange(Double_t momentum){ | |
115 | // | |
116 | // Check Whether momentum is in the defined Range | |
117 | // | |
118 | return (momentum >= fMomentumAxis->GetXmin() && momentum <= fMomentumAxis->GetXmax()); | |
119 | } | |
120 | ||
121 | #endif |