Line data Source code
1 : #ifndef ALITRDPIDUTIL_H
2 : #define ALITRDPIDUTIL_H
3 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 : * See cxx source for full Copyright notice */
5 :
6 : /* $Id: AliTRDpidUtil.h 42548 2010-07-27 08:10:51Z cblume $ */
7 :
8 : //////////////////////////////////////////////////////
9 : //
10 : // Class to calculate PID performance of the TRD
11 : //
12 : // Author : Alex Wilk <wilka@uni-muenster.de>
13 : //
14 : ///////////////////////////////////////////////////////
15 :
16 : class TH1;
17 : class AliESDtrack;
18 : class AliTRDpidUtil : public TObject {
19 : public:
20 : enum {
21 : kBins = 10001
22 : };
23 : enum ETRDPIDMethod {
24 : kLQ = 0 // 2D likelihood method
25 : ,kNN = 1 // Neural network method
26 : ,kESD = 2 // ESD results - check offline
27 : };
28 : enum{
29 : kNNslices = 8
30 : ,kLQslices = 3
31 : };
32 :
33 : AliTRDpidUtil();
34 0 : virtual ~AliTRDpidUtil(){;}
35 :
36 : Bool_t CalculatePionEffi(TH1* histo1, TH1* histo2);
37 :
38 0 : static Float_t ElectronEfficiency() { return fgEleEffi;};
39 :
40 : static Bool_t IsElectron(const AliESDtrack *track, ETRDPIDMethod method = kNN);
41 : static Double_t GetSystematicError(const AliESDtrack *track, ETRDPIDMethod method = kNN);
42 0 : static Int_t GetNdEdxSlices(ETRDPIDMethod m) { return m == kNN ? kNNslices : kLQslices;}
43 0 : Double_t GetCalcElectronEfficiency() const { return fCalcEleEffi;};
44 0 : Double_t GetPionEfficiency() const { return fPionEffi;};
45 0 : Double_t GetError() const { return fError;};
46 0 : Double_t GetThreshold() const { return fThreshold;};
47 :
48 : static Int_t GetMomentumBin(Double_t p);
49 : static Int_t Pdg2Pid(Int_t pdg);
50 : static Int_t Mass2Pid(Float_t m);
51 0 : static void SetElectronEfficiency(Float_t eleeffi) {fgEleEffi = eleeffi;};
52 :
53 : private:
54 : AliTRDpidUtil(const AliTRDpidUtil&); // not implemented
55 : AliTRDpidUtil& operator=(const AliTRDpidUtil&); // not implemented
56 :
57 : static Float_t fgEleEffi; // electron efficiency
58 :
59 : Double_t fCalcEleEffi; // electron efficiency after calculation
60 : Double_t fPionEffi; // pion efficiency
61 : Double_t fError; // pion efficiency error
62 : Double_t fThreshold; // threshold for calculated electron efficiency
63 :
64 48 : ClassDef(AliTRDpidUtil, 1) // TRD PID efficiency calculator
65 :
66 : };
67 :
68 : #endif
|