]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/TRD/AliTRDpidRefMaker.h
memory leak (Markus)
[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 ALIPID_H
20 #include "AliPID.h"
21 #endif
22 #ifndef ALITRDCALPID_H
23 #include "Cal/AliTRDCalPID.h"
24 #endif
25 #ifndef ALITRDGEOMETRY_H
26 #include "AliTRDgeometry.h"
27 #endif
28
29 class TTree;
30 class TObjArray;
31 class AliTRDReconstructor;
32 class AliTRDseedV1;
33 class AliTRDtrackInfo;
34 class AliTRDpidInfo;
35 class AliTRDpidRefMaker : public AliTRDrecoTask
36 {
37 public:
38   enum ETRDpidRefMakerPBins {
39     k006  =  0
40     ,k008 =  1
41     ,k010 =  2
42     ,k015 =  3
43     ,k020 =  4
44     ,k030 =  5
45     ,k040 =  6
46     ,k050 =  7
47     ,k060 =  8
48     ,k080 =  9
49     ,k100 = 10
50     ,kAll = 11
51   };
52   enum ETRDpidRefMakerSource {
53     kV0 = 0 // use V0 as reference
54    ,kMC = 1 // use MC as reference
55    ,kRec= 2 // use Reconstructed PID as reference
56   };
57
58   AliTRDpidRefMaker();
59   AliTRDpidRefMaker(const char *name, const char *title);
60
61   virtual ~AliTRDpidRefMaker();
62   
63   void    UserCreateOutputObjects();
64   void    UserExec(Option_t *option);
65   Float_t GetPthreshold() const { return fPthreshold;}
66
67   void    SetAbundance(Float_t train);
68   void    SetPthreshold(Float_t t) { fPthreshold = t;}
69   void    SetRefPID(ETRDpidRefMakerSource select, AliTRDtrackInfo *t, const AliTRDtrackInfo::AliESDinfo *infoESD, Float_t *pid);
70   void    SetSource(ETRDpidRefMakerSource pid, ETRDpidRefMakerSource momentum) {fRefPID = pid; fRefP = momentum;}
71
72
73 protected:
74   virtual Bool_t   CheckQuality(AliTRDseedV1* trklt);
75   virtual Float_t* CookdEdx(AliTRDseedV1* trklt);
76   virtual void     LinkPIDdata();
77   virtual void     Fill();
78
79   AliTRDReconstructor *fReconstructor;  // reconstructor needed for recalculation the PID
80   TObjArray     *fV0s;                  //! v0 array
81   TTree         *fData;                 //! dEdx-P data
82   TObjArray     *fInfo;                 //! list of PID info
83   AliTRDpidInfo *fPIDdataArray;         //! pid data array
84   ETRDpidRefMakerSource  fRefPID;       // reference PID source
85   ETRDpidRefMakerSource  fRefP;         // reference momentum source
86   Float_t       fFreq;                  // training sample relative abundance
87   Float_t       fP;                     // momentum
88   Float_t       fdEdx[8];               // dEdx array
89   Float_t       fPID[AliPID::kSPECIES]; // pid from v0s
90
91 private:
92   AliTRDpidRefMaker(const AliTRDpidRefMaker&);              // not implemented
93   AliTRDpidRefMaker& operator=(const AliTRDpidRefMaker&);   // not implemented
94
95   Float_t        fPthreshold;            // momentum threshold [GeV/c]
96
97   ClassDef(AliTRDpidRefMaker, 3); // TRD PID reference  maker base class
98 };
99
100 #endif