1 #ifndef ALITRDPIDREFMAKERNN_H
2 #define ALITRDPIDREFMAKERNN_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 /* $Id: AliTRDpidRefMakerNN.h 27496 2008-07-22 08:35:45Z cblume $ */
8 //////////////////////////////////////////////////////
10 // Task to build PID reference tree for the training
11 // of neural networs for the TRD PID
13 // Authors: Alex Wilk <wilka@uni-muenster.de>
14 // Markus Heide <mheide@uni-muenster.de>
16 ///////////////////////////////////////////////////////
18 /* #ifndef ALITRDRECOTASK_H */
19 /* #include "AliTRDrecoTask.h" */
22 /* #ifndef ALIPID_H */
23 /* #include "AliPID.h" */
26 /* #ifndef ALITRDCALPID_H */
27 /* #include "../Cal/AliTRDCalPID.h" */
30 /* #ifndef ALITRDGEOMETRY_H */
31 /* #include "../AliTRDgeometry.h" */
34 #ifndef ALITRDPIDREFMAKER_H
35 #include "AliTRDpidRefMaker.h"
39 /* class TObjArray; */
40 /* class TEventList; */
41 /* class TMultiLayerPerceptron; */
43 /* class AliTRDtrackV1; */
44 /* class AliTRDReconstructor; */
46 /* class AliTRDpidRefMakerNN : public AliTRDrecoTask */
49 class TMultiLayerPerceptron;
50 class AliTRDpidRefMakerNN : public AliTRDpidRefMaker
54 enum ETRDpidRefMakerNNgraph {
59 enum ETRDpidRefMakerNNmoni {
63 AliTRDpidRefMakerNN();
65 virtual ~AliTRDpidRefMakerNN();
67 void CreateOutputObjects();
68 Int_t GetEpochs() const {return fEpochs;};
69 Int_t GetMinTrain() const {return fMinTrain;};
70 Int_t GetTrainMomBin() const {return fTrainMomBin;};
74 void SetEpochs(Int_t epochs) {fEpochs = epochs;};
75 void SetMinTrain(Int_t mintrain) {fMinTrain = mintrain;};
76 void SetTrainMomBin(Int_t trainmombin) {fTrainMomBin = trainmombin;};
77 void SetDate(Int_t date) {fDate = date;};
78 void SetDoTraining(Bool_t train) {fDoTraining = train;};
79 void SetContinueTraining(Bool_t continTrain) {fContinueTraining = continTrain;};
80 void SetTrainPath(Int_t path) {fTrainPath = path;};
81 void LoadFile(const Char_t *InFileNN);
82 void SetScaledEdx(Float_t s) {fScale = s;};
84 void MakeTrainingLists(); // build the training and the test list
85 void MonitorTraining(Int_t mombin); // monitor training process
88 void MakeRefs(Int_t mombin); // train the neural networks for a given momentum bin
91 AliTRDpidRefMakerNN(const AliTRDpidRefMakerNN&); // not implemented
92 AliTRDpidRefMakerNN& operator=(const AliTRDpidRefMakerNN&); // not implemented
94 TEventList *fTrain[AliTRDCalPID::kNMom][AliTRDgeometry::kNlayer]; // Training list for each momentum
95 TEventList *fTest[AliTRDCalPID::kNMom][AliTRDgeometry::kNlayer]; // Test list for each momentum
96 TMultiLayerPerceptron *fNet[AliTRDgeometry::kNlayer]; // artificial neural network
98 Int_t fTrainMomBin; // momentum bin for the training
99 Int_t fEpochs; // Number of epochs for the training of the NNs
100 Int_t fMinTrain; // minimum of events needed for training
101 Int_t fDate; // date stamp for training of the NNs
102 Bool_t fDoTraining; // checks if training will be done
103 Bool_t fContinueTraining; // checks if training from an older run should be continued
104 Int_t fTrainPath; // sets the path for continuing the training
108 ClassDef(AliTRDpidRefMakerNN, 2); // TRD reference maker for NN