1 #ifndef ALITRDPIDREFMAKER_H
\r
2 #define ALITRDPIDREFMAKER_H
\r
4 //////////////////////////////////////////////////////
\r
6 // Task to build PID reference tree for the training
\r
7 // of neural networs for the TRD PID
\r
9 // Authors: Alex Wilk <wilka@uni-muenster.de>
\r
10 // Markus Heide <mheide@uni-muenster.de>
\r
12 ///////////////////////////////////////////////////////
\r
14 #ifndef ALITRDRECOTASK_H
\r
15 #include "AliTRDrecoTask.h"
\r
22 #ifndef ALIPIDCALPID_H
\r
23 #include "Cal/AliTRDCalPID.h"
\r
26 #ifndef ALITRDGEOMETRY_H
\r
27 #include "AliTRDgeometry.h"
\r
32 class TMultiLayerPerceptron;
\r
34 class AliTRDtrackV1;
\r
35 class AliTRDReconstructor;
\r
36 class AliTRDpidRefMaker : public AliTRDrecoTask
\r
64 AliTRDpidRefMaker();
\r
66 virtual ~AliTRDpidRefMaker();
\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
74 Bool_t PostProcess();
\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
85 void Terminate(Option_t *);
\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
93 AliTRDpidRefMaker(const AliTRDpidRefMaker&); // not implemented
\r
94 AliTRDpidRefMaker& operator=(const AliTRDpidRefMaker&); // not implemented
\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
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
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
119 ClassDef(AliTRDpidRefMaker, 1); // TRD reference maker for NN
\r