]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/qaRec/AliTRDpidChecker.h
updates of the PID task by Alex
[u/mrichter/AliRoot.git] / TRD / qaRec / AliTRDpidChecker.h
1 #ifndef ALITRDPIDCHECKER_H
2 #define ALITRDPIDCHECKER_H
3
4 //////////////////////////////////////////////////////
5 //
6 // Task to check PID performance of the TRD
7 //
8 // Author : Alex Wilk <wilka@uni-muenster.de>
9 //
10 ///////////////////////////////////////////////////////
11
12 #include "AliPID.h"
13 #include "../Cal/AliTRDCalPID.h"
14
15 #ifndef ALITRDRECOTASK_H
16 #include "AliTRDrecoTask.h"
17 #endif
18
19 class TObjArray;
20 class TList;
21 class TClonesArray;
22 class TTreeSRedirector;
23 class AliTRDReconstructor;
24 class AliTRDpidChecker : public AliTRDrecoTask 
25 {
26
27   enum{
28       kLQlikelihood    = 0                                           // place for 2-dim LQ electron likelihood distributions
29         ,kNNlikelihood = 1 * AliTRDCalPID::kNMom * AliPID::kSPECIES  // place for NN electron likelihood distributions
30         ,kdEdx         = 2 * AliTRDCalPID::kNMom * AliPID::kSPECIES  // place for the dE/dx spectra
31         ,kPH           = 3 * AliTRDCalPID::kNMom * AliPID::kSPECIES  // place for pulse height spectra
32         ,kMomentum     = 4 * AliTRDCalPID::kNMom * AliPID::kSPECIES  // place for the momentum distribution
33         ,kMomentumBin  = kMomentum +1                                // place for the momentum distribution
34         ,kGraphLQ      = kMomentumBin +1                             // place for the 2-dim LQ pion efficiencies
35         ,kGraphLQerr   = kGraphLQ +1                                 // place for the 2-dim LQ pion efficiency errors
36         ,kGraphNN      = kGraphLQerr +1                              // place for the NN pion efficiencies
37         ,kGraphNNerr   = kGraphNN +1                                 // place for the NN pion efficiency errors
38   };
39
40   enum{
41     kGraphStart = kGraphLQ
42       };
43
44 public:
45   AliTRDpidChecker();
46   virtual ~AliTRDpidChecker();
47   
48   void    CreateOutputObjects();
49   void    Exec(Option_t *option);
50   Bool_t  PostProcess();
51   void    Terminate(Option_t *);
52
53 private:
54   AliTRDpidChecker(const AliTRDpidChecker&); // not implemented
55   AliTRDpidChecker& operator=(const AliTRDpidChecker&); // not implemented
56
57   Double_t GetPionEfficiency(Int_t Index1, Int_t Index2);  // calculates the pion efficiency
58   Double_t GetError(Int_t Index1, Int_t Index2);           // calculates the error
59   
60
61   AliTRDReconstructor *fReconstructor;     //! reconstructor needed for recalculation the PID
62
63   enum{
64     kBins = 12001                // binning of the likelihood histograms
65   };
66
67   ClassDef(AliTRDpidChecker, 1); // TRD PID checker
68 };
69
70 #endif