Warning, file /include/root/TMVA/VariableGaussTransform.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef ROOT_TMVA_VariableGaussTransform
0030 #define ROOT_TMVA_VariableGaussTransform
0031
0032 #include "TMVA/PDF.h"
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 #include <vector>
0043
0044 #include "TH1.h"
0045 #include "TGraph.h"
0046 #include "TSpline.h"
0047 #include "TDirectory.h"
0048 #include "Event.h"
0049
0050 #include "TMVA/VariableTransformBase.h"
0051
0052 namespace TMVA {
0053
0054 class TMVAGaussPair {
0055
0056 public:
0057
0058 TMVAGaussPair( Float_t f, Float_t w ): fF(f), fW(w) {}
0059 Bool_t operator > ( const TMVAGaussPair &p ) const { return fF > p.fF; }
0060 Bool_t operator < ( const TMVAGaussPair &p ) const { return fF < p.fF; }
0061 Bool_t operator == ( const TMVAGaussPair &p ) const { return fF == p.fF; }
0062 Float_t GetValue() const { return fF; }
0063 Float_t GetWeight() const { return fW; }
0064
0065 private:
0066
0067 Float_t fF;
0068 Float_t fW;
0069 };
0070
0071
0072 class VariableGaussTransform : public VariableTransformBase {
0073
0074 public:
0075
0076 VariableGaussTransform( DataSetInfo& dsi, TString strcor="" );
0077 virtual ~VariableGaussTransform( void );
0078
0079 void Initialize() override;
0080 Bool_t PrepareTransformation (const std::vector<Event*>&) override;
0081
0082 const Event* Transform(const Event* const, Int_t cls ) const override;
0083 const Event* InverseTransform(const Event* const, Int_t cls ) const override;
0084
0085 void WriteTransformationToStream ( std::ostream& ) const override;
0086 void ReadTransformationFromStream( std::istream&, const TString& ) override;
0087
0088 void AttachXMLTo(void* parent) override;
0089 void ReadFromXML( void* trfnode ) override;
0090
0091 void PrintTransformation( std::ostream & o ) override;
0092
0093
0094 void MakeFunction( std::ostream& fout, const TString& fncName, Int_t part, UInt_t trCounter, Int_t cls ) override;
0095
0096 private:
0097
0098 Bool_t fFlatNotGauss;
0099 Int_t fPdfMinSmooth;
0100 Int_t fPdfMaxSmooth;
0101
0102
0103 std::vector< std::vector< TH1F* > > fCumulativeDist;
0104
0105
0106 std::vector< std::vector< PDF*> > fCumulativePDF;
0107
0108 void GetCumulativeDist( const std::vector<Event*>& );
0109 void CleanUpCumulativeArrays(TString opt = "ALL");
0110
0111
0112 UInt_t fElementsperbin;
0113 Double_t OldCumulant(Float_t x, TH1* h ) const;
0114
0115 ClassDefOverride(VariableGaussTransform,0);
0116 };
0117
0118 }
0119
0120 #endif