ROOT » TMVA » TMVA::Tools

class TMVA::Tools

Function Members (Methods)

public:
~Tools()
voidAddAttr(void* node, const char* attrname, const char* value)
voidAddAttr<const char *>(void* node, const char* attrname, const char*const& value, Int_t precision = 16)
void*AddChild(void* parent, const char* childname, const char* content = 0, bool isRootNode = false)
Bool_tAddComment(void* node, const char* comment)
Bool_tAddRawLine(void* node, const char* raw)
vector<TMatrixDSym*>*CalcCovarianceMatrices(const vector<TMVA::Event*>& events, Int_t maxCls, TMVA::VariableTransformBase* transformBase = 0)
vector<TMatrixDSym*>*CalcCovarianceMatrices(const vector<const TMVA::Event*>& events, Int_t maxCls, TMVA::VariableTransformBase* transformBase = 0)
Bool_tCheckForSilentOption(const TString&) const
Bool_tCheckForVerboseOption(const TString&) const
Bool_tCheckSplines(const TH1*, const TSpline*)
const TString&Color(const TString&)
voidComputeStat(const vector<TMVA::Event*>&, vector<Float_t>*, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Int_t signalClass, Bool_t norm = kFALSE)
Double_tComputeVariance(Double_t sumx2, Double_t sumx, Int_t nx)
Bool_tContainsRegularExpression(const TString& s)
static voidDestroyInstance()
voidFormattedOutput(const TMatrixD&, const vector<TString>&, TMVA::MsgLogger& logger)
voidFormattedOutput(const TMatrixD&, const vector<TString>& vert, const vector<TString>& horiz, TMVA::MsgLogger& logger)
voidFormattedOutput(const vector<Double_t>&, const vector<TString>&, const TString titleVars, const TString titleValues, TMVA::MsgLogger& logger, TString format = "%+1.3f")
void*GetChild(void* parent, const char* childname = 0)
const char*GetContent(void* node)
const TMatrixD*GetCorrelationMatrix(const TMatrixD* covMat)
Double_tGetCorrelationRatio(const TH2F&)
TH1*GetCumulativeDist(TH1* h)
Int_tGetIndexMaxElement(vector<Double_t>&)
Int_tGetIndexMinElement(vector<Double_t>&)
Double_tGetMutualInformation(const TH2F&)
const char*GetName(void* node)
void*GetNextChild(void* prevchild, const char* childname = 0)
void*GetParent(void* child)
Double_tGetSeparation(TH1* S, TH1* B) const
Double_tGetSeparation(const TMVA::PDF& pdfS, const TMVA::PDF& pdfB) const
TMatrixD*GetSQRootMatrix(TMatrixDSym* symMat)
TStringGetXTitleWithUnit(const TString& title, const TString& unit)
TStringGetYTitleWithUnit(const TH1& h, const TString& unit, Bool_t normalised)
Bool_tHasAttr(void* node, const char* attrname)
Bool_tHistoHasEquidistantBins(const TH1& h)
static TMVA::Tools&Instance()
TMVA::MsgLogger&Log() const
vector<Double_t>MVADiff(vector<Double_t>&, vector<Double_t>&)
Double_tNormHist(TH1* theHist, Double_t norm = 1.)
Double_tNormVariable(Double_t x, Double_t xmin, Double_t xmax)
TMVA::Tools&operator=(const TMVA::Tools&)
vector<Int_t>*ParseANNOptionString(TString theOptions, Int_t nvar, vector<Int_t>* nodes)
TList*ParseFormatLine(TString theString, const char* sep = ":")
TH1*projNormTH1F(TTree* theTree, const TString& theVarName, const TString& name, Int_t nbins, Double_t xmin, Double_t xmax, const TString& cut)
voidReadAttr(void* node, const char* attrname, TString& value)
voidReadAttr<TString>(void* node, const char* attrname, TString& value)
voidReadFloatArbitraryPrecision(Float_t& val, istream& is)
voidReadTMatrixDFromXML(void* node, const char* name, TMatrixD* mat)
voidReadTVectorDFromXML(void* node, const char* name, TVectorD* vec)
TStringReplaceRegularExpressions(const TString& s, const TString& replace = "+")
voidROOTVersionMessage(TMVA::MsgLogger& logger)
voidScale(vector<Double_t>&, Double_t)
voidScale(vector<Float_t>&, Float_t)
vector<TString>SplitString(const TString& theOpt, const char separator) const
TStringStringFromDouble(Double_t d)
TStringStringFromInt(Long_t i)
voidTMVACitation(TMVA::MsgLogger& logger, TMVA::Tools::ECitation citType = kPlainText)
voidTMVAVersionMessage(TMVA::MsgLogger& logger)
voidTMVAWelcomeMessage()
voidTMVAWelcomeMessage(TMVA::MsgLogger& logger, TMVA::Tools::EWelcomeMessage m = kStandardWelcomeMsg)
TMVA::ToolsTools(const TMVA::Tools&)
TH2F*TransposeHist(const TH2F&)
voidUsefulSortAscending(vector<Double_t>&)
voidUsefulSortAscending(vector<vector<Double_t> >&, vector<TString>* vs = 0)
voidUsefulSortDescending(vector<Double_t>&)
voidUsefulSortDescending(vector<vector<Double_t> >&, vector<TString>* vs = 0)
voidWriteFloatArbitraryPrecision(Float_t val, ostream& os)
voidWriteTMatrixDToXML(void* node, const char* name, TMatrixD* mat)
voidWriteTVectorDToXML(void* node, const char* name, TVectorD* vec)
TXMLEngine&xmlengine()
intxmlenginebuffersize()
private:
Double_tGetYMean_binX(const TH2&, Int_t bin_x)
TMVA::ToolsTools()

