]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/qaRec/AliTRDpidRefMaker.h
Remove CreateGraphs() and AliTRDpidRefMaker(const Char_t*,cons tChar_t*)
[u/mrichter/AliRoot.git] / TRD / qaRec / AliTRDpidRefMaker.h
1 #ifndef ALITRDPIDREFMAKER_H\r
2 #define ALITRDPIDREFMAKER_H\r
3 \r
4 //////////////////////////////////////////////////////\r
5 //\r
6 // Task to build PID reference tree for the training\r
7 // of neural networs for the TRD PID\r
8 //\r
9 // Authors: Alex Wilk    <wilka@uni-muenster.de>\r
10 //          Markus Heide <mheide@uni-muenster.de>\r
11 //\r
12 ///////////////////////////////////////////////////////\r
13 \r
14 #ifndef ALITRDRECOTASK_H\r
15 #include "AliTRDrecoTask.h"\r
16 #endif\r
17 \r
18 #ifndef ALIPID_H\r
19 #include "AliPID.h"\r
20 #endif\r
21 \r
22 #ifndef ALIPIDCALPID_H\r
23 #include "Cal/AliTRDCalPID.h"\r
24 #endif\r
25 \r
26 #ifndef ALITRDGEOMETRY_H\r
27 #include "AliTRDgeometry.h"\r
28 #endif\r
29 \r
30 class TTree;\r
31 class TEventList;\r
32 class TMultiLayerPerceptron;\r
33 class AliPID;\r
34 class AliTRDtrackV1;\r
35 class AliTRDReconstructor;\r
36 class AliTRDpidRefMaker : public AliTRDrecoTask\r
37 {\r
38 \r
39 public:\r
40   enum  {\r
41     k006  =  0\r
42     ,k008 =  1\r
43     ,k010 =  2\r
44     ,k015 =  3\r
45     ,k020 =  4\r
46     ,k030 =  5\r
47     ,k040 =  6\r
48     ,k050 =  7\r
49     ,k060 =  8\r
50     ,k080 =  9\r
51     ,k100 = 10\r
52     ,kAll = 11\r
53   };\r
54 \r
55   enum {\r
56     kGraphTrain = 0\r
57     ,kGraphTest = 1\r
58   };\r
59 \r
60   enum {\r
61     kMoniTrain = 50\r
62   };\r
63 \r
64   AliTRDpidRefMaker();\r
65 \r
66   virtual ~AliTRDpidRefMaker();\r
67   \r
68   void    CreateOutputObjects();\r
69   void    Exec(Option_t *option);\r
70   Int_t   GetEpochs() {return fEpochs;};\r
71   Int_t   GetMinTrain() {return fMinTrain;};\r
72   Int_t   GetTrainMomBin() {return fTrainMomBin;};\r
73 \r
74   Bool_t  PostProcess();\r
75 \r
76   void    SetEpochs(Int_t epochs) {fEpochs = epochs;};\r
77   void    SetMinTrain(Int_t mintrain) {fMinTrain = mintrain;};\r
78   void    SetTrainMomBin(Int_t trainmombin) {fTrainMomBin = trainmombin;};\r
79   void    SetDate(Int_t date) {fDate = date;};\r
80   void    SetDoTraining(Bool_t train) {fDoTraining = train;};\r
81   void    SetContinueTraining(Bool_t continTrain) {fContinueTraining = continTrain;};\r
82   void    SetTrainPath(Int_t path) {fTrainPath = path;};\r
83   void    LoadFiles(const Char_t *InFileNN, const Char_t *InFileLQ);\r
84 \r
85   void    Terminate(Option_t *);\r
86 \r
87   void    MakeTrainingLists();                                 // build the training and the test list\r
88   void    MonitorTraining(Int_t mombin);                       // monitor training process\r
89   void    LoadContainer(const Char_t *InFileCont);\r
90   //void    CreateGraphs();\r
91 \r
92 private:\r
93   AliTRDpidRefMaker(const AliTRDpidRefMaker&);              // not implemented\r
94   AliTRDpidRefMaker& operator=(const AliTRDpidRefMaker&);   // not implemented\r
95 \r
96   void GetV0info(AliTRDtrackV1 *TRDtrack, Float_t *v0pdg);  // get the v0 information\r
97   void TrainNetworks(Int_t mombin);                         // train the neural networks for a given momentum bin\r
98   void BuildLQRefs(Int_t mombin);                           // build the 2dim histos for a given momentum bin\r
99 \r
100   AliTRDReconstructor *fReconstructor;     //! reconstructor needed for recalculation the PID\r
101   TTree         *fNN;                      // NN data\r
102   TTree         *fLQ;                      // LQ data\r
103   TEventList *fTrain[AliTRDCalPID::kNMom][AliTRDgeometry::kNlayer];          // Training list for each momentum \r
104   TEventList *fTest[AliTRDCalPID::kNMom][AliTRDgeometry::kNlayer];           // Test list for each momentum \r
105   TMultiLayerPerceptron *fNet[AliTRDgeometry::kNlayer]; // artificial neural network\r
106 \r
107   Int_t         fLayer;                    // TRD layer index \r
108   Int_t         fTrainMomBin;              // momentum bin for the training\r
109   Int_t         fEpochs;                   // Number of epochs for the training of the NNs\r
110   Int_t         fMinTrain;                 // minimum of events needed for training\r
111   Int_t         fDate;                     // date stamp for training of the NNs\r
112   Float_t       fMom;                      // momentum\r
113   Float_t       *fdEdx[10];                // dEdx array\r
114   Float_t       fv0pid[AliPID::kSPECIES];  // pid from v0s\r
115   Bool_t        fDoTraining;               // checks if training will be done\r
116   Bool_t        fContinueTraining;         // checks if training from an older run should be continued\r
117   Int_t         fTrainPath;                // sets the path for continuing the training\r
118 \r
119   ClassDef(AliTRDpidRefMaker, 1); // TRD reference  maker for NN\r
120 };\r
121 \r
122 #endif\r