Bits.h   Bits.h 
/* @(#)root/zip:$Id: Bits.h 39887 2011-06-22 14:12:05Z rdm $ */ /* @(#)root/zip:$Id: Bits.h 40084 2011-06-29 16:25:31Z pcanal $ */
/* Author: */ /* Author: */
/* /*
Copyright (C) 1990-1993 Mark Adler, Richard B. Wales, Jean-loup Gailly, Copyright (C) 1990-1993 Mark Adler, Richard B. Wales, Jean-loup Gailly,
Kai Uwe Rommel and Igor Mandrichenko. Kai Uwe Rommel and Igor Mandrichenko.
For conditions of distribution and use, see copyright notice in zlib.h For conditions of distribution and use, see copyright notice in zlib.h
*/ */
/* /*
* Changed for ROOT. Functions names have a R__ prepended to differentiate * Changed for ROOT. Functions names have a R__ prepended to differentiate
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 Chi2FCN.h   Chi2FCN.h 
// @(#)root/mathcore:$Id: Chi2FCN.h 37232 2010-12-03 18:09:43Z moneta $ // @(#)root/mathcore:$Id: Chi2FCN.h 40626 2011-08-18 08:34:03Z moneta $
// Author: L. Moneta Tue Sep 5 09:13:32 2006 // Author: L. Moneta Tue Sep 5 09:13:32 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class Chi2FCN // Header file for class Chi2FCN
skipping to change at line 51 skipping to change at line 51
@defgroup FitMethodFunc Fit Method Classes @defgroup FitMethodFunc Fit Method Classes
Classes describing Fit Method functions Classes describing Fit Method functions
@ingroup Fit @ingroup Fit
*/ */
namespace ROOT { namespace ROOT {
namespace Fit { namespace Fit {
template<class FunType>
struct ModelFunctionTrait {
typedef ::ROOT::Math::IParamMultiFunction ModelFunc;
};
template<>
struct ModelFunctionTrait<ROOT::Math::IMultiGradFunction> {
typedef ::ROOT::Math::IParamMultiGradFunction ModelFunc;
};
//_________________________________________________________________________ __________ //_________________________________________________________________________ __________
/** /**
Chi2FCN class for binnned fits using the least square methods Chi2FCN class for binnned fits using the least square methods
@ingroup FitMethodFunc @ingroup FitMethodFunc
*/ */
template<class FunType> template<class FunType>
class Chi2FCN : public ::ROOT::Math::BasicFitMethodFunction<FunType> { class Chi2FCN : public ::ROOT::Math::BasicFitMethodFunction<FunType> {
public: public:
typedef ::ROOT::Math::BasicFitMethodFunction<FunType> BaseObjFunction; typedef ::ROOT::Math::BasicFitMethodFunction<FunType> BaseObjFunction;
typedef typename BaseObjFunction::BaseFunction BaseFunction; typedef typename BaseObjFunction::BaseFunction BaseFunction;
typedef typename ModelFunctionTrait<FunType>::ModelFunc IModelFunction; //typedef typename ::ROOT::Math::ParamFunctionTrait<FunType>::PFType IM
odelFunction;
typedef ::ROOT::Math::IParamMultiFunction IModelFunction;
typedef typename BaseObjFunction::Type_t Type_t; typedef typename BaseObjFunction::Type_t Type_t;
/** /**
Constructor from data set (binned ) and model function Constructor from data set (binned ) and model function
*/ */
Chi2FCN (const BinData & data, const IModelFunction & func) : Chi2FCN (const BinData & data, const IModelFunction & func) :
BaseObjFunction(func.NPar(), data.Size() ), BaseObjFunction(func.NPar(), data.Size() ),
fData(data), fData(data),
fFunc(func), fFunc(func),
fNEffPoints(0), fNEffPoints(0),
skipping to change at line 128 skipping to change at line 120
// effective points used in the fit (exclude the rejected one) // effective points used in the fit (exclude the rejected one)
virtual unsigned int NFitPoints() const { return fNEffPoints; } virtual unsigned int NFitPoints() const { return fNEffPoints; }
/// i-th chi-square residual /// i-th chi-square residual
virtual double DataElement(const double * x, unsigned int i, double * g) const { virtual double DataElement(const double * x, unsigned int i, double * g) const {
if (i==0) this->UpdateNCalls(); if (i==0) this->UpdateNCalls();
return FitUtil::EvaluateChi2Residual(fFunc, fData, x, i, g); return FitUtil::EvaluateChi2Residual(fFunc, fData, x, i, g);
} }
// need to be virtual to be instantited // need to be virtual to be instantiated
virtual void Gradient(const double *x, double *g) const { virtual void Gradient(const double *x, double *g) const {
// evaluate the chi2 gradient // evaluate the chi2 gradient
FitUtil::EvaluateChi2Gradient(fFunc, fData, x, g, fNEffPoints); FitUtil::EvaluateChi2Gradient(fFunc, fData, x, g, fNEffPoints);
} }
/// get type of fit method function /// get type of fit method function
virtual typename BaseObjFunction::Type_t Type() const { return BaseObjF unction::kLeastSquare; } virtual typename BaseObjFunction::Type_t Type() const { return BaseObjF unction::kLeastSquare; }
/// access to const reference to the data /// access to const reference to the data
virtual const BinData & Data() const { return fData; } virtual const BinData & Data() const { return fData; }
 End of changes. 4 change blocks. 
12 lines changed or deleted 5 lines changed or added