Data Members

public:
TMVA::MsgLogger*fLogger
const TStringfRegexp
TXMLEngine*fXMLEngine
static atomic<TMVA::Tools*>fgTools
static TMVA::Tools::ECitationkBibTeX
static TMVA::Tools::EWelcomeMessagekBlockWelcomeMsg
static TMVA::Tools::ECitationkHtmlLink
static TMVA::Tools::EWelcomeMessagekIsometricWelcomeMsg
static TMVA::Tools::ECitationkLaTeX
static TMVA::Tools::EWelcomeMessagekLeanWelcomeMsg
static TMVA::Tools::EWelcomeMessagekLogoWelcomeMsg
static TMVA::Tools::EWelcomeMessagekOriginalWelcomeMsgBW
static TMVA::Tools::EWelcomeMessagekOriginalWelcomeMsgColor
static TMVA::Tools::ECitationkPlainText
static TMVA::Tools::EWelcomeMessagekSmall1WelcomeMsg
static TMVA::Tools::EWelcomeMessagekSmall2WelcomeMsg
static TMVA::Tools::EWelcomeMessagekStandardWelcomeMsg

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TMVA::Tools& Instance()
void DestroyInstance()
NOTE: there is no thread safe way to do this so
 one must only call this method ones in an executable
Tools()
 constructor
~Tools()
 destructor
Double_t NormVariable(Double_t x, Double_t xmin, Double_t xmax)
 normalise to output range: [-1, 1]
Double_t GetSeparation(TH1* S, TH1* B) const
 compute "separation" defined as
 <s2> = (1/2) Int_-oo..+oo { (S(x) - B(x))^2/(S(x) + B(x)) dx }
Double_t GetSeparation(const TMVA::PDF& pdfS, const TMVA::PDF& pdfB) const
 compute "separation" defined as
 <s2> = (1/2) Int_-oo..+oo { (S(x) - B(x))2/(S(x) + B(x)) dx }
void ComputeStat(const vector<TMVA::Event*>& , vector<Float_t>* , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& , Int_t signalClass, Bool_t norm = kFALSE)
 sanity check
TMatrixD* GetSQRootMatrix(TMatrixDSym* symMat)
 square-root of symmetric matrix
 of course the resulting sqrtMat is also symmetric, but it's easier to
 treat it as a general matrix
const TMatrixD* GetCorrelationMatrix(const TMatrixD* covMat)
 turns covariance into correlation matrix
TH1* projNormTH1F(TTree* theTree, const TString& theVarName, const TString& name, Int_t nbins, Double_t xmin, Double_t xmax, const TString& cut)
 projects variable from tree into normalised histogram
Double_t NormHist(TH1* theHist, Double_t norm = 1.)
 normalises histogram
TList* ParseFormatLine(TString theString, const char* sep = ":")
 Parse the string and cut into labels separated by ":"
vector<Int_t>* ParseANNOptionString(TString theOptions, Int_t nvar, vector<Int_t>* nodes)
 parse option string for ANN methods
 default settings (should be defined in theOption string)
Bool_t CheckSplines(const TH1* , const TSpline* )
 check quality of splining by comparing splines and histograms in each bin
std::vector<Double_t> MVADiff(vector<Double_t>& , vector<Double_t>& )
 computes difference between two vectors
void Scale(vector<Double_t>& , Double_t )
 scales double vector
void Scale(vector<Float_t>& , Float_t )
 scales float vector
void UsefulSortAscending(vector<vector<Double_t> >& , vector<TString>* vs = 0)
 sort 2D vector (AND in parallel a TString vector) in such a way
 that the "first vector is sorted" and the other vectors are reshuffled
 in the same way as necessary to have the first vector sorted.
 I.e. the correlation between the elements is kept.
void UsefulSortDescending(vector<vector<Double_t> >& , vector<TString>* vs = 0)
 sort 2D vector (AND in parallel a TString vector) in such a way
 that the "first vector is sorted" and the other vectors are reshuffled
 in the same way as necessary to have the first vector sorted.
 I.e. the correlation between the elements is kept.
Double_t GetMutualInformation(const TH2F& )
 Mutual Information method for non-linear correlations estimates in 2D histogram
 Author: Moritz Backes, Geneva (2009)
Double_t GetCorrelationRatio(const TH2F& )
 Compute Correlation Ratio of 2D histogram to estimate functional dependency between two variables
 Author: Moritz Backes, Geneva (2009)
