]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEpidTRD.h
Protection against division by 0
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEpidTRD.h
1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 *                                                                        *
4 * Author: The ALICE Off-line Project.                                    *
5 * Contributors are mentioned in the code where appropriate.              *
6 *                                                                        *
7 * Permission to use, copy, modify and distribute this software and its   *
8 * documentation strictly for non-commercial purposes is hereby granted   *
9 * without fee, provided that the above copyright notice appears in all   *
10 * copies and that both the copyright notice and this permission notice   *
11 * appear in the supporting documentation. The authors make no claims     *
12 * about the suitability of this software for any purpose. It is          *
13 * provided "as is" without express or implied warranty.                  *
14 **************************************************************************/
15 #ifndef __ALIHFEPIDTRD_H__
16 #define __ALIHFEPIDTRD_H__
17
18  #ifndef __ALIHFEPIDBASE_H__
19  #include "AliHFEpidBase.h"
20  #endif
21
22 class TAxis;
23 class TH1F;
24 class TMap;
25 class TString;
26 class AliVParticle;
27
28 class AliHFEpidTRD : public AliHFEpidBase{
29   public:
30     typedef enum{
31       kLQ = 0,
32       kNN = 1
33     } PIDMethodTRD_t;
34     AliHFEpidTRD(const Char_t *name);
35     AliHFEpidTRD(const AliHFEpidTRD &ref);
36     AliHFEpidTRD& operator=(const AliHFEpidTRD &ref);
37     virtual ~AliHFEpidTRD();
38     
39     virtual Bool_t InitializePID();
40     virtual Int_t IsSelected(AliVParticle *track);
41     virtual Bool_t HasQAhistos() const { return kFALSE; };
42
43     void LoadTRDthresholds();
44
45     void SetPIDMethod(PIDMethodTRD_t method) { fPIDMethod = method; };
46     void SetThresholdFile(Char_t *thresholdFile) { fThresholdFile = thresholdFile; };
47
48   protected:
49     void Copy(TObject &ref) const;
50     TH1F *GetTRDthresholds(Float_t electronEff);
51     void SetTRDthresholds(TH1F *thresholds, Float_t electronEff);
52
53   private:
54     TString fThresholdFile;                                 // Threshold file name
55     PIDMethodTRD_t fPIDMethod;                              // PID Method: 2D Likelihood or Neural Network
56     TMap *fTRDthresholds;                                   //! TRD Thresholds
57     TAxis *fTRDelectronEfficiencies;                        //! Electron Efficiencies corresponding to reference histos
58
59   ClassDef(AliHFEpidTRD, 1)     // TRD electron ID class
60 };
61
62 #endif