]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEpidTRD.h
Major update of the HFE package (comments inside the code
[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 //
16 // TRD PID Class
17 // Does PID either on a x% electron efficiency basis or on dE/dx
18 // For more information please check the implementation file
19 //
20 #ifndef ALIHFEPIDTRD_H
21 #define ALIHFEPIDTRD_H
22
23  #ifndef ALIHFEPIDBASE_H
24  #include "AliHFEpidBase.h"
25  #endif
26
27 class AliAODTrack;
28 class AliAODMCParticle;
29 class AliESDtrack;
30 class AliHFEcollection;
31 class AliMCParticle;
32 class AliVParticle;
33 class TList;
34 class TH2F;
35
36 class AliHFEpidTRD : public AliHFEpidBase{
37   public:
38     typedef enum{
39       kLQ = 0,
40       kNN = 1
41     } PIDMethodTRD_t;
42     enum{
43       kThreshParams = 24
44     };
45     enum{
46       kHistTRDlikeBefore = 0,
47       kHistTRDlikeAfter = 1,
48       kHistTRDthresholds = 2,
49       kHistTRDSigV1 = 3,
50       kHistTRDSigV2 = 4,
51       kHistOverallSpecies = 5
52     };
53     AliHFEpidTRD();
54     AliHFEpidTRD(const Char_t *name);
55     AliHFEpidTRD(const AliHFEpidTRD &ref);
56     AliHFEpidTRD& operator=(const AliHFEpidTRD &ref);
57     virtual ~AliHFEpidTRD();
58     
59     virtual Bool_t InitializePID();
60     virtual Int_t IsSelected(AliHFEpidObject *track, AliHFEpidQAmanager *pidqa);
61
62     Double_t GetTRDSignalV1(const AliESDtrack *track);
63     Double_t GetTRDSignalV2(const AliESDtrack *track);
64
65     Bool_t IsCalculateTRDSignals() const { return TestBit(kTRDsignals); }
66     void SetPIDMethod(PIDMethodTRD_t method) { fPIDMethod = method; };
67     void SetElectronEfficiency(Double_t electronEfficiency) { fElectronEfficiency = electronEfficiency; }
68     void SetMinP(Double_t p) { fMinP = p; }
69     void CalculateTRDSignals(Bool_t docalc) { SetBit(kTRDsignals, docalc); } 
70
71     Double_t GetTRDthresholds(Double_t electronEff, Double_t p);
72   protected:
73     enum{
74       kTRDsignals = BIT(16)
75     };
76     void Copy(TObject &ref) const;
77     Double_t GetElectronLikelihood(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType);
78     Double_t GetP(const AliVParticle *track, AliHFEpidObject::AnalysisType_t anaType);
79     void InitParameters();
80     void InitParameters1DLQ();
81     void GetParameters(Double_t electronEff, Double_t *parameters);
82
83   private:
84     static const Double_t fgkVerySmall;                       // Check for 0
85     Double_t fMinP;                                         // Minimum momentum above which TRD PID is applied
86     Double_t fElectronEfficiency;                           // Cut on electron efficiency
87     PIDMethodTRD_t fPIDMethod;                              // PID Method: 2D Likelihood or Neural Network
88     Double_t fThreshParams[kThreshParams];                  // Threshold parametrisation
89   ClassDef(AliHFEpidTRD, 1)     // TRD electron ID class
90 };
91
92 #endif