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