Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AltNeuralNetI.h

Go to the documentation of this file.
00001 
00002 // $Id: AltNeuralNetI.h,v 1.3 2004/11/08 23:22:10 gmieg Exp $
00003 //
00004 // AltNeuralNetI.h
00005 //
00006 //   -- Neural Net Input abstract base class
00007 //   -- This is adapted for AltReco from my Neural Network Foundation Classes
00008 //      (NNFC) package that I use for some of my Neural Net analyses.
00009 //      NNFC is not intended to be part of the minos offline, so I just adapted
00010 //      this single file here.
00011 //
00012 // Costas Andreopoulos <C.V.Andreopoulos@rl.ac.uk>
00013 // CCLRC, Rutherford Appleton Laboratory
00014 // July 01, 2003
00016 
00017 #ifndef _ALT_NEURAL_NET_I_H_
00018 #define _ALT_NEURAL_NET_I_H_
00019 
00020 #include<string>
00021 #include<vector>
00022 #include<map>
00023 
00024 #include <TNamed.h>
00025 
00026 const int kSignal     = 1;
00027 const int kBackground = 0;
00028 
00029 class AltNeuralNetI: public TNamed
00030 {
00031 public:
00032 
00033   AltNeuralNetI();  
00034   AltNeuralNetI(const char * name, const char * title);  
00035   AltNeuralNetI(const AltNeuralNetI & cneti);  
00036  ~AltNeuralNetI();
00037   
00038   void   setInputVar(std::string varName, double varValue);  
00039   double getInputVar(std::string varName);
00040   double getTarget(void) const;
00041     
00042   void   normalizeInputs(std::map<std::string, double> norm_consts);
00043   bool   isWithinLimits(void);
00044 
00045   void   copyInputsToArray(float * inputs);    
00046 
00047   void   raiseSignalFlag(void);
00048   void   raiseBackgroundFlag(void);
00049   bool   isSignal(void) const;
00050   bool   isBackground(void) const;
00051   
00052   void   resetPattern(void);
00053   void   resetPatternValues(void);
00054   
00055   void   printI(const Option_t * opt);
00056 
00057   int    getNumberOfInputs(void) const;
00058 
00059   std::vector<std::string> getInputNames(void);
00060   
00061 protected:
00062 
00063   void initPattern(const std::string * var_names, const int n_vars);
00064 
00065   std::string                    fTitle;
00066   double                         fTarget;
00067   std::map<std::string, double>  fSinglePattern;
00068 
00069 private:
00070   
00071   ClassDef(AltNeuralNetI, 0)
00072 };
00073 
00074 #endif // _ALT_NEURAL_NET_I_H_

Generated on Mon Feb 15 11:06:21 2010 for loon by  doxygen 1.3.9.1