]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDpidUtil.h
Add possibility to rotate event
[u/mrichter/AliRoot.git] / TRD / AliTRDpidUtil.h
1 #ifndef ALITRDPIDUTIL_H
2 #define ALITRDPIDUTIL_H
3
4 //////////////////////////////////////////////////////
5 //
6 // Class to calculate PID performance of the TRD
7 //
8 // Author : Alex Wilk <wilka@uni-muenster.de>
9 //
10 ///////////////////////////////////////////////////////
11
12 class TH1;
13 class AliESDtrack;
14 class AliTRDpidUtil : public TObject {
15 public:
16   enum {
17     kBins = 10001
18   };
19   enum ETRDPIDMethod {
20      kLQ   = 0 // 2D likelihood method
21     ,kNN   = 1 // Neural network method
22     ,kESD  = 2 // ESD results - check offline
23   };
24   enum{
25     kNNslices = 8
26    ,kLQslices = 3
27   };
28
29   AliTRDpidUtil();
30   virtual ~AliTRDpidUtil(){;}
31
32   Bool_t       CalculatePionEffi(TH1* histo1, TH1* histo2);
33
34   static Float_t  ElectronEfficiency()   { return fgEleEffi;};
35   
36   static Bool_t   IsElectron(const AliESDtrack *track, ETRDPIDMethod method = kNN);
37   static Double_t GetSystematicError(const AliESDtrack *track, ETRDPIDMethod method = kNN);
38   static Int_t GetNdEdxSlices(ETRDPIDMethod m)   { return m == kNN ? kNNslices : kLQslices;}
39   Double_t     GetCalcElectronEfficiency() const { return fCalcEleEffi;};
40   Double_t     GetPionEfficiency() const { return fPionEffi;};
41   Double_t     GetError() const          { return fError;};
42   Double_t     GetThreshold() const      { return fThreshold;};
43
44   static Int_t GetMomentumBin(Double_t p);
45   static Int_t Pdg2Pid(Int_t pdg);
46   static void  SetElectronEfficiency(Float_t eleeffi) {fgEleEffi = eleeffi;};
47
48 private:
49   AliTRDpidUtil(const AliTRDpidUtil&);               // not implemented
50   AliTRDpidUtil& operator=(const AliTRDpidUtil&);    // not implemented
51
52   static Float_t fgEleEffi;               // electron efficiency
53
54   Double_t fCalcEleEffi;                 // electron efficiency after calculation
55   Double_t fPionEffi;                    // pion efficiency 
56   Double_t fError;                       // pion efficiency error
57   Double_t fThreshold;                   // threshold for calculated electron efficiency
58
59   ClassDef(AliTRDpidUtil, 1)  // TRD PID efficiency calculator
60
61 };
62
63 #endif