Double_t GetYMean_binX(const TH2& , Int_t bin_x)
 Compute the mean in Y for a given bin X of a 2D histogram
TH2F* TransposeHist(const TH2F& )
 Transpose quadratic histogram
Bool_t CheckForSilentOption(const TString& ) const
 check for "silence" option in configuration option string
Bool_t CheckForVerboseOption(const TString& ) const
 check if verbosity "V" set in option
void UsefulSortDescending(vector<Double_t>& )
 sort vector
void UsefulSortAscending(vector<Double_t>& )
 sort vector
Int_t GetIndexMaxElement(vector<Double_t>& )
 find index of maximum entry in vector
Int_t GetIndexMinElement(vector<Double_t>& )
 find index of minimum entry in vector
Bool_t ContainsRegularExpression(const TString& s)
 check if regular expression
 helper function to search for "$!%^&()'<>?= " in a string
TString ReplaceRegularExpressions(const TString& s, const TString& replace = "+")
 replace regular expressions
 helper function to remove all occurences "$!%^&()'<>?= " from a string
 and replace all ::,$,*,/,+,- with _M_,_S_,_T_,_D_,_P_,_M_ respectively
const TString& Color(const TString& )
 human readable color strings
void FormattedOutput(const vector<Double_t>& , const vector<TString>& , const TString titleVars, const TString titleValues, TMVA::MsgLogger& logger, TString format = "%+1.3f")
 formatted output of simple table
void FormattedOutput(const TMatrixD& , const vector<TString>& , TMVA::MsgLogger& logger)
 formatted output of matrix (with labels)
void FormattedOutput(const TMatrixD& , const vector<TString>& vert, const vector<TString>& horiz, TMVA::MsgLogger& logger)
 formatted output of matrix (with labels)
TString GetXTitleWithUnit(const TString& title, const TString& unit)
 histogramming utility
TString GetYTitleWithUnit(const TH1& h, const TString& unit, Bool_t normalised)
 histogramming utility
void WriteFloatArbitraryPrecision(Float_t val, ostream& os)
 writes a float value with the available precision to a stream
void ReadFloatArbitraryPrecision(Float_t& val, istream& is)
 reads a float value with the available precision from a stream
Bool_t HasAttr(void* node, const char* attrname)
 add attribute from xml
void ReadAttr(void* node, const char* attrname, TString& value)
 add attribute from xml
void AddAttr(void* node, const char* attrname, const char* value)
 add attribute to node
void* AddChild(void* parent, const char* childname, const char* content = 0, bool isRootNode = false)
 add child node
Bool_t AddComment(void* node, const char* comment)
void* GetParent(void* child)
 get parent node
void* GetChild(void* parent, const char* childname = 0)
 get child node
void* GetNextChild(void* prevchild, const char* childname = 0)
 XML helpers
const char* GetContent(void* node)
 XML helpers
const char* GetName(void* node)
 XML helpers
Bool_t AddRawLine(void* node, const char* raw)
 XML helpers
std::vector<TString> SplitString(const TString& theOpt, const char separator) const
 splits the option string at 'separator' and fills the list
 'splitV' with the primitive strings
TString StringFromInt(Long_t i)
 string tools
TString StringFromDouble(Double_t d)
 string tools
void WriteTMatrixDToXML(void* node, const char* name, TMatrixD* mat)
 XML helpers
void WriteTVectorDToXML(void* node, const char* name, TVectorD* vec)
void ReadTVectorDFromXML(void* node, const char* name, TVectorD* vec)
void ReadTMatrixDFromXML(void* node, const char* name, TMatrixD* mat)
void TMVAWelcomeMessage()
 direct output, eg, when starting ROOT session -> no use of Logger here
void TMVAVersionMessage(TMVA::MsgLogger& logger)
 prints the TMVA release number and date
void ROOTVersionMessage(TMVA::MsgLogger& logger)
 prints the ROOT release number and date
void TMVAWelcomeMessage(TMVA::MsgLogger& logger, TMVA::Tools::EWelcomeMessage m = kStandardWelcomeMsg)
 various kinds of welcome messages
 ASCII text generated by this site: http://www.network-science.de/ascii
void TMVACitation(TMVA::MsgLogger& logger, TMVA::Tools::ECitation citType = kPlainText)
 kinds of TMVA citation
Bool_t HistoHasEquidistantBins(const TH1& h)
CalcCovarianceMatrices( const std::vector<const Event*>& events, Int_t maxCls, VariableTransformBase* transformBase )
CalcCovarianceMatrices( const std::vector<Event*>& events, Int_t maxCls, VariableTransformBase* transformBase )
 compute covariance matrices
TH1* GetCumulativeDist(TH1* h)
 get the cumulative distribution of a histogram
Double_t ComputeVariance(Double_t sumx2, Double_t sumx, Int_t nx)
Tools()
TXMLEngine& xmlengine()
{ return *fXMLEngine; }
int xmlenginebuffersize()
{ return 10000000; }