 Factory.h   Factory.h 
// @(#)root/mathcore:$Id: Factory.h 37448 2010-12-09 20:20:56Z moneta $ // @(#)root/tmva $Id: Factory.h 40012 2011-06-27 16:03:11Z stelzer $
// Author: L. Moneta Fri Dec 22 14:43:33 2006 // Author: Andreas Hoecker, Peter Speckmayer, Joerg Stelzer, Helge Voss, Ka
i Voss, Eckhard von Toerne, Jan Therhaag
/********************************************************************** /**************************************************************************
* * ********
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Project: TMVA - a Root-integrated toolkit for multivariate data analysis
* * *
* * * Package: TMVA
**********************************************************************/ *
* Class : Factory
// Header file for class Factory *
* Web : http://tmva.sourceforge.net
#ifndef ROOT_Math_Factory *
#define ROOT_Math_Factory *
*
* Description:
*
* This is the main MVA steering class: it creates (books) all MVA met
hods, *
* and guides them through the training, testing and evaluation phases
. *
*
*
* Authors (alphabetical):
*
* Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland
*
* Joerg Stelzer <stelzer@cern.ch> - DESY, Germany
*
* Peter Speckmayer <peter.speckmayer@cern.ch> - CERN, Switzerland
*
* Jan Therhaag <Jan.Therhaag@cern.ch> - U of Bonn, Germany
*
* Eckhard v. Toerne <evt@uni-bonn.de> - U of Bonn, Germany
*
* Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German
y *
* Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada
*
*
*
* Copyright (c) 2005-2011:
*
* CERN, Switzerland
*
* U. of Victoria, Canada
*
* MPI-K Heidelberg, Germany
*
* U. of Bonn, Germany
*
*
*
* Redistribution and use in source and binary forms, with or without
*
* modification, are permitted according to the terms listed in LICENSE
*
* (http://tmva.sourceforge.net/LICENSE)
*
**************************************************************************
********/
#ifndef ROOT_TMVA_Factory
#define ROOT_TMVA_Factory
//////////////////////////////////////////////////////////////////////////
// //
// Factory //
// //
// This is the main MVA steering class: it creates all MVA methods, //
// and guides them through the training, testing and evaluation //
// phases //
// //
//////////////////////////////////////////////////////////////////////////
#include <string> #include <string>
#include <vector>
#include <map>
#ifndef ROOT_TCut
#include "TCut.h"
#endif
#ifndef ROOT_TMVA_Configurable
#include "TMVA/Configurable.h"
#endif
#ifndef ROOT_TMVA_Types
#include "TMVA/Types.h"
#endif
#ifndef ROOT_TMVA_DataSet
#include "TMVA/DataSet.h"
#endif
class TFile;
class TTree;
class TDirectory;
namespace TMVA {
class IMethod;
class MethodBase;
class DataInputHandler;
class DataSetInfo;
class DataSetManager;
class VariableTransformBase;
class Factory : public Configurable {
public:
typedef std::vector<IMethod*> MVector;
// no default constructor
Factory( TString theJobName, TFile* theTargetFile, TString theOption
= "" );
// default destructor
virtual ~Factory();
virtual const char* GetName() const { return "Factory"; }
// add events to training and testing trees
void AddSignalTrainingEvent ( const std::vector<Double_t>& event,
Double_t weight = 1.0 );
void AddBackgroundTrainingEvent( const std::vector<Double_t>& event,
Double_t weight = 1.0 );
void AddSignalTestEvent ( const std::vector<Double_t>& event,
Double_t weight = 1.0 );
void AddBackgroundTestEvent ( const std::vector<Double_t>& event,
Double_t weight = 1.0 );
void AddTrainingEvent( const TString& className, const std::vector<Do
uble_t>& event, Double_t weight );
void AddTestEvent ( const TString& className, const std::vector<Do
uble_t>& event, Double_t weight );
void AddEvent ( const TString& className, Types::ETreeType tt,
const std::vector<Double_t>& event, Double_t weight );
Bool_t UserAssignEvents(UInt_t clIndex);
TTree* CreateEventAssignTrees( const TString& name );
DataSetInfo& AddDataSet( DataSetInfo& );
DataSetInfo& AddDataSet( const TString& );
// special case: signal/background
// Data input related
void SetInputTrees( const TString& signalFileName, const TString& bac
kgroundFileName,
Double_t signalWeight=1.0, Double_t backgroundWei
ght=1.0 );
void SetInputTrees( TTree* inputTree, const TCut& SigCut, const TCut&
BgCut );
// Set input trees at once
void SetInputTrees( TTree* signal, TTree* background,
Double_t signalWeight=1.0, Double_t backgroundWei
ght=1.0) ;
void AddSignalTree( TTree* signal, Double_t weight=1.0, Types::ETr
eeType treetype = Types::kMaxTreeType );
void AddSignalTree( TString datFileS, Double_t weight=1.0, Types::ETr
eeType treetype = Types::kMaxTreeType );
void AddSignalTree( TTree* signal, Double_t weight, const TString& tr
eetype );
// ... depreciated, kept for backwards compatibility
void SetSignalTree( TTree* signal, Double_t weight=1.0);
void AddBackgroundTree( TTree* background, Double_t weight=1.0, Types
::ETreeType treetype = Types::kMaxTreeType );
void AddBackgroundTree( TString datFileB, Double_t weight=1.0, Types
::ETreeType treetype = Types::kMaxTreeType );
void AddBackgroundTree( TTree* background, Double_t weight, const TSt
ring & treetype );
// ... depreciated, kept for backwards compatibility
void SetBackgroundTree( TTree* background, Double_t weight=1.0 );
void SetSignalWeightExpression( const TString& variable );
void SetBackgroundWeightExpression( const TString& variable );
// special case: regression
void AddRegressionTree( TTree* tree, Double_t weight = 1.0,
Types::ETreeType treetype = Types::kMaxTreeTy
pe ) {
AddTree( tree, "Regression", weight, "", treetype );
}
// general
// Data input related
void SetTree( TTree* tree, const TString& className, Double_t weight
); // depreciated
void AddTree( TTree* tree, const TString& className, Double_t weight=
1.0,
const TCut& cut = "",
Types::ETreeType tt = Types::kMaxTreeType );
void AddTree( TTree* tree, const TString& className, Double_t weight,
const TCut& cut, const TString& treeType );
// set input variable
void SetInputVariables ( std::vector<TString>* theVariables ); // de
preciated
void AddVariable ( const TString& expression, const TString& t
itle, const TString& unit,
char type='F', Double_t min = 0, Double_t m
ax = 0 );
void AddVariable ( const TString& expression, char type='F',
Double_t min = 0, Double_t max = 0 );
void AddTarget ( const TString& expression, const TString& t
itle = "", const TString& unit = "",
Double_t min = 0, Double_t max = 0 );
void AddRegressionTarget( const TString& expression, const TString& t
itle = "", const TString& unit = "",
Double_t min = 0, Double_t max = 0 )
{
AddTarget( expression, title, unit, min, max );
}
void AddSpectator ( const TString& expression, const TString&
title = "", const TString& unit = "",
Double_t min = 0, Double_t max = 0 );
// set weight for class
void SetWeightExpression( const TString& variable, const TString& cla
ssName = "" );
// set cut for class
void SetCut( const TString& cut, const TString& className = "" );
void SetCut( const TCut& cut, const TString& className = "" );
void AddCut( const TString& cut, const TString& className = "" );
void AddCut( const TCut& cut, const TString& className = "" );
// prepare input tree for training
void PrepareTrainingAndTestTree( const TCut& cut, const TString& spli
tOpt );
void PrepareTrainingAndTestTree( TCut sigcut, TCut bkgcut, const TStr
ing& splitOpt );
// ... deprecated, kept for backwards compatibility
void PrepareTrainingAndTestTree( const TCut& cut, Int_t Ntrain, Int_t
Ntest = -1 );
void PrepareTrainingAndTestTree( const TCut& cut, Int_t NsigTrain, In
t_t NbkgTrain, Int_t NsigTest, Int_t NbkgTest,
const TString& otherOpt="SplitMode=R
andom:!V" );
MethodBase* BookMethod( TString theMethodName, TString methodTitle, T
String theOption = "" );
MethodBase* BookMethod( Types::EMVA theMethod, TString methodTitle,
TString theOption = "" );
MethodBase* BookMethod( TMVA::Types::EMVA /*theMethod*/,
TString /*methodTitle*/,
TString /*methodOption*/,
TMVA::Types::EMVA /*theCommittee*/,
TString /*committeeOption = ""*/ ) { return 0
; }
// optimize all booked methods (well, if desired by the method)
void OptimizeAllMethods (TString fomType="ROCIntegral
", TString fitType="FitGA");
void OptimizeAllMethodsForClassification(TString fomType="ROCIntegral
", TString fitType="FitGA") { OptimizeAllMethods(fomType,fitType); }
void OptimizeAllMethodsForRegression (TString fomType="ROCIntegral
", TString fitType="FitGA") { OptimizeAllMethods(fomType,fitType); }
// training for all booked methods
void TrainAllMethods ();
void TrainAllMethodsForClassification( void ) { TrainAllMethods(); }
void TrainAllMethodsForRegression ( void ) { TrainAllMethods(); }
// testing
void TestAllMethods();
// performance evaluation
void EvaluateAllMethods( void );
void EvaluateAllVariables( TString options = "" );
// delete all methods and reset the method vector
void DeleteAllMethods( void );
// accessors
IMethod* GetMethod( const TString& title ) const;
Bool_t Verbose( void ) const { return fVerbose; }
void SetVerbose( Bool_t v=kTRUE );
// make ROOT-independent C++ class for classifier response
// (classifier-specific implementation)
// If no classifier name is given, help messages for all booked
// classifiers are printed
virtual void MakeClass( const TString& methodTitle = "" ) const;
// prints classifier-specific hepl messages, dedicated to
// help with the optimisation and configuration options tuning.
// If no classifier name is given, help messages for all booked
// classifiers are printed
void PrintHelpMessage( const TString& methodTitle = "" ) const;
static TDirectory* RootBaseDir() { return (TDirectory*)fgTargetFile;
}
private:
// the beautiful greeting message
void Greetings();
void WriteDataInformation();
DataInputHandler& DataInput() { return *fDataInputHandler; }
DataSetInfo& DefaultDataSetInfo();
void SetInputTreesFromEventAssignTrees();
private:
// data members
DataSetManager* fDataSetManager; // DSMTEST
static TFile* fgTargetFile; //! ROOT
output file
DataInputHandler* fDataInputHandler;
std::vector<TMVA::VariableTransformBase*> fDefaultTrfs; //! list
of transformations on default DataSet
// cd to local directory
TString fOptions; //! optio
n string given by construction (presently only "V")
TString fTransformations; //! List
of transformations to test
Bool_t fVerbose; //! verbo
se mode
MVector fMethods; //! all M
VA methods
TString fJobName; //! jobna
me, used as extension in weight file names
// flag determining the way training and test data are assigned to Fa
ctory
enum DataAssignType { kUndefined = 0,
kAssignTrees,
kAssignEvents };
DataAssignType fDataAssignType; //! flags
for data assigning
std::vector<TTree*> fTrainAssignTree; //! for e
ach class: tmp tree if user wants to assign the events directly
std::vector<TTree*> fTestAssignTree; //! for e
ach class: tmp tree if user wants to assign the events directly
Int_t fATreeType; // typ
e of event (=classIndex)
Float_t fATreeWeight; // wei
ght of the event
Float_t* fATreeEvent; // eve
nt variables
Types::EAnalysisType fAnalysisType; //! the t
raining type
namespace ROOT { protected:
namespace Math {
class Minimizer;
class DistSampler;
//_________________________________________________________________________
__
/**
Factory class holding static functions to create the interfaces like RO
OT::Math::Minimizer
via the Plugin Manager
*/
class Factory {
public:
/**
static method to create the corrisponding Minimizer given the string
Supported Minimizers types are:
Minuit (TMinuit), Minuit2, GSLMultiMin, GSLMultiFit, GSLSimAn, Linear
, Fumili, Genetic
If no name is given use default values defined in MinimizerOptions
*/
static ROOT::Math::Minimizer * CreateMinimizer(const std::string & minim
izerType = "", const std::string & algoType = "");
/**
static method to create the distribution sampler class given a string
specifying the type
Supported sampler types are:
Unuran, Foam
If no name is given use default values defined in DistSamplerOptions
*/
static ROOT::Math::DistSampler * CreateDistSampler(const std::string & s
amplerType ="");
};
} // end namespace Fit ClassDef(Factory,0) // The factory creates all MVA methods, and perf
orms their training and testing
};
} // end namespace ROOT } // namespace TMVA
#endif /* ROOT_Fit_MinimizerFactory */ #endif
 End of changes. 7 change blocks. 
53 lines changed or deleted 360 lines changed or added


 FitMethodFunction.h   FitMethodFunction.h 
// @(#)root/mathcore:$Id: FitMethodFunction.h 31763 2009-12-10 10:40:21Z mo neta $ // @(#)root/mathcore:$Id: FitMethodFunction.h 40626 2011-08-18 08:34:03Z mo neta $
// Author: L. Moneta Thu Aug 16 15:40:28 2007 // Author: L. Moneta Thu Aug 16 15:40:28 2007
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2007 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2007 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class FitMethodFunction // Header file for class FitMethodFunction
#ifndef ROOT_Math_FitMethodFunction #ifndef ROOT_Math_FitMethodFunction
#define ROOT_Math_FitMethodFunction #define ROOT_Math_FitMethodFunction
#ifndef ROOT_Math_IFunction #ifndef ROOT_Math_IFunction
#include "Math/IFunction.h" #include "Math/IFunction.h"
#endif #endif
// #ifndef ROOT_Math_IParamFunctionfwd
// #include "Math/IParamFunctionfwd.h"
// #endif
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
//_________________________________________________________________________ _____________ //_________________________________________________________________________ _____________
/** /**
FitMethodFunction class FitMethodFunction class
Interface for objective functions (like chi2 and likelihood used in the fit) Interface for objective functions (like chi2 and likelihood used in the fit)
In addition to normal function interface provide interface for calculati ng each In addition to normal function interface provide interface for calculati ng each
data contrinution to the function which is required by some algorithm (l ike Fumili) data contrinution to the function which is required by some algorithm (l ike Fumili)
skipping to change at line 108 skipping to change at line 112
unsigned int fNDim; // function dimension unsigned int fNDim; // function dimension
unsigned int fNPoints; // size of the data unsigned int fNPoints; // size of the data
mutable unsigned int fNCalls; // number of function calls mutable unsigned int fNCalls; // number of function calls
}; };
// define the normal and gradient function // define the normal and gradient function
typedef BasicFitMethodFunction<ROOT::Math::IMultiGenFunction> FitMet hodFunction; typedef BasicFitMethodFunction<ROOT::Math::IMultiGenFunction> FitMet hodFunction;
typedef BasicFitMethodFunction<ROOT::Math::IMultiGradFunction> FitMet hodGradFunction; typedef BasicFitMethodFunction<ROOT::Math::IMultiGradFunction> FitMet hodGradFunction;
// useful template definition to use these interface in
// generic programming
// (comment them out since they are not used anymore)
/*
template<class FunType>
struct ParamFunctionTrait {
typedef IParamMultiFunction PFType;
};
// specialization for the gradient param functions
template<>
struct ParamFunctionTrait<ROOT::Math::IMultiGradFunction> {
typedef IParamMultiGradFunction PFType;
};
*/
} // end namespace Math } // end namespace Math
} // end namespace ROOT } // end namespace ROOT
#endif /* ROOT_Math_FitMethodFunction */ #endif /* ROOT_Math_FitMethodFunction */
 End of changes. 3 change blocks. 
1 lines changed or deleted 21 lines changed or added


 HypoTestInverter.h   HypoTestInverter.h 
// @(#)root/roostats:$Id: HypoTestInverter.h 40052 2011-06-27 21:34:10Z mon eta $ // @(#)root/roostats:$Id: HypoTestInverter.h 40096 2011-07-01 10:08:17Z mon eta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_HypoTestInverter #ifndef ROOSTATS_HypoTestInverter
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 IFunctionfwd.h   IFunctionfwd.h 
// @(#)root/mathcore:$Id: IFunctionfwd.h 20882 2007-11-19 11:31:26Z rdm $ // @(#)root/mathcore:$Id: IFunctionfwd.h 40626 2011-08-18 08:34:03Z moneta $
// Author: L. Moneta Tue Nov 14 14:38:48 2006 // Author: L. Moneta Tue Nov 14 14:38:48 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Defines Forward declaration for template IFunction class and useful type defs // Defines Forward declaration for template IFunction class and useful type defs
#ifndef ROOT_Math_IFunctionfwd #ifndef ROOT_Math_IFunctionfwd
#define ROOT_Math_IFunctionfwd #define ROOT_Math_IFunctionfwd
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
#ifdef OLD
template<class DimensionType> class IBaseFunction;
template<class DimensionType> class IGradientFunction;
/// tag for multi-dimensional functions
struct MultiDim {};
/// tag for one-dimensional functions
struct OneDim {};
typedef IBaseFunction<OneDim> IGenFunction;
typedef IBaseFunction<MultiDim> IMultiGenFunction;
typedef IGradientFunction<OneDim> IGradFunction;
typedef IGradientFunction<MultiDim> IMultiGradFunction;
#endif
class IBaseFunctionOneDim; class IBaseFunctionOneDim;
class IGradientFunctionOneDim; class IGradientFunctionOneDim;
class IBaseFunctionMultiDim; class IBaseFunctionMultiDim;
class IGradientFunctionMultiDim; class IGradientFunctionMultiDim;
typedef IBaseFunctionOneDim IGenFunction; typedef IBaseFunctionOneDim IGenFunction;
typedef IBaseFunctionMultiDim IMultiGenFunction; typedef IBaseFunctionMultiDim IMultiGenFunction;
typedef IGradientFunctionOneDim IGradFunction; typedef IGradientFunctionOneDim IGradFunction;
typedef IGradientFunctionMultiDim IMultiGradFunction; typedef IGradientFunctionMultiDim IMultiGradFunction;
 End of changes. 2 change blocks. 
18 lines changed or deleted 1 lines changed or added


 IParamFunctionfwd.h   IParamFunctionfwd.h 
// @(#)root/mathcore:$Id: IParamFunctionfwd.h 20882 2007-11-19 11:31:26Z rd m $ // @(#)root/mathcore:$Id: IParamFunctionfwd.h 40626 2011-08-18 08:34:03Z mo neta $
// Author: L. Moneta Tue Nov 14 14:38:52 2006 // Author: L. Moneta Tue Nov 14 14:38:52 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Forward declarations for template class IParamFunction class // Forward declarations for template class IParamFunction class
skipping to change at line 24 skipping to change at line 24
#define ROOT_Math_IParamFunctionfwd #define ROOT_Math_IParamFunctionfwd
#ifndef ROOT_Math_IFunctionfwd #ifndef ROOT_Math_IFunctionfwd
#include "Math/IFunctionfwd.h" #include "Math/IFunctionfwd.h"
#endif #endif
namespace ROOT { namespace ROOT {
namespace Math { namespace Math {
#ifdef OLD
template<class DimensionType> class IParametricFunction;
template<class DimensionType> class IParametricGradFunction;
typedef IParametricFunction<OneDim> IParamFunction;
typedef IParametricFunction<MultiDim> IParamMultiFunction;
typedef IParametricGradFunction<OneDim> IParamGradFunction;
typedef IParametricGradFunction<MultiDim> IParamMultiGradFunctio
n;
#endif
class IParametricFunctionOneDim; class IParametricFunctionOneDim;
class IParametricGradFunctionOneDim; class IParametricGradFunctionOneDim;
class IParametricFunctionMultiDim; class IParametricFunctionMultiDim;
class IParametricGradFunctionMultiDim; class IParametricGradFunctionMultiDim;
typedef IParametricFunctionOneDim IParamFunction; typedef IParametricFunctionOneDim IParamFunction;
typedef IParametricFunctionMultiDim IParamMultiFunction; typedef IParametricFunctionMultiDim IParamMultiFunction;
typedef IParametricGradFunctionOneDim IParamGradFunction; typedef IParametricGradFunctionOneDim IParamGradFunction;
typedef IParametricGradFunctionMultiDim IParamMultiGradFunction; typedef IParametricGradFunctionMultiDim IParamMultiGradFunction;
 End of changes. 2 change blocks. 
15 lines changed or deleted 1 lines changed or added


 ProfileLikelihoodTestStat.h   ProfileLikelihoodTestStat.h 
// @(#)root/roostats:$Id: ProfileLikelihoodTestStat.h 40023 2011-06-27 16:5 8:44Z moneta $ // @(#)root/roostats:$Id: ProfileLikelihoodTestStat.h 40567 2011-08-11 16:3 1:47Z moneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
// Additional Contributions: Giovanni Petrucciani
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
#ifndef ROOSTATS_ProfileLikelihoodTestStat #ifndef ROOSTATS_ProfileLikelihoodTestStat
#define ROOSTATS_ProfileLikelihoodTestStat #define ROOSTATS_ProfileLikelihoodTestStat
skipping to change at line 50 skipping to change at line 51
#include "RooStats/SamplingDistribution.h" #include "RooStats/SamplingDistribution.h"
#include "RooStats/TestStatistic.h" #include "RooStats/TestStatistic.h"
#include "RooStats/RooStatsUtils.h" #include "RooStats/RooStatsUtils.h"
#include "RooRealVar.h" #include "RooRealVar.h"
#include "RooProfileLL.h" #include "RooProfileLL.h"
#include "RooNLLVar.h" #include "RooNLLVar.h"
#include "RooMinuit.h" #include "RooMinuit.h"
#include "RooMinimizer.h"
#include "Math/MinimizerOptions.h"
namespace RooStats { namespace RooStats {
class ProfileLikelihoodTestStat : public TestStatistic{ class ProfileLikelihoodTestStat : public TestStatistic{
public: public:
ProfileLikelihoodTestStat() { ProfileLikelihoodTestStat() {
// Proof constructor. Do not use. // Proof constructor. Do not use.
fPdf = 0; fPdf = 0;
fProfile = 0; fProfile = 0;
fNll = 0; fNll = 0;
fCachedBestFitParams = 0; fCachedBestFitParams = 0;
fLastData = 0; fLastData = 0;
fOneSided = false; fOneSided = false;
fReuseNll = false; fReuseNll = false;
fMinimizer=ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_st
r();
fStrategy=ROOT::Math::MinimizerOptions::DefaultStrategy();
fPrintLevel=ROOT::Math::MinimizerOptions::DefaultPrintLevel();
} }
ProfileLikelihoodTestStat(RooAbsPdf& pdf) { ProfileLikelihoodTestStat(RooAbsPdf& pdf) {
fPdf = &pdf; fPdf = &pdf;
fProfile = 0; fProfile = 0;
fNll = 0; fNll = 0;
fCachedBestFitParams = 0; fCachedBestFitParams = 0;
fLastData = 0; fLastData = 0;
fOneSided = false; fOneSided = false;
fReuseNll = false; fReuseNll = false;
fMinimizer=ROOT::Math::MinimizerOptions::DefaultMinimizerType();
fStrategy=ROOT::Math::MinimizerOptions::DefaultStrategy();
fPrintLevel=ROOT::Math::MinimizerOptions::DefaultPrintLevel();
} }
virtual ~ProfileLikelihoodTestStat() { virtual ~ProfileLikelihoodTestStat() {
// delete fRand; // delete fRand;
// delete fTestStatistic; // delete fTestStatistic;
if(fProfile) delete fProfile; if(fProfile) delete fProfile;
if(fNll) delete fNll; if(fNll) delete fNll;
if(fCachedBestFitParams) delete fCachedBestFitParams; if(fCachedBestFitParams) delete fCachedBestFitParams;
} }
void SetOneSided(Bool_t flag=true) {fOneSided = flag;} void SetOneSided(Bool_t flag=true) {fOneSided = flag;}
static void SetAlwaysReuseNLL(Bool_t flag) { fgAlwaysReuseNll = flag ; } static void SetAlwaysReuseNLL(Bool_t flag) { fgAlwaysReuseNll = flag ; }
void SetReuseNLL(Bool_t flag) { fReuseNll = flag ; } void SetReuseNLL(Bool_t flag) { fReuseNll = flag ; }
void SetMinimizer(const char* minimizer){ fMinimizer=minimizer;}
void SetStrategy(Int_t strategy){fStrategy=strategy;}
void SetPrintLevel(Int_t printlevel){fPrintLevel=printlevel;}
// Main interface to evaluate the test statistic on a dataset // Main interface to evaluate the test statistic on a dataset
virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInteres t) { virtual Double_t Evaluate(RooAbsData& data, RooArgSet& paramsOfInteres t) {
if (!&data) { if (!&data) {
cout << "problem with data" << endl; cout << "problem with data" << endl;
return 0 ; return 0 ;
} }
RooRealVar* firstPOI = (RooRealVar*) paramsOfInterest.first(); RooRealVar* firstPOI = (RooRealVar*) paramsOfInterest.first();
double initial_mu_value = firstPOI->getVal(); double initial_mu_value = firstPOI->getVal();
//paramsOfInterest.getRealValue(firstPOI->GetName()); //paramsOfInterest.getRealValue(firstPOI->GetName());
RooFit::MsgLevel msglevel = RooMsgService::instance().globalKillBelo w(); RooFit::MsgLevel msglevel = RooMsgService::instance().globalKillBelo w();
RooMsgService::instance().setGlobalKillBelow(RooFit::FATAL); RooMsgService::instance().setGlobalKillBelow(RooFit::FATAL);
// simple // simple
Bool_t reuse=(fReuseNll || fgAlwaysReuseNll) ; Bool_t reuse=(fReuseNll || fgAlwaysReuseNll) ;
Bool_t created(kFALSE) ; Bool_t created(kFALSE) ;
if (!reuse || fNll==0) { if (!reuse || fNll==0) {
fNll = (RooNLLVar*) fPdf->createNLL(data, RooFit::CloneData(kFALSE) RooArgSet* allParams = fPdf->getParameters(data);
); RooStats::RemoveConstantParameters(allParams);
fProfile = (RooProfileLL*) fNll->createProfile(paramsOfInterest);
// need to call constrain for RooSimultaneous until stripDisconnect
ed problem fixed
fNll = (RooNLLVar*) fPdf->createNLL(data, RooFit::CloneData(kFALSE)
,RooFit::Constrain(*allParams));
// fNll = (RooNLLVar*) fPdf->createNLL(data, RooFit::CloneData
(kFALSE));
// fProfile = (RooProfileLL*) fNll->createProfile(paramsOfInte
rest);
created = kTRUE ; created = kTRUE ;
//cout << "creating profile LL " << fNll << " " << fProfile << " da ta = " << &data << endl ; //cout << "creating profile LL " << fNll << " " << fProfile << " da ta = " << &data << endl ;
} }
if (reuse && !created) { if (reuse && !created) {
//cout << "reusing profile LL " << fNll << " new data = " << &data << endl ; //cout << "reusing profile LL " << fNll << " new data = " << &data << endl ;
fNll->setData(data,kFALSE) ; fNll->setData(data,kFALSE) ;
if (fProfile) delete fProfile ; // if (fProfile) delete fProfile ;
fProfile = (RooProfileLL*) fNll->createProfile(paramsOfInterest) ; // fProfile = (RooProfileLL*) fNll->createProfile(paramsOfInte
rest) ;
//fProfile->clearAbsMin() ; //fProfile->clearAbsMin() ;
} }
// make sure we set the variables attached to this nll // make sure we set the variables attached to this nll
RooArgSet* attachedSet = fNll->getVariables(); RooArgSet* attachedSet = fNll->getVariables();
*attachedSet = paramsOfInterest; *attachedSet = paramsOfInterest;
RooArgSet* origAttachedSet = (RooArgSet*) attachedSet->snapshot();
////////////////////////////////////////////////////////////////////
///
// Main profiling version as of 5.30
// fPdf->setEvalErrorLoggingMode(RooAbsReal::CountErrors); // fPdf->setEvalErrorLoggingMode(RooAbsReal::CountErrors);
// profile->setEvalErrorLoggingMode(RooAbsReal::CountErrors); // profile->setEvalErrorLoggingMode(RooAbsReal::CountErrors);
// ((RooProfileLL*)profile)->nll().setEvalErrorLoggingMode(Roo AbsReal::CountErrors); // ((RooProfileLL*)profile)->nll().setEvalErrorLoggingMode(Roo AbsReal::CountErrors);
// nll->setEvalErrorLoggingMode(RooAbsReal::CountErrors); // nll->setEvalErrorLoggingMode(RooAbsReal::CountErrors);
//cout << "evaluating profile LL" << endl ; //cout << "evaluating profile LL" << endl ;
double ret = fProfile->getVal();
// double ret = fProfile->getVal(); // previous main evaluatio
n
// cout << "profile value = " << ret << endl ; // cout << "profile value = " << ret << endl ;
// cout <<"eval errors pdf = "<<fPdf->numEvalErrors() << endl; // cout <<"eval errors pdf = "<<fPdf->numEvalErrors() << endl;
// cout <<"eval errors profile = "<<profile->numEvalErrors() < < endl; // cout <<"eval errors profile = "<<profile->numEvalErrors() < < endl;
// cout <<"eval errors profile->nll = "<<((RooProfileLL*)profi le)->nll().numEvalErrors() << endl; // cout <<"eval errors profile->nll = "<<((RooProfileLL*)profi le)->nll().numEvalErrors() << endl;
// cout <<"eval errors nll = "<<nll->numEvalErrors() << endl; // cout <<"eval errors nll = "<<nll->numEvalErrors() << endl;
// if(profile->numEvalErrors()>0) // if(profile->numEvalErrors()>0)
// cout <<"eval errors = "<<profile->numEvalErrors() < < endl; // cout <<"eval errors = "<<profile->numEvalErrors() < < endl;
// paramsOfInterest.Print("v"); // paramsOfInterest.Print("v");
// cout << "ret = " << ret << endl; // cout << "ret = " << ret << endl;
////////////////////////////////////////////////////////////////////
///
////////////////////////////////////////////////////////////////////
///
// New profiling based on RooMinimizer (allows for Minuit2)
// based on major speed increases seen by CMS for complex problems
/*
// set the parameters of interest to be fixed for the conditional ML
E
TIterator* it = paramsOfInterest.createIterator();
RooRealVar* tmpPar = NULL, *tmpParA=NULL;
while((tmpPar = (RooRealVar*)it->Next())){
tmpParA = ((RooRealVar*)attachedSet->find(tmpPar->GetName()));
tmpParA->setConstant();
}
// cout <<"using Minimizer: "<< fMinimizer<< " with strategy =
" << fStrategy << endl;
// get the numerator
int statusN;
double condML = GetMinNLL(statusN);
// set the parameters of interest back to floating
it->Reset();
while((tmpPar = (RooRealVar*)it->Next())){
tmpParA = ((RooRealVar*)attachedSet->find(tmpPar->GetName()));
tmpParA->setConstant(false);
}
delete it;
// get the denominator
int statusD;
double uncondML = GetMinNLL(statusD);
*/
// other order
// get the numerator
RooArgSet* snap = (RooArgSet*)paramsOfInterest.snapshot();
// get the denominator
int statusD;
double uncondML = GetMinNLL(statusD);
// cout <<" reestablish snapshot"<<endl;
*attachedSet = *snap;
TIterator* it = paramsOfInterest.createIterator();
RooRealVar* tmpPar = NULL, *tmpParA=NULL;
while((tmpPar = (RooRealVar*)it->Next())){
tmpParA = ((RooRealVar*)attachedSet->find(tmpPar->GetName()));
tmpParA->setConstant();
}
int statusN;
double condML = GetMinNLL(statusN);
*attachedSet = *origAttachedSet;
double ret=condML-uncondML;;
if(fOneSided){ if(fOneSided){
double fit_favored_mu = ((RooProfileLL*) fProfile)->bestFitObs().ge // double fit_favored_mu = ((RooProfileLL*) fProfile)->bestFit
tRealValue(firstPOI->GetName()) ; Obs().getRealValue(firstPOI->GetName()) ;
double fit_favored_mu = attachedSet->getRealValue(firstPOI->GetName
()) ;
if( fit_favored_mu > initial_mu_value) if( fit_favored_mu > initial_mu_value)
// cout <<"fit-favored_mu, initial value" << fit_favored_mu << " " << initial_mu_value<<endl;
ret = 0 ; ret = 0 ;
} }
delete attachedSet; delete attachedSet;
delete origAttachedSet;
delete snap;
delete it;
if (!reuse) { if (!reuse) {
//cout << "deleting ProfileLL " << fNll << " " << fProfile << endl ;
delete fNll; delete fNll;
fNll = 0; fNll = 0;
delete fProfile; // delete fProfile;
fProfile = 0 ; fProfile = 0 ;
} }
RooMsgService::instance().setGlobalKillBelow(msglevel); RooMsgService::instance().setGlobalKillBelow(msglevel);
////////////////////////////////////////////////////// if(statusN!=0 || statusD!=0)
// return here and forget about the following code ret= -1; // indicate failed fit
return ret;
////////////////////////////////////////////////////////// return ret;
// OLD version with some handling for local minima
// (not used right now)
/////////////////////////////////////////////////////////
bool needToRebuild = true; // try to avoid rebuilding if possible
if (fLastData == &data) // simple pointer comparison for now (note
NLL makes COPY of data)
needToRebuild = false;
else fLastData = &data; // keep a copy of pointer to original data
// pointer comparison causing problems. See multiple datasets wit
h same value of pointer
// but actually a new dataset
needToRebuild = true;
// check mem leak in NLL or Profile. Should remove.
// if(fProfile) needToRebuild = false;
if (needToRebuild) {
if (fProfile) delete fProfile;
if (fNll) delete fNll;
/*
RooNLLVar* nll = new RooNLLVar("nll","",*fPdf,data, RooFit::Ex
tended());
fNll = nll;
fProfile = new RooProfileLL("pll","",*nll, paramsOfInterest);
*/
RooArgSet* constrainedParams = fPdf->getParameters(data);
RemoveConstantParameters(constrainedParams);
//cout << "cons: " << endl;
//constrainedParams->Print("v");
RooNLLVar * nll2 = (RooNLLVar*) fPdf->createNLL(
data, RooFit::CloneData(kFALSE), RooFit::Constrain(*constrai
nedParams)
);
fNll = nll2;
fProfile = (RooProfileLL*) nll2->createProfile(paramsOfInterest
);
delete constrainedParams;
// paramsOfInterest.Print("v");
// set parameters to previous best fit params, to speed converg
ence
// and to avoid local minima
if (fCachedBestFitParams) {
// store original values, since minimization will change the
m.
RooArgSet* origParamVals = (RooArgSet*) paramsOfInterest.sna
pshot();
// these parameters are not guaranteed to be the best for th
is data
SetParameters(fCachedBestFitParams, fProfile->getParameters(
data));
// now evaluate to force this profile to evaluate and store
// best fit parameters for this data
fProfile->getVal();
// possibly store last MLE for reference
// Double mle = fNll->getVal();
// restore parameters
SetParameters(origParamVals, &paramsOfInterest);
// cleanup
delete origParamVals;
} else {
// store best fit parameters
// RooProfileLL::bestFitParams returns best fit of nuisance
parameters only
// fCachedBestFitParams = (RooArgSet*) (fProfile->be
stFitParams().clone("lastBestFit"));
// ProfileLL::getParameters returns current value of the par
ameters
// fCachedBestFitParams = (RooArgSet*) (fProfile->ge
tParameters(data)->clone("lastBestFit"));
//cout << "making fCachedBestFitParams: " << fCachedBestFitP
arams << fCachedBestFitParams->getSize() << endl;
// store original values, since minimization will change the
m.
RooArgSet* origParamVals = (RooArgSet*) paramsOfInterest.sna
pshot();
// find minimum
RooMinuit minuit(*fNll);
minuit.setPrintLevel(-999);
minuit.setNoWarn();
minuit.migrad();
// store the best fit values for future use
fCachedBestFitParams = (RooArgSet*) (fNll->getParameters(dat
a)->snapshot());
// restore parameters
SetParameters(origParamVals, &paramsOfInterest);
// evaluate to force this profile to evaluate and store
// best fit parameters for this data
fProfile->getVal();
// cleanup
delete origParamVals;
}
}
// issue warning if problems
if (!fProfile) {
cout << "problem making profile" << endl;
}
// set parameters to point being requested
SetParameters(&paramsOfInterest, fProfile->getParameters(data));
Double_t value = fProfile->getVal();
/*
// for debugging caching
cout << "current value of input params: " << endl;
paramsOfInterest.Print("verbose");
cout << "current value of params in profile: " << endl;
fProfile->getParameters(data)->Print("verbose");
cout << "cached last best fit: " << endl;
fCachedBestFitParams->Print("verbose");
*/
// catch false minimum
if (value < 0) {
// cout << "ProfileLikelihoodTestStat: problem that profileLL
= " << value
// << " < 0, indicates false min. Try again."<<endl;
delete fNll;
delete fProfile;
/*
RooNLLVar* nll = new RooNLLVar("nll","",*fPdf,data, RooFit::Ex
tended());
fNll = nll;
fProfile = new RooProfileLL("pll","",*nll, paramsOfInterest);
*/
RooArgSet* constrainedParams = fPdf->getParameters(data);
RemoveConstantParameters(constrainedParams);
RooNLLVar * nll2 = (RooNLLVar*) fPdf->createNLL(data, RooFit::C
loneData(kFALSE), RooFit::Constrain(
*constrainedParams));
fNll = nll2;
fProfile = (RooProfileLL*) nll2->createProfile(paramsOfInterest
);
delete constrainedParams;
// set parameters to point being requested
SetParameters(&paramsOfInterest, fProfile->getParameters(data))
;
value = fProfile->getVal();
//cout << "now profileLL = " << value << endl;
}
// cout << "now profileLL = " << value << endl;
RooMsgService::instance().setGlobalKillBelow(RooFit::DEBUG);
return value;
} }
virtual const TString GetVarName() const {return "Profile Likelihood Ratio";} virtual const TString GetVarName() const {return "Profile Likelihood Ratio";}
// const bool PValueIsRightTail(void) { return false; } // overw rites default // const bool PValueIsRightTail(void) { return false; } // overw rites default
private:
double GetMinNLL(int& status) {
RooMinimizer minim(*fNll);
minim.setStrategy(fStrategy);
//LM: RooMinimizer.setPrintLevel has +1 offset - so subtruct here
-1
minim.setPrintLevel(fPrintLevel-1);
// minim.optimizeConst(true);
for (int tries = 0, maxtries = 4; tries <= maxtries; ++tries) {
// status = minim.minimize(fMinimizer, ROOT::Math::MinimizerOp
tions::DefaultMinimizerAlgo().c_str());
status = minim.minimize(fMinimizer, "Minimize");
if (status == 0) {
break;
} else {
if (tries > 1) {
printf(" ----> Doing a re-scan first\n");
minim.minimize(fMinimizer,"Scan");
}
if (tries > 2) {
printf(" ----> trying with strategy = 1\n");
minim.setStrategy(1);
}
}
}
// cout <<"fNll = " << fNll->getVal()<<endl;
return fNll->getVal();
}
private: private:
RooProfileLL* fProfile; //! RooProfileLL* fProfile; //!
RooAbsPdf* fPdf; RooAbsPdf* fPdf;
RooNLLVar* fNll; //! RooNLLVar* fNll; //!
const RooArgSet* fCachedBestFitParams; const RooArgSet* fCachedBestFitParams;
RooAbsData* fLastData; RooAbsData* fLastData;
// Double_t fLastMLE; // Double_t fLastMLE;
Bool_t fOneSided; Bool_t fOneSided;
static Bool_t fgAlwaysReuseNll ; static Bool_t fgAlwaysReuseNll ;
Bool_t fReuseNll ; Bool_t fReuseNll ;
TString fMinimizer;
Int_t fStrategy;
Int_t fPrintLevel;
protected: protected:
ClassDef(ProfileLikelihoodTestStat,4) // implements the profile lik elihood ratio as a test statistic to be used with several tools ClassDef(ProfileLikelihoodTestStat,5) // implements the profile lik elihood ratio as a test statistic to be used with several tools
}; };
} }
#endif #endif
 End of changes. 23 change blocks. 
188 lines changed or deleted 145 lines changed or added


