// ------------------------------------------------------------------------- // ----- CbmTrdSetTracksPidANN header file ----- // ----- Created 06/03/2007 by Simeon Lebedev ----- // ------------------------------------------------------------------------- /** CbmTrdSetTracksPidANN ** *@author Simeon Lebedev ** ** Task class for PID calculation in the TRD using an ** artificial neural network (ANN). ** Input: TClonesArray of CbmTrdTrack ** Parameters: The parameters of this method are fixed by ** Simeon Lebedev and stored in the parameters/trd directory. ** There should be no need to change this parameters at all. ** **/ #ifndef CBM_TRD_SET_TRACKS_PID_ANN #define CBM_TRD_SET_TRACKS_PID_ANN 1 #include "CbmTask.h" #include "TString.h" class TMultiLayerPerceptron; class TClonesArray; class CbmTrdSetTracksPidANN : public CbmTask { /** Verbosity level **/ Int_t fVerbose; public: /** Default constructor **/ CbmTrdSetTracksPidANN(); /** Standard constructor ** *@param name Name of class *@param title Task title **/ CbmTrdSetTracksPidANN(const char* name, const char* title = "CbmTask"); /** Destructor **/ virtual ~CbmTrdSetTracksPidANN(); /** Initialisation at beginning of each event **/ virtual InitStatus Init(); /** Task execution **/ virtual void Exec(Option_t* opt); /** Finish at the end of each event **/ virtual void Finish(); /** SetParContainers **/ virtual void SetParContainers(); /** Accessors **/ Int_t GetNofTracks() { return fNofTracks; }; Double_t GetANNPar1() { return ANNPar1; }; Double_t GetANNPar2() { return ANNPar2; }; /** Setters **/ void SetANNPar1(Double_t param) { ANNPar1=param; }; void SetANNPar2(Double_t param) { ANNPar2=param; }; void SetInputFile(TString infile) {NeuralNetWeightsFile = infile;}; private: TClonesArray* fTrackArray; // Input array of TRD tracks TClonesArray* fTrdHitArray; // Input array of TRD Hits Int_t fNofTracks; // Number of tracks successfully fitted Double_t ANNPar1; // Parameter1 for Wkn method Double_t ANNPar2; // Parameter2 for Wkn method TMultiLayerPerceptron* fNN; // Neural Network TString NeuralNetWeightsFile; // name of the input file with the weights // for the neural network Bool_t ReadData(); // Read the weights needed for ANN ClassDef(CbmTrdSetTracksPidANN,1); }; #endif