]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEpidTRD.h
84d73575354d4e2d614537eddc20fdd911f445d7
[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);
61     virtual Bool_t HasQAhistos() const { return kTRUE; };
62
63     Double_t GetTRDSignalV1(AliESDtrack *track, Int_t mcPID);
64     Double_t GetTRDSignalV2(AliESDtrack *track, Int_t mcPID);
65
66     Bool_t IsCalculateTRDSignals() const { return TestBit(kTRDsignals); }
67     void SetPIDMethod(PIDMethodTRD_t method) { fPIDMethod = method; };
68     void SetElectronEfficiency(Double_t electronEfficiency) { fElectronEfficiency = electronEfficiency; }
69     void SetMinP(Double_t p) { fMinP = p; }
70     void CalculateTRDSignals(Bool_t docalc) { SetBit(kTRDsignals, docalc); } 
71
72     Double_t GetTRDthresholds(Double_t electronEff, Double_t p);
73   protected:
74     enum{
75       kTRDsignals = BIT(16)
76     };
77     void Copy(TObject &ref) const;
78     Int_t MakePIDesd(AliESDtrack *esdTrack, AliMCParticle *mcTrack);
79     Int_t MakePIDaod(AliAODTrack *aofTrack, AliAODMCParticle *aodMC);
80     Int_t GetMCpid(AliESDtrack *track);
81     void InitParameters();
82     void InitParameters1DLQ();
83     virtual void AddQAhistograms(TList *l);
84     void GetParameters(Double_t electronEff, Double_t *parameters);
85
86     void FillStandardQA(Int_t whenFilled, AliESDtrack *esdTrack);
87     void FillHistogramsTRDSignal(Double_t signal, Double_t p, Int_t species, UInt_t version);
88   private:
89     static const Double_t fgkVerySmall;                       // Check for 0
90     Double_t fMinP;                                         // Minimum momentum above which TRD PID is applied
91     Double_t fElectronEfficiency;                           // Cut on electron efficiency
92     PIDMethodTRD_t fPIDMethod;                              // PID Method: 2D Likelihood or Neural Network
93     Double_t fThreshParams[kThreshParams];                  // Threshold parametrisation
94     AliHFEcollection *fContainer;                                      // QA  Histogram Container
95   ClassDef(AliHFEpidTRD, 1)     // TRD electron ID class
96 };
97
98 #endif