]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDpidUtil.h
Removing extern call to gROOT to allow compilation with ROOT6.
[u/mrichter/AliRoot.git] / TRD / AliTRDpidUtil.h
CommitLineData
0e60774c 1#ifndef ALITRDPIDUTIL_H
2#define ALITRDPIDUTIL_H
142229c3 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 $ */
0e60774c 7
8//////////////////////////////////////////////////////
9//
10// Class to calculate PID performance of the TRD
11//
12// Author : Alex Wilk <wilka@uni-muenster.de>
13//
14///////////////////////////////////////////////////////
15
422a2dc0 16class TH1;
0affc9e5 17class AliESDtrack;
0e60774c 18class AliTRDpidUtil : public TObject {
19public:
0e60774c 20 enum {
21 kBins = 10001
22 };
0d83b3a5 23 enum ETRDPIDMethod {
0affc9e5 24 kLQ = 0 // 2D likelihood method
25 ,kNN = 1 // Neural network method
26 ,kESD = 2 // ESD results - check offline
0d83b3a5 27 };
28 enum{
29 kNNslices = 8
30 ,kLQslices = 3
31 };
0e60774c 32
33 AliTRDpidUtil();
34 virtual ~AliTRDpidUtil(){;}
35
0d83b3a5 36 Bool_t CalculatePionEffi(TH1* histo1, TH1* histo2);
0e60774c 37
4d6aee34 38 static Float_t ElectronEfficiency() { return fgEleEffi;};
0affc9e5 39
0d83b3a5 40 static Bool_t IsElectron(const AliESDtrack *track, ETRDPIDMethod method = kNN);
41 static Double_t GetSystematicError(const AliESDtrack *track, ETRDPIDMethod method = kNN);
42 static Int_t GetNdEdxSlices(ETRDPIDMethod m) { return m == kNN ? kNNslices : kLQslices;}
43 Double_t GetCalcElectronEfficiency() const { return fCalcEleEffi;};
44 Double_t GetPionEfficiency() const { return fPionEffi;};
45 Double_t GetError() const { return fError;};
46 Double_t GetThreshold() const { return fThreshold;};
47
48 static Int_t GetMomentumBin(Double_t p);
49 static Int_t Pdg2Pid(Int_t pdg);
2f4384e6 50 static Int_t Mass2Pid(Float_t m);
4d6aee34 51 static void SetElectronEfficiency(Float_t eleeffi) {fgEleEffi = eleeffi;};
0e60774c 52
53private:
54 AliTRDpidUtil(const AliTRDpidUtil&); // not implemented
55 AliTRDpidUtil& operator=(const AliTRDpidUtil&); // not implemented
56
4d6aee34 57 static Float_t fgEleEffi; // electron efficiency
0e60774c 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 ClassDef(AliTRDpidUtil, 1) // TRD PID efficiency calculator
65
66};
67
68#endif