]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEpidTRD.h
fe5128029829618dd50f61563492eeea641b11bf
[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 AliAODTrack;
23 class AliAODMCParticle;
24 class AliESDtrack;
25 class AliMCParticle;
26 class AliVParticle;
27 class TList;
28 class TH2F;
29
30 class AliHFEpidTRD : public AliHFEpidBase{
31   public:
32     typedef enum{
33       kLQ = 0,
34       kNN = 1
35     } PIDMethodTRD_t;
36     enum{
37       kThreshParams = 24
38     };
39     enum{
40       kHistTRDlikeBefore = 0,
41       kHistTRDlikeAfter = 1,
42       kHistTRDthresholds = 2,
43       kHistTRDSigV1 = 3,
44       kHistTRDSigV2 = 4,
45       kHistOverallSpecies = 5
46     };
47     AliHFEpidTRD(const Char_t *name);
48     AliHFEpidTRD(const AliHFEpidTRD &ref);
49     AliHFEpidTRD& operator=(const AliHFEpidTRD &ref);
50     virtual ~AliHFEpidTRD();
51     
52     virtual Bool_t InitializePID();
53     virtual Int_t IsSelected(AliHFEpidObject *track);
54     virtual Bool_t HasQAhistos() const { return kTRUE; };
55
56     Double_t GetTRDSignalV1(AliESDtrack *track, Int_t mcPID);
57     Double_t GetTRDSignalV2(AliESDtrack *track, Int_t mcPID);
58
59     void SetPIDMethod(PIDMethodTRD_t method) { fPIDMethod = method; };
60   protected:
61     void Copy(TObject &ref) const;
62     Int_t MakePIDesd(AliESDtrack *esdTrack, AliMCParticle *mcTrack);
63     Int_t MakePIDaod(AliAODTrack *aofTrack, AliAODMCParticle *aodMC);
64     Double_t GetTRDthresholds(Double_t electronEff, Double_t p);
65     Int_t GetMCpid(AliESDtrack *track);
66     void InitParameters();
67     virtual void AddQAhistograms(TList *l);
68     void GetParameters(Double_t electronEff, Double_t *parameters);
69
70     void FillHistogramsLikelihood(Int_t whenFilled, Float_t p, Float_t elProb);
71     void FillHistogramsTRDSignalV1(Double_t signal, Double_t p, Int_t species);
72     void FillHistogramsTRDSignalV2(Double_t signal, Double_t p, Int_t species);
73   private:
74     static const Double_t fgkVerySmall;                       // Check for 0
75     PIDMethodTRD_t fPIDMethod;                              // PID Method: 2D Likelihood or Neural Network
76     Double_t fThreshParams[kThreshParams];                  // Threshold parametrisation
77     TList *fContainer;                                      // QA  Histogram Container
78   ClassDef(AliHFEpidTRD, 1)     // TRD electron ID class
79 };
80
81 #endif