Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:11

0001 // @(#)root/tmva $Id$
0002 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss
0003 
0004 /**********************************************************************************
0005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
0006  * Package: TMVA                                                                  *
0007  * Class  : VariableRearrangeTransform                                            *
0008  *                                             *
0009  *                                                                                *
0010  * Description:                                                                   *
0011  *      rearrangement of input variables                                          *
0012  *                                                                                *
0013  * Authors (alphabetical):                                                        *
0014  *      Peter Speckmayer <Peter.Speckmayer@cern.ch> - CERN, Switzerland           *
0015  *                                                                                *
0016  * Copyright (c) 2005:                                                            *
0017  *      CERN, Switzerland                                                         *
0018  *      U. of Victoria, Canada                                                    *
0019  *      MPI-K Heidelberg, Germany                                                 *
0020  *                                                                                *
0021  * Redistribution and use in source and binary forms, with or without             *
0022  * modification, are permitted according to the terms listed in LICENSE           *
0023  * (see tmva/doc/LICENSE)                                          *
0024  **********************************************************************************/
0025 
0026 #ifndef ROOT_TMVA_VariableRearrangeTransform
0027 #define ROOT_TMVA_VariableRearrangeTransform
0028 
0029 //////////////////////////////////////////////////////////////////////////
0030 //                                                                      //
0031 // VariableRearrangeTransform                                           //
0032 //                                                                      //
0033 // rearrangement of input variables                                     //
0034 //                                                                      //
0035 //////////////////////////////////////////////////////////////////////////
0036 
0037 #include "TMVA/VariableTransformBase.h"
0038 
0039 #include <vector>
0040 
0041 namespace TMVA {
0042 
0043    class VariableRearrangeTransform : public VariableTransformBase {
0044 
0045    public:
0046 
0047       typedef std::vector<Float_t>       FloatVector;
0048 
0049       VariableRearrangeTransform( DataSetInfo& dsi );
0050       virtual ~VariableRearrangeTransform( void );
0051 
0052       void   Initialize();
0053       Bool_t PrepareTransformation (const std::vector<Event*>&);
0054 
0055       virtual const Event* Transform(const Event* const, Int_t cls ) const;
0056       virtual const Event* InverseTransform( const Event* const, Int_t cls ) const;
0057 
0058       void WriteTransformationToStream ( std::ostream& ) const {}
0059       void ReadTransformationFromStream( std::istream&, const TString& ) { SetCreated(); }
0060 
0061       virtual void AttachXMLTo(void* parent);
0062       virtual void ReadFromXML( void* trfnode );
0063 
0064       virtual void PrintTransformation( std::ostream & o );
0065 
0066       // writer of function code
0067       virtual void MakeFunction( std::ostream& fout, const TString& fncName, Int_t part, UInt_t trCounter, Int_t cls );
0068 
0069       // provides string vector giving explicit transformation
0070       std::vector<TString>* GetTransformationStrings( Int_t cls ) const;
0071 
0072    private:
0073 
0074       ClassDef(VariableRearrangeTransform,0); // Variable transformation: normalization
0075    };
0076 
0077 } // namespace TMVA
0078 
0079 #endif