]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/TRD/AliTRDpidRefMaker.h
change summary plots name accoring to convention proposed by Anton (Markus F)
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDpidRefMaker.h
1 #ifndef ALITRDPIDREFMAKER_H
2 #define ALITRDPIDREFMAKER_H
3
4 ////////////////////////////////////////////////////////////
5 //
6 // Base class for the Task to build TRD-PID reference data
7 // For the actual implementation please check the classes
8 //   - AliTRDpidRefMakerNN (Neural Networks)
9 //   - AliTRDpidRefMakerLQ (Multidimensional Likelihood)
10 //
11 // Authors: Alex Bercuci <A.Bercuci@gsi.de>
12 //          Alex Wilk    <wilka@uni-muenster.de>
13 //
14 /////////////////////////////////////////////////////////////
15
16 #ifndef ALITRDRECOTASK_H
17 #include "AliTRDrecoTask.h"
18 #endif
19 #ifndef ALITRDPIDUTIL_H
20 #include "AliTRDpidUtil.h"
21 #endif
22
23 class TTree;
24 class TObjArray;
25 class AliTRDseedV1;
26 class AliTRDtrackInfo;
27 class AliTRDpidInfo;
28 class AliTRDpidRefMaker : public AliTRDrecoTask
29 {
30 public:
31   enum ETRDpidRefMakerPBins {
32     k006  =  0
33     ,k008 =  1
34     ,k010 =  2
35     ,k015 =  3
36     ,k020 =  4
37     ,k030 =  5
38     ,k040 =  6
39     ,k050 =  7
40     ,k060 =  8
41     ,k080 =  9
42     ,k100 = 10
43     ,kAll = 11
44   };
45   enum ETRDpidRefMakerSource {
46     kV0 = 0 // use V0 as reference
47    ,kMC = 1 // use MC as reference
48    ,kRec= 2 // use Reconstructed PID as reference
49   };
50
51   AliTRDpidRefMaker();
52   AliTRDpidRefMaker(const char *name, const char *title);
53
54   virtual ~AliTRDpidRefMaker();
55   
56   void    UserCreateOutputObjects();
57   void    UserExec(Option_t *option);
58   Float_t GetPthreshold() const { return fPthreshold;}
59
60   void    SetAbundance(Float_t train);
61   void    SetPthreshold(Float_t t) { fPthreshold = t;}
62   void    SetRefPID(ETRDpidRefMakerSource select, AliTRDtrackInfo *t, const AliTRDtrackInfo::AliESDinfo *infoESD, Float_t *pid);
63   void    SetSource(ETRDpidRefMakerSource pid, ETRDpidRefMakerSource momentum) {fRefPID = pid; fRefP = momentum;}
64
65
66 protected:
67   virtual Bool_t   CheckQuality(AliTRDseedV1* trklt);
68   virtual Float_t* CookdEdx(AliTRDseedV1* trklt);
69   virtual void     LinkPIDdata();
70   virtual void     Fill();
71
72   TObjArray     *fV0s;                  //! v0 array
73   TTree         *fData;                 //! dEdx-P data
74   TObjArray     *fInfo;                 //! list of PID info
75   AliTRDpidInfo *fPIDdataArray;         //! pid data array
76   ETRDpidRefMakerSource  fRefPID;       // reference PID source
77   ETRDpidRefMakerSource  fRefP;         // reference momentum source
78   Float_t       fFreq;                  // training sample relative abundance
79   Float_t       fP;                     // momentum
80   Float_t       fdEdx[AliTRDpidUtil::kNNslices];// dEdx array
81   Float_t       fPID[AliPID::kSPECIES]; // pid from v0s
82
83 private:
84   AliTRDpidRefMaker(const AliTRDpidRefMaker&);              // not implemented
85   AliTRDpidRefMaker& operator=(const AliTRDpidRefMaker&);   // not implemented
86
87   Float_t        fPthreshold;            // momentum threshold [GeV/c]
88
89   ClassDef(AliTRDpidRefMaker, 4); // TRD PID reference  maker base class
90 };
91
92 #endif