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