 RVersion.h   RVersion.h 
skipping to change at line 17 skipping to change at line 17
* These macros can be used in the following way: * These macros can be used in the following way:
* *
* #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4) * #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4)
* #include <newheader.h> * #include <newheader.h>
* #else * #else
* #include <oldheader.h> * #include <oldheader.h>
* #endif * #endif
* *
*/ */
#define ROOT_RELEASE "5.30/00" #define ROOT_RELEASE "5.30/01"
#define ROOT_RELEASE_DATE "Jun 27 2011" #define ROOT_RELEASE_DATE "Aug 8 2011"
#define ROOT_RELEASE_TIME "15:00:08" #define ROOT_RELEASE_TIME "12:34:39"
#define ROOT_SVN_REVISION 39979 #define ROOT_SVN_REVISION 40484
#define ROOT_SVN_BRANCH "branches/v5-30-00-patches" #define ROOT_SVN_BRANCH "branches/v5-30-00-patches"
#define ROOT_VERSION_CODE 335360 #define ROOT_VERSION_CODE 335361
#define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define ROOT_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif #endif
 End of changes. 2 change blocks. 
5 lines changed or deleted 5 lines changed or added


 RooAbsPdf.h   RooAbsPdf.h 
skipping to change at line 231 skipping to change at line 231
return expectedEvents(&nset) ; return expectedEvents(&nset) ;
} }
// Printing interface (human readable) // Printing interface (human readable)
virtual void printValue(ostream& os) const ; virtual void printValue(ostream& os) const ;
virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k FALSE, TString indent="") const ; virtual void printMultiline(ostream& os, Int_t contents, Bool_t verbose=k FALSE, TString indent="") const ;
static void verboseEval(Int_t stat) ; static void verboseEval(Int_t stat) ;
static int verboseEval() ; static int verboseEval() ;
virtual Double_t extendedTerm(UInt_t observedEvents, const RooArgSet* nse t=0) const ; virtual Double_t extendedTerm(Double_t observedEvents, const RooArgSet* n set=0) const ;
static void clearEvalError() ; static void clearEvalError() ;
static Bool_t evalError() ; static Bool_t evalError() ;
void setNormRange(const char* rangeName) ; void setNormRange(const char* rangeName) ;
const char* normRange() const { const char* normRange() const {
return _normRange.Length()>0 ? _normRange.Data() : 0 ; return _normRange.Length()>0 ? _normRange.Data() : 0 ;
} }
void setNormRangeOverride(const char* rangeName) ; void setNormRangeOverride(const char* rangeName) ;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 RooMinuit.h   RooMinuit.h 
skipping to change at line 70 skipping to change at line 70
RooPlot* contour(RooRealVar& var1, RooRealVar& var2, RooPlot* contour(RooRealVar& var1, RooRealVar& var2,
Double_t n1=1, Double_t n2=2, Double_t n3=0, Double_t n1=1, Double_t n2=2, Double_t n3=0,
Double_t n4=0, Double_t n5=0, Double_t n6=0) ; Double_t n4=0, Double_t n5=0, Double_t n6=0) ;
Int_t setPrintLevel(Int_t newLevel) ; Int_t setPrintLevel(Int_t newLevel) ;
void setNoWarn() ; void setNoWarn() ;
Int_t setWarnLevel(Int_t newLevel) ; Int_t setWarnLevel(Int_t newLevel) ;
void setPrintEvalErrors(Int_t numEvalErrors) { _printEvalErrors = numEval Errors ; } void setPrintEvalErrors(Int_t numEvalErrors) { _printEvalErrors = numEval Errors ; }
void setVerbose(Bool_t flag=kTRUE) { _verbose = flag ; } void setVerbose(Bool_t flag=kTRUE) { _verbose = flag ; }
void setProfile(Bool_t flag=kTRUE) { _profile = flag ; } void setProfile(Bool_t flag=kTRUE) { _profile = flag ; }
void setMaxEvalMultiplier(Int_t n) { _maxEvalMult = n ; }
Bool_t setLogFile(const char* logfile=0) ; Bool_t setLogFile(const char* logfile=0) ;
static void cleanup() ; static void cleanup() ;
Int_t evalCounter() const { return _evalCounter ; } Int_t evalCounter() const { return _evalCounter ; }
void zeroEvalCount() { _evalCounter = 0 ; } void zeroEvalCount() { _evalCounter = 0 ; }
protected: protected:
friend class RooAbsPdf ; friend class RooAbsPdf ;
skipping to change at line 114 skipping to change at line 115
Int_t _printLevel ; Int_t _printLevel ;
Int_t _warnLevel ; Int_t _warnLevel ;
Int_t _status ; Int_t _status ;
Bool_t _optConst ; Bool_t _optConst ;
Bool_t _profile ; Bool_t _profile ;
Bool_t _handleLocalErrors ; Bool_t _handleLocalErrors ;
Int_t _numBadNLL ; Int_t _numBadNLL ;
Int_t _nPar ; Int_t _nPar ;
Int_t _printEvalErrors ; Int_t _printEvalErrors ;
Bool_t _doEvalErrorWall ; Bool_t _doEvalErrorWall ;
Int_t _maxEvalMult ;
RooArgList* _floatParamList ; RooArgList* _floatParamList ;
RooArgList* _initFloatParamList ; RooArgList* _initFloatParamList ;
RooArgList* _constParamList ; RooArgList* _constParamList ;
RooArgList* _initConstParamList ; RooArgList* _initConstParamList ;
RooAbsReal* _func ; RooAbsReal* _func ;
Double_t _maxFCN ; Double_t _maxFCN ;
ofstream* _logfile ; ofstream* _logfile ;
Bool_t _verbose ; Bool_t _verbose ;
TStopwatch _timer ; TStopwatch _timer ;
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 TMinuitMinimizer.h   TMinuitMinimizer.h 
// @(#)root/minuit:$Id: TMinuitMinimizer.h 39420 2011-05-26 15:00:28Z monet a $ // @(#)root/minuit:$Id: TMinuitMinimizer.h 40566 2011-08-11 16:30:49Z monet a $
// Author: L. Moneta Wed Oct 25 16:28:55 2006 // Author: L. Moneta Wed Oct 25 16:28:55 2006
/********************************************************************** /**********************************************************************
* * * *
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
* * * *
* * * *
**********************************************************************/ **********************************************************************/
// Header file for class TMinuitMinimizer // Header file for class TMinuitMinimizer
skipping to change at line 206 skipping to change at line 206
virtual std::string VariableName(unsigned int ivar) const; virtual std::string VariableName(unsigned int ivar) const;
/// get index of variable given a variable given a name /// get index of variable given a variable given a name
/// return always -1 . (It is Not implemented) /// return always -1 . (It is Not implemented)
virtual int VariableIndex(const std::string & name) const; virtual int VariableIndex(const std::string & name) const;
/// static function to switch on/off usage of static global TMinuit inst ance (gMinuit) /// static function to switch on/off usage of static global TMinuit inst ance (gMinuit)
/// By default it is used (i.e. is on). Method returns the previous stat e /// By default it is used (i.e. is on). Method returns the previous stat e
bool static UseStaticMinuit(bool on = true); bool static UseStaticMinuit(bool on = true);
/// suppress the minuit warnings (if called with false will enable them)
/// By default they are suppressed only when the printlevel is <= 0
void SuppressMinuitWarnings(bool nowarn=true);
protected: protected:
/// implementation of FCN for Minuit /// implementation of FCN for Minuit
static void Fcn( int &, double * , double & f, double * , int); static void Fcn( int &, double * , double & f, double * , int);
/// implementation of FCN for Minuit when user provided gradient is used /// implementation of FCN for Minuit when user provided gradient is used
static void FcnGrad( int &, double * g, double & f, double * , int); static void FcnGrad( int &, double * g, double & f, double * , int);
/// initialize the TMinuit instance /// initialize the TMinuit instance
void InitTMinuit(int ndim); void InitTMinuit(int ndim);
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added


 TParameter.h   TParameter.h 
// @(#)root/base:$Id: TParameter.h 38395 2011-03-12 12:29:40Z rdm $ // @(#)root/base:$Id: TParameter.h 40366 2011-07-26 15:36:39Z ganis $
// Author: Maarten Ballintijn 21/06/2004 // Author: Maarten Ballintijn 21/06/2004
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 71 skipping to change at line 71
TParameter(const char *name, const AParamType &val, char mergemode) TParameter(const char *name, const AParamType &val, char mergemode)
: fName(name), fVal(val) { SetMergeMode(mergemode); } : fName(name), fVal(val) { SetMergeMode(mergemode); }
~TParameter() { } ~TParameter() { }
const char *GetName() const { return fName; } const char *GetName() const { return fName; }
const AParamType &GetVal() const { return fVal; } const AParamType &GetVal() const { return fVal; }
void SetVal(const AParamType &val) { fVal = val; } void SetVal(const AParamType &val) { fVal = val; }
void SetMergeMode(char mergemode = '+') { ResetBit(kMultipl y); void SetMergeMode(char mergemode = '+') { ResetBit(kMultipl y);
if (mergemode == '*') SetBit(kMultiply); } if (mergemode == '*') SetBit(kMultiply); }
virtual ULong_t Hash() const { return fName.Hash(); }
virtual Bool_t IsSortable() const { return kTRUE; }
virtual Int_t Compare(const TObject *obj) const {
// Compare two TParameter objects. Returns 0 when equal, -1 when this
is
// smaller and +1 when bigger (like strcmp).
if (this == obj) return 0;
return fName.CompareTo(obj->GetName());
}
virtual void ls(Option_t *) const { virtual void ls(Option_t *) const {
// Print this parameter content // Print this parameter content
TROOT::IndentLevel(); TROOT::IndentLevel();
cout << "OBJ: " << IsA()->GetName() << "\t" << fName << " = " << fVal << endl; cout << "OBJ: " << IsA()->GetName() << "\t" << fName << " = " << fVal << endl;
} }
virtual void Print(Option_t *) const { virtual void Print(Option_t *) const {
// Print this parameter content // Print this parameter content
TROOT::IndentLevel(); TROOT::IndentLevel();
cout << IsA()->GetName() << "\t" << fName << " = " << fVal << endl; cout << IsA()->GetName() << "\t" << fName << " = " << fVal << endl;
 End of changes. 2 change blocks. 
1 lines changed or deleted 12 lines changed or added


 TPerfStats.h   TPerfStats.h 
// @(#)root/proofplayer:$Id: TPerfStats.h 38709 2011-04-01 16:27:30Z ganis $ // @(#)root/proofplayer:$Id: TPerfStats.h 40188 2011-07-11 13:13:11Z ganis $
// Author: Kristjan Gulbrandsen 11/05/04 // Author: Kristjan Gulbrandsen 11/05/04
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 140 skipping to change at line 140
Long64_t eventsprocessed, Long64_t bytesRead); Long64_t eventsprocessed, Long64_t bytesRead);
void SetBytesRead(Long64_t num); void SetBytesRead(Long64_t num);
Long64_t GetBytesRead() const; Long64_t GetBytesRead() const;
void SetNumEvents(Long64_t num) { fNumEvents = num; } void SetNumEvents(Long64_t num) { fNumEvents = num; }
Long64_t GetNumEvents() const { return fNumEvents; } Long64_t GetNumEvents() const { return fNumEvents; }
static void Start(TList *input, TList *output); static void Start(TList *input, TList *output);
static void Stop(); static void Stop();
static void Setup(TList *input); static void Setup(TList *input);
static void SetMemValues(); static void SetMemValues();
static void GetMemValues(Long_t &vmax, Long_t &rmax);
ClassDef(TPerfStats,0) // Class for collecting PROOF statistics ClassDef(TPerfStats,0) // Class for collecting PROOF statistics
}; };
#endif #endif
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 TProofPlayer.h   TProofPlayer.h 
// @(#)root/proofplayer:$Id: TProofPlayer.h 39442 2011-05-27 09:13:25Z gani s $ // @(#)root/proofplayer:$Id: TProofPlayer.h 40188 2011-07-11 13:13:11Z gani s $
// Author: Maarten Ballintijn 07/01/02 // Author: Maarten Ballintijn 07/01/02
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 300 skipping to change at line 300
virtual Long64_t Finalize(TQueryResult *qr); virtual Long64_t Finalize(TQueryResult *qr);
Long64_t DrawSelect(TDSet *set, const char *varexp, Long64_t DrawSelect(TDSet *set, const char *varexp,
const char *selection, Option_t *option = "", const char *selection, Option_t *option = "",
Long64_t nentries = -1, Long64_t firstentry = 0); Long64_t nentries = -1, Long64_t firstentry = 0);
void RedirectOutput(Bool_t on = kTRUE); void RedirectOutput(Bool_t on = kTRUE);
void StopProcess(Bool_t abort, Int_t timeout = -1); void StopProcess(Bool_t abort, Int_t timeout = -1);
void StoreOutput(TList *out); // Adopts the list void StoreOutput(TList *out); // Adopts the list
virtual void StoreFeedback(TObject *slave, TList *out); // Adopts the list virtual void StoreFeedback(TObject *slave, TList *out); // Adopts the list
Int_t Incorporate(TObject *obj, TList *out, Bool_t &merged); Int_t Incorporate(TObject *obj, TList *out, Bool_t &merged);
TObject *HandleHistogram(TObject *obj); TObject *HandleHistogram(TObject *obj, Bool_t &merged);
Bool_t HistoSameAxis(TH1 *h0, TH1 *h1); Bool_t HistoSameAxis(TH1 *h0, TH1 *h1);
Int_t AddOutputObject(TObject *obj); Int_t AddOutputObject(TObject *obj);
void AddOutput(TList *out); // Incorporate a list void AddOutput(TList *out); // Incorporate a list
virtual void MergeOutput(); virtual void MergeOutput();
void Progress(Long64_t total, Long64_t processed); // *SIGNAL* void Progress(Long64_t total, Long64_t processed); // *SIGNAL*
void Progress(TSlave*, Long64_t total, Long64_t processed) void Progress(TSlave*, Long64_t total, Long64_t processed)
{ Progress(total, processed); } { Progress(total, processed); }
void Progress(Long64_t total, Long64_t processed, Long64_t byt esread, void Progress(Long64_t total, Long64_t processed, Long64_t byt esread,
Float_t initTime, Float_t procTime, Float_t initTime, Float_t procTime,
Float_t evtrti, Float_t mbrti); // *SIGNAL* Float_t evtrti, Float_t mbrti); // *SIGNAL*
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 TStatus.h   TStatus.h 
// @(#)root/proofplayer:$Id: TStatus.h 38709 2011-04-01 16:27:30Z ganis $ // @(#)root/proofplayer:$Id: TStatus.h 40188 2011-07-11 13:13:11Z ganis $
// Author: Maarten Ballintijn 12/03/2004 // Author: Maarten Ballintijn 12/03/2004
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
skipping to change at line 46 skipping to change at line 46
class TCollection; class TCollection;
class TStatus : public TNamed { class TStatus : public TNamed {
private: private:
typedef std::set<std::string> MsgSet_t; typedef std::set<std::string> MsgSet_t;
typedef std::set<std::string>::const_iterator MsgIter_t; typedef std::set<std::string>::const_iterator MsgIter_t;
MsgSet_t fMsgs; // list of error messages MsgSet_t fMsgs; // list of error messages
MsgIter_t fIter; //!iterator in messages MsgIter_t fIter; //!iterator in messages
Int_t fExitStatus; // Query exit status ((Int_t)TVirtualProofPlay er::EExitStatus or -1);
Long_t fVirtMemMax; // Max virtual memory used by the worker Long_t fVirtMemMax; // Max virtual memory used by the worker
Long_t fResMemMax; // Max resident memory used by the worker Long_t fResMemMax; // Max resident memory used by the worker
Long_t fVirtMaxMst; // Max virtual memory used by the master
Long_t fResMaxMst; // Max resident memory used by the master
public: public:
TStatus(); TStatus();
virtual ~TStatus() { } virtual ~TStatus() { }
Bool_t IsOk() const { return fMsgs.empty(); } Bool_t IsOk() const { return fMsgs.empty(); }
void Add(const char *mesg); void Add(const char *mesg);
virtual Int_t Merge(TCollection *list); virtual Int_t Merge(TCollection *list);
virtual void Print(Option_t *option="") const; virtual void Print(Option_t *option="") const;
void Reset(); void Reset();
const char *NextMesg(); const char *NextMesg();
Long_t GetResMemMax() const { return fResMemMax; } Int_t GetExitStatus() const { return fExitStatus; }
Long_t GetVirtMemMax() const { return fVirtMemMax; } Long_t GetResMemMax(Bool_t master = kFALSE) const { return ((mas
void SetMemValues(Long_t vmem = -1, Long_t rmem = -1); ter) ? fResMaxMst : fResMemMax); }
Long_t GetVirtMemMax(Bool_t master = kFALSE) const { return ((ma
ster) ? fVirtMaxMst : fVirtMemMax); }
ClassDef(TStatus,2); // Status class void SetExitStatus(Int_t est) { fExitStatus = est; }
void SetMemValues(Long_t vmem = -1, Long_t rmem = -1, Bool_t m
aster = kFALSE);
ClassDef(TStatus,4); // Status class
}; };
#endif #endif
 End of changes. 5 change blocks. 
5 lines changed or deleted 14 lines changed or added


 ToyMCSamplerOld.h   ToyMCSamplerOld.h 
// @(#)root/roostats:$Id: ToyMCSamplerOld.h 40059 2011-06-28 08:57:41Z mone ta $ // @(#)root/roostats:$Id: ToyMCSamplerOld.h 40567 2011-08-11 16:31:47Z mone ta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
// Additions and modifications by Mario Pelliccioni // Additions and modifications by Mario Pelliccioni
/************************************************************************* /*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. * * All rights reserved. *
* * * *
* For the licensing terms see $ROOTSYS/LICENSE. * * For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. * * For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/ *************************************************************************/
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 compiledata.h   compiledata.h 
/* This is file is automatically generated */ /* This is file is automatically generated */
#define BUILD_ARCH "linux" #define BUILD_ARCH "linux"
#define BUILD_NODE "Linux lxbuild147.cern.ch 2.6.18-194.26.1.el5 #1 SMP Wed Nov 10 09:51:11 CET 2010 i686 i686 i386 GNU/Linux" #define BUILD_NODE "Linux lxbuild147.cern.ch 2.6.18-194.26.1.el5 #1 SMP Wed Nov 10 09:51:11 CET 2010 i686 i686 i386 GNU/Linux"
#define COMPILER "/afs/cern.ch/sw/lcg/contrib/gcc/4.3.2/i686-slc5-gcc34-opt #define COMPILER "/afs/cern.ch/sw/lcg/contrib/gcc/4.3.5/i686-slc5-gcc43-opt
/bin/g++" /bin/g++"
#define COMPILERVERS "gcc432" #define COMPILERVERS "gcc435"
#define MAKESHAREDLIB "cd $BuildDir ; g++ -c $Opt -pipe -m32 -Wall -W -Wov erloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g++ $ObjectFile s -shared -Wl,-soname,$LibName.so -m32 -O2 $LinkedLibs -o $SharedLib" #define MAKESHAREDLIB "cd $BuildDir ; g++ -c $Opt -pipe -m32 -Wall -W -Wov erloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g++ $ObjectFile s -shared -Wl,-soname,$LibName.so -m32 -O2 $LinkedLibs -o $SharedLib"
#define MAKEEXE "cd $BuildDir ; g++ -c -pipe -m32 -Wall -W -Woverloaded-vi rtual -fPIC -pthread $IncludePath $SourceFiles; g++ $ObjectFiles -m32 -O2 -o $ExeName $LinkedLibs -lm -ldl -pthread -rdynamic" #define MAKEEXE "cd $BuildDir ; g++ -c -pipe -m32 -Wall -W -Woverloaded-vi rtual -fPIC -pthread $IncludePath $SourceFiles; g++ $ObjectFiles -m32 -O2 -o $ExeName $LinkedLibs -lm -ldl -pthread -rdynamic"
#define CXXOPT "-O2" #define CXXOPT "-O2"
#define CXXDEBUG "-g" #define CXXDEBUG "-g"
#define ROOTBUILD "" #define ROOTBUILD ""
#define LINKEDLIBS "-L$ROOTSYS/lib -lCore -lCint -lMathCore -lRint " #define LINKEDLIBS "-L$ROOTSYS/lib -lCore -lCint -lMathCore -lRint "
#define INCLUDEPATH "-I$ROOTSYS/include" #define INCLUDEPATH "-I$ROOTSYS/include"
#define OBJEXT "o" #define OBJEXT "o"
#define SOEXT "so" #define SOEXT "so"
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/