AdaptiveIntegratorMultiDim.h | AdaptiveIntegratorMultiDim.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
#include "Math/IFunctionfwd.h" | #include "Math/IFunctionfwd.h" | |||
#endif | #endif | |||
#include "Math/VirtualIntegrator.h" | #include "Math/VirtualIntegrator.h" | |||
namespace ROOT { | namespace ROOT { | |||
namespace Math { | namespace Math { | |||
//_________________________________________________________________________ _________________ | //_________________________________________________________________________ _________________ | |||
/** | /** | |||
class for adaptive quadrature integration in multi-dimensions | class for adaptive quadrature integration in multi-dimensions using rect angular regions. | |||
Algorithm from A.C. Genz, A.A. Malik, An adaptive algorithm for numeric al integration over | Algorithm from A.C. Genz, A.A. Malik, An adaptive algorithm for numeric al integration over | |||
an N-dimensional rectangular region, J. Comput. Appl. Math. 6 (1980) 295 -302. | an N-dimensional rectangular region, J. Comput. Appl. Math. 6 (1980) 295 -302. | |||
Converted/adapted by R.Brun to C++ from Fortran CERNLIB routine RADMUL ( D120) | Converted/adapted by R.Brun to C++ from Fortran CERNLIB routine RADMUL ( D120) | |||
The new code features many changes compared to the Fortran version. | The new code features many changes compared to the Fortran version. | |||
Control parameters are: | ||||
minpts: Minimum number of function evaluations requested. Must not e | ||||
xceed maxpts. | ||||
if minpts < 1 minpts is set to 2^n +2*n*(n+1) +1 where n is | ||||
the function dimension | ||||
maxpts: Maximum number of function evaluations to be allowed. | ||||
maxpts >= 2^n +2*n*(n+1) +1 | ||||
if maxpts<minpts, maxpts is set to 10*minpts | ||||
epstol, epsrel : Specified relative and absolute accuracy. | ||||
The integral will stop if the relative error is less than relative to | ||||
lerance OR the | ||||
absolute error is less than the absolute tolerance | ||||
The class computes in addition to the integral of the function is the de | ||||
sired interval: | ||||
an estimation of the relative accuracy of the result. | ||||
number of function evaluations performed. | ||||
status code : | ||||
0 Normal exit. . At least minpts and at most maxpts calls to the | ||||
function were performed. | ||||
1 maxpts is too small for the specified accuracy eps. | ||||
The result and relerr contain the values obtainable for the | ||||
specified value of maxpts. | ||||
3 n<2 or n>15 | ||||
Method: | ||||
An integration rule of degree seven is used together with a certain | ||||
strategy of subdivision. | ||||
For a more detailed description of the method see References. | ||||
Notes: | ||||
1.Multi-dimensional integration is time-consuming. For each rectangula | ||||
r | ||||
subregion, the routine requires function evaluations. | ||||
Careful programming of the integrand might result in substantial sav | ||||
ing | ||||
of time. | ||||
2.Numerical integration usually works best for smooth functions. | ||||
Some analysis or suitable transformations of the integral prior to | ||||
numerical work may contribute to numerical efficiency. | ||||
References: | ||||
1.A.C. Genz and A.A. Malik, Remarks on algorithm 006: | ||||
An adaptive algorithm for numerical integration over | ||||
an N-dimensional rectangular region, J. Comput. Appl. Math. 6 (1980) | ||||
295-302. | ||||
2.A. van Doren and L. de Ridder, An adaptive algorithm for numerical | ||||
integration over an n-dimensional cube, J.Comput. Appl. Math. 2 (197 | ||||
6) 207-217. | ||||
@ingroup Integration | @ingroup Integration | |||
*/ | */ | |||
class AdaptiveIntegratorMultiDim : public VirtualIntegratorMultiDim { | class AdaptiveIntegratorMultiDim : public VirtualIntegratorMultiDim { | |||
public: | public: | |||
/** | /** | |||
construct given optionally tolerance (absolute and relative), maximum number of function evaluation (maxpts) and | construct given optionally tolerance (absolute and relative), maximum number of function evaluation (maxpts) and | |||
size of the working array. | size of the working array. | |||
The size of working array represents the number of sub-division used for calculating the integral. | The size of working array represents the number of sub-division used for calculating the integral. | |||
Higher the dimension, larger sizes are required for getting the same accuracy. | Higher the dimension, larger sizes are required for getting the same accuracy. | |||
The size must be larger than >= (2N + 3) * (1 + MAXPTS/(2**N + 2N(N + 1) + 1))/2). For smaller value passed, the | The size must be larger than >= (2N + 3) * (1 + MAXPTS/(2**N + 2N(N + 1) + 1))/2). For smaller value passed, the | |||
minimum allowed will be used | minimum allowed will be used | |||
*/ | */ | |||
explicit | explicit | |||
AdaptiveIntegratorMultiDim(double absTol = 1.E-6, double relTol = 1E-6, unsigned int maxpts = 100000, unsigned int size = 0); | AdaptiveIntegratorMultiDim(double absTol = 1.E-9, double relTol = 1E-9, unsigned int maxpts = 100000, unsigned int size = 0); | |||
/** | /** | |||
Construct with a reference to the integrand function and given option ally | Construct with a reference to the integrand function and given option ally | |||
tolerance (absolute and relative), maximum number of function evaluat ion (maxpts) and | tolerance (absolute and relative), maximum number of function evaluat ion (maxpts) and | |||
size of the working array. | size of the working array. | |||
*/ | */ | |||
explicit | explicit | |||
AdaptiveIntegratorMultiDim(const IMultiGenFunction &f, double absTol = 1 .E-9, double relTol = 1E-6, unsigned int maxcall = 100000, unsigned int si ze = 0); | AdaptiveIntegratorMultiDim(const IMultiGenFunction &f, double absTol = 1 .E-9, double relTol = 1E-9, unsigned int maxcall = 100000, unsigned int si ze = 0); | |||
/** | /** | |||
destructor (no operations) | destructor (no operations) | |||
*/ | */ | |||
virtual ~AdaptiveIntegratorMultiDim() {} | virtual ~AdaptiveIntegratorMultiDim() {} | |||
/** | /** | |||
evaluate the integral with the previously given function between xmin [] and xmax[] | evaluate the integral with the previously given function between xmin [] and xmax[] | |||
*/ | */ | |||
double Integral(const double* xmin, const double * xmax) { | double Integral(const double* xmin, const double * xmax) { | |||
End of changes. 4 change blocks. | ||||
3 lines changed or deleted | 59 lines changed or added | |||
BinData.h | BinData.h | |||
---|---|---|---|---|
skipping to change at line 484 | skipping to change at line 484 | |||
/** | /** | |||
retrieve the reference volume used to normalize the data when the op tion bin volume is set | retrieve the reference volume used to normalize the data when the op tion bin volume is set | |||
*/ | */ | |||
double RefVolume() const { return fRefVolume; } | double RefVolume() const { return fRefVolume; } | |||
/** | /** | |||
set the reference volume used to normalize the data when the option b in volume is set | set the reference volume used to normalize the data when the option b in volume is set | |||
*/ | */ | |||
void SetRefVolume(double value) { fRefVolume = value; } | void SetRefVolume(double value) { fRefVolume = value; } | |||
/** | ||||
compute the total sum of the data content | ||||
(sum of weights in cse of weighted data set) | ||||
*/ | ||||
double SumOfContent() const { return fSumContent; } | ||||
/** | ||||
compute the total sum of the error square | ||||
(sum of weight square in case of a weighted data set) | ||||
*/ | ||||
double SumOfError2() const { return fSumError2;} | ||||
protected: | protected: | |||
void SetNPoints(unsigned int n) { fNPoints = n; } | void SetNPoints(unsigned int n) { fNPoints = n; } | |||
private: | private: | |||
unsigned int fDim; // coordinate dimension | unsigned int fDim; // coordinate dimension | |||
unsigned int fPointSize; // total point size including value and errors (= fDim + 2 for error in only Y ) | unsigned int fPointSize; // total point size including value and errors (= fDim + 2 for error in only Y ) | |||
unsigned int fNPoints; // number of contained points in the data set ( can be different than size of vector) | unsigned int fNPoints; // number of contained points in the data set ( can be different than size of vector) | |||
double fSumContent; // total sum of the bin data content | ||||
double fSumError2; // total sum square of the errors | ||||
double fRefVolume; // reference bin volume - used to normalize the bins in case of variable bins data | double fRefVolume; // reference bin volume - used to normalize the bins in case of variable bins data | |||
DataVector * fDataVector; // pointer to the copied in data vector | DataVector * fDataVector; // pointer to the copied in data vector | |||
DataWrapper * fDataWrapper; // pointer to the external data wrapper str ucture | DataWrapper * fDataWrapper; // pointer to the external data wrapper str ucture | |||
std::vector<double> fBinEdge; // vector containing the bin upper edge ( coordinate will contain low edge) | std::vector<double> fBinEdge; // vector containing the bin upper edge ( coordinate will contain low edge) | |||
#ifdef USE_BINPOINT_CLASS | #ifdef USE_BINPOINT_CLASS | |||
mutable BinPoint fPoint; | mutable BinPoint fPoint; | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 14 lines changed or added | |||
Buttons.h | Buttons.h | |||
---|---|---|---|---|
skipping to change at line 20 | skipping to change at line 20 | |||
#ifndef ROOT_Buttons | #ifndef ROOT_Buttons | |||
#define ROOT_Buttons | #define ROOT_Buttons | |||
enum EEventType { | enum EEventType { | |||
kNoEvent = 0, | kNoEvent = 0, | |||
kButton1Down = 1, kButton2Down = 2, kButton3Down = 3, kKeyDown = 4, | kButton1Down = 1, kButton2Down = 2, kButton3Down = 3, kKeyDown = 4, | |||
kWheelUp = 5, kWheelDown = 6, kButton1Shift = 7, kButton1S hiftMotion = 8, | kWheelUp = 5, kWheelDown = 6, kButton1Shift = 7, kButton1S hiftMotion = 8, | |||
kButton1Up = 11, kButton2Up = 12, kButton3Up = 13, kKeyUp = 14, | kButton1Up = 11, kButton2Up = 12, kButton3Up = 13, kKeyUp = 14, | |||
kButton1Motion = 21, kButton2Motion = 22, kButton3Motion = 23, kKeyPress = 24, | kButton1Motion = 21, kButton2Motion = 22, kButton3Motion = 23, kKeyPress = 24, | |||
kArrowKeyPress = 25, kArrowKeyRelease = 26, | ||||
kButton1Locate = 41, kButton2Locate = 42, kButton3Locate = 43, kESC = 27, | kButton1Locate = 41, kButton2Locate = 42, kButton3Locate = 43, kESC = 27, | |||
kMouseMotion = 51, kMouseEnter = 52, kMouseLeave = 53, | kMouseMotion = 51, kMouseEnter = 52, kMouseLeave = 53, | |||
kButton1Double = 61, kButton2Double = 62, kButton3Double = 63 | kButton1Double = 61, kButton2Double = 62, kButton3Double = 63 | |||
}; | }; | |||
enum EEditMode { | enum EEditMode { | |||
kPolyLine = 1, kSPolyLine = 2, kPolyGone = 3, | kPolyLine = 1, kSPolyLine = 2, kPolyGone = 3, | |||
kSPolyGone = 4, kBox = 5, kDelete = 6, | kSPolyGone = 4, kBox = 5, kDelete = 6, | |||
kPad = 7, kText = 8, kEditor = 9, | kPad = 7, kText = 8, kEditor = 9, | |||
kExit = 10, kPave = 11, kPaveLabel = 12, | kExit = 10, kPave = 11, kPaveLabel = 12, | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
CombinedMinimizer.h | CombinedMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 40 | skipping to change at line 40 | |||
public: | public: | |||
CombinedMinimizer() : fMinSeedGen(MnSeedGenerator()), | CombinedMinimizer() : fMinSeedGen(MnSeedGenerator()), | |||
fMinBuilder(CombinedMinimumBuilder()) {} | fMinBuilder(CombinedMinimumBuilder()) {} | |||
~CombinedMinimizer() {} | ~CombinedMinimizer() {} | |||
const MinimumSeedGenerator& SeedGenerator() const {return fMinSeedGen;} | const MinimumSeedGenerator& SeedGenerator() const {return fMinSeedGen;} | |||
const MinimumBuilder& Builder() const {return fMinBuilder;} | const MinimumBuilder& Builder() const {return fMinBuilder;} | |||
MinimumBuilder& Builder() {return fMinBuilder;} | ||||
private: | private: | |||
MnSeedGenerator fMinSeedGen; | MnSeedGenerator fMinSeedGen; | |||
CombinedMinimumBuilder fMinBuilder; | CombinedMinimumBuilder fMinBuilder; | |||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
CombinedMinimumBuilder.h | CombinedMinimumBuilder.h | |||
---|---|---|---|---|
skipping to change at line 25 | skipping to change at line 25 | |||
#include "Minuit2/SimplexMinimizer.h" | #include "Minuit2/SimplexMinimizer.h" | |||
namespace ROOT { | namespace ROOT { | |||
namespace Minuit2 { | namespace Minuit2 { | |||
class CombinedMinimumBuilder : public MinimumBuilder { | class CombinedMinimumBuilder : public MinimumBuilder { | |||
public: | public: | |||
CombinedMinimumBuilder() : fVMMinimizer(VariableMetricMinimizer()), | CombinedMinimumBuilder() : fVMMinimizer(VariableMetricMinimizer()), | |||
fSimplexMinimizer(SimplexMinimizer()) {} | fSimplexMinimizer(SimplexMinimizer()) {} | |||
~CombinedMinimumBuilder() {} | ~CombinedMinimumBuilder() {} | |||
virtual FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, | virtual FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, | |||
const MinimumSeed&, const MnStrategy&, unsigned int, double) const; | const MinimumSeed&, const MnStrategy&, unsigned int, double) const; | |||
//re-implement setter of base class. Need also to store in the base clas | ||||
s for consistency | ||||
virtual void SetPrintLevel(int level) { | ||||
MinimumBuilder::SetPrintLevel(level); | ||||
fVMMinimizer.Builder().SetPrintLevel(level); | ||||
fSimplexMinimizer.Builder().SetPrintLevel(level); | ||||
} | ||||
virtual void SetStorageLevel(int level) { | ||||
MinimumBuilder::SetStorageLevel(level); | ||||
fVMMinimizer.Builder().SetStorageLevel(level); | ||||
fSimplexMinimizer.Builder().SetStorageLevel(level); | ||||
} | ||||
// set trace object (user manages it) | ||||
virtual void SetTraceObject(MnTraceObject & obj) { | ||||
MinimumBuilder::SetTraceObject(obj); | ||||
fVMMinimizer.Builder().SetTraceObject(obj); | ||||
fSimplexMinimizer.Builder().SetTraceObject(obj); | ||||
} | ||||
private: | private: | |||
VariableMetricMinimizer fVMMinimizer; | VariableMetricMinimizer fVMMinimizer; | |||
SimplexMinimizer fSimplexMinimizer; | SimplexMinimizer fSimplexMinimizer; | |||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 24 lines changed or added | |||
DataOptions.h | DataOptions.h | |||
---|---|---|---|---|
skipping to change at line 37 | skipping to change at line 37 | |||
/** | /** | |||
Default constructor: use the default options | Default constructor: use the default options | |||
*/ | */ | |||
DataOptions () : | DataOptions () : | |||
fIntegral(false), | fIntegral(false), | |||
fBinVolume(false), | fBinVolume(false), | |||
fUseEmpty(false), | fUseEmpty(false), | |||
fUseRange(false), | fUseRange(false), | |||
fErrors1(false), | fErrors1(false), | |||
fExpErrors(false), | ||||
fCoordErrors(true), | fCoordErrors(true), | |||
fAsymErrors(true) | fAsymErrors(true) | |||
{} | {} | |||
bool fIntegral; // use integral of bin content instead of bin center (default is false) | bool fIntegral; // use integral of bin content instead of bin center (default is false) | |||
bool fBinVolume; // normalize data by the bin volume (it is used in th e Poisson likelihood fits) | bool fBinVolume; // normalize data by the bin volume (it is used in th e Poisson likelihood fits) | |||
bool fUseEmpty; // use empty bins (default is false) with a fixed err or of 1 | bool fUseEmpty; // use empty bins (default is false) with a fixed err or of 1 | |||
bool fUseRange; // use the function range when creating the fit data (default is false) | bool fUseRange; // use the function range when creating the fit data (default is false) | |||
bool fErrors1; // use all errors equal to 1, i.e. fit without errors (default is false) | bool fErrors1; // use all errors equal to 1, i.e. fit without errors (default is false) | |||
bool fExpErrors; // use expected errors from the function and not from the data | ||||
bool fCoordErrors; // use errors on the x coordinates when available (de fault is true) | bool fCoordErrors; // use errors on the x coordinates when available (de fault is true) | |||
bool fAsymErrors; // use asymmetric errors in the value when available, selecting them according to the on sign of residual (default is true) | bool fAsymErrors; // use asymmetric errors in the value when available, selecting them according to the on sign of residual (default is true) | |||
}; | }; | |||
} // end namespace Fit | } // end namespace Fit | |||
} // end namespace ROOT | } // end namespace ROOT | |||
#endif /* ROOT_Fit_DataOptions */ | #endif /* ROOT_Fit_DataOptions */ | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
Dfact.h | Dfact.h | |||
---|---|---|---|---|
skipping to change at line 66 | skipping to change at line 66 | |||
if (idim < n || n <= 0) { | if (idim < n || n <= 0) { | |||
return false; | return false; | |||
} | } | |||
#endif | #endif | |||
/* Initialized data */ | /* Initialized data */ | |||
// const typename MatrixRep::value_type* A = rhs.Array(); | // const typename MatrixRep::value_type* A = rhs.Array(); | |||
//typename MatrixRep::value_type* a = rhs.Array(); | //typename MatrixRep::value_type* a = rhs.Array(); | |||
/* Local variables */ | /* Local variables */ | |||
static unsigned int nxch, i, j, k, l; | unsigned int nxch, i, j, k, l; | |||
//static typename MatrixRep::value_type p, q, tf; | //static typename MatrixRep::value_type p, q, tf; | |||
static T p, q, tf; | T p, q, tf; | |||
/* Parameter adjustments */ | /* Parameter adjustments */ | |||
// a -= idim + 1; | // a -= idim + 1; | |||
static int arrayOffset = - int(idim+1); | const int arrayOffset = - int(idim+1); | |||
/* Function Body */ | /* Function Body */ | |||
// fact.inc | // fact.inc | |||
nxch = 0; | nxch = 0; | |||
det = 1.; | det = 1.; | |||
for (j = 1; j <= n; ++j) { | for (j = 1; j <= n; ++j) { | |||
const unsigned int ji = j * idim; | const unsigned int ji = j * idim; | |||
const unsigned int jj = j + ji; | const unsigned int jj = j + ji; | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||
Dfactir.h | Dfactir.h | |||
---|---|---|---|---|
skipping to change at line 59 | skipping to change at line 59 | |||
#ifdef XXX | #ifdef XXX | |||
if (idim < n || n <= 0) { | if (idim < n || n <= 0) { | |||
return false; | return false; | |||
} | } | |||
#endif | #endif | |||
/* Initialized data */ | /* Initialized data */ | |||
typename Matrix::value_type* a = rhs.Array(); | typename Matrix::value_type* a = rhs.Array(); | |||
/* Local variables */ | /* Local variables */ | |||
static unsigned int nxch, i, j, k, l; | unsigned int nxch, i, j, k, l; | |||
static typename Matrix::value_type p, q, tf; | typename Matrix::value_type p, q, tf; | |||
/* Parameter adjustments */ | /* Parameter adjustments */ | |||
a -= idim + 1; | a -= idim + 1; | |||
--ir; | --ir; | |||
/* Function Body */ | /* Function Body */ | |||
// fact.inc | // fact.inc | |||
nxch = 0; | nxch = 0; | |||
det = 1.; | det = 1.; | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
Dfinv.h | Dfinv.h | |||
---|---|---|---|---|
skipping to change at line 53 | skipping to change at line 53 | |||
bool Dfinv(Matrix& rhs, unsigned int* ir) { | bool Dfinv(Matrix& rhs, unsigned int* ir) { | |||
#ifdef XXX | #ifdef XXX | |||
if (idim < n || n <= 0 || n==1) { | if (idim < n || n <= 0 || n==1) { | |||
return false; | return false; | |||
} | } | |||
#endif | #endif | |||
typename Matrix::value_type* a = rhs.Array(); | typename Matrix::value_type* a = rhs.Array(); | |||
/* Local variables */ | /* Local variables */ | |||
static unsigned int nxch, i, j, k, m, ij; | unsigned int nxch, i, j, k, m, ij; | |||
static unsigned int im2, nm1, nmi; | unsigned int im2, nm1, nmi; | |||
static typename Matrix::value_type s31, s34, ti; | typename Matrix::value_type s31, s34, ti; | |||
/* Parameter adjustments */ | /* Parameter adjustments */ | |||
a -= idim + 1; | a -= idim + 1; | |||
--ir; | --ir; | |||
/* Function Body */ | /* Function Body */ | |||
/* finv.inc */ | /* finv.inc */ | |||
a[idim + 2] = -a[(idim << 1) + 2] * (a[idim + 1] * a[idim + 2]); | a[idim + 2] = -a[(idim << 1) + 2] * (a[idim + 1] * a[idim + 2]); | |||
End of changes. 1 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||
Dinv.h | Dinv.h | |||
---|---|---|---|---|
skipping to change at line 76 | skipping to change at line 76 | |||
public: | public: | |||
/// matrix inversion for a generic square matrix using LU factorization | /// matrix inversion for a generic square matrix using LU factorization | |||
/// (code originally from CERNLIB and then ported in C++ for CLHEP) | /// (code originally from CERNLIB and then ported in C++ for CLHEP) | |||
/// implementation is in file Math/MatrixInversion.icc | /// implementation is in file Math/MatrixInversion.icc | |||
template <class MatrixRep> | template <class MatrixRep> | |||
static bool Dinv(MatrixRep& rhs) { | static bool Dinv(MatrixRep& rhs) { | |||
/* Initialized data */ | /* Initialized data */ | |||
unsigned int work[n+1] = {0}; | unsigned int work[n+1] = {0}; | |||
static typename MatrixRep::value_type det(0.0); | typename MatrixRep::value_type det(0.0); | |||
if (DfactMatrix(rhs,det,work) != 0) { | if (DfactMatrix(rhs,det,work) != 0) { | |||
std::cerr << "Dfact_matrix failed!!" << std::endl; | std::cerr << "Dfact_matrix failed!!" << std::endl; | |||
return false; | return false; | |||
} | } | |||
int ifail = DfinvMatrix(rhs,work); | int ifail = DfinvMatrix(rhs,work); | |||
if (ifail == 0) return true; | if (ifail == 0) return true; | |||
return false; | return false; | |||
} // Dinv | } // Dinv | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
Dsfact.h | Dsfact.h | |||
---|---|---|---|---|
skipping to change at line 73 | skipping to change at line 73 | |||
typename MatrixRep::value_type array[MatrixRep::kSize]; | typename MatrixRep::value_type array[MatrixRep::kSize]; | |||
typename MatrixRep::value_type* a = array; | typename MatrixRep::value_type* a = array; | |||
// copy contents of matrix to working place | // copy contents of matrix to working place | |||
for(unsigned int i=0; i<MatrixRep::kSize; ++i) { | for(unsigned int i=0; i<MatrixRep::kSize; ++i) { | |||
array[i] = A[i]; | array[i] = A[i]; | |||
} | } | |||
#endif | #endif | |||
/* Local variables */ | /* Local variables */ | |||
static unsigned int i, j, l; | unsigned int i, j, l; | |||
/* Parameter adjustments */ | /* Parameter adjustments */ | |||
// a -= idim + 1; | // a -= idim + 1; | |||
static int arrayOffset = -(idim+1); | const int arrayOffset = -(idim+1); | |||
/* sfactd.inc */ | /* sfactd.inc */ | |||
det = 1.; | det = 1.; | |||
for (j = 1; j <= n; ++j) { | for (j = 1; j <= n; ++j) { | |||
const unsigned int ji = j * idim; | const unsigned int ji = j * idim; | |||
const unsigned int jj = j + ji; | const unsigned int jj = j + ji; | |||
if (rhs[jj + arrayOffset] <= 0.) { | if (rhs[jj + arrayOffset] <= 0.) { | |||
det = 0.; | det = 0.; | |||
return false; | return false; | |||
} | } | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
Dsinv.h | Dsinv.h | |||
---|---|---|---|---|
skipping to change at line 50 | skipping to change at line 50 | |||
*/ | */ | |||
template <class T, int n, int idim> | template <class T, int n, int idim> | |||
class SInverter | class SInverter | |||
{ | { | |||
public: | public: | |||
template <class MatrixRep> | template <class MatrixRep> | |||
inline static bool Dsinv(MatrixRep& rhs) { | inline static bool Dsinv(MatrixRep& rhs) { | |||
/* Local variables */ | /* Local variables */ | |||
static int i, j, k, l; | int i, j, k, l; | |||
static T s31, s32; | T s31, s32; | |||
static int jm1, jp1; | int jm1, jp1; | |||
/* Parameter adjustments */ | /* Parameter adjustments */ | |||
static int arrayOffset = -1*(idim + 1); | const int arrayOffset = -1*(idim + 1); | |||
/* Function Body */ | /* Function Body */ | |||
if (idim < n || n <= 1) { | if (idim < n || n <= 1) { | |||
return false; | return false; | |||
} | } | |||
/* sfact.inc */ | /* sfact.inc */ | |||
for (j = 1; j <= n; ++j) { | for (j = 1; j <= n; ++j) { | |||
const int ja = j * idim; | const int ja = j * idim; | |||
const int jj = j + ja; | const int jj = j + ja; | |||
End of changes. 2 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added | |||
Expression.h | Expression.h | |||
---|---|---|---|---|
skipping to change at line 96 | skipping to change at line 96 | |||
///static const unsigned int cols = D2; | ///static const unsigned int cols = D2; | |||
#else | #else | |||
// use enumerations | // use enumerations | |||
enum { | enum { | |||
kRows = D | kRows = D | |||
}; | }; | |||
#endif | #endif | |||
/** | ||||
function to determine if any use operand | ||||
is being used (has same memory adress) | ||||
*/ | ||||
inline bool IsInUse (const T * p) const { | ||||
return rhs_.IsInUse(p); | ||||
} | ||||
/// used by operator<<() | /// used by operator<<() | |||
std::ostream& print(std::ostream& os) const { | std::ostream& print(std::ostream& os) const { | |||
os.setf(std::ios::right,std::ios::adjustfield); | os.setf(std::ios::right,std::ios::adjustfield); | |||
unsigned int i=0; | unsigned int i=0; | |||
os << "[ "; | os << "[ "; | |||
for(; i<D-1; ++i) { | for(; i<D-1; ++i) { | |||
os << apply(i) << ", "; | os << apply(i) << ", "; | |||
} | } | |||
os << apply(i); | os << apply(i); | |||
os << " ]"; | os << " ]"; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 8 lines changed or added | |||
FitResult.h | FitResult.h | |||
---|---|---|---|---|
skipping to change at line 102 | skipping to change at line 102 | |||
Note that in this case MINOS is not re-run. If one wants to run also MINOS | Note that in this case MINOS is not re-run. If one wants to run also MINOS | |||
a new result must be created | a new result must be created | |||
*/ | */ | |||
bool Update(const ROOT::Math::Minimizer & min, bool isValid, unsigned in t ncalls = 0 ); | bool Update(const ROOT::Math::Minimizer & min, bool isValid, unsigned in t ncalls = 0 ); | |||
/** minimization quantities **/ | /** minimization quantities **/ | |||
/// minimizer type | /// minimizer type | |||
const std::string & MinimizerType() const { return fMinimType; } | const std::string & MinimizerType() const { return fMinimType; } | |||
/// True if fit successful, otherwise false. | /** | |||
True if fit successful, otherwise false. | ||||
A fit is considered successful if the minimizer succeded in finding | ||||
the | ||||
minimum. It could happen that subsequent operations like error analy | ||||
sis (e.g. Minos) | ||||
failed. In that case the status can be still true if the original mi | ||||
nimization algorithm | ||||
succeeded in finding the minimum. | ||||
One can query in that case the minimizer return status using Status( | ||||
). | ||||
It is responability to the Minimizer class to tag a found minimum as | ||||
valid or not | ||||
and to produce also a status code. | ||||
*/ | ||||
bool IsValid() const { return fValid; } | bool IsValid() const { return fValid; } | |||
/// True if a fit result does not exist (even invalid) with parameter va lues | /// True if a fit result does not exist (even invalid) with parameter va lues | |||
bool IsEmpty() const { return (fParams.size() == 0); } | bool IsEmpty() const { return (fParams.size() == 0); } | |||
/// Return value of the objective function (chi2 or likelihood) used in the fit | /// Return value of the objective function (chi2 or likelihood) used in the fit | |||
double MinFcnValue() const { return fVal; } | double MinFcnValue() const { return fVal; } | |||
///Number of function calls to find minimum | ///Number of function calls to find minimum | |||
unsigned int NCalls() const { return fNCalls; } | unsigned int NCalls() const { return fNCalls; } | |||
skipping to change at line 283 | skipping to change at line 292 | |||
///print error matrix and correlations | ///print error matrix and correlations | |||
void PrintCovMatrix(std::ostream & os) const; | void PrintCovMatrix(std::ostream & os) const; | |||
/// query if a parameter is bound | /// query if a parameter is bound | |||
bool IsParameterBound(unsigned int ipar) const; | bool IsParameterBound(unsigned int ipar) const; | |||
/// query if a parameter is fixed | /// query if a parameter is fixed | |||
bool IsParameterFixed(unsigned int ipar) const; | bool IsParameterFixed(unsigned int ipar) const; | |||
/// retrieve parameter bounds - return false if parameter is not bound | ||||
bool ParameterBounds(unsigned int ipar, double &lower, double &upper) co | ||||
nst; | ||||
/// get name of parameter (deprecated) | /// get name of parameter (deprecated) | |||
std::string GetParameterName(unsigned int ipar) const { | std::string GetParameterName(unsigned int ipar) const { | |||
return ParName(ipar); | return ParName(ipar); | |||
} | } | |||
protected: | protected: | |||
/// Return pointer non const pointer to model (fit) function with fitted parameter values. | /// Return pointer non const pointer to model (fit) function with fitted parameter values. | |||
/// used by Fitter class | /// used by Fitter class | |||
IModelFunction * ModelFunction() { return fFitFunc; } | IModelFunction * ModelFunction() { return fFitFunc; } | |||
skipping to change at line 308 | skipping to change at line 320 | |||
bool fNormalized; // flag for indicating is errors are normalized | bool fNormalized; // flag for indicating is errors are normalized | |||
unsigned int fNFree; // number of fit free parameters (total paramet ers are in size of parameter vector) | unsigned int fNFree; // number of fit free parameters (total paramet ers are in size of parameter vector) | |||
unsigned int fNdf; // number of degree of freedom | unsigned int fNdf; // number of degree of freedom | |||
unsigned int fNCalls; // number of function calls | unsigned int fNCalls; // number of function calls | |||
int fStatus; // minimizer status code | int fStatus; // minimizer status code | |||
int fCovStatus; // covariance matrix status code | int fCovStatus; // covariance matrix status code | |||
double fVal; // minimum function value | double fVal; // minimum function value | |||
double fEdm; // expected distance from mimimum | double fEdm; // expected distance from mimimum | |||
double fChi2; // fit chi2 value (different than fval in case of chi2 fits) | double fChi2; // fit chi2 value (different than fval in case of chi2 fits) | |||
IModelFunction * fFitFunc; //! model function resulting from the fit. I t is given by Fitter but it is managed by FitResult | IModelFunction * fFitFunc; //! model function resulting from the fit. I t is given by Fitter but it is managed by FitResult | |||
std::vector<unsigned int> fFixedParams; // list of fixed parameters | std::map<unsigned int, bool> fFixedParams; // list of fixed pa | |||
std::vector<unsigned int> fBoundParams; // list of limited parameters | rameters | |||
std::map<unsigned int, unsigned int> fBoundParams; // list of limited | ||||
parameters | ||||
std::vector<std::pair<double,double> > fParamBounds; // parameter bound | ||||
s | ||||
std::vector<double> fParams; // parameter values. Size is total number of parameters | std::vector<double> fParams; // parameter values. Size is total number of parameters | |||
std::vector<double> fErrors; // errors | std::vector<double> fErrors; // errors | |||
std::vector<double> fCovMatrix; // covariance matrix (size is n par*(npar+1)/2) where npar is total parameters | std::vector<double> fCovMatrix; // covariance matrix (size is n par*(npar+1)/2) where npar is total parameters | |||
std::vector<double> fGlobalCC; // global Correlation coefficie nt | std::vector<double> fGlobalCC; // global Correlation coefficie nt | |||
std::map<unsigned int, std::pair<double,double> > fMinosErrors; // map contains the two Minos errors | std::map<unsigned int, std::pair<double,double> > fMinosErrors; // map contains the two Minos errors | |||
std::string fMinimType; // string indicating type of minimi zer | std::string fMinimType; // string indicating type of minimi zer | |||
std::vector<std::string> fParNames; // parameter names (only with FCN o nly fits, when fFitFunc=0) | std::vector<std::string> fParNames; // parameter names (only with FCN o nly fits, when fFitFunc=0) | |||
}; | }; | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 25 lines changed or added | |||
Fitter.h | Fitter.h | |||
---|---|---|---|---|
skipping to change at line 155 | skipping to change at line 155 | |||
/** | /** | |||
fit an unbinned data set using loglikelihood method | fit an unbinned data set using loglikelihood method | |||
*/ | */ | |||
bool Fit(const UnBinData & data, bool extended = false) { | bool Fit(const UnBinData & data, bool extended = false) { | |||
return DoLikelihoodFit(data, extended); | return DoLikelihoodFit(data, extended); | |||
} | } | |||
/** | /** | |||
Likelihood fit (unbinned or unbinned) depending on the type of data | Likelihood fit (unbinned or unbinned) depending on the type of data | |||
If Binned default is extended | If Binned default is extended | |||
If Unbinned defult is NOT extended (for backward compatibility) | If Unbinned default is NOT extended (for backward compatibility) | |||
*/ | */ | |||
template <class Data> | template <class Data> | |||
bool LikelihoodFit(const Data & data ) { | bool LikelihoodFit(const Data & data ) { | |||
return DoLikelihoodFit(data); | return DoLikelihoodFit(data); | |||
} | } | |||
/** | /** | |||
Likelihood fit using extended or not extended method | Likelihood fit using extended or not extended method | |||
*/ | */ | |||
template <class Data> | template <class Data> | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
FumiliMinimizer.h | FumiliMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 84 | skipping to change at line 84 | |||
/** | /** | |||
Accessor to the Minimum builder of the minimizer. | Accessor to the Minimum builder of the minimizer. | |||
@return a reference to the Minimum builder. | @return a reference to the Minimum builder. | |||
*/ | */ | |||
const FumiliBuilder& Builder() const {return fMinBuilder;} | const FumiliBuilder& Builder() const {return fMinBuilder;} | |||
FumiliBuilder& Builder() {return fMinBuilder;} | ||||
// for Fumili | // for Fumili | |||
FunctionMinimum Minimize(const FCNBase&, const MnUserParameterState&, co nst MnStrategy&, unsigned int maxfcn = 0, double toler = 0.1) const; | FunctionMinimum Minimize(const FCNBase&, const MnUserParameterState&, co nst MnStrategy&, unsigned int maxfcn = 0, double toler = 0.1) const; | |||
virtual FunctionMinimum Minimize(const FCNGradientBase&, const MnUserPar ameterState&, const MnStrategy&, unsigned int maxfcn = 0, double toler = 0. 1) const; | virtual FunctionMinimum Minimize(const FCNGradientBase&, const MnUserPar ameterState&, const MnStrategy&, unsigned int maxfcn = 0, double toler = 0. 1) const; | |||
// need to re-implement all function in ModularFuncitionMinimizer otherw ise they will be hided | // need to re-implement all function in ModularFuncitionMinimizer otherw ise they will be hided | |||
virtual FunctionMinimum Minimize(const FCNBase& fcn, const std::vector<d ouble>& par, const std::vector<double>& err, unsigned int stra = 1, unsigne d int maxfcn = 0, double toler = 0.1) const { | virtual FunctionMinimum Minimize(const FCNBase& fcn, const std::vector<d ouble>& par, const std::vector<double>& err, unsigned int stra = 1, unsigne d int maxfcn = 0, double toler = 0.1) const { | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
GSLMinimizer.h | GSLMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 42 | skipping to change at line 42 | |||
#endif | #endif | |||
#ifndef ROOT_Math_IFunctionfwd | #ifndef ROOT_Math_IFunctionfwd | |||
#include "Math/IFunctionfwd.h" | #include "Math/IFunctionfwd.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_IParamFunctionfwd | #ifndef ROOT_Math_IParamFunctionfwd | |||
#include "Math/IParamFunctionfwd.h" | #include "Math/IParamFunctionfwd.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_MinimizerVariable | #ifndef ROOT_Math_BasicMinimizer | |||
#include "Math/MinimizerVariable.h" | #include "Math/BasicMinimizer.h" | |||
#endif | #endif | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
#include <string> | #include <string> | |||
namespace ROOT { | namespace ROOT { | |||
namespace Math { | namespace Math { | |||
skipping to change at line 86 | skipping to change at line 86 | |||
See <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Multidimen sional-Minimization.html">GSL doc</A> | See <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Multidimen sional-Minimization.html">GSL doc</A> | |||
from more info on the GSL minimization algorithms. | from more info on the GSL minimization algorithms. | |||
The class implements the ROOT::Math::Minimizer interface and can be inst antiated using the | The class implements the ROOT::Math::Minimizer interface and can be inst antiated using the | |||
ROOT plugin manager (plugin name is "GSLMultiMin"). The varius minimizat ion algorithms | ROOT plugin manager (plugin name is "GSLMultiMin"). The varius minimizat ion algorithms | |||
(conjugatefr, conjugatepr, bfgs, etc..) can be passed as enumerations an d also as a string. | (conjugatefr, conjugatepr, bfgs, etc..) can be passed as enumerations an d also as a string. | |||
The default algorithm is conjugatefr (Fletcher-Reeves conjugate gradient algorithm). | The default algorithm is conjugatefr (Fletcher-Reeves conjugate gradient algorithm). | |||
@ingroup MultiMin | @ingroup MultiMin | |||
*/ | */ | |||
class GSLMinimizer : public ROOT::Math::Minimizer { | class GSLMinimizer : public ROOT::Math::BasicMinimizer { | |||
public: | public: | |||
/** | /** | |||
Default constructor | Default constructor | |||
*/ | */ | |||
GSLMinimizer (ROOT::Math::EGSLMinimizerType type = ROOT::Math::kConjugat eFR ); | GSLMinimizer (ROOT::Math::EGSLMinimizerType type = ROOT::Math::kConjugat eFR ); | |||
/** | /** | |||
Constructor with a string giving name of algorithm | Constructor with a string giving name of algorithm | |||
skipping to change at line 111 | skipping to change at line 111 | |||
Destructor | Destructor | |||
*/ | */ | |||
virtual ~GSLMinimizer (); | virtual ~GSLMinimizer (); | |||
private: | private: | |||
// usually copying is non trivial, so we make this unaccessible | // usually copying is non trivial, so we make this unaccessible | |||
/** | /** | |||
Copy constructor | Copy constructor | |||
*/ | */ | |||
GSLMinimizer(const GSLMinimizer &) : Minimizer() {} | GSLMinimizer(const GSLMinimizer &) : BasicMinimizer() {} | |||
/** | /** | |||
Assignment operator | Assignment operator | |||
*/ | */ | |||
GSLMinimizer & operator = (const GSLMinimizer & rhs) { | GSLMinimizer & operator = (const GSLMinimizer & rhs) { | |||
if (this == &rhs) return *this; // time saving self-test | if (this == &rhs) return *this; // time saving self-test | |||
return *this; | return *this; | |||
} | } | |||
public: | public: | |||
/// set the function to minimize | /// set the function to minimize | |||
virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); | virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); | |||
/// set gradient the function to minimize | /// set the function to minimize | |||
virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func); | virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func) { | |||
BasicMinimizer::SetFunction(func);} | ||||
/// set free variable | ||||
virtual bool SetVariable(unsigned int ivar, const std::string & name, do | ||||
uble val, double step); | ||||
/// set lower limit variable (override if minimizer supports them ) | ||||
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str | ||||
ing & name , double val , double step , double lower ); | ||||
/// set upper limit variable (override if minimizer supports them ) | ||||
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri | ||||
ng & name , double val , double step , double upper ); | ||||
/// set upper/lower limited variable (override if minimizer supports the | ||||
m ) | ||||
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & | ||||
name , double val , double step , double /* lower */, double /* upper */); | ||||
/// set fixed variable (override if minimizer supports them ) | ||||
virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string | ||||
& /* name */, double /* val */); | ||||
/// set the value of an existing variable | ||||
virtual bool SetVariableValue(unsigned int ivar, double val ); | ||||
/// set the values of all existing variables (array must be dimensioned | ||||
to the size of existing parameters) | ||||
virtual bool SetVariableValues(const double * x); | ||||
/// method to perform the minimization | /// method to perform the minimization | |||
virtual bool Minimize(); | virtual bool Minimize(); | |||
/// return minimum function value | ||||
virtual double MinValue() const { return fMinVal; } | ||||
/// return expected distance reached from the minimum | /// return expected distance reached from the minimum | |||
virtual double Edm() const { return 0; } // not impl. } | virtual double Edm() const { return 0; } // not impl. } | |||
/// return pointer to X values at the minimum | ||||
virtual const double * X() const { return &fValues.front(); } | ||||
/// return pointer to gradient values at the minimum | /// return pointer to gradient values at the minimum | |||
virtual const double * MinGradient() const; | virtual const double * MinGradient() const; | |||
/// number of function calls to reach the minimum | /// number of function calls to reach the minimum | |||
virtual unsigned int NCalls() const; | virtual unsigned int NCalls() const; | |||
/// this is <= Function().NDim() which is the total | ||||
/// number of variables (free+ constrained ones) | ||||
virtual unsigned int NDim() const { return fValues.size(); } | ||||
/// number of free variables (real dimension of the problem) | ||||
/// this is <= Function().NDim() which is the total number of free param | ||||
eters | ||||
virtual unsigned int NFree() const { return fObjFunc->NDim(); } | ||||
/// minimizer provides error and error matrix | /// minimizer provides error and error matrix | |||
virtual bool ProvidesError() const { return false; } | virtual bool ProvidesError() const { return false; } | |||
/// return errors at the minimum | /// return errors at the minimum | |||
virtual const double * Errors() const { | virtual const double * Errors() const { | |||
return 0; | return 0; | |||
} | } | |||
/** return covariance matrices elements | /** return covariance matrices elements | |||
if the variable is fixed the matrix is zero | if the variable is fixed the matrix is zero | |||
The ordering of the variables is the same as in errors | The ordering of the variables is the same as in errors | |||
*/ | */ | |||
virtual double CovMatrix(unsigned int , unsigned int ) const { return 0; } | virtual double CovMatrix(unsigned int , unsigned int ) const { return 0; } | |||
// method of only GSL minimizer (not inherited from interface) | ||||
/// return pointer to used objective gradient function | ||||
const ROOT::Math::IMultiGradFunction * ObjFunction() const { return fObj | ||||
Func; } | ||||
/// return transformation function (NULL if not having a transformation) | ||||
const ROOT::Math::MinimTransformFunction * TransformFunction() const; | ||||
protected: | protected: | |||
private: | private: | |||
// dimension of the function to be minimized | ||||
unsigned int fDim; | ||||
ROOT::Math::GSLMultiMinimizer * fGSLMultiMin; | ROOT::Math::GSLMultiMinimizer * fGSLMultiMin; | |||
const ROOT::Math::IMultiGradFunction * fObjFunc; | ||||
double fMinVal; | ||||
double fLSTolerance; // Line Search Tolerance | double fLSTolerance; // Line Search Tolerance | |||
std::vector<double> fValues; | ||||
//mutable std::vector<double> fErrors; | ||||
std::vector<double> fSteps; | ||||
std::vector<std::string> fNames; | ||||
std::vector<ROOT::Math::EMinimVariableType> fVarTypes; // vector specif | ||||
yng the type of variables | ||||
std::map< unsigned int, std::pair<double, double> > fBounds; // map spec | ||||
ifying the bound using as key the parameter index | ||||
}; | }; | |||
} // end namespace Fit | } // end namespace Fit | |||
} // end namespace ROOT | } // end namespace ROOT | |||
#endif /* ROOT_Math_GSLMinimizer */ | #endif /* ROOT_Math_GSLMinimizer */ | |||
End of changes. 12 change blocks. | ||||
66 lines changed or deleted | 7 lines changed or added | |||
GSLNLSMinimizer.h | GSLNLSMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 30 | skipping to change at line 30 | |||
* to the Free Software Foundation, Inc., 59 Temple Place, Suite * | * to the Free Software Foundation, Inc., 59 Temple Place, Suite * | |||
* 330, Boston, MA 02111-1307 USA, or contact the author. * | * 330, Boston, MA 02111-1307 USA, or contact the author. * | |||
* * | * * | |||
**********************************************************************/ | **********************************************************************/ | |||
// Header file for class GSLNLSMinimizer | // Header file for class GSLNLSMinimizer | |||
#ifndef ROOT_Math_GSLNLSMinimizer | #ifndef ROOT_Math_GSLNLSMinimizer | |||
#define ROOT_Math_GSLNLSMinimizer | #define ROOT_Math_GSLNLSMinimizer | |||
#ifndef ROOT_Math_Minimizer | #ifndef ROOT_Math_BasicMinimizer | |||
#include "Math/Minimizer.h" | #include "Math/BasicMinimizer.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_IFunctionfwd | #ifndef ROOT_Math_IFunctionfwd | |||
#include "Math/IFunctionfwd.h" | #include "Math/IFunctionfwd.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_IParamFunctionfwd | #ifndef ROOT_Math_IParamFunctionfwd | |||
#include "Math/IParamFunctionfwd.h" | #include "Math/IParamFunctionfwd.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_FitMethodFunction | #ifndef ROOT_Math_FitMethodFunction | |||
#include "Math/FitMethodFunction.h" | #include "Math/FitMethodFunction.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_MinimizerVariable | #ifndef ROOT_Math_MinimTransformVariable | |||
#include "Math/MinimizerVariable.h" | #include "Math/MinimTransformVariable.h" | |||
#endif | #endif | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
#include <string> | #include <string> | |||
namespace ROOT { | namespace ROOT { | |||
namespace Math { | namespace Math { | |||
skipping to change at line 153 | skipping to change at line 153 | |||
//_________________________________________________________________________ ____________________________ | //_________________________________________________________________________ ____________________________ | |||
/** | /** | |||
GSLNLSMinimizer class for Non Linear Least Square fitting | GSLNLSMinimizer class for Non Linear Least Square fitting | |||
It Uses the Levemberg-Marquardt algorithm from | It Uses the Levemberg-Marquardt algorithm from | |||
<A HREF="http://www.gnu.org/software/gsl/manual/html_node/Nonlinear-Leas t_002dSquares-Fitting.html"> | <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Nonlinear-Leas t_002dSquares-Fitting.html"> | |||
GSL Non Linear Least Square fitting</A>. | GSL Non Linear Least Square fitting</A>. | |||
@ingroup MultiMin | @ingroup MultiMin | |||
*/ | */ | |||
class GSLNLSMinimizer : public ROOT::Math::Minimizer { | class GSLNLSMinimizer : public ROOT::Math::BasicMinimizer { | |||
public: | public: | |||
/** | /** | |||
Default constructor | Default constructor | |||
*/ | */ | |||
GSLNLSMinimizer (int type = 0); | GSLNLSMinimizer (int type = 0); | |||
/** | /** | |||
Destructor (no operations) | Destructor (no operations) | |||
*/ | */ | |||
~GSLNLSMinimizer (); | ~GSLNLSMinimizer (); | |||
private: | private: | |||
// usually copying is non trivial, so we make this unaccessible | // usually copying is non trivial, so we make this unaccessible | |||
/** | /** | |||
Copy constructor | Copy constructor | |||
*/ | */ | |||
GSLNLSMinimizer(const GSLNLSMinimizer &) : ROOT::Math::Minimizer() {} | GSLNLSMinimizer(const GSLNLSMinimizer &) : ROOT::Math::BasicMinimizer() {} | |||
/** | /** | |||
Assignment operator | Assignment operator | |||
*/ | */ | |||
GSLNLSMinimizer & operator = (const GSLNLSMinimizer & rhs) { | GSLNLSMinimizer & operator = (const GSLNLSMinimizer & rhs) { | |||
if (this == &rhs) return *this; // time saving self-test | if (this == &rhs) return *this; // time saving self-test | |||
return *this; | return *this; | |||
} | } | |||
public: | public: | |||
/// set the function to minimize | /// set the function to minimize | |||
virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); | virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); | |||
/// set gradient the function to minimize | /// set gradient the function to minimize | |||
virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func); | virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func); | |||
/// set free variable | ||||
virtual bool SetVariable(unsigned int ivar, const std::string & name, do | ||||
uble val, double step); | ||||
/// set lower limited variable | ||||
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str | ||||
ing & name , double val , double step , double lower ); | ||||
/// set upper limited variable | ||||
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri | ||||
ng & name , double val , double step , double upper ); | ||||
/// set upper/lower limited variable | ||||
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & | ||||
name , double val , double step , double lower , double upper ); | ||||
/// set fixed variable | ||||
virtual bool SetFixedVariable(unsigned int ivar , const std::string & na | ||||
me , double val ); | ||||
/// set the value of an existing variable | ||||
virtual bool SetVariableValue(unsigned int ivar, double val ); | ||||
/// set the values of all existing variables (array must be dimensioned | ||||
to the size of existing parameters) | ||||
virtual bool SetVariableValues(const double * x); | ||||
/// method to perform the minimization | /// method to perform the minimization | |||
virtual bool Minimize(); | virtual bool Minimize(); | |||
/// return minimum function value | ||||
virtual double MinValue() const { return fMinVal; } | ||||
/// return expected distance reached from the minimum | /// return expected distance reached from the minimum | |||
virtual double Edm() const { return fEdm; } // not impl. } | virtual double Edm() const { return fEdm; } // not impl. } | |||
/// return pointer to X values at the minimum | ||||
virtual const double * X() const { return &fValues.front(); } | ||||
/// return pointer to gradient values at the minimum | /// return pointer to gradient values at the minimum | |||
virtual const double * MinGradient() const; | virtual const double * MinGradient() const; | |||
/// number of function calls to reach the minimum | /// number of function calls to reach the minimum | |||
virtual unsigned int NCalls() const { return (fObjFunc) ? fObjFunc->NCal | virtual unsigned int NCalls() const { return (fChi2Func) ? fChi2Func->NC | |||
ls() : 0; } | alls() : 0; } | |||
/// this is <= Function().NDim() which is the total | ||||
/// number of variables (free+ constrained ones) | ||||
virtual unsigned int NDim() const { return fDim; } | ||||
/// number of free variables (real dimension of the problem) | /// number of free variables (real dimension of the problem) | |||
/// this is <= Function().NDim() which is the total | /// this is <= Function().NDim() which is the total | |||
virtual unsigned int NFree() const { return fNFree; } | // virtual unsigned int NFree() const { return fNFree; } | |||
/// minimizer provides error and error matrix | /// minimizer provides error and error matrix | |||
virtual bool ProvidesError() const { return true; } | virtual bool ProvidesError() const { return true; } | |||
/// return errors at the minimum | /// return errors at the minimum | |||
virtual const double * Errors() const { return (fErrors.size() > 0) ? &f Errors.front() : 0; } | virtual const double * Errors() const { return (fErrors.size() > 0) ? &f Errors.front() : 0; } | |||
// { | // { | |||
// static std::vector<double> err; | // static std::vector<double> err; | |||
// err.resize(fDim); | // err.resize(fDim); | |||
// return &err.front(); | // return &err.front(); | |||
skipping to change at line 258 | skipping to change at line 231 | |||
*/ | */ | |||
virtual double CovMatrix(unsigned int , unsigned int ) const; | virtual double CovMatrix(unsigned int , unsigned int ) const; | |||
/// return covariance matrix status | /// return covariance matrix status | |||
virtual int CovMatrixStatus() const; | virtual int CovMatrixStatus() const; | |||
protected: | protected: | |||
private: | private: | |||
unsigned int fDim; // dimension of the function to be minimized | ||||
unsigned int fNFree; // dimension of the internal function to be mi nimized | unsigned int fNFree; // dimension of the internal function to be mi nimized | |||
unsigned int fSize; // number of fit points (residuals) | unsigned int fSize; // number of fit points (residuals) | |||
ROOT::Math::GSLMultiFit * fGSLMultiFit; // pointer to GSL multi f it solver | ROOT::Math::GSLMultiFit * fGSLMultiFit; // pointer to GSL multi f it solver | |||
const ROOT::Math::FitMethodFunction * fObjFunc; // pointer to Least square function | const ROOT::Math::FitMethodFunction * fChi2Func; // pointer to Leas t square function | |||
double fMinVal; // minimum function value | ||||
double fEdm; // edm value | double fEdm; // edm value | |||
double fLSTolerance; // Line Search Tolerance | double fLSTolerance; // Line Search Tolerance | |||
std::vector<double> fValues; | ||||
std::vector<double> fErrors; | std::vector<double> fErrors; | |||
std::vector<double> fCovMatrix; // cov matrix (stored as c ov[ i * dim + j] | std::vector<double> fCovMatrix; // cov matrix (stored as c ov[ i * dim + j] | |||
std::vector<double> fSteps; | ||||
std::vector<std::string> fNames; | ||||
std::vector<LSResidualFunc> fResiduals; //! transient Vector of the re sidual functions | std::vector<LSResidualFunc> fResiduals; //! transient Vector of the re sidual functions | |||
std::vector<ROOT::Math::EMinimVariableType> fVarTypes; // vector specif | ||||
yng the type of variables | ||||
std::map< unsigned int, std::pair<double, double> > fBounds; // map spec | ||||
ifying the bound using as key the parameter index | ||||
}; | }; | |||
} // end namespace Math | } // end namespace Math | |||
} // end namespace ROOT | } // end namespace ROOT | |||
#endif /* ROOT_Math_GSLNLSMinimizer */ | #endif /* ROOT_Math_GSLNLSMinimizer */ | |||
End of changes. 15 change blocks. | ||||
53 lines changed or deleted | 10 lines changed or added | |||
GSLSimAnMinimizer.h | GSLSimAnMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 30 | skipping to change at line 30 | |||
* to the Free Software Foundation, Inc., 59 Temple Place, Suite * | * to the Free Software Foundation, Inc., 59 Temple Place, Suite * | |||
* 330, Boston, MA 02111-1307 USA, or contact the author. * | * 330, Boston, MA 02111-1307 USA, or contact the author. * | |||
* * | * * | |||
**********************************************************************/ | **********************************************************************/ | |||
// Header file for class GSLSimAnMinimizer | // Header file for class GSLSimAnMinimizer | |||
#ifndef ROOT_Math_GSLSimAnMinimizer | #ifndef ROOT_Math_GSLSimAnMinimizer | |||
#define ROOT_Math_GSLSimAnMinimizer | #define ROOT_Math_GSLSimAnMinimizer | |||
#ifndef ROOT_Math_Minimizer | #ifndef ROOT_Math_BasicMinimizer | |||
#include "Math/Minimizer.h" | #include "Math/BasicMinimizer.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_IFunctionfwd | #ifndef ROOT_Math_IFunctionfwd | |||
#include "Math/IFunctionfwd.h" | #include "Math/IFunctionfwd.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_IParamFunctionfwd | #ifndef ROOT_Math_IParamFunctionfwd | |||
#include "Math/IParamFunctionfwd.h" | #include "Math/IParamFunctionfwd.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_GSLSimAnnealing | #ifndef ROOT_Math_GSLSimAnnealing | |||
#include "Math/GSLSimAnnealing.h" | #include "Math/GSLSimAnnealing.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_MinimizerVariable | ||||
#include "Math/MinimizerVariable.h" | ||||
#endif | ||||
#include <vector> | ||||
#include <map> | ||||
namespace ROOT { | namespace ROOT { | |||
namespace Math { | namespace Math { | |||
class MinimTransformFunction; | ||||
//_________________________________________________________________________ ____________ | //_________________________________________________________________________ ____________ | |||
/** | /** | |||
GSLSimAnMinimizer class for minimization using simulated annealing | GSLSimAnMinimizer class for minimization using simulated annealing | |||
using the algorithm from | using the algorithm from | |||
<A HREF="http://www.gnu.org/software/gsl/manual/html_node/Simulated-Anne aling.html"> | <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Simulated-Anne aling.html"> | |||
GSL</A>. | GSL</A>. | |||
It implements the ROOT::Minimizer interface and | It implements the ROOT::Minimizer interface and | |||
a plug-in (name "GSLSimAn") exists to instantiate this class via the plu g-in manager | a plug-in (name "GSLSimAn") exists to instantiate this class via the plu g-in manager | |||
@ingroup MultiMin | @ingroup MultiMin | |||
*/ | */ | |||
class GSLSimAnMinimizer : public ROOT::Math::Minimizer { | class GSLSimAnMinimizer : public ROOT::Math::BasicMinimizer { | |||
public: | public: | |||
/** | /** | |||
Default constructor | Default constructor | |||
*/ | */ | |||
GSLSimAnMinimizer (int type = 0); | GSLSimAnMinimizer (int type = 0); | |||
/** | /** | |||
Destructor (no operations) | Destructor (no operations) | |||
*/ | */ | |||
~GSLSimAnMinimizer (); | virtual ~GSLSimAnMinimizer (); | |||
private: | private: | |||
// usually copying is non trivial, so we make this unaccessible | // usually copying is non trivial, so we make this unaccessible | |||
/** | /** | |||
Copy constructor | Copy constructor | |||
*/ | */ | |||
GSLSimAnMinimizer(const GSLSimAnMinimizer &) : ROOT::Math::Minimizer() { } | GSLSimAnMinimizer(const GSLSimAnMinimizer &) : ROOT::Math::BasicMinimize r() {} | |||
/** | /** | |||
Assignment operator | Assignment operator | |||
*/ | */ | |||
GSLSimAnMinimizer & operator = (const GSLSimAnMinimizer & rhs) { | GSLSimAnMinimizer & operator = (const GSLSimAnMinimizer & rhs) { | |||
if (this == &rhs) return *this; // time saving self-test | if (this == &rhs) return *this; // time saving self-test | |||
return *this; | return *this; | |||
} | } | |||
public: | public: | |||
/// set the function to minimize | ||||
virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); | ||||
/// set gradient the function to minimize | ||||
virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func); | ||||
/// set free variable | ||||
virtual bool SetVariable(unsigned int ivar, const std::string & name, do | ||||
uble val, double step); | ||||
/// set fixed variable (override if minimizer supports them ) | ||||
virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string | ||||
& /* name */, double /* val */); | ||||
/// set lower limit variable (override if minimizer supports them ) | ||||
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str | ||||
ing & name , double val , double step , double lower ); | ||||
/// set upper limit variable (override if minimizer supports them ) | ||||
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri | ||||
ng & name , double val , double step , double upper ); | ||||
/// set upper/lower limited variable (override if minimizer supports the | ||||
m ) | ||||
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & | ||||
name , double val , double step , double /* lower */, double /* upper */); | ||||
/// set the value of an existing variable | ||||
virtual bool SetVariableValue(unsigned int ivar, double val ); | ||||
/// set the values of all existing variables (array must be dimensioned | ||||
to the size of the existing parameters) | ||||
virtual bool SetVariableValues(const double * x); | ||||
/// method to perform the minimization | /// method to perform the minimization | |||
virtual bool Minimize(); | virtual bool Minimize(); | |||
/// return minimum function value | //number of calls | |||
virtual double MinValue() const { return fMinVal; } | unsigned int NCalls() const; | |||
/// return expected distance reached from the minimum | ||||
virtual double Edm() const { return 0; } // not impl. } | ||||
/// return pointer to X values at the minimum | ||||
virtual const double * X() const { return &fValues.front(); } | ||||
/// return pointer to gradient values at the minimum | ||||
virtual const double * MinGradient() const { return 0; } // not impl. | ||||
/// number of function calls to reach the minimum | ||||
virtual unsigned int NCalls() const { return 0; } // not yet ipl. | ||||
/// this is <= Function().NDim() which is the total | ||||
/// number of variables (free+ constrained ones) | ||||
virtual unsigned int NDim() const { return fDim; } | ||||
/// number of free variables (real dimension of the problem) | ||||
/// this is <= Function().NDim() which is the total | ||||
virtual unsigned int NFree() const { return fDim; } | ||||
/// minimizer provides error and error matrix | ||||
virtual bool ProvidesError() const { return false; } | ||||
/// return errors at the minimum | ||||
virtual const double * Errors() const { return 0; } | ||||
/** return covariance matrices elements | ||||
if the variable is fixed the matrix is zero | ||||
The ordering of the variables is the same as in errors | ||||
*/ | ||||
virtual double CovMatrix(unsigned int , unsigned int ) const { return 0; | ||||
} | ||||
/// return reference to the objective function | ||||
///virtual const ROOT::Math::IGenFunction & Function() const; | ||||
protected: | protected: | |||
private: | private: | |||
unsigned int fDim; // dimension of the function to be minimized | ||||
bool fOwnFunc; // flag to indicate if objective function is manag | ||||
ed | ||||
ROOT::Math::GSLSimAnnealing fSolver; | ROOT::Math::GSLSimAnnealing fSolver; | |||
const ROOT::Math::IMultiGenFunction * fObjFunc; | ||||
double fMinVal; // minimum values | ||||
mutable std::vector<double> fValues; | ||||
std::vector<double> fSteps; | ||||
std::vector<std::string> fNames; | ||||
std::vector<ROOT::Math::EMinimVariableType> fVarTypes; // vector specif | ||||
yng the type of variables | ||||
std::map< unsigned int, std::pair<double, double> > fBounds; // map spec | ||||
ifying the bound using as key the parameter index | ||||
}; | }; | |||
} // end namespace Math | } // end namespace Math | |||
} // end namespace ROOT | } // end namespace ROOT | |||
#endif /* ROOT_Math_GSLSimAnMinimizer */ | #endif /* ROOT_Math_GSLSimAnMinimizer */ | |||
End of changes. 10 change blocks. | ||||
99 lines changed or deleted | 7 lines changed or added | |||
G__ci.h | G__ci.h | |||
---|---|---|---|---|
skipping to change at line 1403 | skipping to change at line 1403 | |||
************************************************************************** / | ************************************************************************** / | |||
#define G__VAARG_SIZE 1024 | #define G__VAARG_SIZE 1024 | |||
typedef struct { | typedef struct { | |||
union { | union { | |||
char d[G__VAARG_SIZE]; | char d[G__VAARG_SIZE]; | |||
long i[G__VAARG_SIZE/sizeof(long)]; | long i[G__VAARG_SIZE/sizeof(long)]; | |||
} x; | } x; | |||
} G__va_arg_buf; | } G__va_arg_buf; | |||
// cross-compiling for iOS and iOS simulator (assumes host is Intel Mac OS X) | /* cross-compiling for iOS and iOS simulator (assumes host is Intel Mac OS X) */ | |||
#if defined(R__IOSSIM) || defined(R__IOS) | #if defined(R__IOSSIM) || defined(R__IOS) | |||
#ifdef __x86_64__ | #ifdef __x86_64__ | |||
#define R__x86_64 1 | #define R__x86_64 1 | |||
#undef __x86_64__ | #undef __x86_64__ | |||
#endif | #endif | |||
#ifdef __i386__ | #ifdef __i386__ | |||
#define R__i386 1 | #define R__i386 1 | |||
#undef __i386__ | #undef __i386__ | |||
#endif | #endif | |||
#ifdef R__IOSSIM | #ifdef R__IOSSIM | |||
skipping to change at line 1542 | skipping to change at line 1542 | |||
/********************************************** | /********************************************** | |||
* Other platforms, | * Other platforms, | |||
* Try copying object as value. | * Try copying object as value. | |||
**********************************************/ | **********************************************/ | |||
#define G__VAARG_NOSUPPORT | #define G__VAARG_NOSUPPORT | |||
#define G__VAARG_INC_COPY_N 4 | #define G__VAARG_INC_COPY_N 4 | |||
/* #define G__VAARG_PASS_BY_REFERENCE 8 */ | /* #define G__VAARG_PASS_BY_REFERENCE 8 */ | |||
#endif | #endif | |||
// cross-compiling for iOS and iOS simulator (assumes host is Intel Mac OS X) | /* cross-compiling for iOS and iOS simulator (assumes host is Intel Mac OS X) */ | |||
#if defined(R__IOSSIM) || defined(R__IOS) | #if defined(R__IOSSIM) || defined(R__IOS) | |||
#undef __i386__ | #undef __i386__ | |||
#undef __arm__ | #undef __arm__ | |||
#ifdef R__x86_64 | #ifdef R__x86_64 | |||
#define __x86_64__ 1 | #define __x86_64__ 1 | |||
#endif | #endif | |||
#ifdef R__i386 | #ifdef R__i386 | |||
#define __i386__ 1 | #define __i386__ 1 | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
G__ci_fproto.h | G__ci_fproto.h | |||
---|---|---|---|---|
skipping to change at line 20 | skipping to change at line 20 | |||
* Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch) | * Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch) | |||
* | * | |||
* For the licensing terms see the file COPYING | * For the licensing terms see the file COPYING | |||
* | * | |||
************************************************************************/ | ************************************************************************/ | |||
#ifndef G__CI_FPROTO_INCLUDE | #ifndef G__CI_FPROTO_INCLUDE | |||
#define G__CI_FPROTO_INCLUDE | #define G__CI_FPROTO_INCLUDE | |||
#if defined(__clang__) | #if defined(__clang__) | |||
# if __has_warning("-Wreturn-type-c-linkage") | # if __has_warning("-Wreturn-type-c-linkage") | |||
// 'G__getfunction' has C-linkage specified, but returns | /* 'G__getfunction' has C-linkage specified, but returns | |||
// user-defined type 'G__value' which is incompatible with C | user-defined type 'G__value' which is incompatible with C | |||
*/ | ||||
# pragma clang diagnostic ignored "-Wreturn-type-c-linkage" | # pragma clang diagnostic ignored "-Wreturn-type-c-linkage" | |||
# endif | # endif | |||
#endif | #endif | |||
G__DECL_API(0, unsigned long, G__uint, (G__value buf)) | G__DECL_API(0, unsigned long, G__uint, (G__value buf)) | |||
G__DECL_API(1, int, G__fgetline, (char *string)) | G__DECL_API(1, int, G__fgetline, (char *string)) | |||
G__DECL_API(2, int, G__load, (char *commandfile)) | G__DECL_API(2, int, G__load, (char *commandfile)) | |||
/* G__DECL_API(???, float, G__float, (G__value buf))*/ | /* G__DECL_API(???, float, G__float, (G__value buf))*/ | |||
G__DECL_API(221, int, G__globalsetup,(void)) | G__DECL_API(221, int, G__globalsetup,(void)) | |||
G__DECL_API(3, int, G__call_setup_funcs, (void)) | G__DECL_API(3, int, G__call_setup_funcs, (void)) | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
GaussIntegrator.h | GaussIntegrator.h | |||
---|---|---|---|---|
skipping to change at line 49 | skipping to change at line 49 | |||
*/ | */ | |||
class GaussIntegrator: public VirtualIntegratorOneDim { | class GaussIntegrator: public VirtualIntegratorOneDim { | |||
public: | public: | |||
/** Destructor */ | /** Destructor */ | |||
virtual ~GaussIntegrator(); | virtual ~GaussIntegrator(); | |||
/** Default Constructor. */ | /** Default Constructor. */ | |||
GaussIntegrator(double relTol = 1.E-12); | GaussIntegrator(double absTol = 0, double relTol = 0); | |||
/** Static function: set the fgAbsValue flag. | /** Static function: set the fgAbsValue flag. | |||
By default TF1::Integral uses the original function value to compute the integral | By default TF1::Integral uses the original function value to compute the integral | |||
However, TF1::Moment, CentralMoment require to compute the integral | However, TF1::Moment, CentralMoment require to compute the integral | |||
using the absolute value of the function. | using the absolute value of the function. | |||
*/ | */ | |||
void AbsValue(bool flag); | void AbsValue(bool flag); | |||
// Implementing VirtualIntegrator Interface | // Implementing VirtualIntegrator Interface | |||
/** Set the desired relative Error. */ | /** Set the desired relative Error. */ | |||
virtual void SetRelTolerance (double); | virtual void SetRelTolerance (double eps) { fEpsRel = eps; } | |||
/** This method is not implemented. */ | /** This method is not implemented. */ | |||
virtual void SetAbsTolerance (double); | virtual void SetAbsTolerance (double eps) { fEpsAbs = eps; } | |||
/** Returns the result of the last Integral calculation. */ | /** Returns the result of the last Integral calculation. */ | |||
double Result () const; | double Result () const; | |||
/** Return the estimate of the absolute Error of the last Integral calcu lation. */ | /** Return the estimate of the absolute Error of the last Integral calcu lation. */ | |||
double Error () const; | double Error () const; | |||
/** return the status of the last integration - 0 in case of success */ | /** return the status of the last integration - 0 in case of success */ | |||
int Status () const; | int Status () const; | |||
skipping to change at line 118 | skipping to change at line 118 | |||
sequence 1,1/2,1/4,... for which r(xi-1, xi) < EPS. | sequence 1,1/2,1/4,... for which r(xi-1, xi) < EPS. | |||
If, at any stage in the process of subdivision, the ratio | If, at any stage in the process of subdivision, the ratio | |||
Begin_Latex | Begin_Latex | |||
q = #||{#frac{x_{i}-x_{i-1}}{B-A}} | q = #||{#frac{x_{i}-x_{i-1}}{B-A}} | |||
End_Latex | End_Latex | |||
is so small that 1+0.005q is indistinguishable from 1 to | is so small that 1+0.005q is indistinguishable from 1 to | |||
machine accuracy, an error exit occurs with the function value | machine accuracy, an error exit occurs with the function value | |||
set equal to zero. | set equal to zero. | |||
Accuracy: | Accuracy: | |||
The user provides absolute and relative error bounds (epsrel and epsa | ||||
bs) and the | ||||
algorithm will stop when the estimated error is less than the epsabs | ||||
OR is less | ||||
than |I| * epsrel. | ||||
Unless there is severe cancellation of positive and negative values o f | Unless there is severe cancellation of positive and negative values o f | |||
f(x) over the interval [A,B], the relative error may be considered as | f(x) over the interval [A,B], the relative error may be considered as | |||
specifying a bound on the <I>relative</I> error of I in the case | specifying a bound on the <I>relative</I> error of I in the case | |||
|I|>1, and a bound on the absolute error in the case |I|<1. Mor e | |I|>1, and a bound on the absolute error in the case |I|<1. Mor e | |||
precisely, if k is the number of sub-intervals contributing to the | precisely, if k is the number of sub-intervals contributing to the | |||
approximation (see Method), and if | approximation (see Method), and if | |||
Begin_Latex | Begin_Latex | |||
I_{abs} = #int^{B}_{A} #||{f(x)}dx | I_{abs} = #int^{B}_{A} #||{f(x)}dx | |||
End_Latex | End_Latex | |||
then the relation | then the relation | |||
skipping to change at line 217 | skipping to change at line 220 | |||
/** | /** | |||
Integration surrugate method. Return integral of passed function in interval [a,b] | Integration surrugate method. Return integral of passed function in interval [a,b] | |||
Derived class (like GaussLegendreIntegrator) can re-implement this m ethod to modify to use | Derived class (like GaussLegendreIntegrator) can re-implement this m ethod to modify to use | |||
an improved algorithm | an improved algorithm | |||
*/ | */ | |||
virtual double DoIntegral (double a, double b, const IGenFunction* func) ; | virtual double DoIntegral (double a, double b, const IGenFunction* func) ; | |||
protected: | protected: | |||
static bool fgAbsValue; // AbsValue used for the calculation of the integral | static bool fgAbsValue; // AbsValue used for the calculation of the integral | |||
double fEpsilon; // Relative error. | double fEpsRel; // Relative error. | |||
double fEpsAbs; // Absolute error. | ||||
bool fUsedOnce; // Bool value to check if the function was at least called once. | bool fUsedOnce; // Bool value to check if the function was at least called once. | |||
double fLastResult; // Result from the last stimation. | double fLastResult; // Result from the last stimation. | |||
double fLastError; // Error from the last stimation. | double fLastError; // Error from the last stimation. | |||
const IGenFunction* fFunction; // Pointer to function used. | const IGenFunction* fFunction; // Pointer to function used. | |||
}; | }; | |||
/** | /** | |||
Auxillary inner class for mapping infinite and semi-infinite integrals | Auxillary inner class for mapping infinite and semi-infinite integrals | |||
*/ | */ | |||
End of changes. 5 change blocks. | ||||
4 lines changed or deleted | 10 lines changed or added | |||
GenAlgoOptions.h | GenAlgoOptions.h | |||
---|---|---|---|---|
skipping to change at line 25 | skipping to change at line 25 | |||
#include <map> | #include <map> | |||
#include <iomanip> | #include <iomanip> | |||
namespace ROOT { | namespace ROOT { | |||
namespace Math { | namespace Math { | |||
//_________________________________________________________________________ ______ | //_________________________________________________________________________ ______ | |||
/** | /** | |||
class implementing generic options for a numerical algorithm | class implementing generic options for a numerical algorithm | |||
Just store the otions in a maps of string-value pair | Just store the options in a map of string-value pairs | |||
@ingroup NumAlgo | @ingroup NumAlgo | |||
*/ | */ | |||
class GenAlgoOptions : public IOptions { | class GenAlgoOptions : public IOptions { | |||
public: | public: | |||
GenAlgoOptions() /* : fExtraOptions(0) */ {} | GenAlgoOptions() /* : fExtraOptions(0) */ {} | |||
virtual ~GenAlgoOptions() {}// { if (fExtraOptions) delete fExtraOptions ; } | virtual ~GenAlgoOptions() {}// { if (fExtraOptions) delete fExtraOptions ; } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
GeneticMinimizer.h | GeneticMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 38 | skipping to change at line 38 | |||
*/ | */ | |||
struct GeneticMinimizerParameters { | struct GeneticMinimizerParameters { | |||
Int_t fPopSize; | Int_t fPopSize; | |||
Int_t fNsteps; | Int_t fNsteps; | |||
Int_t fCycles; | Int_t fCycles; | |||
Int_t fSC_steps; | Int_t fSC_steps; | |||
Int_t fSC_rate; | Int_t fSC_rate; | |||
Double_t fSC_factor; | Double_t fSC_factor; | |||
Double_t fConvCrit; | Double_t fConvCrit; | |||
Int_t fSeed; | ||||
// constructor with default value | // constructor with default value | |||
GeneticMinimizerParameters(); | GeneticMinimizerParameters(); | |||
}; | }; | |||
//_________________________________________________________________________ ______ | //_________________________________________________________________________ ______ | |||
/** | /** | |||
GeneticMinimizer | GeneticMinimizer | |||
@ingroup MultiMin | @ingroup MultiMin | |||
*/ | */ | |||
class GeneticMinimizer: public ROOT::Math::Minimizer { | class GeneticMinimizer: public ROOT::Math::Minimizer { | |||
public: | public: | |||
GeneticMinimizer (int = 0); | //GeneticMinimizer (int = 0); | |||
GeneticMinimizer (int i = 0); | ||||
virtual ~GeneticMinimizer (); | virtual ~GeneticMinimizer (); | |||
virtual void Clear(); | virtual void Clear(); | |||
using ROOT::Math::Minimizer::SetFunction; | using ROOT::Math::Minimizer::SetFunction; | |||
virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); | virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func); | |||
virtual bool SetLimitedVariable(unsigned int , const std::string& , doub le , double , double, double); | virtual bool SetLimitedVariable(unsigned int , const std::string& , doub le , double , double, double); | |||
virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step); | virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step); | |||
virtual bool SetFixedVariable(unsigned int ivar , const std::string & n ame , double val); | virtual bool SetFixedVariable(unsigned int ivar , const std::string & n ame , double val); | |||
skipping to change at line 81 | skipping to change at line 83 | |||
virtual unsigned int NDim() const; | virtual unsigned int NDim() const; | |||
virtual unsigned int NFree() const; | virtual unsigned int NFree() const; | |||
virtual bool ProvidesError() const; | virtual bool ProvidesError() const; | |||
virtual const double * Errors() const; | virtual const double * Errors() const; | |||
virtual double CovMatrix(unsigned int i, unsigned int j) const; | virtual double CovMatrix(unsigned int i, unsigned int j) const; | |||
void SetParameters(const GeneticMinimizerParameters & params ); | void SetParameters(const GeneticMinimizerParameters & params ); | |||
void SetRandomSeed(int seed) { fParameters.fSeed = seed; } | ||||
const GeneticMinimizerParameters & MinimizerParameters() const { return | ||||
fParameters; } | ||||
virtual ROOT::Math::MinimizerOptions Options() const; | virtual ROOT::Math::MinimizerOptions Options() const; | |||
virtual void SetOptions(const ROOT::Math::MinimizerOptions & opt); | virtual void SetOptions(const ROOT::Math::MinimizerOptions & opt); | |||
protected: | protected: | |||
void GetGeneticOptions(ROOT::Math::MinimizerOptions & opt) const; | void GetGeneticOptions(ROOT::Math::MinimizerOptions & opt) const; | |||
std::vector<TMVA::Interval*> fRanges; | std::vector<TMVA::Interval*> fRanges; | |||
TMVA::IFitterTarget* fFitness; | TMVA::IFitterTarget* fFitness; | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 8 lines changed or added | |||
HypoTestInverter.h | HypoTestInverter.h | |||
---|---|---|---|---|
skipping to change at line 120 | skipping to change at line 120 | |||
// retrieved a reference to the internally used HypoTestCalculator | // retrieved a reference to the internally used HypoTestCalculator | |||
// it might be invalid when the class is deleted | // it might be invalid when the class is deleted | |||
HypoTestCalculatorGeneric * GetHypoTestCalculator() const { return fCalc ulator0; } | HypoTestCalculatorGeneric * GetHypoTestCalculator() const { return fCalc ulator0; } | |||
// get the upper/lower limit distribution | // get the upper/lower limit distribution | |||
SamplingDistribution * GetLowerLimitDistribution(bool rebuild=false, int nToys = 100); | SamplingDistribution * GetLowerLimitDistribution(bool rebuild=false, int nToys = 100); | |||
SamplingDistribution * GetUpperLimitDistribution(bool rebuild=false, int nToys = 100); | SamplingDistribution * GetUpperLimitDistribution(bool rebuild=false, int nToys = 100); | |||
// function to rebuild the distributions | // function to rebuild the distributions | |||
SamplingDistribution * RebuildDistributions(bool isUpper=true, int nToys = 100, | SamplingDistribution * RebuildDistributions(bool isUpper=true, int nToys = 100, | |||
TList * clsDist = 0, TList * clsbDist= 0, TList * clbDist = 0); | TList * clsDist = 0, TList * clsbDist= 0, TList * clbDist = 0, const char * outputfile = "HypoTestInver terRebuiltDist.root"); | |||
// get the test statistic | // get the test statistic | |||
TestStatistic * GetTestStatistic() const; | TestStatistic * GetTestStatistic() const; | |||
// set the test statistic | // set the test statistic | |||
bool SetTestStatistic(TestStatistic& stat); | bool SetTestStatistic(TestStatistic& stat); | |||
// set verbose level (0,1,2) | // set verbose level (0,1,2) | |||
void SetVerbose(int level=1) { fVerbose = level; } | void SetVerbose(int level=1) { fVerbose = level; } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
Interpolator.h | Interpolator.h | |||
---|---|---|---|---|
skipping to change at line 69 | skipping to change at line 69 | |||
*/ | */ | |||
class Interpolator { | class Interpolator { | |||
public: | public: | |||
/** | /** | |||
Constructs an interpolator class from number of data points and with Interpolation::Type type. | Constructs an interpolator class from number of data points and with Interpolation::Type type. | |||
The data can be set later on with the SetData method. | The data can be set later on with the SetData method. | |||
In case the data size is not known, better using the default of zero or the next constructor later on. | In case the data size is not known, better using the default of zero or the next constructor later on. | |||
The defult interpolation type is Cubic spline | The default interpolation type is Cubic spline | |||
*/ | */ | |||
Interpolator(unsigned int ndata = 0, Interpolation::Type type = Interpol ation::kCSPLINE); | Interpolator(unsigned int ndata = 0, Interpolation::Type type = Interpol ation::kCSPLINE); | |||
/** | /** | |||
Constructs an interpolator class from vector of data points \f$ (x_i, y_i )\f$ and with Interpolation::Type type. | Constructs an interpolator class from vector of data points \f$ (x_i, y_i )\f$ and with Interpolation::Type type. | |||
The method will compute a continuous interpolating function \f$ y(x) \f$ such that \f$ y_i = y ( x_i )\f$. | The method will compute a continuous interpolating function \f$ y(x) \f$ such that \f$ y_i = y ( x_i )\f$. | |||
The defult interpolation type is Cubic spline | The default interpolation type is Cubic spline | |||
*/ | */ | |||
Interpolator(const std::vector<double> & x, const std::vector<double> & y, Interpolation::Type type = Interpolation::kCSPLINE); | Interpolator(const std::vector<double> & x, const std::vector<double> & y, Interpolation::Type type = Interpolation::kCSPLINE); | |||
virtual ~Interpolator(); | virtual ~Interpolator(); | |||
private: | private: | |||
// usually copying is non trivial, so we make this unaccessible | // usually copying is non trivial, so we make this unaccessible | |||
Interpolator(const Interpolator &); | Interpolator(const Interpolator &); | |||
Interpolator & operator = (const Interpolator &); | Interpolator & operator = (const Interpolator &); | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
KDEKernel.h | KDEKernel.h | |||
---|---|---|---|---|
skipping to change at line 40 | skipping to change at line 40 | |||
#define ROOT_TMVA_KDEKernel | #define ROOT_TMVA_KDEKernel | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
// // | // // | |||
// KDEKernel // | // KDEKernel // | |||
// // | // // | |||
// KDE Kernel for "smoothing" the PDFs // | // KDE Kernel for "smoothing" the PDFs // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_Rtypes | ||||
#include "Rtypes.h" | ||||
#endif | ||||
class TH1; | class TH1; | |||
class TH1F; | class TH1F; | |||
class TF1; | class TF1; | |||
namespace TMVA { | namespace TMVA { | |||
class MsgLogger; | class MsgLogger; | |||
class KDEKernel { | class KDEKernel { | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 4 lines changed or added | |||
LikelihoodInterval.h | LikelihoodInterval.h | |||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
class Minimizer; | class Minimizer; | |||
} | } | |||
} | } | |||
namespace RooStats { | namespace RooStats { | |||
class LikelihoodInterval : public ConfInterval { | class LikelihoodInterval : public ConfInterval { | |||
public: | public: | |||
// defult constructor | // default constructor | |||
explicit LikelihoodInterval(const char* name = 0); | explicit LikelihoodInterval(const char* name = 0); | |||
/// construct the interval from a Profile Likelihood object, paramete r of interest and optionally a snapshot of | /// construct the interval from a Profile Likelihood object, paramete r of interest and optionally a snapshot of | |||
/// POI with their best fit values | /// POI with their best fit values | |||
LikelihoodInterval(const char* name, RooAbsReal*, const RooArgSet*, RooArgSet * = 0); | LikelihoodInterval(const char* name, RooAbsReal*, const RooArgSet*, RooArgSet * = 0); | |||
// destructor | // destructor | |||
virtual ~LikelihoodInterval(); | virtual ~LikelihoodInterval(); | |||
// check if given point is in the interval | // check if given point is in the interval | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
LikelihoodIntervalPlot.h | LikelihoodIntervalPlot.h | |||
---|---|---|---|---|
skipping to change at line 56 | skipping to change at line 56 | |||
// set plot range (for 1D plot) | // set plot range (for 1D plot) | |||
void SetRange(double x1, double x2) { fXmin = x1; fXmax = x2; } | void SetRange(double x1, double x2) { fXmin = x1; fXmax = x2; } | |||
// set plot range (for 2D plot) | // set plot range (for 2D plot) | |||
void SetRange(double x1, double y1, double x2, double y2) { | void SetRange(double x1, double y1, double x2, double y2) { | |||
fXmin = x1; fXmax = x2; | fXmin = x1; fXmax = x2; | |||
fYmin = y1; fYmax = y2; | fYmin = y1; fYmax = y2; | |||
} | } | |||
//set plot precision (when drawing a RooPlot) | //set plot precision (when drawing a RooPlot) | |||
void SetPrecision(double eps) { fPrecision = eps; } | void SetPrecision(double eps) { fPrecision = eps; } | |||
// set the line color for the 1D interval lines or contours (2D) | ||||
void SetContourColor(const Color_t color) {fColor = color;} | ||||
void SetLineColor(const Color_t color) {fLineColor = color;} | void SetLineColor(const Color_t color) {fLineColor = color;} | |||
// set the fill contour color | ||||
void SetFillStyle(const Style_t style) {fFillStyle = style;} | ||||
// set the fill contour color | ||||
void SetContourColor(const Color_t color) {fColor = color;} | ||||
void SetMaximum(const Double_t theMaximum) {fMaximum = theMaximum;} | void SetMaximum(const Double_t theMaximum) {fMaximum = theMaximum;} | |||
void SetNPoints(Int_t np) { fNPoints = np; } | void SetNPoints(Int_t np) { fNPoints = np; } | |||
// draw the likelihood interval or contour | // draw the likelihood interval or contour | |||
// for the 1D case a RooPlot is drawn by default of the profiled Log-Li kelihood ratio | // for the 1D case a RooPlot is drawn by default of the profiled Log-Li kelihood ratio | |||
// if option "TF1" is used the objects is drawn using a TF1 scanning th e LL function in a | // if option "TF1" is used the objects is drawn using a TF1 scanning th e LL function in a | |||
// grid of the setetd points (by default | // grid of the setetd points (by default | |||
// the TF1 can be costumized by setting maximum and the number of point s to scan | // the TF1 can be costumized by setting maximum and the number of point s to scan | |||
void Draw(const Option_t *options=0); | void Draw(const Option_t *options=0); | |||
private: | private: | |||
Int_t fColor; // color for the contour (for 2D) or function (in | Color_t fColor; // color for the contour (for 2D) or function ( | |||
1D) | in 1D) | |||
Int_t fFillStyle; // fill style for contours | Style_t fFillStyle; // fill style for contours | |||
Int_t fLineColor; // line color for the interval (1D) or for other | Color_t fLineColor; // line color for the interval (1D) or for othe | |||
contours (2D) | r contours (2D) | |||
Int_t fNdimPlot; | Int_t fNdimPlot; | |||
Int_t fNPoints; // number of points used to scan the PL | Int_t fNPoints; // number of points used to scan the PL | |||
Double_t fMaximum; // function maximum | Double_t fMaximum; // function maximum | |||
// ranges for plots | // ranges for plots | |||
Double_t fXmin; | Double_t fXmin; | |||
Double_t fXmax; | Double_t fXmax; | |||
Double_t fYmin; | Double_t fYmin; | |||
Double_t fYmax; | Double_t fYmax; | |||
Double_t fPrecision; // RooCurve precision | Double_t fPrecision; // RooCurve precision | |||
End of changes. 3 change blocks. | ||||
7 lines changed or deleted | 10 lines changed or added | |||
LogLikelihoodFCN.h | LogLikelihoodFCN.h | |||
---|---|---|---|---|
skipping to change at line 125 | skipping to change at line 125 | |||
virtual typename BaseObjFunction::Type_t Type() const { return BaseObjF unction::kLogLikelihood; } | virtual typename BaseObjFunction::Type_t Type() const { return BaseObjF unction::kLogLikelihood; } | |||
/// access to const reference to the data | /// access to const reference to the data | |||
virtual const UnBinData & Data() const { return fData; } | virtual const UnBinData & Data() const { return fData; } | |||
/// access to const reference to the model function | /// access to const reference to the model function | |||
virtual const IModelFunction & ModelFunction() const { return fFunc; } | virtual const IModelFunction & ModelFunction() const { return fFunc; } | |||
// Use sum of the weight squared in evaluating the likelihood | // Use sum of the weight squared in evaluating the likelihood | |||
// (this is needed for calculating the errors) | // (this is needed for calculating the errors) | |||
void UseSumOfWeightSquare() { | void UseSumOfWeightSquare(bool on = true) { | |||
if (fWeight == 0) return; // do nothing if it was not weighted | if (fWeight == 0) return; // do nothing if it was not weighted | |||
fWeight = 2; | if (on) fWeight = 2; | |||
else fWeight = 1; | ||||
} | } | |||
protected: | protected: | |||
private: | private: | |||
/** | /** | |||
Evaluation of the function (required by interface) | Evaluation of the function (required by interface) | |||
*/ | */ | |||
virtual double DoEval (const double * x) const { | virtual double DoEval (const double * x) const { | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
MatrixFunctions.h | MatrixFunctions.h | |||
---|---|---|---|---|
skipping to change at line 103 | skipping to change at line 103 | |||
return lhs.apply(offset) * rhs.apply(0); | return lhs.apply(offset) * rhs.apply(0); | |||
} | } | |||
}; | }; | |||
//========================================================================= ===== | //========================================================================= ===== | |||
// VectorMatrixRowOp | // VectorMatrixRowOp | |||
//========================================================================= ===== | //========================================================================= ===== | |||
template <class Matrix, class Vector, unsigned int D2> | template <class Matrix, class Vector, unsigned int D2> | |||
class VectorMatrixRowOp { | class VectorMatrixRowOp { | |||
public: | public: | |||
typedef typename Vector::value_type T; | ||||
/// | /// | |||
VectorMatrixRowOp(const Matrix& lhs, const Vector& rhs) : | VectorMatrixRowOp(const Matrix& lhs, const Vector& rhs) : | |||
lhs_(lhs), rhs_(rhs) {} | lhs_(lhs), rhs_(rhs) {} | |||
/// | /// | |||
~VectorMatrixRowOp() {} | ~VectorMatrixRowOp() {} | |||
/// calc \f$ \sum_{j} a_{ij} * v_j \f$ | /// calc \f$ \sum_{j} a_{ij} * v_j \f$ | |||
inline typename Matrix::value_type apply(unsigned int i) const { | inline typename Matrix::value_type apply(unsigned int i) const { | |||
return meta_row_dot<D2-1>::f(lhs_, rhs_, i*D2); | return meta_row_dot<D2-1>::f(lhs_, rhs_, i*D2); | |||
} | } | |||
// check if passed pointer is in use | ||||
// check only the vector since this is a vector expression | ||||
inline bool IsInUse (const T * p) const { | ||||
return rhs_.IsInUse(p); | ||||
} | ||||
protected: | protected: | |||
const Matrix& lhs_; | const Matrix& lhs_; | |||
const Vector& rhs_; | const Vector& rhs_; | |||
}; | }; | |||
//========================================================================= ===== | //========================================================================= ===== | |||
// meta_col_dot | // meta_col_dot | |||
//========================================================================= ===== | //========================================================================= ===== | |||
template <unsigned int I> | template <unsigned int I> | |||
struct meta_col_dot { | struct meta_col_dot { | |||
skipping to change at line 156 | skipping to change at line 165 | |||
// VectorMatrixColOp | // VectorMatrixColOp | |||
//========================================================================= ===== | //========================================================================= ===== | |||
/** | /** | |||
Class for Vector-Matrix multiplication | Class for Vector-Matrix multiplication | |||
@ingroup Expression | @ingroup Expression | |||
*/ | */ | |||
template <class Vector, class Matrix, unsigned int D1> | template <class Vector, class Matrix, unsigned int D1> | |||
class VectorMatrixColOp { | class VectorMatrixColOp { | |||
public: | public: | |||
typedef typename Vector::value_type T; | ||||
/// | /// | |||
VectorMatrixColOp(const Vector& lhs, const Matrix& rhs) : | VectorMatrixColOp(const Vector& lhs, const Matrix& rhs) : | |||
lhs_(lhs), rhs_(rhs) {} | lhs_(lhs), rhs_(rhs) {} | |||
/// | /// | |||
~VectorMatrixColOp() {} | ~VectorMatrixColOp() {} | |||
/// calc \f$ \sum_{j} a_{ij} * v_j \f$ | /// calc \f$ \sum_{j} a_{ij} * v_j \f$ | |||
inline typename Matrix::value_type apply(unsigned int i) const { | inline typename Matrix::value_type apply(unsigned int i) const { | |||
return meta_col_dot<D1-1>::f(rhs_, lhs_, i); | return meta_col_dot<D1-1>::f(rhs_, lhs_, i); | |||
} | } | |||
// check if passed pointer is in use | ||||
// check only the vector since this is a vector expression | ||||
inline bool IsInUse (const T * p) const { | ||||
return lhs_.IsInUse(p); | ||||
} | ||||
protected: | protected: | |||
const Vector& lhs_; | const Vector& lhs_; | |||
const Matrix& rhs_; | const Matrix& rhs_; | |||
}; | }; | |||
/** | /** | |||
Matrix * Vector multiplication \f$ a(i) = \sum_{j} M(i,j) * b(j) \f$ | Matrix * Vector multiplication \f$ a(i) = \sum_{j} M(i,j) * b(j) \f$ | |||
returning a vector expression | returning a vector expression | |||
@ingroup MatrixFunctions | @ingroup MatrixFunctions | |||
End of changes. 4 change blocks. | ||||
0 lines changed or deleted | 17 lines changed or added | |||
MinimTransformFunction.h | MinimTransformFunction.h | |||
---|---|---|---|---|
skipping to change at line 18 | skipping to change at line 18 | |||
// Header file for class MinimTransformFunction | // Header file for class MinimTransformFunction | |||
#ifndef ROOT_Math_MinimTransformFunction | #ifndef ROOT_Math_MinimTransformFunction | |||
#define ROOT_Math_MinimTransformFunction | #define ROOT_Math_MinimTransformFunction | |||
#ifndef ROOT_Math_IFunction | #ifndef ROOT_Math_IFunction | |||
#include "Math/IFunction.h" | #include "Math/IFunction.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_MinimizerVariable | #ifndef ROOT_Math_MinimTransformVariable | |||
#include "Math/MinimizerVariable.h" | #include "Math/MinimTransformVariable.h" | |||
#endif | #endif | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
namespace ROOT { | namespace ROOT { | |||
namespace Math { | namespace Math { | |||
/** | /** | |||
skipping to change at line 49 | skipping to change at line 49 | |||
typedef ROOT::Math::IMultiGradFunction BaseGradFunc; | typedef ROOT::Math::IMultiGradFunction BaseGradFunc; | |||
typedef ROOT::Math::IMultiGradFunction::BaseFunc BaseFunc; | typedef ROOT::Math::IMultiGradFunction::BaseFunc BaseFunc; | |||
/** | /** | |||
Constructor from a IMultiGradFunction interface (which is managed by t he class) | Constructor from a IMultiGradFunction interface (which is managed by t he class) | |||
vector specifying the variable types (free, bounded or fixed, defined in enum EMinimVariableTypes ) | vector specifying the variable types (free, bounded or fixed, defined in enum EMinimVariableTypes ) | |||
variable values (used for the fixed ones) and a map with the bounds (f or the bounded variables) | variable values (used for the fixed ones) and a map with the bounds (f or the bounded variables) | |||
*/ | */ | |||
MinimTransformFunction ( const IMultiGradFunction * f, const std::vector <EMinimVariableType> & types, const std::vector<double> & values, | MinimTransformFunction ( const IMultiGradFunction * f, const std::vector <ROOT::Math::EMinimVariableType> & types, const std::vector<double> & value s, | |||
const std::map<unsigned int, std::pair<double, double> > & bounds); | const std::map<unsigned int, std::pair<double, double> > & bounds); | |||
/** | /** | |||
Destructor (delete function pointer) | Destructor (delete function pointer) | |||
*/ | */ | |||
~MinimTransformFunction () { | ~MinimTransformFunction () { | |||
if (fFunc) delete fFunc; | if (fFunc) delete fFunc; | |||
} | } | |||
// method inherited from IFunction interface | // method inherited from IFunction interface | |||
skipping to change at line 72 | skipping to change at line 72 | |||
unsigned int NTot() const { return fFunc->NDim(); } | unsigned int NTot() const { return fFunc->NDim(); } | |||
/// clone: not supported (since auto_ptr used in the fVariables) | /// clone: not supported (since auto_ptr used in the fVariables) | |||
IMultiGenFunction * Clone() const { | IMultiGenFunction * Clone() const { | |||
return 0; | return 0; | |||
} | } | |||
/// transform from internal to external | /// transform from internal to external | |||
/// result is cached also inside the class | /// result is cached also inside the class | |||
const double * Transformation( const double * x) const; | const double * Transformation( const double * x) const { | |||
Transformation(x, &fX[0]); | ||||
return &fX.front(); | ||||
} | ||||
/// transform from internal to external | ||||
void Transformation( const double * xint, double * xext) const; | ||||
/// inverse transformation (external -> internal) | /// inverse transformation (external -> internal) | |||
void InvTransformation(const double * xext, double * xint) const; | void InvTransformation(const double * xext, double * xint) const; | |||
/// inverse transformation for steps (external -> internal) at external point x | /// inverse transformation for steps (external -> internal) at external point x | |||
void InvStepTransformation(const double * x, const double * sext, doub le * sint) const; | void InvStepTransformation(const double * x, const double * sext, doub le * sint) const; | |||
///transform gradient vector (external -> internal) at internal point x | ///transform gradient vector (external -> internal) at internal point x | |||
void GradientTransformation(const double * x, const double *gExt, double * gInt) const; | void GradientTransformation(const double * x, const double *gExt, double * gInt) const; | |||
///transform covariance matrix (internal -> external) at internal point x | ///transform covariance matrix (internal -> external) at internal point x | |||
/// use row storages for matrices m(i,j) = rep[ i * dim + j] | /// use row storages for matrices m(i,j) = rep[ i * dim + j] | |||
void MatrixTransformation(const double * x, const double *covInt, double * covExt) const; | void MatrixTransformation(const double * x, const double *covInt, double * covExt) const; | |||
// return original function | ||||
const IMultiGradFunction *OriginalFunction() const { return fFunc; } | ||||
private: | private: | |||
/// function evaluation | /// function evaluation | |||
virtual double DoEval(const double * x) const { | virtual double DoEval(const double * x) const { | |||
#ifndef DO_THREADSAFE | ||||
return (*fFunc)(Transformation(x)); | return (*fFunc)(Transformation(x)); | |||
#else | ||||
std::vector<double> xext(fVariables.size() ); | ||||
Transformation(x, &xext[0]); | ||||
return (*fFunc)(&xext[0]); | ||||
#endif | ||||
} | } | |||
/// calculate derivatives | /// calculate derivatives | |||
virtual double DoDerivative (const double * x, unsigned int icoord ) co nst { | virtual double DoDerivative (const double * x, unsigned int icoord ) co nst { | |||
const MinimizerVariable & var = fVariables[ fIndex[icoord] ]; | const MinimTransformVariable & var = fVariables[ fIndex[icoord] ]; | |||
double dExtdInt = (var.IsLimited() ) ? var.DerivativeIntToExt( x[icoo rd] ) : 1.0; | double dExtdInt = (var.IsLimited() ) ? var.DerivativeIntToExt( x[icoo rd] ) : 1.0; | |||
double deriv = fFunc->Derivative( Transformation(x) , fIndex[icoord] ); | double deriv = fFunc->Derivative( Transformation(x) , fIndex[icoord] ); | |||
//std::cout << "Derivative icoord (ext)" << fIndex[icoord] << " dtr afo " << dExtdInt << " " << deriv << std::endl; | //std::cout << "Derivative icoord (ext)" << fIndex[icoord] << " dtr afo " << dExtdInt << " " << deriv << std::endl; | |||
return deriv * dExtdInt; | return deriv * dExtdInt; | |||
} | } | |||
// copy constructor for this class (disable by having it private) | // copy constructor for this class (disable by having it private) | |||
MinimTransformFunction( const MinimTransformFunction & ) : | MinimTransformFunction( const MinimTransformFunction & ) : | |||
BaseFunc(), BaseGradFunc() | BaseFunc(), BaseGradFunc() | |||
{} | {} | |||
// assignment operator for this class (disable by having it private) | // assignment operator for this class (disable by having it private) | |||
MinimTransformFunction & operator= ( const MinimTransformFunction & ) { | MinimTransformFunction & operator= ( const MinimTransformFunction & ) { | |||
return *this; | return *this; | |||
} | } | |||
private: | private: | |||
mutable std::vector<double> fX; // internal cached of exte rnal values | mutable std::vector<double> fX; // internal cached of exte rnal values | |||
std::vector<MinimizerVariable> fVariables; // vector of variable sett ings and tranformation function | std::vector<MinimTransformVariable> fVariables; // vector of variable settings and tranformation function | |||
std::vector<unsigned int> fIndex; // vector with external in dices for internal variables | std::vector<unsigned int> fIndex; // vector with external in dices for internal variables | |||
const IMultiGradFunction * fFunc; // user function | const IMultiGradFunction * fFunc; // user function | |||
}; | }; | |||
} // end namespace Math | } // end namespace Math | |||
} // end namespace ROOT | } // end namespace ROOT | |||
#endif /* ROOT_Math_MinimTransformFunction */ | #endif /* ROOT_Math_MinimTransformFunction */ | |||
End of changes. 8 change blocks. | ||||
6 lines changed or deleted | 21 lines changed or added | |||
Minimizer.h | Minimizer.h | |||
---|---|---|---|---|
skipping to change at line 24 | skipping to change at line 24 | |||
#define ROOT_Math_Minimizer | #define ROOT_Math_Minimizer | |||
#ifndef ROOT_Math_IFunction | #ifndef ROOT_Math_IFunction | |||
#include "Math/IFunction.h" | #include "Math/IFunction.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_MinimizerOptions | #ifndef ROOT_Math_MinimizerOptions | |||
#include "Math/MinimizerOptions.h" | #include "Math/MinimizerOptions.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_Util | ||||
#include "Math/Util.h" | ||||
#endif | ||||
#ifndef ROOT_Math_Error | ||||
#include "Math/Error.h" | ||||
#endif | ||||
#include <vector> | #include <vector> | |||
#include <string> | #include <string> | |||
#include <limits> | #include <limits> | |||
#include <cmath> | #include <cmath> | |||
namespace ROOT { | namespace ROOT { | |||
namespace Fit { | ||||
class ParameterSettings; | ||||
} | ||||
namespace Math { | namespace Math { | |||
/** | /** | |||
@defgroup MultiMin Multi-dimensional Minimization | @defgroup MultiMin Multi-dimensional Minimization | |||
@ingroup NumAlgo | @ingroup NumAlgo | |||
Classes implementing algorithms for multi-dimensional minimization | Classes implementing algorithms for multi-dimensional minimization | |||
*/ | */ | |||
//_________________________________________________________________________ ______ | //_________________________________________________________________________ ______ | |||
skipping to change at line 77 | skipping to change at line 89 | |||
class Minimizer { | class Minimizer { | |||
public: | public: | |||
/** | /** | |||
Default constructor | Default constructor | |||
*/ | */ | |||
Minimizer () : | Minimizer () : | |||
fValidError(false), | fValidError(false), | |||
fDebug(MinimizerOptions::DefaultPrintLevel()), | fStatus(-1) | |||
fStrategy(MinimizerOptions::DefaultStrategy()), | ||||
fStatus(-1), | ||||
fMaxCalls(MinimizerOptions::DefaultMaxFunctionCalls()), | ||||
fMaxIter(MinimizerOptions::DefaultMaxIterations()), | ||||
fTol(MinimizerOptions::DefaultTolerance()), | ||||
fPrec(MinimizerOptions::DefaultPrecision()), | ||||
fUp(MinimizerOptions::DefaultErrorDef() ) | ||||
{} | {} | |||
/** | /** | |||
Destructor (no operations) | Destructor (no operations) | |||
*/ | */ | |||
virtual ~Minimizer () {} | virtual ~Minimizer () {} | |||
private: | private: | |||
// usually copying is non trivial, so we make this unaccessible | // usually copying is non trivial, so we make this unaccessible | |||
skipping to change at line 145 | skipping to change at line 150 | |||
iret = SetUpperLimitedVariable(ivar, vitr->Name(), vitr->Value (), vitr->StepSize(), vitr->UpperLimit() ); | iret = SetUpperLimitedVariable(ivar, vitr->Name(), vitr->Value (), vitr->StepSize(), vitr->UpperLimit() ); | |||
else | else | |||
iret = SetVariable( ivar, vitr->Name(), vitr->Value(), vitr->St epSize() ); | iret = SetVariable( ivar, vitr->Name(), vitr->Value(), vitr->St epSize() ); | |||
if (iret) ivar++; | if (iret) ivar++; | |||
// an error message should be eventually be reported in the virtua l single SetVariable methods | // an error message should be eventually be reported in the virtua l single SetVariable methods | |||
} | } | |||
return ivar; | return ivar; | |||
} | } | |||
/// set free variable | /// set a new free variable | |||
virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step) = 0; | virtual bool SetVariable(unsigned int ivar, const std::string & name, do uble val, double step) = 0; | |||
/// set lower limit variable (override if minimizer supports them ) | /// set a new lower limit variable (override if minimizer supports them ) | |||
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ) { | virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ) { | |||
return SetLimitedVariable(ivar, name, val, step, lower, std::numeric_ limits<double>::infinity() ); | return SetLimitedVariable(ivar, name, val, step, lower, std::numeric_ limits<double>::infinity() ); | |||
} | } | |||
/// set upper limit variable (override if minimizer supports them ) | /// set a new upper limit variable (override if minimizer supports them ) | |||
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ) { | virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ) { | |||
return SetLimitedVariable(ivar, name, val, step, - std::numeric_limit s<double>::infinity(), upper ); | return SetLimitedVariable(ivar, name, val, step, - std::numeric_limit s<double>::infinity(), upper ); | |||
} | } | |||
/// set upper/lower limited variable (override if minimizer supports the | /// set a new upper/lower limited variable (override if minimizer suppor | |||
m ) | ts them ) otherwise as default set an unlimited variable | |||
virtual bool SetLimitedVariable(unsigned int /* ivar */ , const std::str | virtual bool SetLimitedVariable(unsigned int ivar , const std::string & | |||
ing & /* name */ , double /*val */ , double /* step */, double /* lower */ | name , double val , double step , | |||
, double /* upper */) { | double lower , double upper ) { | |||
MATH_WARN_MSG("Minimizer::SetLimitedVariable","Setting of limited var | ||||
iable not implemented - set as unlimited"); | ||||
MATH_UNUSED(lower); MATH_UNUSED(upper); | ||||
return SetVariable(ivar, name, val, step); | ||||
} | ||||
/// set a new fixed variable (override if minimizer supports them ) | ||||
virtual bool SetFixedVariable(unsigned int ivar , const std::string & | ||||
name , double val ) { | ||||
MATH_ERROR_MSG("Minimizer::SetFixedVariable","Setting of fixed variab | ||||
le not implemented"); | ||||
MATH_UNUSED(ivar); MATH_UNUSED(name); MATH_UNUSED(val); | ||||
return false; | return false; | |||
} | } | |||
/// set fixed variable (override if minimizer supports them ) | /// set the value of an already existing variable | |||
virtual bool SetFixedVariable(unsigned int /* ivar */ , const std::strin | virtual bool SetVariableValue(unsigned int ivar , double value) { | |||
g & /* name */ , double /* val */ ) { | MATH_ERROR_MSG("Minimizer::SetVariableValue","Set of a variable value | |||
not implemented"); | ||||
MATH_UNUSED(ivar); MATH_UNUSED(value); | ||||
return false; | return false; | |||
} | } | |||
/// set the value of an existing variable | ||||
virtual bool SetVariableValue(unsigned int , double ) { return false; } | ||||
/// set the values of all existing variables (array must be dimensioned to the size of the existing parameters) | /// set the values of all existing variables (array must be dimensioned to the size of the existing parameters) | |||
virtual bool SetVariableValues(const double * x) { | virtual bool SetVariableValues(const double * x) { | |||
bool ret = true; | bool ret = true; | |||
unsigned int i = 0; | unsigned int i = 0; | |||
while ( i <= NDim() && ret) { | while ( i <= NDim() && ret) { | |||
SetVariableValue(i,x[i] ); i++; | ret &= SetVariableValue(i,x[i] ); i++; | |||
} | } | |||
return ret; | return ret; | |||
} | } | |||
/// set the step size of an already existing variable | ||||
virtual bool SetVariableStepSize(unsigned int ivar, double value ) { | ||||
MATH_ERROR_MSG("Minimizer::SetVariableStepSize","Setting an existing | ||||
variable step size not implemented"); | ||||
MATH_UNUSED(ivar); MATH_UNUSED(value); | ||||
return false; | ||||
} | ||||
/// set the lower-limit of an already existing variable | ||||
virtual bool SetVariableLowerLimit(unsigned int ivar, double lower) { | ||||
MATH_ERROR_MSG("Minimizer::SetVariableLowerLimit","Setting an existin | ||||
g variable limit not implemented"); | ||||
MATH_UNUSED(ivar); MATH_UNUSED(lower); | ||||
return false; | ||||
} | ||||
/// set the upper-limit of an already existing variable | ||||
virtual bool SetVariableUpperLimit(unsigned int ivar, double upper) { | ||||
MATH_ERROR_MSG("Minimizer::SetVariableUpperLimit","Setting an existin | ||||
g variable limit not implemented"); | ||||
MATH_UNUSED(ivar); MATH_UNUSED(upper); | ||||
return false; | ||||
} | ||||
/// set the limits of an already existing variable | ||||
virtual bool SetVariableLimits(unsigned int ivar, double lower, double u | ||||
pper) { | ||||
return SetVariableLowerLimit(ivar,lower) && SetVariableUpperLimit(iva | ||||
r,upper); | ||||
} | ||||
/// fix an existing variable | ||||
virtual bool FixVariable(unsigned int ivar) { | ||||
MATH_ERROR_MSG("Minimizer::FixVariable","Fixing an existing variable | ||||
not implemented"); | ||||
MATH_UNUSED(ivar); | ||||
return false; | ||||
} | ||||
/// release an existing variable | ||||
virtual bool ReleaseVariable(unsigned int ivar) { | ||||
MATH_ERROR_MSG("Minimizer::ReleaseVariable","Releasing an existing va | ||||
riable not implemented"); | ||||
MATH_UNUSED(ivar); | ||||
return false; | ||||
} | ||||
/// query if an existing variable is fixed (i.e. considered constant in | ||||
the minimization) | ||||
/// note that by default all variables are not fixed | ||||
virtual bool IsFixedVariable(unsigned int ivar) const { | ||||
MATH_ERROR_MSG("Minimizer::IsFixedVariable","Quering an existing vari | ||||
able not implemented"); | ||||
MATH_UNUSED(ivar); | ||||
return false; | ||||
} | ||||
/// get variable settings in a variable object (like ROOT::Fit::ParamsSe | ||||
ttings) | ||||
virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::Parameter | ||||
Settings & /*pars */ ) const { | ||||
MATH_ERROR_MSG("Minimizer::GetVariableSettings","Quering an existing | ||||
variable not implemented"); | ||||
MATH_UNUSED(ivar); | ||||
//MATH_UNUSED(pars); | ||||
return false; | ||||
} | ||||
/// set the initial range of an existing variable | ||||
virtual bool SetVariableInitialRange(unsigned int /* ivar */, double /* | ||||
mininitial */, double /* maxinitial */) { | ||||
return false; | ||||
} | ||||
/// method to perform the minimization | /// method to perform the minimization | |||
virtual bool Minimize() = 0; | virtual bool Minimize() = 0; | |||
/// return minimum function value | /// return minimum function value | |||
virtual double MinValue() const = 0; | virtual double MinValue() const = 0; | |||
/// return expected distance reached from the minimum | ||||
virtual double Edm() const = 0; | ||||
/// return pointer to X values at the minimum | /// return pointer to X values at the minimum | |||
virtual const double * X() const = 0; | virtual const double * X() const = 0; | |||
/// return expected distance reached from the minimum (re-implement if m | ||||
inimizer provides it | ||||
virtual double Edm() const { return -1; } | ||||
/// return pointer to gradient values at the minimum | /// return pointer to gradient values at the minimum | |||
virtual const double * MinGradient() const = 0; | virtual const double * MinGradient() const { return NULL; } | |||
/// number of function calls to reach the minimum | /// number of function calls to reach the minimum | |||
virtual unsigned int NCalls() const = 0; | virtual unsigned int NCalls() const { return 0; } | |||
/// number of iterations to reach the minimum | ||||
virtual unsigned int NIterations() const { return NCalls(); } | ||||
/// this is <= Function().NDim() which is the total | /// this is <= Function().NDim() which is the total | |||
/// number of variables (free+ constrained ones) | /// number of variables (free+ constrained ones) | |||
virtual unsigned int NDim() const = 0; | virtual unsigned int NDim() const = 0; | |||
/// number of free variables (real dimension of the problem) | /// number of free variables (real dimension of the problem) | |||
/// this is <= Function().NDim() which is the total | /// this is <= Function().NDim() which is the total | |||
virtual unsigned int NFree() const = 0; | /// (re-implement if minimizer supports bounded parameters) | |||
virtual unsigned int NFree() const { return NDim(); } | ||||
/// minimizer provides error and error matrix | /// minimizer provides error and error matrix | |||
virtual bool ProvidesError() const = 0; | virtual bool ProvidesError() const { return false; } | |||
/// return errors at the minimum | /// return errors at the minimum | |||
virtual const double * Errors() const = 0; | virtual const double * Errors() const { return NULL; } | |||
/** return covariance matrices elements | /** return covariance matrices element for variables ivar,jvar | |||
if the variable is fixed the matrix is zero | if the variable is fixed the return value is zero | |||
The ordering of the variables is the same as in errors | The ordering of the variables is the same as in the parameter and er | |||
rors vectors | ||||
*/ | */ | |||
virtual double CovMatrix(unsigned int i, unsigned int j) const = 0; | virtual double CovMatrix(unsigned int ivar , unsigned int jvar ) const | |||
{ | ||||
MATH_UNUSED(ivar); MATH_UNUSED(jvar); | ||||
return 0; | ||||
} | ||||
/** | /** | |||
Fill the passed array with the covariance matrix elements | Fill the passed array with the covariance matrix elements | |||
if the variable is fixed or const the value is zero. | if the variable is fixed or const the value is zero. | |||
The array will be filled as cov[i *ndim + j] | The array will be filled as cov[i *ndim + j] | |||
The ordering of the variables is the same as in errors and parameter value. | The ordering of the variables is the same as in errors and parameter value. | |||
This is different from the direct interface of Minuit2 or TMinuit wh ere the | This is different from the direct interface of Minuit2 or TMinuit wh ere the | |||
values were obtained only to variable parameters | values were obtained only to variable parameters | |||
*/ | */ | |||
virtual bool GetCovMatrix(double * /*cov*/) const { return false; } | virtual bool GetCovMatrix(double * covMat) const { | |||
MATH_UNUSED(covMat); | ||||
return false; | ||||
} | ||||
/** | /** | |||
Fill the passed array with the Hessian matrix elements | Fill the passed array with the Hessian matrix elements | |||
The Hessian matrix is the matrix of the second derivatives | The Hessian matrix is the matrix of the second derivatives | |||
and is the inverse of the covariance matrix | and is the inverse of the covariance matrix | |||
If the variable is fixed or const the values for that variables are zero. | If the variable is fixed or const the values for that variables are zero. | |||
The array will be filled as h[i *ndim + j] | The array will be filled as h[i *ndim + j] | |||
*/ | */ | |||
virtual bool GetHessianMatrix(double * /* h */) const { return false; } | virtual bool GetHessianMatrix(double * hMat) const { | |||
MATH_UNUSED(hMat); | ||||
return false; | ||||
} | ||||
///return status of covariance matrix | ///return status of covariance matrix | |||
/// using Minuit convention {0 not calculated 1 approximated 2 made pos def , 3 accurate} | /// using Minuit convention {0 not calculated 1 approximated 2 made pos def , 3 accurate} | |||
/// Minimizer who implements covariance matrix calculation will re-imple ment the method | /// Minimizer who implements covariance matrix calculation will re-imple ment the method | |||
virtual int CovMatrixStatus() const { return 0; } | virtual int CovMatrixStatus() const { | |||
return 0; | ||||
} | ||||
/** | /** | |||
return correlation coefficient between variable i and j. | return correlation coefficient between variable i and j. | |||
If the variable is fixed or const the return value is zero | If the variable is fixed or const the return value is zero | |||
*/ | */ | |||
virtual double Correlation(unsigned int i, unsigned int j ) const { | virtual double Correlation(unsigned int i, unsigned int j ) const { | |||
double tmp = CovMatrix(i,i) * CovMatrix(j,j); | double tmp = CovMatrix(i,i) * CovMatrix(j,j); | |||
return ( tmp < 0) ? 0 : CovMatrix(i,j) / std::sqrt( tmp ); | return ( tmp < 0) ? 0 : CovMatrix(i,j) / std::sqrt( tmp ); | |||
} | } | |||
/** | /** | |||
return global correlation coefficient for variable i | return global correlation coefficient for variable i | |||
This is a number between zero and one which gives | This is a number between zero and one which gives | |||
the correlation between the i-th parameter and that linear combinati on of all | the correlation between the i-th parameter and that linear combinati on of all | |||
other parameters which is most strongly correlated with i. | other parameters which is most strongly correlated with i. | |||
Minimizer must overload method if implemented | Minimizer must overload method if implemented | |||
*/ | */ | |||
virtual double GlobalCC(unsigned int ) const { return -1; } | virtual double GlobalCC(unsigned int ivar) const { | |||
MATH_UNUSED(ivar); | ||||
return -1; | ||||
} | ||||
/** | /** | |||
minos error for variable i, return false if Minos failed or not suppo rted | minos error for variable i, return false if Minos failed or not suppo rted | |||
and the lower and upper errors are returned in errLow and errUp | and the lower and upper errors are returned in errLow and errUp | |||
An extra flag specifies if only the lower (runopt=-1) or the upper ( | An extra flag specifies if only the lower (option=-1) or the upper ( | |||
runopt=+1) error calculation is run | option=+1) error calculation is run | |||
(This feature isnot yet implemented) | (This feature is not yet implemented) | |||
*/ | */ | |||
virtual bool GetMinosError(unsigned int /* i */, double & errLow, double | virtual bool GetMinosError(unsigned int ivar , double & errLow, double & | |||
& errUp, int = 0) { | errUp, int option = 0) { | |||
errLow = 0; errUp = 0; | MATH_ERROR_MSG("Minimizer::GetMinosError","Minos Error not implemente | |||
d"); | ||||
MATH_UNUSED(ivar); MATH_UNUSED(errLow); MATH_UNUSED(errUp); MATH_UNUS | ||||
ED(option); | ||||
return false; | return false; | |||
} | } | |||
/** | /** | |||
perform a full calculation of the Hessian matrix for error calculatio n | perform a full calculation of the Hessian matrix for error calculatio n | |||
*/ | */ | |||
virtual bool Hesse() { return false; } | virtual bool Hesse() { | |||
MATH_ERROR_MSG("Minimizer::Hesse","Hesse not implemented"); | ||||
return false; | ||||
} | ||||
/** | /** | |||
scan function minimum for variable i. Variable and function must be s et before using Scan | scan function minimum for variable i. Variable and function must be s et before using Scan | |||
Return false if an error or if minimizer does not support this functi onality | Return false if an error or if minimizer does not support this functi onality | |||
*/ | */ | |||
virtual bool Scan(unsigned int /* i */, unsigned int & /* nstep */, doub | virtual bool Scan(unsigned int ivar , unsigned int & nstep , double * x | |||
le * /* x */, double * /* y */, | , double * y , | |||
double /*xmin */ = 0, double /*xmax*/ = 0) { | double xmin = 0, double xmax = 0) { | |||
MATH_ERROR_MSG("Minimizer::Scan","Scan not implemented"); | ||||
MATH_UNUSED(ivar); MATH_UNUSED(nstep); MATH_UNUSED(x); MATH_UNUSED(y) | ||||
; | ||||
MATH_UNUSED(xmin); MATH_UNUSED(xmax); | ||||
return false; | return false; | |||
} | } | |||
/** | /** | |||
find the contour points (xi,xj) of the function for parameter i and j around the minimum | find the contour points (xi, xj) of the function for parameter ivar a nd jvar around the minimum | |||
The contour will be find for value of the function = Min + ErrorUp(); | The contour will be find for value of the function = Min + ErrorUp(); | |||
*/ | */ | |||
virtual bool Contour(unsigned int /* i */, unsigned int /* j */, unsigne | virtual bool Contour(unsigned int ivar , unsigned int jvar, unsigned int | |||
d int &/* np */, | & npoints, | |||
double * /* xi */, double * /* xj */) { | double * xi , double * xj ) { | |||
MATH_ERROR_MSG("Minimizer::Contour","Contour not implemented"); | ||||
MATH_UNUSED(ivar); MATH_UNUSED(jvar); MATH_UNUSED(npoints); | ||||
MATH_UNUSED(xi); MATH_UNUSED(xj); | ||||
return false; | return false; | |||
} | } | |||
/// return reference to the objective function | /// return reference to the objective function | |||
///virtual const ROOT::Math::IGenFunction & Function() const = 0; | ///virtual const ROOT::Math::IGenFunction & Function() const = 0; | |||
/// print the result according to set level (implemented for TMinuit for mantaining Minuit-style printing) | /// print the result according to set level (implemented for TMinuit for mantaining Minuit-style printing) | |||
virtual void PrintResults() {} | virtual void PrintResults() {} | |||
/// get name of variables (override if minimizer support storing of vari able names) | /// get name of variables (override if minimizer support storing of vari able names) | |||
/// return an empty string if variable is not found | /// return an empty string if variable is not found | |||
virtual std::string VariableName(unsigned int ) const { return std::stri | virtual std::string VariableName(unsigned int ivar) const { | |||
ng();} // return empty string | MATH_UNUSED(ivar); | |||
return std::string(); // return empty string | ||||
} | ||||
/// get index of variable given a variable given a name | /// get index of variable given a variable given a name | |||
/// return -1 if variable is not found | /// return -1 if variable is not found | |||
virtual int VariableIndex(const std::string &) const { return -1; } | virtual int VariableIndex(const std::string & name) const { | |||
MATH_ERROR_MSG("Minimizer::VariableIndex","Getting variable index fro | ||||
m name not implemented"); | ||||
MATH_UNUSED(name); | ||||
return -1; | ||||
} | ||||
/** minimizer configuration parameters **/ | /** minimizer configuration parameters **/ | |||
/// set print level | /// set print level | |||
int PrintLevel() const { return fDebug; } | int PrintLevel() const { return fOptions.PrintLevel(); } | |||
/// max number of function calls | /// max number of function calls | |||
unsigned int MaxFunctionCalls() const { return fMaxCalls; } | unsigned int MaxFunctionCalls() const { return fOptions.MaxFunctionCalls (); } | |||
/// max iterations | /// max iterations | |||
unsigned int MaxIterations() const { return fMaxIter; } | unsigned int MaxIterations() const { return fOptions.MaxIterations(); } | |||
/// absolute tolerance | /// absolute tolerance | |||
double Tolerance() const { return fTol; } | double Tolerance() const { return fOptions.Tolerance(); } | |||
/// precision of minimizer in the evaluation of the objective function | /// precision of minimizer in the evaluation of the objective function | |||
/// ( a value <=0 corresponds to the let the minimizer choose its defaul t one) | /// ( a value <=0 corresponds to the let the minimizer choose its defaul t one) | |||
double Precision() const { return fPrec; } | double Precision() const { return fOptions.Precision(); } | |||
/// strategy | /// strategy | |||
int Strategy() const { return fStrategy; } | int Strategy() const { return fOptions.Strategy(); } | |||
/// status code of minimizer | /// status code of minimizer | |||
int Status() const { return fStatus; } | int Status() const { return fStatus; } | |||
/// return the statistical scale used for calculate the error | /// return the statistical scale used for calculate the error | |||
/// is typically 1 for Chi2 and 0.5 for likelihood minimization | /// is typically 1 for Chi2 and 0.5 for likelihood minimization | |||
double ErrorDef() const { return fUp; } | double ErrorDef() const { return fOptions.ErrorDef(); } | |||
///return true if Minimizer has performed a detailed error validation (e .g. run Hesse for Minuit) | ///return true if Minimizer has performed a detailed error validation (e .g. run Hesse for Minuit) | |||
bool IsValidError() const { return fValidError; } | bool IsValidError() const { return fValidError; } | |||
/// retrieve the minimizer options (implement derived class if needed) | /// retrieve the minimizer options (implement derived class if needed) | |||
virtual MinimizerOptions Options() const { | virtual MinimizerOptions Options() const { | |||
MinimizerOptions opt; | return fOptions; | |||
opt.SetPrintLevel(fDebug); | ||||
opt.SetStrategy(fStrategy); | ||||
opt.SetMaxFunctionCalls(fMaxCalls); | ||||
opt.SetMaxIterations(fMaxIter); | ||||
opt.SetTolerance(fTol); | ||||
opt.SetPrecision(fPrec); | ||||
opt.SetErrorDef(fUp); | ||||
return opt; | ||||
} | } | |||
/// set print level | /// set print level | |||
void SetPrintLevel(int level) { fDebug = level; } | void SetPrintLevel(int level) { fOptions.SetPrintLevel(level); } | |||
///set maximum of function calls | ///set maximum of function calls | |||
void SetMaxFunctionCalls(unsigned int maxfcn) { if (maxfcn > 0) fMaxCall s = maxfcn; } | void SetMaxFunctionCalls(unsigned int maxfcn) { if (maxfcn > 0) fOptions .SetMaxFunctionCalls(maxfcn); } | |||
/// set maximum iterations (one iteration can have many function calls) | /// set maximum iterations (one iteration can have many function calls) | |||
void SetMaxIterations(unsigned int maxiter) { if (maxiter > 0) fMaxIter = maxiter; } | void SetMaxIterations(unsigned int maxiter) { if (maxiter > 0) fOptions. SetMaxIterations(maxiter); } | |||
/// set the tolerance | /// set the tolerance | |||
void SetTolerance(double tol) { fTol = tol; } | void SetTolerance(double tol) { fOptions.SetTolerance(tol); } | |||
/// set in the minimizer the objective function evaluation precision | /// set in the minimizer the objective function evaluation precision | |||
/// ( a value <=0 means the minimizer will choose its optimal value auto matically, i.e. default case) | /// ( a value <=0 means the minimizer will choose its optimal value auto matically, i.e. default case) | |||
void SetPrecision(double prec) { fPrec = prec; } | void SetPrecision(double prec) { fOptions.SetPrecision(prec); } | |||
///set the strategy | ///set the strategy | |||
void SetStrategy(int strategyLevel) { fStrategy = strategyLevel; } | void SetStrategy(int strategyLevel) { fOptions.SetStrategy(strategyLevel ); } | |||
/// set scale for calculating the errors | /// set scale for calculating the errors | |||
void SetErrorDef(double up) { fUp = up; } | void SetErrorDef(double up) { fOptions.SetErrorDef(up); } | |||
/// flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit) | /// flag to check if minimizer needs to perform accurate error analysis (e.g. run Hesse for Minuit) | |||
void SetValidError(bool on) { fValidError = on; } | void SetValidError(bool on) { fValidError = on; } | |||
/// set all options in one go | /// set all options in one go | |||
void SetOptions(const MinimizerOptions & opt) { | void SetOptions(const MinimizerOptions & opt) { | |||
fDebug = opt.PrintLevel(); | fOptions = opt; | |||
fStrategy = opt.Strategy(); | ||||
fMaxCalls = opt.MaxFunctionCalls(); | ||||
fMaxIter = opt.MaxIterations(); | ||||
fTol = opt.Tolerance(); | ||||
fPrec = opt.Precision(); | ||||
fUp = opt.ErrorDef(); | ||||
} | } | |||
/// reset the defaut options (defined in MinimizerOptions) | /// reset the defaut options (defined in MinimizerOptions) | |||
void SetDefaultOptions() { | void SetDefaultOptions() { | |||
fDebug = MinimizerOptions::DefaultPrintLevel(); | fOptions.ResetToDefaultOptions(); | |||
fStrategy = MinimizerOptions::DefaultStrategy(); | ||||
fMaxCalls = MinimizerOptions::DefaultMaxFunctionCalls(); | ||||
fMaxIter = MinimizerOptions::DefaultMaxIterations(); | ||||
fTol = MinimizerOptions::DefaultTolerance(); | ||||
fPrec = MinimizerOptions::DefaultPrecision(); | ||||
fUp = MinimizerOptions::DefaultErrorDef(); | ||||
} | } | |||
protected: | protected: | |||
//private: | //private: | |||
// keep protected to be accessible by the derived classes | // keep protected to be accessible by the derived classes | |||
bool fValidError; // flag to control if errors have been vali dated (Hesse has been run in case of Minuit) | bool fValidError; // flag to control if errors have been vali dated (Hesse has been run in case of Minuit) | |||
int fDebug; // print level | MinimizerOptions fOptions; // minimizer options | |||
int fStrategy; // minimizer strategy | ||||
int fStatus; // status of minimizer | int fStatus; // status of minimizer | |||
unsigned int fMaxCalls; // max number of function calls | ||||
unsigned int fMaxIter; // max number or iterations used to find th | ||||
e minimum | ||||
double fTol; // tolerance (absolute) | ||||
double fPrec; // precision | ||||
double fUp; // error scale | ||||
}; | }; | |||
} // end namespace Math | } // end namespace Math | |||
} // end namespace ROOT | } // end namespace ROOT | |||
#endif /* ROOT_Math_Minimizer */ | #endif /* ROOT_Math_Minimizer */ | |||
End of changes. 51 change blocks. | ||||
101 lines changed or deleted | 196 lines changed or added | |||
MinimizerOptions.h | MinimizerOptions.h | |||
---|---|---|---|---|
skipping to change at line 44 | skipping to change at line 44 | |||
// static methods for setting and retrieving the default options | // static methods for setting and retrieving the default options | |||
static void SetDefaultMinimizer(const char * type, const char * algo = 0 ); | static void SetDefaultMinimizer(const char * type, const char * algo = 0 ); | |||
static void SetDefaultErrorDef( double up); | static void SetDefaultErrorDef( double up); | |||
static void SetDefaultTolerance(double tol); | static void SetDefaultTolerance(double tol); | |||
static void SetDefaultPrecision(double prec); | static void SetDefaultPrecision(double prec); | |||
static void SetDefaultMaxFunctionCalls(int maxcall); | static void SetDefaultMaxFunctionCalls(int maxcall); | |||
static void SetDefaultMaxIterations(int maxiter); | static void SetDefaultMaxIterations(int maxiter); | |||
static void SetDefaultStrategy(int strat); | static void SetDefaultStrategy(int strat); | |||
static void SetDefaultPrintLevel(int level); | static void SetDefaultPrintLevel(int level); | |||
static void SetDefaultExtraOptions(const IOptions * extraoptions); | ||||
static const std::string & DefaultMinimizerType(); | static const std::string & DefaultMinimizerType(); | |||
static const std::string & DefaultMinimizerAlgo(); | static const std::string & DefaultMinimizerAlgo(); | |||
static double DefaultErrorDef(); | static double DefaultErrorDef(); | |||
static double DefaultTolerance(); | static double DefaultTolerance(); | |||
static double DefaultPrecision(); | static double DefaultPrecision(); | |||
static int DefaultMaxFunctionCalls(); | static int DefaultMaxFunctionCalls(); | |||
static int DefaultMaxIterations(); | static int DefaultMaxIterations(); | |||
static int DefaultStrategy(); | static int DefaultStrategy(); | |||
static int DefaultPrintLevel(); | static int DefaultPrintLevel(); | |||
static IOptions * DefaultExtraOptions(); | ||||
/// retrieve extra options - if not existing create a IOptions | /// retrieve extra options - if not existing create a IOptions | |||
static ROOT::Math::IOptions & Default(const char * name); | static ROOT::Math::IOptions & Default(const char * name); | |||
// find extra options - return 0 if not existing | // find extra options - return 0 if not existing | |||
static ROOT::Math::IOptions * FindDefault(const char * name); | static ROOT::Math::IOptions * FindDefault(const char * name); | |||
/// print all the default options for the name given | /// print all the default options for the name given | |||
static void PrintDefault(const char * name, std::ostream & os = std::cou t); | static void PrintDefault(const char * name, std::ostream & os = std::cou t); | |||
public: | public: | |||
// constructor using the default options | // constructor using the default options | |||
// pass optionally a pointer to the additional options | MinimizerOptions(); | |||
// otehrwise look if they exist for this default minimizer | ||||
// and in that case they are copied in the constructed instance | ||||
MinimizerOptions(IOptions * extraOpts = 0); | ||||
// destructor | // destructor | |||
~MinimizerOptions(); | ~MinimizerOptions(); | |||
// copy constructor | // copy constructor | |||
MinimizerOptions(const MinimizerOptions & opt); | MinimizerOptions(const MinimizerOptions & opt); | |||
/// assignment operators | /// assignment operators | |||
MinimizerOptions & operator=(const MinimizerOptions & opt); | MinimizerOptions & operator=(const MinimizerOptions & opt); | |||
/** non-static methods for retrivieng options */ | /** non-static methods for retrieving options */ | |||
/// set print level | /// set print level | |||
int PrintLevel() const { return fLevel; } | int PrintLevel() const { return fLevel; } | |||
/// max number of function calls | /// max number of function calls | |||
unsigned int MaxFunctionCalls() const { return fMaxCalls; } | unsigned int MaxFunctionCalls() const { return fMaxCalls; } | |||
/// max iterations | /// max iterations | |||
unsigned int MaxIterations() const { return fMaxIter; } | unsigned int MaxIterations() const { return fMaxIter; } | |||
skipping to change at line 105 | skipping to change at line 104 | |||
/// absolute tolerance | /// absolute tolerance | |||
double Tolerance() const { return fTolerance; } | double Tolerance() const { return fTolerance; } | |||
/// precision in the objective funciton calculation (value <=0 means lef t to default) | /// precision in the objective funciton calculation (value <=0 means lef t to default) | |||
double Precision() const { return fPrecision; } | double Precision() const { return fPrecision; } | |||
/// error definition | /// error definition | |||
double ErrorDef() const { return fErrorDef; } | double ErrorDef() const { return fErrorDef; } | |||
/// return extra options (NULL pointer if they are not present) | /// return extra options (NULL pointer if they are not present) | |||
IOptions * ExtraOptions() const { return fExtraOptions; } | const IOptions * ExtraOptions() const { return fExtraOptions; } | |||
/// type of minimizer | /// type of minimizer | |||
const std::string & MinimizerType() const { return fMinimType; } | const std::string & MinimizerType() const { return fMinimType; } | |||
/// type of algorithm | /// type of algorithm | |||
const std::string & MinimizerAlgorithm() const { return fAlgoType; } | const std::string & MinimizerAlgorithm() const { return fAlgoType; } | |||
/// print all the options | /// print all the options | |||
void Print(std::ostream & os = std::cout) const; | void Print(std::ostream & os = std::cout) const; | |||
/** non-static methods for setting options */ | /** non-static methods for setting options */ | |||
void ResetToDefaultOptions(); | ||||
/// set print level | /// set print level | |||
void SetPrintLevel(int level) { fLevel = level; } | void SetPrintLevel(int level) { fLevel = level; } | |||
///set maximum of function calls | ///set maximum of function calls | |||
void SetMaxFunctionCalls(unsigned int maxfcn) { fMaxCalls = maxfcn; } | void SetMaxFunctionCalls(unsigned int maxfcn) { fMaxCalls = maxfcn; } | |||
/// set maximum iterations (one iteration can have many function calls) | /// set maximum iterations (one iteration can have many function calls) | |||
void SetMaxIterations(unsigned int maxiter) { fMaxIter = maxiter; } | void SetMaxIterations(unsigned int maxiter) { fMaxIter = maxiter; } | |||
skipping to change at line 146 | skipping to change at line 146 | |||
/// set error def | /// set error def | |||
void SetErrorDef(double err) { fErrorDef = err; } | void SetErrorDef(double err) { fErrorDef = err; } | |||
/// set minimizer type | /// set minimizer type | |||
void SetMinimizerType(const char * type) { fMinimType = type; } | void SetMinimizerType(const char * type) { fMinimType = type; } | |||
/// set minimizer algorithm | /// set minimizer algorithm | |||
void SetMinimizerAlgorithm(const char *type) { fAlgoType = type; } | void SetMinimizerAlgorithm(const char *type) { fAlgoType = type; } | |||
/// set extra options (in this case pointer is cloned) | /// set extra options (in this case pointer is cloned) | |||
void SetExtraOptions(const IOptions & opt); | void SetExtraOptions(const IOptions & opt); | |||
private: | private: | |||
int fLevel; // debug print level | int fLevel; // debug print level | |||
int fMaxCalls; // maximum number of function calls | int fMaxCalls; // maximum number of function calls | |||
int fMaxIter; // maximum number of iterations | int fMaxIter; // maximum number of iterations | |||
int fStrategy; // minimizer strategy (used by Minuit) | int fStrategy; // minimizer strategy (used by Minuit) | |||
double fErrorDef; // error definition (=1. for getting 1 sigma e rror for chi2 fits) | double fErrorDef; // error definition (=1. for getting 1 sigma e rror for chi2 fits) | |||
double fTolerance; // minimize tolerance to reach solution | double fTolerance; // minimize tolerance to reach solution | |||
double fPrecision; // precision of the objective function evaluat ion (value <=0 means left to default) | double fPrecision; // precision of the objective function evaluat ion (value <=0 means left to default) | |||
End of changes. 7 change blocks. | ||||
7 lines changed or deleted | 7 lines changed or added | |||
MinimumBuilder.h | MinimumBuilder.h | |||
---|---|---|---|---|
skipping to change at line 13 | skipping to change at line 13 | |||
/********************************************************************** | /********************************************************************** | |||
* * | * * | |||
* Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * | * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT * | |||
* * | * * | |||
**********************************************************************/ | **********************************************************************/ | |||
#ifndef ROOT_Minuit2_MinimumBuilder | #ifndef ROOT_Minuit2_MinimumBuilder | |||
#define ROOT_Minuit2_MinimumBuilder | #define ROOT_Minuit2_MinimumBuilder | |||
#ifndef ROOT_Minuit2_MnTraceObject | ||||
#include "Minuit2/MnTraceObject.h" | ||||
#endif | ||||
namespace ROOT { | namespace ROOT { | |||
namespace Minuit2 { | namespace Minuit2 { | |||
class FunctionMinimum; | class FunctionMinimum; | |||
class MnFcn; | class MnFcn; | |||
class GradientCalculator; | class GradientCalculator; | |||
class MinimumSeed; | class MinimumSeed; | |||
class MinimumState; | ||||
class MnStrategy; | class MnStrategy; | |||
class MinimumBuilder { | class MinimumBuilder { | |||
public: | public: | |||
virtual ~MinimumBuilder() {} | MinimumBuilder(); | |||
virtual ~MinimumBuilder() {} | ||||
virtual FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, | ||||
const MinimumSeed&, const MnStrategy&, unsigned int, double) const = 0; | ||||
int StorageLevel() const { return fStorageLevel; } | ||||
int PrintLevel() const { return fPrintLevel; } | ||||
bool TraceIter() const { return (fTracer); } | ||||
MnTraceObject * TraceObject() const { return (fTracer); } | ||||
virtual void SetPrintLevel(int level) { fPrintLevel = level;} | ||||
virtual void SetStorageLevel(int level) { fStorageLevel = level;} | ||||
// set trace object (user manages it) | ||||
virtual void SetTraceObject(MnTraceObject & obj) { | ||||
fTracer = &obj; | ||||
} | ||||
void TraceIteration(int iter, const MinimumState & state) const { | ||||
if (fTracer) (*fTracer)(iter, state); | ||||
} | ||||
private: | ||||
int fPrintLevel; | ||||
int fStorageLevel; | ||||
virtual FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, const MinimumSeed&, const MnStrategy&, unsigned int, double) const = 0; | MnTraceObject * fTracer; //! tracer object (it is managed by user) | |||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
#endif // ROOT_Minuit2_MinimumBuilder | #endif // ROOT_Minuit2_MinimumBuilder | |||
End of changes. 4 change blocks. | ||||
2 lines changed or deleted | 35 lines changed or added | |||
Minuit2Minimizer.h | Minuit2Minimizer.h | |||
---|---|---|---|---|
skipping to change at line 35 | skipping to change at line 35 | |||
#include "Math/IFunctionfwd.h" | #include "Math/IFunctionfwd.h" | |||
#endif | #endif | |||
namespace ROOT { | namespace ROOT { | |||
namespace Minuit2 { | namespace Minuit2 { | |||
class ModularFunctionMinimizer; | class ModularFunctionMinimizer; | |||
class FCNBase; | class FCNBase; | |||
class FunctionMinimum; | class FunctionMinimum; | |||
class MnTraceObject; | ||||
// enumeration specifying the type of Minuit2 minimizers | // enumeration specifying the type of Minuit2 minimizers | |||
enum EMinimizerType { | enum EMinimizerType { | |||
kMigrad, | kMigrad, | |||
kSimplex, | kSimplex, | |||
kCombined, | kCombined, | |||
kScan, | kScan, | |||
kFumili | kFumili | |||
}; | }; | |||
skipping to change at line 112 | skipping to change at line 113 | |||
/// set lower limit variable (override if minimizer supports them ) | /// set lower limit variable (override if minimizer supports them ) | |||
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ); | virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::str ing & name , double val , double step , double lower ); | |||
/// set upper limit variable (override if minimizer supports them ) | /// set upper limit variable (override if minimizer supports them ) | |||
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ); | virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ); | |||
/// set upper/lower limited variable (override if minimizer supports the m ) | /// set upper/lower limited variable (override if minimizer supports the m ) | |||
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double /* lower */, double /* upper */); | virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double /* lower */, double /* upper */); | |||
/// set fixed variable (override if minimizer supports them ) | /// set fixed variable (override if minimizer supports them ) | |||
virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */); | virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */); | |||
/// set variable | /// set variable | |||
virtual bool SetVariableValue(unsigned int ivar, double val); | virtual bool SetVariableValue(unsigned int ivar, double val); | |||
// set variable values | ||||
virtual bool SetVariableValues(const double * val); | virtual bool SetVariableValues(const double * val); | |||
/// set the step size of an already existing variable | ||||
virtual bool SetVariableStepSize(unsigned int ivar, double step ); | ||||
/// set the lower-limit of an already existing variable | ||||
virtual bool SetVariableLowerLimit(unsigned int ivar, double lower); | ||||
/// set the upper-limit of an already existing variable | ||||
virtual bool SetVariableUpperLimit(unsigned int ivar, double upper); | ||||
/// set the limits of an already existing variable | ||||
virtual bool SetVariableLimits(unsigned int ivar, double lower, double u | ||||
pper); | ||||
/// fix an existing variable | ||||
virtual bool FixVariable(unsigned int ivar); | ||||
/// release an existing variable | ||||
virtual bool ReleaseVariable(unsigned int ivar); | ||||
/// query if an existing variable is fixed (i.e. considered constant in | ||||
the minimization) | ||||
/// note that by default all variables are not fixed | ||||
virtual bool IsFixedVariable(unsigned int ivar) const; | ||||
/// get variable settings in a variable object (like ROOT::Fit::ParamsSe | ||||
ttings) | ||||
virtual bool GetVariableSettings(unsigned int ivar, ROOT::Fit::Parameter | ||||
Settings & varObj) const; | ||||
/// get name of variables (override if minimizer support storing of vari able names) | /// get name of variables (override if minimizer support storing of vari able names) | |||
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 -1 if variable is not found | /// return -1 if variable is not found | |||
virtual int VariableIndex(const std::string & name) const; | virtual int VariableIndex(const std::string & name) const; | |||
/** | /** | |||
method to perform the minimization. | method to perform the minimization. | |||
Return false in case the minimization did not converge. In this case a | Return false in case the minimization did not converge. In this case a | |||
status code different than zero is set | status code different than zero is set | |||
(retrieved by the derived method Minimizer::Status() )" | (retrieved by the derived method Minimizer::Status() )" | |||
skipping to change at line 260 | skipping to change at line 277 | |||
status = 3 : matrix is not pos defined | status = 3 : matrix is not pos defined | |||
*/ | */ | |||
virtual bool Hesse(); | virtual bool Hesse(); | |||
/// return reference to the objective function | /// return reference to the objective function | |||
///virtual const ROOT::Math::IGenFunction & Function() const; | ///virtual const ROOT::Math::IGenFunction & Function() const; | |||
/// print result of minimization | /// print result of minimization | |||
virtual void PrintResults(); | virtual void PrintResults(); | |||
/// set an object to trace operation for each iteration | ||||
/// The object muust implement operator() (unsigned int, MinimumState & | ||||
state) | ||||
void SetTraceObject(MnTraceObject & obj); | ||||
/// set storage level = 1 : store all iteration states (default) | ||||
/// = 0 : store only first and last state to save me | ||||
mory | ||||
void SetStorageLevel(int level); | ||||
/// return the minimizer state (containing values, step size , etc..) | ||||
const ROOT::Minuit2::MnUserParameterState & State() { return fState; } | ||||
protected: | protected: | |||
// protected function for accessing the internal Minuit2 object. Needed for derived classes | // protected function for accessing the internal Minuit2 object. Needed for derived classes | |||
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() c onst { return fMinimizer; } | virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() c onst { return fMinimizer; } | |||
virtual void SetMinimizer( ROOT::Minuit2::ModularFunctionMinimizer * m) { fMinimizer = m; } | virtual void SetMinimizer( ROOT::Minuit2::ModularFunctionMinimizer * m) { fMinimizer = m; } | |||
void SetMinimizerType( ROOT::Minuit2::EMinimizerType type); | void SetMinimizerType( ROOT::Minuit2::EMinimizerType type); | |||
End of changes. 5 change blocks. | ||||
2 lines changed or deleted | 36 lines changed or added | |||
MinuitParameter.h | MinuitParameter.h | |||
---|---|---|---|---|
skipping to change at line 83 | skipping to change at line 83 | |||
MinuitParameter(const MinuitParameter& par) : | MinuitParameter(const MinuitParameter& par) : | |||
fNum(par.fNum), fValue(par.fValue), fError(par.fError), | fNum(par.fNum), fValue(par.fValue), fError(par.fError), | |||
fConst(par.fConst), fFix(par.fFix), fLoLimit(par.fLoLimit), | fConst(par.fConst), fFix(par.fFix), fLoLimit(par.fLoLimit), | |||
fUpLimit(par.fUpLimit), fLoLimValid(par.fLoLimValid), | fUpLimit(par.fUpLimit), fLoLimValid(par.fLoLimValid), | |||
fUpLimValid(par.fUpLimValid), | fUpLimValid(par.fUpLimValid), | |||
fName(par.fName ) | fName(par.fName ) | |||
{} | {} | |||
MinuitParameter& operator=(const MinuitParameter& par) { | MinuitParameter& operator=(const MinuitParameter& par) { | |||
fNum = par.fNum; | if(this != &par) { | |||
fName = par.fName; | fNum = par.fNum; | |||
fValue = par.fValue; | fName = par.fName; | |||
fError = par.fError; | fValue = par.fValue; | |||
fConst = par.fConst; | fError = par.fError; | |||
fFix = par.fFix; | fConst = par.fConst; | |||
fLoLimit = par.fLoLimit; | fFix = par.fFix; | |||
fUpLimit = par.fUpLimit; | fLoLimit = par.fLoLimit; | |||
fLoLimValid = par.fLoLimValid; | fUpLimit = par.fUpLimit; | |||
fUpLimValid = par.fUpLimValid; | fLoLimValid = par.fLoLimValid; | |||
fUpLimValid = par.fUpLimValid; | ||||
} | ||||
return *this; | return *this; | |||
} | } | |||
//access methods | //access methods | |||
unsigned int Number() const {return fNum;} | unsigned int Number() const {return fNum;} | |||
// new API returning a string | // new API returning a string | |||
const std::string & GetName() const { return fName; } | const std::string & GetName() const { return fName; } | |||
// return const char * for mantaining backward compatibility | // return const char * for mantaining backward compatibility | |||
const char * Name() const {return fName.c_str();} | const char * Name() const {return fName.c_str();} | |||
double Value() const {return fValue;} | double Value() const {return fValue;} | |||
double Error() const {return fError;} | double Error() const {return fError;} | |||
//interaction | //interaction | |||
void SetName(const std::string &name) { fName = name; } | ||||
void SetValue(double val) {fValue = val;} | void SetValue(double val) {fValue = val;} | |||
void SetError(double err) {fError = err;} | void SetError(double err) {fError = err;} | |||
void SetLimits(double low, double up) { | void SetLimits(double low, double up) { | |||
assert(low != up); | assert(low != up); | |||
fLoLimit = low; | fLoLimit = low; | |||
fUpLimit = up; | fUpLimit = up; | |||
fLoLimValid = true; | fLoLimValid = true; | |||
fUpLimValid = true; | fUpLimValid = true; | |||
if(low > up) { | if(low > up) { | |||
fLoLimit = up; | fLoLimit = up; | |||
End of changes. 2 change blocks. | ||||
10 lines changed or deleted | 14 lines changed or added | |||
MnPrint.h | MnPrint.h | |||
---|---|---|---|---|
skipping to change at line 79 | skipping to change at line 79 | |||
class MnPrint { | class MnPrint { | |||
public: | public: | |||
// set print level and return the previous one | // set print level and return the previous one | |||
static int SetLevel(int level); | static int SetLevel(int level); | |||
// return current level | // return current level | |||
static int Level(); | static int Level(); | |||
// print current minimization state | // print current minimization state | |||
static void PrintState(std::ostream & os, const MinimumState &, const ch | static void PrintState(std::ostream & os, const MinimumState & state, co | |||
ar * msg, int iter = -1); | nst char * msg, int iter = -1); | |||
// print current minimization state | ||||
static void PrintState(std::ostream & os, double fcn, double edm, int nc | ||||
alls, const char * msg, int iter = -1); | ||||
// print FCN value with right precision adding optionally end line | ||||
static void PrintFcn(std::ostream & os, double value, bool endline = tru | ||||
e); | ||||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
// macro to report messages | // macro to report messages | |||
#ifndef USE_ROOT_ERROR | #ifndef USE_ROOT_ERROR | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 11 lines changed or added | |||
MnRefCountedPointer.h | MnRefCountedPointer.h | |||
---|---|---|---|---|
skipping to change at line 46 | skipping to change at line 46 | |||
if(fCounter) delete fCounter; | if(fCounter) delete fCounter; | |||
} | } | |||
else RemoveReference(); | else RemoveReference(); | |||
*/ | */ | |||
if(References() != 0) RemoveReference(); | if(References() != 0) RemoveReference(); | |||
} | } | |||
bool IsValid() const {return fPtr != 0;} | bool IsValid() const {return fPtr != 0;} | |||
MnRefCountedPointer& operator=(const MnRefCountedPointer<T>& other) { | MnRefCountedPointer& operator=(const MnRefCountedPointer<T>& other) { | |||
if(fPtr != other.fPtr) { | if(this != &other && fPtr != other.fPtr) { | |||
RemoveReference(); | RemoveReference(); | |||
fPtr = other.fPtr; | fPtr = other.fPtr; | |||
fCounter = other.fCounter; | fCounter = other.fCounter; | |||
AddReference(); | AddReference(); | |||
} | } | |||
return *this; | return *this; | |||
} | } | |||
MnRefCountedPointer& operator=(T* ptr) { | MnRefCountedPointer& operator=(T* ptr) { | |||
if(fPtr != ptr) { | if(fPtr != ptr) { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
MnStrategy.h | MnStrategy.h | |||
---|---|---|---|---|
skipping to change at line 50 | skipping to change at line 50 | |||
unsigned int GradientNCycles() const {return fGradNCyc;} | unsigned int GradientNCycles() const {return fGradNCyc;} | |||
double GradientStepTolerance() const {return fGradTlrStp;} | double GradientStepTolerance() const {return fGradTlrStp;} | |||
double GradientTolerance() const {return fGradTlr;} | double GradientTolerance() const {return fGradTlr;} | |||
unsigned int HessianNCycles() const {return fHessNCyc;} | unsigned int HessianNCycles() const {return fHessNCyc;} | |||
double HessianStepTolerance() const {return fHessTlrStp;} | double HessianStepTolerance() const {return fHessTlrStp;} | |||
double HessianG2Tolerance() const {return fHessTlrG2;} | double HessianG2Tolerance() const {return fHessTlrG2;} | |||
unsigned int HessianGradientNCycles() const {return fHessGradNCyc;} | unsigned int HessianGradientNCycles() const {return fHessGradNCyc;} | |||
int StorageLevel() const { return fStoreLevel; } | ||||
bool IsLow() const {return fStrategy == 0;} | bool IsLow() const {return fStrategy == 0;} | |||
bool IsMedium() const {return fStrategy == 1;} | bool IsMedium() const {return fStrategy == 1;} | |||
bool IsHigh() const {return fStrategy >= 2;} | bool IsHigh() const {return fStrategy >= 2;} | |||
void SetLowStrategy(); | void SetLowStrategy(); | |||
void SetMediumStrategy(); | void SetMediumStrategy(); | |||
void SetHighStrategy(); | void SetHighStrategy(); | |||
void SetGradientNCycles(unsigned int n) {fGradNCyc = n;} | void SetGradientNCycles(unsigned int n) {fGradNCyc = n;} | |||
void SetGradientStepTolerance(double stp) {fGradTlrStp = stp;} | void SetGradientStepTolerance(double stp) {fGradTlrStp = stp;} | |||
void SetGradientTolerance(double toler) {fGradTlr = toler;} | void SetGradientTolerance(double toler) {fGradTlr = toler;} | |||
void SetHessianNCycles(unsigned int n) {fHessNCyc = n;} | void SetHessianNCycles(unsigned int n) {fHessNCyc = n;} | |||
void SetHessianStepTolerance(double stp) {fHessTlrStp = stp;} | void SetHessianStepTolerance(double stp) {fHessTlrStp = stp;} | |||
void SetHessianG2Tolerance(double toler) {fHessTlrG2 = toler;} | void SetHessianG2Tolerance(double toler) {fHessTlrG2 = toler;} | |||
void SetHessianGradientNCycles(unsigned int n) {fHessGradNCyc = n;} | void SetHessianGradientNCycles(unsigned int n) {fHessGradNCyc = n;} | |||
// set storage level of iteration quantities | ||||
// 0 = store only last iterations 1 = full storage (default) | ||||
void SetStorageLevel(unsigned int level) { fStoreLevel = level; } | ||||
private: | private: | |||
unsigned int fStrategy; | unsigned int fStrategy; | |||
unsigned int fGradNCyc; | unsigned int fGradNCyc; | |||
double fGradTlrStp; | double fGradTlrStp; | |||
double fGradTlr; | double fGradTlr; | |||
unsigned int fHessNCyc; | unsigned int fHessNCyc; | |||
double fHessTlrStp; | double fHessTlrStp; | |||
double fHessTlrG2; | double fHessTlrG2; | |||
unsigned int fHessGradNCyc; | unsigned int fHessGradNCyc; | |||
int fStoreLevel; | ||||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
#endif // ROOT_Minuit2_MnStrategy | #endif // ROOT_Minuit2_MnStrategy | |||
End of changes. 3 change blocks. | ||||
0 lines changed or deleted | 6 lines changed or added | |||
MnUserCovariance.h | MnUserCovariance.h | |||
---|---|---|---|---|
skipping to change at line 54 | skipping to change at line 54 | |||
} | } | |||
MnUserCovariance(unsigned int n) : | MnUserCovariance(unsigned int n) : | |||
fData(std::vector<double>(n*(n+1)/2, 0.)), fNRow(n) {} | fData(std::vector<double>(n*(n+1)/2, 0.)), fNRow(n) {} | |||
~MnUserCovariance() {} | ~MnUserCovariance() {} | |||
MnUserCovariance(const MnUserCovariance& cov) : fData(cov.fData), fNRow(c ov.fNRow) {} | MnUserCovariance(const MnUserCovariance& cov) : fData(cov.fData), fNRow(c ov.fNRow) {} | |||
MnUserCovariance& operator=(const MnUserCovariance& cov) { | MnUserCovariance& operator=(const MnUserCovariance& cov) { | |||
fData = cov.fData; | if(this != &cov) { | |||
fNRow = cov.fNRow; | fData = cov.fData; | |||
fNRow = cov.fNRow; | ||||
} | ||||
return *this; | return *this; | |||
} | } | |||
double operator()(unsigned int row, unsigned int col) const { | double operator()(unsigned int row, unsigned int col) const { | |||
assert(row < fNRow && col < fNRow); | assert(row < fNRow && col < fNRow); | |||
if(row > col) | if(row > col) | |||
return fData[col+row*(row+1)/2]; | return fData[col+row*(row+1)/2]; | |||
else | else | |||
return fData[row+col*(col+1)/2]; | return fData[row+col*(col+1)/2]; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 4 lines changed or added | |||
MnUserParameterState.h | MnUserParameterState.h | |||
---|---|---|---|---|
skipping to change at line 64 | skipping to change at line 64 | |||
~MnUserParameterState() {} | ~MnUserParameterState() {} | |||
MnUserParameterState(const MnUserParameterState& state) : fValid(state.f Valid), | MnUserParameterState(const MnUserParameterState& state) : fValid(state.f Valid), | |||
fCovarianceVal id(state.fCovarianceValid), fGCCValid(state.fGCCValid), fCovStatus(state.fC ovStatus), | fCovarianceVal id(state.fCovarianceValid), fGCCValid(state.fGCCValid), fCovStatus(state.fC ovStatus), | |||
fFVal(state.fF Val), fEDM(state.fEDM), fNFcn(state.fNFcn), | fFVal(state.fF Val), fEDM(state.fEDM), fNFcn(state.fNFcn), | |||
fParameters(st ate.fParameters), | fParameters(st ate.fParameters), | |||
fCovariance(st ate.fCovariance), | fCovariance(st ate.fCovariance), | |||
fGlobalCC(stat e.fGlobalCC), fIntParameters(state.fIntParameters), fIntCovariance(state.fI ntCovariance) {} | fGlobalCC(stat e.fGlobalCC), fIntParameters(state.fIntParameters), fIntCovariance(state.fI ntCovariance) {} | |||
MnUserParameterState& operator=(const MnUserParameterState& state) { | MnUserParameterState& operator=(const MnUserParameterState& state) { | |||
fValid = state.fValid; | if(this != &state) { | |||
fCovarianceValid = state.fCovarianceValid; | fValid = state.fValid; | |||
fGCCValid = state.fGCCValid; | fCovarianceValid = state.fCovarianceValid; | |||
fCovStatus = state.fCovStatus; | fGCCValid = state.fGCCValid; | |||
fFVal = state.fFVal; | fCovStatus = state.fCovStatus; | |||
fEDM = state.fEDM; | fFVal = state.fFVal; | |||
fNFcn = state.fNFcn; | fEDM = state.fEDM; | |||
fParameters = state.fParameters; | fNFcn = state.fNFcn; | |||
fCovariance = state.fCovariance; | fParameters = state.fParameters; | |||
fGlobalCC = state.fGlobalCC; | fCovariance = state.fCovariance; | |||
fIntParameters = state.fIntParameters; | fGlobalCC = state.fGlobalCC; | |||
fIntCovariance = state.fIntCovariance; | fIntParameters = state.fIntParameters; | |||
fIntCovariance = state.fIntCovariance; | ||||
} | ||||
return *this; | return *this; | |||
} | } | |||
//user external representation | //user external representation | |||
const MnUserParameters& Parameters() const {return fParameters;} | const MnUserParameters& Parameters() const {return fParameters;} | |||
const MnUserCovariance& Covariance() const {return fCovariance;} | const MnUserCovariance& Covariance() const {return fCovariance;} | |||
const MnGlobalCorrelationCoeff& GlobalCC() const {return fGlobalCC;} | const MnGlobalCorrelationCoeff& GlobalCC() const {return fGlobalCC;} | |||
// hessian (inverse of covariance matrix) | // hessian (inverse of covariance matrix) | |||
MnUserCovariance Hessian() const; | MnUserCovariance Hessian() const; | |||
skipping to change at line 128 | skipping to change at line 130 | |||
//add free Parameter | //add free Parameter | |||
void Add(const std::string & name, double val, double err); | void Add(const std::string & name, double val, double err); | |||
//add limited Parameter | //add limited Parameter | |||
void Add(const std::string & name, double val, double err, double , doub le); | void Add(const std::string & name, double val, double err, double , doub le); | |||
//add const Parameter | //add const Parameter | |||
void Add(const std::string &, double); | void Add(const std::string &, double); | |||
//interaction via external number of Parameter | //interaction via external number of Parameter | |||
void Fix(unsigned int); | void Fix(unsigned int); | |||
void Release(unsigned int); | void Release(unsigned int); | |||
void RemoveLimits(unsigned int); | ||||
void SetValue(unsigned int, double); | void SetValue(unsigned int, double); | |||
void SetError(unsigned int, double); | void SetError(unsigned int, double); | |||
void SetLimits(unsigned int, double, double); | void SetLimits(unsigned int, double, double); | |||
void SetUpperLimit(unsigned int, double); | void SetUpperLimit(unsigned int, double); | |||
void SetLowerLimit(unsigned int, double); | void SetLowerLimit(unsigned int, double); | |||
void RemoveLimits(unsigned int); | void SetName(unsigned int iext, const std::string &name) { fParameters.S etName(iext,name); } | |||
double Value(unsigned int) const; | double Value(unsigned int) const; | |||
double Error(unsigned int) const; | double Error(unsigned int) const; | |||
//interaction via Name of Parameter | //interaction via Name of Parameter | |||
void Fix(const std::string &); | void Fix(const std::string &); | |||
void Release(const std::string &); | void Release(const std::string &); | |||
void SetValue(const std::string &, double); | void SetValue(const std::string &, double); | |||
void SetError(const std::string &, double); | void SetError(const std::string &, double); | |||
void SetLimits(const std::string &, double, double); | void SetLimits(const std::string &, double, double); | |||
End of changes. 3 change blocks. | ||||
13 lines changed or deleted | 16 lines changed or added | |||
MnUserParameters.h | MnUserParameters.h | |||
---|---|---|---|---|
skipping to change at line 79 | skipping to change at line 79 | |||
/// Add free Parameter Name, Value, Error | /// Add free Parameter Name, Value, Error | |||
bool Add(const std::string &, double, double); | bool Add(const std::string &, double, double); | |||
/// Add limited Parameter Name, Value, Lower bound, Upper bound | /// Add limited Parameter Name, Value, Lower bound, Upper bound | |||
bool Add(const std::string &, double, double, double, double); | bool Add(const std::string &, double, double, double, double); | |||
/// Add const Parameter Name, vale | /// Add const Parameter Name, vale | |||
bool Add(const std::string &, double); | bool Add(const std::string &, double); | |||
/// interaction via external number of Parameter | /// interaction via external number of Parameter | |||
void Fix(unsigned int); | void Fix(unsigned int); | |||
void Release(unsigned int); | void Release(unsigned int); | |||
void RemoveLimits(unsigned int); | ||||
void SetValue(unsigned int, double); | void SetValue(unsigned int, double); | |||
void SetError(unsigned int, double); | void SetError(unsigned int, double); | |||
void SetLimits(unsigned int, double, double); | void SetLimits(unsigned int, double, double); | |||
void SetUpperLimit(unsigned int, double); | void SetUpperLimit(unsigned int, double); | |||
void SetLowerLimit(unsigned int, double); | void SetLowerLimit(unsigned int, double); | |||
void RemoveLimits(unsigned int); | void SetName(unsigned int, const std::string &); | |||
double Value(unsigned int) const; | double Value(unsigned int) const; | |||
double Error(unsigned int) const; | double Error(unsigned int) const; | |||
/// interaction via Name of Parameter | /// interaction via Name of Parameter | |||
void Fix(const std::string &); | void Fix(const std::string &); | |||
void Release(const std::string &); | void Release(const std::string &); | |||
void SetValue(const std::string &, double); | void SetValue(const std::string &, double); | |||
void SetError(const std::string &, double); | void SetError(const std::string &, double); | |||
void SetLimits(const std::string &, double, double); | void SetLimits(const std::string &, double, double); | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added | |||
MnUserTransformation.h | MnUserTransformation.h | |||
---|---|---|---|---|
skipping to change at line 75 | skipping to change at line 75 | |||
~MnUserTransformation() {} | ~MnUserTransformation() {} | |||
MnUserTransformation(const MnUserTransformation& trafo) : | MnUserTransformation(const MnUserTransformation& trafo) : | |||
fPrecision(trafo.fPrecision), | fPrecision(trafo.fPrecision), | |||
fParameters(trafo.fParameters),fExtOfInt(trafo.fExtOfInt), | fParameters(trafo.fParameters),fExtOfInt(trafo.fExtOfInt), | |||
fDoubleLimTrafo(trafo.fDoubleLimTrafo), | fDoubleLimTrafo(trafo.fDoubleLimTrafo), | |||
fUpperLimTrafo(trafo.fUpperLimTrafo), | fUpperLimTrafo(trafo.fUpperLimTrafo), | |||
fLowerLimTrafo(trafo.fLowerLimTrafo), fCache(trafo.fCache) {} | fLowerLimTrafo(trafo.fLowerLimTrafo), fCache(trafo.fCache) {} | |||
MnUserTransformation& operator=(const MnUserTransformation& trafo) { | MnUserTransformation& operator=(const MnUserTransformation& trafo) { | |||
fPrecision = trafo.fPrecision; | if(this != &trafo) { | |||
fParameters = trafo.fParameters; | fPrecision = trafo.fPrecision; | |||
fExtOfInt = trafo.fExtOfInt; | fParameters = trafo.fParameters; | |||
fDoubleLimTrafo = trafo.fDoubleLimTrafo; | fExtOfInt = trafo.fExtOfInt; | |||
fUpperLimTrafo = trafo.fUpperLimTrafo; | fDoubleLimTrafo = trafo.fDoubleLimTrafo; | |||
fLowerLimTrafo = trafo.fLowerLimTrafo; | fUpperLimTrafo = trafo.fUpperLimTrafo; | |||
fCache = trafo.fCache; | fLowerLimTrafo = trafo.fLowerLimTrafo; | |||
fCache = trafo.fCache; | ||||
} | ||||
return *this; | return *this; | |||
} | } | |||
//#ifdef MINUIT2_THREAD_SAFE | //#ifdef MINUIT2_THREAD_SAFE | |||
// thread-safe version (do not use cache) | // thread-safe version (do not use cache) | |||
std::vector<double> operator()(const MnAlgebraicVector&) const; | std::vector<double> operator()(const MnAlgebraicVector&) const; | |||
//#else // not thread safe | //#else // not thread safe | |||
// const std::vector<double>& operator()(const MnAlgebraicVector&) const; | // const std::vector<double>& operator()(const MnAlgebraicVector&) const; | |||
//#endif | //#endif | |||
skipping to change at line 152 | skipping to change at line 154 | |||
//add free Parameter | //add free Parameter | |||
bool Add(const std::string &, double, double); | bool Add(const std::string &, double, double); | |||
//add limited Parameter | //add limited Parameter | |||
bool Add(const std::string &, double, double, double, double); | bool Add(const std::string &, double, double, double, double); | |||
//add const Parameter | //add const Parameter | |||
bool Add(const std::string &, double); | bool Add(const std::string &, double); | |||
//interaction via external number of Parameter | //interaction via external number of Parameter | |||
void Fix(unsigned int); | void Fix(unsigned int); | |||
void Release(unsigned int); | void Release(unsigned int); | |||
void RemoveLimits(unsigned int); | ||||
void SetValue(unsigned int, double); | void SetValue(unsigned int, double); | |||
void SetError(unsigned int, double); | void SetError(unsigned int, double); | |||
void SetLimits(unsigned int, double, double); | void SetLimits(unsigned int, double, double); | |||
void SetUpperLimit(unsigned int, double); | void SetUpperLimit(unsigned int, double); | |||
void SetLowerLimit(unsigned int, double); | void SetLowerLimit(unsigned int, double); | |||
void RemoveLimits(unsigned int); | void SetName(unsigned int, const std::string &); | |||
double Value(unsigned int) const; | double Value(unsigned int) const; | |||
double Error(unsigned int) const; | double Error(unsigned int) const; | |||
//interaction via Name of Parameter | //interaction via Name of Parameter | |||
void Fix(const std::string &); | void Fix(const std::string &); | |||
void Release(const std::string &); | void Release(const std::string &); | |||
void SetValue(const std::string &, double); | void SetValue(const std::string &, double); | |||
void SetError(const std::string &, double); | void SetError(const std::string &, double); | |||
void SetLimits(const std::string &, double, double); | void SetLimits(const std::string &, double, double); | |||
End of changes. 3 change blocks. | ||||
8 lines changed or deleted | 11 lines changed or added | |||
ModularFunctionMinimizer.h | ModularFunctionMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 84 | skipping to change at line 84 | |||
// virtual FunctionMinimum Minimize(const FumiliFCNBase&, const std::vect or<double>&, const std::vector<double>&, unsigned int stra=1, unsigned int maxfcn = 0, double toler = 0.1) const; | // virtual FunctionMinimum Minimize(const FumiliFCNBase&, const std::vect or<double>&, const std::vector<double>&, unsigned int stra=1, unsigned int maxfcn = 0, double toler = 0.1) const; | |||
// virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserPar ameters&, const MnStrategy&, unsigned int maxfcn = 0, double toler = 0.1) c onst; | // virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserPar ameters&, const MnStrategy&, unsigned int maxfcn = 0, double toler = 0.1) c onst; | |||
// virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserPar ameters&, const MnUserCovariance&, const MnStrategy&, unsigned int maxfcn = 0, double toler = 0.1) const; | // virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserPar ameters&, const MnUserCovariance&, const MnStrategy&, unsigned int maxfcn = 0, double toler = 0.1) const; | |||
// virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserPar ameterState&, const MnStrategy&, unsigned int maxfcn = 0, double toler = 0. 1) const; | // virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserPar ameterState&, const MnStrategy&, unsigned int maxfcn = 0, double toler = 0. 1) const; | |||
virtual const MinimumSeedGenerator& SeedGenerator() const = 0; | virtual const MinimumSeedGenerator& SeedGenerator() const = 0; | |||
virtual const MinimumBuilder& Builder() const = 0; | virtual const MinimumBuilder& Builder() const = 0; | |||
virtual MinimumBuilder& Builder() = 0; | ||||
public: | public: | |||
virtual FunctionMinimum Minimize(const MnFcn&, const GradientCalculator& , const MinimumSeed&, const MnStrategy&, unsigned int, double) const; | virtual FunctionMinimum Minimize(const MnFcn&, const GradientCalculator& , const MinimumSeed&, const MnStrategy&, unsigned int, double) const; | |||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
MultiNumGradFunction.h | MultiNumGradFunction.h | |||
---|---|---|---|---|
skipping to change at line 102 | skipping to change at line 102 | |||
if (!fOwner) | if (!fOwner) | |||
return new MultiNumGradFunction(*fFunc); | return new MultiNumGradFunction(*fFunc); | |||
else { | else { | |||
// we need to copy the pointer to the wrapped function | // we need to copy the pointer to the wrapped function | |||
MultiNumGradFunction * f = new MultiNumGradFunction(*(fFunc->Clon e()) ); | MultiNumGradFunction * f = new MultiNumGradFunction(*(fFunc->Clon e()) ); | |||
f->fOwner = true; | f->fOwner = true; | |||
return f; | return f; | |||
} | } | |||
} | } | |||
// set ownership | ||||
void SetOwnership(bool on = true) { fOwner = on; } | ||||
/// precision value used for calculating the derivative step-size | /// precision value used for calculating the derivative step-size | |||
/// h = eps * |x|. The default is 0.001, give a smaller in case function chanes rapidly | /// h = eps * |x|. The default is 0.001, give a smaller in case function chanes rapidly | |||
static void SetDerivPrecision(double eps); | static void SetDerivPrecision(double eps); | |||
/// get precision value used for calculating the derivative step-size | /// get precision value used for calculating the derivative step-size | |||
static double GetDerivPrecision(); | static double GetDerivPrecision(); | |||
private: | private: | |||
double DoEval(const double * x) const { | double DoEval(const double * x) const { | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added | |||
ParamFunctor.h | ParamFunctor.h | |||
---|---|---|---|---|
skipping to change at line 258 | skipping to change at line 258 | |||
/** | /** | |||
Assignment operator | Assignment operator | |||
*/ | */ | |||
ParamFunctor & operator = (const ParamFunctor & rhs) { | ParamFunctor & operator = (const ParamFunctor & rhs) { | |||
// ParamFunctor copy(rhs); | // ParamFunctor copy(rhs); | |||
// swap auto_ptr by hand | // swap auto_ptr by hand | |||
// Impl * p = fImpl.release(); | // Impl * p = fImpl.release(); | |||
// fImpl.reset(copy.fImpl.release()); | // fImpl.reset(copy.fImpl.release()); | |||
// copy.fImpl.reset(p); | // copy.fImpl.reset(p); | |||
if (fImpl) delete fImpl; | if(this != &rhs) { | |||
fImpl = 0; | if (fImpl) delete fImpl; | |||
if (rhs.fImpl != 0) | fImpl = 0; | |||
fImpl = rhs.fImpl->Clone(); | if (rhs.fImpl != 0) | |||
fImpl = rhs.fImpl->Clone(); | ||||
} | ||||
return *this; | return *this; | |||
} | } | |||
void * GetImpl() { return (void *) fImpl; } | void * GetImpl() { return (void *) fImpl; } | |||
double operator() (double * x, double * p) { | double operator() (double * x, double * p) { | |||
return (*fImpl)(x,p); | return (*fImpl)(x,p); | |||
} | } | |||
bool Empty() { return fImpl == 0; } | bool Empty() { return fImpl == 0; } | |||
End of changes. 1 change blocks. | ||||
5 lines changed or deleted | 6 lines changed or added | |||
ParamHistFunc.h | ParamHistFunc.h | |||
---|---|---|---|---|
skipping to change at line 96 | skipping to change at line 96 | |||
// Turn into a RooListProxy | // Turn into a RooListProxy | |||
//RooRealProxy _dataVar; // The RooRealVar | //RooRealProxy _dataVar; // The RooRealVar | |||
RooListProxy _dataVars; // The RooRealVars | RooListProxy _dataVars; // The RooRealVars | |||
RooListProxy _paramSet ; // interpolation parameters | RooListProxy _paramSet ; // interpolation parameters | |||
//RooAbsBinning* _binning; // Holds the binning of the dataVar (at const ruction time) | //RooAbsBinning* _binning; // Holds the binning of the dataVar (at const ruction time) | |||
Int_t _numBins; | Int_t _numBins; | |||
mutable std::map<Int_t, Int_t> _binMap; | mutable std::map<Int_t, Int_t> _binMap; | |||
mutable RooDataHist _dataSet; | mutable RooDataHist _dataSet; | |||
Bool_t _Normalized; | //Bool_t _normalized; | |||
// std::vector< Double_t > _nominalVals; // The nominal vals when gamma = 1.0 ( = 1.0 by default) | // std::vector< Double_t > _nominalVals; // The nominal vals when gamma = 1.0 ( = 1.0 by default) | |||
RooArgList _ownedList ; // List of owned components | RooArgList _ownedList ; // List of owned components | |||
Int_t getCurrentBin() const ; | Int_t getCurrentBin() const ; | |||
Int_t addVarSet( const RooArgList& vars ); | Int_t addVarSet( const RooArgList& vars ); | |||
Int_t addParamSet( const RooArgList& params ); | Int_t addParamSet( const RooArgList& params ); | |||
static Int_t GetNumBins( const RooArgSet& vars ); | static Int_t GetNumBins( const RooArgSet& vars ); | |||
Double_t evaluate() const; | Double_t evaluate() const; | |||
ClassDef(ParamHistFunc,4) // Sum of RooAbsReal objects | ClassDef(ParamHistFunc,5) // Sum of RooAbsReal objects | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
ParameterSettings.h | ParameterSettings.h | |||
---|---|---|---|---|
skipping to change at line 119 | skipping to change at line 119 | |||
double LowerLimit() const {return fLowerLimit;} | double LowerLimit() const {return fLowerLimit;} | |||
/// return upper limit value | /// return upper limit value | |||
double UpperLimit() const {return fUpperLimit;} | double UpperLimit() const {return fUpperLimit;} | |||
/// check if is fixed | /// check if is fixed | |||
bool IsFixed() const { return fFix; } | bool IsFixed() const { return fFix; } | |||
/// check if parameter has lower limit | /// check if parameter has lower limit | |||
bool HasLowerLimit() const {return fHasLowerLimit; } | bool HasLowerLimit() const {return fHasLowerLimit; } | |||
/// check if parameter has upper limit | /// check if parameter has upper limit | |||
bool HasUpperLimit() const {return fHasUpperLimit; } | bool HasUpperLimit() const {return fHasUpperLimit; } | |||
/// check if is bound | /// check if is bound | |||
bool IsBound() const { return fHasLowerLimit || fHasUpperLimit; } | bool IsBound() const { return fHasLowerLimit || fHasUpperLimit; } | |||
/// check if is double bound (upper AND lower limit) | /// check if is double bound (upper AND lower limit) | |||
bool IsDoubleBound() const { return fHasLowerLimit && fHasUpperLimit; } | bool IsDoubleBound() const { return fHasLowerLimit && fHasUpperLimit; } | |||
/// return name | /// return name | |||
const std::string & Name() const { return fName; } | const std::string & Name() const { return fName; } | |||
/** interaction **/ | /** interaction **/ | |||
/// set name | /// set name | |||
void SetName(const std::string & name ) { fName = name; } | void SetName(const std::string & name ) { fName = name; } | |||
/// fix the parameter | /// fix the parameter | |||
void Fix() {fFix = true;} | void Fix() {fFix = true;} | |||
/// release the parameter | /// release the parameter | |||
void Release() {fFix = false;} | void Release() {fFix = false;} | |||
/// set the value | /// set the value | |||
void SetValue(double val) {fValue = val;} | void SetValue(double val) {fValue = val;} | |||
/// set the step size | /// set the step size | |||
void SetStepSize(double err) {fStepSize = err;} | void SetStepSize(double err) {fStepSize = err;} | |||
/// set a double side limit, | /// set a double side limit, | |||
/// if low == up the parameter is fixedm if low > up the limits are remo ved | /// if low == up the parameter is fixed if low > up the limits are remo ved | |||
void SetLimits(double low, double up) { | void SetLimits(double low, double up) { | |||
if ( low > up ) { | if ( low > up ) { | |||
RemoveLimits(); | RemoveLimits(); | |||
return; | return; | |||
} | } | |||
if (low == up && low == fValue) { | if (low == up && low == fValue) { | |||
Fix(); | Fix(); | |||
return; | return; | |||
} | } | |||
if (low > fValue || up < fValue) { | if (low > fValue || up < fValue) { | |||
MATH_ERROR_MSG("ParameterSettings","Invalid lower/upper bounds - i gnoring the bounds "); | MATH_ERROR_MSG("ParameterSettings","Invalid lower/upper bounds - i gnoring the bounds "); | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
PiecewiseInterpolation.h | PiecewiseInterpolation.h | |||
---|---|---|---|---|
skipping to change at line 46 | skipping to change at line 46 | |||
virtual TObject* clone(const char* newname) const { return new PiecewiseI nterpolation(*this, newname); } | virtual TObject* clone(const char* newname) const { return new PiecewiseI nterpolation(*this, newname); } | |||
// virtual Double_t defaultErrorLevel() const ; | // virtual Double_t defaultErrorLevel() const ; | |||
// void printMetaArgs(std::ostream& os) const ; | // void printMetaArgs(std::ostream& os) const ; | |||
const RooArgList& lowList() const { return _lowSet ; } | const RooArgList& lowList() const { return _lowSet ; } | |||
const RooArgList& highList() const { return _highSet ; } | const RooArgList& highList() const { return _highSet ; } | |||
const RooArgList& paramList() const { return _paramSet ; } | const RooArgList& paramList() const { return _paramSet ; } | |||
virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; } | //virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRU E ; } | |||
Bool_t setBinIntegrator(RooArgSet& allVars) ; | Bool_t setBinIntegrator(RooArgSet& allVars) ; | |||
Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, co nst RooArgSet* normSet,const char* rangeName=0) const ; | Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, co nst RooArgSet* normSet,const char* rangeName=0) const ; | |||
Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ; | Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ; | |||
void setPositiveDefinite(bool flag=true){_positiveDefinite=flag;} | void setPositiveDefinite(bool flag=true){_positiveDefinite=flag;} | |||
void setInterpCode(RooAbsReal& param, int code); | void setInterpCode(RooAbsReal& param, int code); | |||
void setAllInterpCodes(int code); | void setAllInterpCodes(int code); | |||
void printAllInterpCodes(); | void printAllInterpCodes(); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
PoissonLikelihoodFCN.h | PoissonLikelihoodFCN.h | |||
---|---|---|---|---|
skipping to change at line 131 | skipping to change at line 131 | |||
bool IsWeighted() const { return (fWeight != 0); } | bool IsWeighted() const { return (fWeight != 0); } | |||
// Use the weights in evaluating the likelihood | // Use the weights in evaluating the likelihood | |||
void UseSumOfWeights() { | void UseSumOfWeights() { | |||
if (fWeight == 0) return; // do nothing if it was not weighted | if (fWeight == 0) return; // do nothing if it was not weighted | |||
fWeight = 1; | fWeight = 1; | |||
} | } | |||
// Use sum of the weight squared in evaluating the likelihood | // Use sum of the weight squared in evaluating the likelihood | |||
// (this is needed for calculating the errors) | // (this is needed for calculating the errors) | |||
void UseSumOfWeightSquare() { | void UseSumOfWeightSquare(bool on = true) { | |||
if (fWeight == 0) return; // do nothing if it was not weighted | if (fWeight == 0) return; // do nothing if it was not weighted | |||
fWeight = 2; | if (on) fWeight = 2; | |||
else fWeight = 1; | ||||
} | } | |||
protected: | protected: | |||
private: | private: | |||
/** | /** | |||
Evaluation of the function (required by interface) | Evaluation of the function (required by interface) | |||
*/ | */ | |||
virtual double DoEval (const double * x) const { | virtual double DoEval (const double * x) const { | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
ProofConfig.h | ProofConfig.h | |||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
*/ | */ | |||
// | // | |||
#ifndef ROOT_Rtypes | #ifndef ROOT_Rtypes | |||
#include "Rtypes.h" | #include "Rtypes.h" | |||
#endif | #endif | |||
#include "RooWorkspace.h" | #include "RooWorkspace.h" | |||
#include "RooStudyManager.h" | #include "RooStudyManager.h" | |||
#include "TROOT.h" | ||||
namespace RooStats { | namespace RooStats { | |||
class ProofConfig { | class ProofConfig { | |||
public: | public: | |||
ProofConfig(RooWorkspace &w, Int_t nExperiments = 8, const char *host | ||||
= "", Bool_t showGui = kFALSE) : | // configure proof with number of experiments and host session | |||
// in case of Prooflite, it is better to define the number of worker | ||||
s as "worker=n" in the host string | ||||
ProofConfig(RooWorkspace &w, Int_t nExperiments = 0, const char *host | ||||
= "", Bool_t showGui = kFALSE) : | ||||
fWorkspace(w), | fWorkspace(w), | |||
fNExperiments(nExperiments), | fNExperiments(nExperiments), | |||
fHost(host), | fHost(host), | |||
fShowGui(showGui) | fShowGui(showGui) | |||
{ | { | |||
// case of ProofLite | ||||
if (fHost == "" || fHost.Contains("lite") ) { | ||||
fLite = true; | ||||
// get the default value of the machine - use CINT inetrface un | ||||
til we have a poper PROOF interface that we can call | ||||
int nMaxWorkers = gROOT->ProcessLineFast("TProofLite::GetNumber | ||||
OfWorkers()"); | ||||
if (nExperiments == 0) { | ||||
fNExperiments = nMaxWorkers; | ||||
} | ||||
if (nExperiments > nMaxWorkers) | ||||
std::cout << "ProofConfig - Warning: using a number of worke | ||||
rs = " << nExperiments << " which is larger than the number of cores in the | ||||
machine " | ||||
<< nMaxWorkers << std::endl; | ||||
// set the number of workers in the Host string | ||||
fHost = TString::Format("workers=%d",fNExperiments); | ||||
} | ||||
else { | ||||
fLite = false; | ||||
// have always a default number of experiments | ||||
if (nExperiments == 0) fNExperiments = 8; | ||||
} | ||||
} | } | |||
virtual ~ProofConfig() { | virtual ~ProofConfig() { | |||
ProofConfig::CloseProof(); | ProofConfig::CloseProof(); | |||
} | } | |||
/// close all proof connections | /// close all proof connections | |||
static void CloseProof(Option_t *option = "s") { RooStudyManager::clo seProof(option); } | static void CloseProof(Option_t *option = "s") { RooStudyManager::clo seProof(option); } | |||
// returns fWorkspace | // returns fWorkspace | |||
RooWorkspace& GetWorkspace(void) { return fWorkspace; } | RooWorkspace& GetWorkspace(void) const { return fWorkspace; } | |||
// returns fHost | // returns fHost | |||
const char* GetHost(void) { return fHost; } | const char* GetHost(void) const { return fHost; } | |||
// return fNExperiments | // return fNExperiments | |||
Int_t GetNExperiments(void) { return fNExperiments; } | Int_t GetNExperiments(void) const { return fNExperiments; } | |||
// return fShowGui | // return fShowGui | |||
Bool_t GetShowGui(void) { return fShowGui; } | Bool_t GetShowGui(void) const { return fShowGui; } | |||
// return true if it is a Lite session (ProofLite) | ||||
Bool_t IsLite() const { return fLite; } | ||||
protected: | protected: | |||
RooWorkspace& fWorkspace; // workspace that is to be used with the RooStudyManager | RooWorkspace& fWorkspace; // workspace that is to be used with the RooStudyManager | |||
Int_t fNExperiments; // number of experiments. This is sometim es called "events" in proof; "experiments" in RooStudyManager. | Int_t fNExperiments; // number of experiments. This is sometim es called "events" in proof; "experiments" in RooStudyManager. | |||
const char* fHost; // Proof hostname. Use empty string (ie " ") for proof-lite. Can also handle options like "workers=2" to run on two n odes. | TString fHost; // Proof hostname. Use empty string (ie " ") for proof-lite. Can also handle options like "workers=2" to run on two n odes. | |||
Bool_t fShowGui; // Whether to show the Proof Progress win dow. | Bool_t fShowGui; // Whether to show the Proof Progress win dow. | |||
Bool_t fLite; // Whether we have a Proof Lite session | ||||
protected: | protected: | |||
ClassDef(ProofConfig,1) // Configuration options for proof. | ClassDef(ProofConfig,1) // Configuration options for proof. | |||
}; | }; | |||
} | } | |||
#endif | #endif | |||
End of changes. 9 change blocks. | ||||
7 lines changed or deleted | 45 lines changed or added | |||
RConfigure.h | RConfigure.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
/* Configurations file for linux */ | /* Configurations file for linux */ | |||
#ifdef R__HAVE_CONFIG | #ifdef R__HAVE_CONFIG | |||
#define ROOTPREFIX "$(ROOTSYS)" | #define ROOTPREFIX "$(ROOTSYS)" | |||
#define ROOTBINDIR "$(ROOTSYS)/bin" | #define ROOTBINDIR "$(ROOTSYS)/bin" | |||
#define ROOTLIBDIR "$(ROOTSYS)/lib" | #define ROOTLIBDIR "$(ROOTSYS)/lib" | |||
#define ROOTINCDIR "$(ROOTSYS)/include" | #define ROOTINCDIR "$(ROOTSYS)/include" | |||
#define ROOTETCDIR "$(ROOTSYS)/etc" | #define ROOTETCDIR "$(ROOTSYS)/etc" | |||
#define ROOTDATADIR "$(ROOTSYS)" | #define ROOTDATADIR "$(ROOTSYS)" | |||
#define ROOTDOCDIR "$(ROOTSYS)" | #define ROOTDOCDIR "$(ROOTSYS)" | |||
#define ROOTMACRODIR "$(ROOTSYS)/macros" | #define ROOTMACRODIR "$(ROOTSYS)/macros" | |||
#define ROOTTUTDIR "$(ROOTSYS)/tutorials" | ||||
#define ROOTSRCDIR "$(ROOTSYS)/src" | #define ROOTSRCDIR "$(ROOTSYS)/src" | |||
#define ROOTICONPATH "$(ROOTSYS)/icons" | #define ROOTICONPATH "$(ROOTSYS)/icons" | |||
#define EXTRAICONPATH "" | #define EXTRAICONPATH "" | |||
#define TTFFONTDIR "$(ROOTSYS)/fonts" | #define TTFFONTDIR "$(ROOTSYS)/fonts" | |||
#define CINTINCDIR "$(ROOTSYS)/cint" | #define CINTINCDIR "$(ROOTSYS)/cint" | |||
#endif | #endif | |||
#define R__HAS_SETRESUID /**/ | #define R__HAS_SETRESUID /**/ | |||
#define R__HAS_MATHMORE /**/ | #define R__HAS_MATHMORE /**/ | |||
#define R__HAS_PTHREAD /**/ | #define R__HAS_PTHREAD /**/ | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 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.34/18" | #define ROOT_RELEASE "5.34/19" | |||
#define ROOT_RELEASE_DATE "Mar 14 2014" | #define ROOT_RELEASE_DATE "Jul 9 2014" | |||
#define ROOT_RELEASE_TIME "16:14:01" | #define ROOT_RELEASE_TIME "15:57:39" | |||
#define ROOT_SVN_REVISION 49361 | #define ROOT_SVN_REVISION 49361 | |||
#define ROOT_GIT_COMMIT "v5-34-17-156-g60f5d99" | #define ROOT_GIT_COMMIT "v5-34-18-592-g34af149" | |||
#define ROOT_GIT_BRANCH "heads/v5-34-00-patches" | #define ROOT_GIT_BRANCH "heads/v5-34-00-patches" | |||
#define ROOT_VERSION_CODE 336402 | #define ROOT_VERSION_CODE 336403 | |||
#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. 3 change blocks. | ||||
5 lines changed or deleted | 5 lines changed or added | |||
RooAbsArg.h | RooAbsArg.h | |||
---|---|---|---|---|
skipping to change at line 503 | skipping to change at line 503 | |||
protected: | protected: | |||
// Proxy management | // Proxy management | |||
friend class RooAddModel ; | friend class RooAddModel ; | |||
friend class RooArgProxy ; | friend class RooArgProxy ; | |||
friend class RooSetProxy ; | friend class RooSetProxy ; | |||
friend class RooListProxy ; | friend class RooListProxy ; | |||
friend class RooObjectFactory ; | friend class RooObjectFactory ; | |||
friend class RooHistPdf ; | friend class RooHistPdf ; | |||
friend class RooHistFunc ; | friend class RooHistFunc ; | |||
friend class RooHistFunc2 ; | ||||
void registerProxy(RooArgProxy& proxy) ; | void registerProxy(RooArgProxy& proxy) ; | |||
void registerProxy(RooSetProxy& proxy) ; | void registerProxy(RooSetProxy& proxy) ; | |||
void registerProxy(RooListProxy& proxy) ; | void registerProxy(RooListProxy& proxy) ; | |||
void unRegisterProxy(RooArgProxy& proxy) ; | void unRegisterProxy(RooArgProxy& proxy) ; | |||
void unRegisterProxy(RooSetProxy& proxy) ; | void unRegisterProxy(RooSetProxy& proxy) ; | |||
void unRegisterProxy(RooListProxy& proxy) ; | void unRegisterProxy(RooListProxy& proxy) ; | |||
RooAbsProxy* getProxy(Int_t index) const ; | RooAbsProxy* getProxy(Int_t index) const ; | |||
void setProxyNormSet(const RooArgSet* nset) ; | void setProxyNormSet(const RooArgSet* nset) ; | |||
Int_t numProxies() const ; | Int_t numProxies() const ; | |||
skipping to change at line 547 | skipping to change at line 548 | |||
// Global | // Global | |||
friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg); | friend std::ostream& operator<<(std::ostream& os, const RooAbsArg &arg); | |||
friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ; | friend std::istream& operator>>(std::istream& is, RooAbsArg &arg) ; | |||
// Debug stuff | // Debug stuff | |||
static Bool_t _verboseDirty ; // Static flag controlling verbose messagin g for dirty state changes | static Bool_t _verboseDirty ; // Static flag controlling verbose messagin g for dirty state changes | |||
static Bool_t _inhibitDirty ; // Static flag controlling global inhibit o f dirty state propagation | static Bool_t _inhibitDirty ; // Static flag controlling global inhibit o f dirty state propagation | |||
Bool_t _deleteWatch ; //! Delete watch flag | Bool_t _deleteWatch ; //! Delete watch flag | |||
static Bool_t inhibitDirty() ; | Bool_t inhibitDirty() const ; | |||
public: | ||||
void setLocalNoDirtyInhibit(Bool_t flag) const { _localNoInhibitDirty = f | ||||
lag ; } | ||||
Bool_t localNoDirtyInhibit() const { return _localNoInhibitDirty ; } | ||||
protected: | ||||
// Value and Shape dirty state bits | // Value and Shape dirty state bits | |||
void setValueDirty(const RooAbsArg* source) const ; | void setValueDirty(const RooAbsArg* source) const ; | |||
void setShapeDirty(const RooAbsArg* source) const ; | void setShapeDirty(const RooAbsArg* source) const ; | |||
mutable Bool_t _valueDirty ; // Flag set if value needs recalculating be cause input values modified | mutable Bool_t _valueDirty ; // Flag set if value needs recalculating be cause input values modified | |||
mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating be cause input shapes modified | mutable Bool_t _shapeDirty ; // Flag set if value needs recalculating be cause input shapes modified | |||
friend class RooRealProxy ; | friend class RooRealProxy ; | |||
mutable OperMode _operMode ; // Dirty state propagation mode | mutable OperMode _operMode ; // Dirty state propagation mode | |||
mutable Bool_t _fast ; // Allow fast access mode in getVal() and proxies | mutable Bool_t _fast ; // Allow fast access mode in getVal() and proxies | |||
skipping to change at line 569 | skipping to change at line 575 | |||
// Owned components | // Owned components | |||
RooArgSet* _ownedComponents ; //! Set of owned component | RooArgSet* _ownedComponents ; //! Set of owned component | |||
mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool | mutable Bool_t _prohibitServerRedirect ; //! Prohibit server redirects -- Debugging tool | |||
mutable RooExpensiveObjectCache* _eocache ; // Pointer to global cache ma nager for any expensive components created by this object | mutable RooExpensiveObjectCache* _eocache ; // Pointer to global cache ma nager for any expensive components created by this object | |||
mutable TNamed* _namePtr ; //! Do not persist. Pointer to global instance of string that matches object named | mutable TNamed* _namePtr ; //! Do not persist. Pointer to global instance of string that matches object named | |||
Bool_t _isConstant ; //! Cached isConstant status | Bool_t _isConstant ; //! Cached isConstant status | |||
mutable Bool_t _localNoInhibitDirty ; //! Prevent 'AlwaysDirty' mode for | ||||
this node | ||||
/* RooArgSet _leafNodeCache ; //! Cached leaf nodes */ | /* RooArgSet _leafNodeCache ; //! Cached leaf nodes */ | |||
/* RooArgSet _branchNodeCache //! Cached branch nodes */ | /* RooArgSet _branchNodeCache //! Cached branch nodes */ | |||
public: | public: | |||
virtual void ioStreamerPass2() ; | virtual void ioStreamerPass2() ; | |||
static void ioStreamerPass2Finalize() ; | static void ioStreamerPass2Finalize() ; | |||
static std::map<RooAbsArg*,TRefArray*> _ioEvoList ; // temporary holding list for proxies needed in schema evolution | static std::map<RooAbsArg*,TRefArray*> _ioEvoList ; // temporary holding list for proxies needed in schema evolution | |||
static std::stack<RooAbsArg*> _ioReadStack ; // reading stack | static std::stack<RooAbsArg*> _ioReadStack ; // reading stack | |||
ClassDef(RooAbsArg,6) // Abstract variable | ClassDef(RooAbsArg,6) // Abstract variable | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 11 lines changed or added | |||
RooAbsReal.h | RooAbsReal.h | |||
---|---|---|---|---|
skipping to change at line 40 | skipping to change at line 40 | |||
class RooAbsFunc; | class RooAbsFunc; | |||
class RooAbsCategoryLValue ; | class RooAbsCategoryLValue ; | |||
class RooCategory ; | class RooCategory ; | |||
class RooLinkedList ; | class RooLinkedList ; | |||
class RooNumIntConfig ; | class RooNumIntConfig ; | |||
class RooDataHist ; | class RooDataHist ; | |||
class RooFunctor ; | class RooFunctor ; | |||
class RooGenFunction ; | class RooGenFunction ; | |||
class RooMultiGenFunction ; | class RooMultiGenFunction ; | |||
class RooFitResult ; | class RooFitResult ; | |||
class RooMoment ; | class RooAbsMoment ; | |||
class RooDerivative ; | class RooDerivative ; | |||
class RooVectorDataStore ; | class RooVectorDataStore ; | |||
class TH1; | class TH1; | |||
class TH1F; | class TH1F; | |||
class TH2F; | class TH2F; | |||
class TH3F; | class TH3F; | |||
#include <list> | #include <list> | |||
#include <string> | #include <string> | |||
skipping to change at line 286 | skipping to change at line 286 | |||
RooGenFunction* iGenFunction(RooRealVar& x, const RooArgSet& nset=RooArgS et()) ; | RooGenFunction* iGenFunction(RooRealVar& x, const RooArgSet& nset=RooArgS et()) ; | |||
RooMultiGenFunction* iGenFunction(const RooArgSet& observables, const Roo ArgSet& nset=RooArgSet()) ; | RooMultiGenFunction* iGenFunction(const RooArgSet& observables, const Roo ArgSet& nset=RooArgSet()) ; | |||
RooFunctor* functor(const RooArgList& obs, const RooArgList& pars=RooArgL ist(), const RooArgSet& nset=RooArgSet()) const ; | RooFunctor* functor(const RooArgList& obs, const RooArgList& pars=RooArgL ist(), const RooArgSet& nset=RooArgSet()) const ; | |||
TF1* asTF(const RooArgList& obs, const RooArgList& pars=RooArgList(), con st RooArgSet& nset=RooArgSet()) const ; | TF1* asTF(const RooArgList& obs, const RooArgList& pars=RooArgList(), con st RooArgSet& nset=RooArgSet()) const ; | |||
RooDerivative* derivative(RooRealVar& obs, Int_t order=1, Double_t eps=0. 001) ; | RooDerivative* derivative(RooRealVar& obs, Int_t order=1, Double_t eps=0. 001) ; | |||
RooDerivative* derivative(RooRealVar& obs, const RooArgSet& normSet, Int_ t order, Double_t eps=0.001) ; | RooDerivative* derivative(RooRealVar& obs, const RooArgSet& normSet, Int_ t order, Double_t eps=0.001) ; | |||
RooMoment* moment(RooRealVar& obs, Int_t order, Bool_t central, Bool_t ta | RooAbsMoment* moment(RooRealVar& obs, Int_t order, Bool_t central, Bool_t | |||
keRoot) ; | takeRoot) ; | |||
RooMoment* moment(RooRealVar& obs, const RooArgSet& normObs, Int_t order, | RooAbsMoment* moment(RooRealVar& obs, const RooArgSet& normObs, Int_t ord | |||
Bool_t central, Bool_t takeRoot, Bool_t intNormObs) ; | er, Bool_t central, Bool_t takeRoot, Bool_t intNormObs) ; | |||
RooMoment* mean(RooRealVar& obs) { return moment(obs,1,kFALSE,kFALSE) ; } | RooAbsMoment* mean(RooRealVar& obs) { return moment(obs,1,kFALSE,kFALSE) | |||
RooMoment* mean(RooRealVar& obs, const RooArgSet& nset) { return moment(o | ; } | |||
bs,nset,1,kFALSE,kFALSE,kTRUE) ; } | RooAbsMoment* mean(RooRealVar& obs, const RooArgSet& nset) { return momen | |||
RooMoment* sigma(RooRealVar& obs) { return moment(obs,2,kTRUE,kTRUE) ; } | t(obs,nset,1,kFALSE,kFALSE,kTRUE) ; } | |||
RooMoment* sigma(RooRealVar& obs, const RooArgSet& nset) { return moment( | RooAbsMoment* sigma(RooRealVar& obs) { return moment(obs,2,kTRUE,kTRUE) ; | |||
obs,nset,2,kTRUE,kTRUE,kTRUE) ; } | } | |||
RooAbsMoment* sigma(RooRealVar& obs, const RooArgSet& nset) { return mome | ||||
nt(obs,nset,2,kTRUE,kTRUE,kTRUE) ; } | ||||
Double_t findRoot(RooRealVar& x, Double_t xmin, Double_t xmax, Double_t y val) ; | Double_t findRoot(RooRealVar& x, Double_t xmin, Double_t xmax, Double_t y val) ; | |||
virtual Bool_t setData(RooAbsData& /*data*/, Bool_t /*cloneData*/=kTRUE) { return kTRUE ; } | virtual Bool_t setData(RooAbsData& /*data*/, Bool_t /*cloneData*/=kTRUE) { return kTRUE ; } | |||
virtual void enableOffsetting(Bool_t) {} ; | virtual void enableOffsetting(Bool_t) {} ; | |||
virtual Bool_t isOffsetting() const { return kFALSE ; } | virtual Bool_t isOffsetting() const { return kFALSE ; } | |||
virtual Double_t offset() const { return 0 ; } | virtual Double_t offset() const { return 0 ; } | |||
static void setHideOffset(Bool_t flag); | static void setHideOffset(Bool_t flag); | |||
End of changes. 3 change blocks. | ||||
11 lines changed or deleted | 13 lines changed or added | |||
RooChangeTracker.h | RooChangeTracker.h | |||
---|---|---|---|---|
skipping to change at line 50 | skipping to change at line 50 | |||
protected: | protected: | |||
RooListProxy _realSet ; // List of reals to track | RooListProxy _realSet ; // List of reals to track | |||
RooListProxy _catSet ; // List of categories to check | RooListProxy _catSet ; // List of categories to check | |||
std::vector<Double_t> _realRef ; // Reference values for reals | std::vector<Double_t> _realRef ; // Reference values for reals | |||
std::vector<Int_t> _catRef ; // Reference valyes for categories | std::vector<Int_t> _catRef ; // Reference valyes for categories | |||
Bool_t _checkVal ; // Check contents as well if true | Bool_t _checkVal ; // Check contents as well if true | |||
mutable TIterator* _realSetIter ; //! do not persist | mutable TIterator* _realSetIter ; //! do not persist | |||
mutable TIterator* _catSetIter ; //! do not persist | mutable TIterator* _catSetIter ; //! do not persist | |||
Bool_t _init ; //! | ||||
Double_t evaluate() const { return 1 ; } | Double_t evaluate() const { return 1 ; } | |||
ClassDef(RooChangeTracker,1) // Meta object that tracks changes in set of other arguments | ClassDef(RooChangeTracker,1) // Meta object that tracks changes in set of other arguments | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
RooDataHist.h | RooDataHist.h | |||
---|---|---|---|---|
skipping to change at line 186 | skipping to change at line 186 | |||
mutable Double_t _curSumW2 ; // Current sum of weights^2 | mutable Double_t _curSumW2 ; // Current sum of weights^2 | |||
mutable Double_t _curVolume ; // Volume of bin enclosing current coordina te | mutable Double_t _curVolume ; // Volume of bin enclosing current coordina te | |||
mutable Int_t _curIndex ; // Current index | mutable Int_t _curIndex ; // Current index | |||
mutable std::vector<Double_t>* _pbinv ; //! Partial bin volume array | mutable std::vector<Double_t>* _pbinv ; //! Partial bin volume array | |||
mutable RooCacheManager<std::vector<Double_t> > _pbinvCacheMgr ; //! Cach e manager for arrays of partial bin volumes | mutable RooCacheManager<std::vector<Double_t> > _pbinvCacheMgr ; //! Cach e manager for arrays of partial bin volumes | |||
std::vector<RooAbsLValue*> _lvvars ; //! List of observables casted as Ro oAbsLValue | std::vector<RooAbsLValue*> _lvvars ; //! List of observables casted as Ro oAbsLValue | |||
std::vector<const RooAbsBinning*> _lvbins ; //! List of used binnings ass ociated with lvalues | std::vector<const RooAbsBinning*> _lvbins ; //! List of used binnings ass ociated with lvalues | |||
mutable std::vector<std::vector<Double_t> > _binbounds; //! list of bin b ounds per dimension | mutable std::vector<std::vector<Double_t> > _binbounds; //! list of bin b ounds per dimension | |||
mutable Int_t _cache_sum_valid ; //! Is cache sum valid | ||||
mutable Double_t _cache_sum ; //! Cache for sum of entries ; | ||||
private: | private: | |||
ClassDef(RooDataHist,4) // Binned data set | ClassDef(RooDataHist,4) // Binned data set | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added | |||
RooFormulaVar.h | RooFormulaVar.h | |||
---|---|---|---|---|
skipping to change at line 61 | skipping to change at line 61 | |||
// Printing interface (human readable) | // Printing interface (human readable) | |||
virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb ose=kFALSE, TString indent= "") const ; | virtual void printMultiline(std::ostream& os, Int_t contents, Bool_t verb ose=kFALSE, TString indent= "") const ; | |||
void printMetaArgs(std::ostream& os) const ; | void printMetaArgs(std::ostream& os) const ; | |||
// Debugging | // Debugging | |||
void dumpFormula() { formula().dump() ; } | void dumpFormula() { formula().dump() ; } | |||
virtual Double_t defaultErrorLevel() const ; | virtual Double_t defaultErrorLevel() const ; | |||
virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou | ||||
ble_t /*xlo*/, Double_t /*xhi*/) const ; | ||||
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& /*obs*/, | ||||
Double_t /*xlo*/, Double_t /*xhi*/) const ; | ||||
protected: | protected: | |||
// Function evaluation | // Function evaluation | |||
virtual Double_t evaluate() const ; | virtual Double_t evaluate() const ; | |||
RooFormula& formula() const ; | RooFormula& formula() const ; | |||
// Post-processing of server redirection | // Post-processing of server redirection | |||
virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ; | virtual Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ; | |||
virtual Bool_t isValidReal(Double_t value, Bool_t printError) const ; | virtual Bool_t isValidReal(Double_t value, Bool_t printError) const ; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 5 lines changed or added | |||
RooHistFunc.h | RooHistFunc.h | |||
---|---|---|---|---|
skipping to change at line 79 | skipping to change at line 79 | |||
virtual Int_t getMaxVal(const RooArgSet& vars) const; | virtual Int_t getMaxVal(const RooArgSet& vars) const; | |||
virtual Double_t maxVal(Int_t code) const; | virtual Double_t maxVal(Int_t code) const; | |||
virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou ble_t /*xlo*/, Double_t /*xhi*/) const ; | virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou ble_t /*xlo*/, Double_t /*xhi*/) const ; | |||
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ; | virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ; | |||
virtual Bool_t isBinnedDistribution(const RooArgSet&) const { return _int Order==0 ; } | virtual Bool_t isBinnedDistribution(const RooArgSet&) const { return _int Order==0 ; } | |||
protected: | protected: | |||
Bool_t redirectServersHook(const RooAbsCollection& newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive) ; | ||||
Bool_t importWorkspaceHook(RooWorkspace& ws) ; | Bool_t importWorkspaceHook(RooWorkspace& ws) ; | |||
Bool_t areIdentical(const RooDataHist& dh1, const RooDataHist& dh2) ; | Bool_t areIdentical(const RooDataHist& dh1, const RooDataHist& dh2) ; | |||
Double_t evaluate() const; | Double_t evaluate() const; | |||
Double_t totalVolume() const ; | Double_t totalVolume() const ; | |||
friend class RooAbsCachedReal ; | friend class RooAbsCachedReal ; | |||
Double_t totVolume() const ; | Double_t totVolume() const ; | |||
virtual void ioStreamerPass2() ; | virtual void ioStreamerPass2() ; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 0 lines changed or added | |||
RooMoment.h | RooMoment.h | |||
---|---|---|---|---|
skipping to change at line 19 | skipping to change at line 19 | |||
* Copyright (c) 2000-2005, Regents of the University of California * | * Copyright (c) 2000-2005, Regents of the University of California * | |||
* and Stanford University. All rights reserved. * | * and Stanford University. All rights reserved. * | |||
* * | * * | |||
* Redistribution and use in source and binary forms, * | * Redistribution and use in source and binary forms, * | |||
* with or without modification, are permitted according to the terms * | * with or without modification, are permitted according to the terms * | |||
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) * | * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * | |||
************************************************************************** ***/ | ************************************************************************** ***/ | |||
#ifndef ROO_MOMENT | #ifndef ROO_MOMENT | |||
#define ROO_MOMENT | #define ROO_MOMENT | |||
#include "RooAbsReal.h" | #include "RooAbsMoment.h" | |||
#include "RooRealProxy.h" | #include "RooRealProxy.h" | |||
#include "RooSetProxy.h" | #include "RooSetProxy.h" | |||
class RooRealVar; | class RooRealVar; | |||
class RooArgList ; | class RooArgList ; | |||
class RooMoment : public RooAbsReal { | class RooMoment : public RooAbsMoment { | |||
public: | public: | |||
RooMoment() ; | RooMoment() ; | |||
RooMoment(const char *name, const char *title, RooAbsReal& func, RooRealV ar& x, Int_t order=1, Bool_t central=kFALSE, Bool_t takeRoot=kFALSE) ; | RooMoment(const char *name, const char *title, RooAbsReal& func, RooRealV ar& x, Int_t order=1, Bool_t central=kFALSE, Bool_t takeRoot=kFALSE) ; | |||
RooMoment(const char *name, const char *title, RooAbsReal& func, RooRealV ar& x, const RooArgSet& nset, Int_t order=1, Bool_t central=kFALSE, Bool_t takeRoot=kFALSE, | RooMoment(const char *name, const char *title, RooAbsReal& func, RooRealV ar& x, const RooArgSet& nset, Int_t order=1, Bool_t central=kFALSE, Bool_t takeRoot=kFALSE, | |||
Bool_t intNSet=kFALSE) ; | Bool_t intNSet=kFALSE) ; | |||
virtual ~RooMoment() ; | virtual ~RooMoment() ; | |||
RooMoment(const RooMoment& other, const char* name = 0); | RooMoment(const RooMoment& other, const char* name = 0); | |||
virtual TObject* clone(const char* newname) const { return new RooMoment( *this, newname); } | virtual TObject* clone(const char* newname) const { return new RooMoment( *this, newname); } | |||
Int_t order() const { return _order ; } | ||||
Bool_t central() const { return _mean.absArg() ? kTRUE : kFALSE ; } | ||||
RooAbsReal* mean() { return (RooAbsReal*) _mean.absArg() ; } | ||||
const RooAbsReal& xF() { return _xf.arg() ; } | const RooAbsReal& xF() { return _xf.arg() ; } | |||
const RooAbsReal& ixF() { return _ixf.arg() ; } | const RooAbsReal& ixF() { return _ixf.arg() ; } | |||
const RooAbsReal& iF() { return _if.arg() ; } | const RooAbsReal& iF() { return _if.arg() ; } | |||
protected: | protected: | |||
Int_t _order ; // Moment order | ||||
Int_t _takeRoot ; // Return n-order root of moment | ||||
RooSetProxy _nset ; // Normalization set (optional) | ||||
RooRealProxy _func ; // Input function | ||||
RooRealProxy _x ; // Observable | ||||
RooRealProxy _mean ; // Mean (if calculated for central | ||||
moment) | ||||
RooRealProxy _xf ; // X*F | RooRealProxy _xf ; // X*F | |||
RooRealProxy _ixf ; // Int(X*F(X))dx ; | RooRealProxy _ixf ; // Int(X*F(X))dx ; | |||
RooRealProxy _if ; // Int(F(x))dx ; | RooRealProxy _if ; // Int(F(x))dx ; | |||
Double_t evaluate() const; | Double_t evaluate() const; | |||
ClassDef(RooMoment,1) // Representation of moment in a RooAbsReal in a gi ven RooRealVar | ClassDef(RooMoment,1) // Representation of moment in a RooAbsReal in a gi ven RooRealVar | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 4 change blocks. | ||||
15 lines changed or deleted | 2 lines changed or added | |||
RooMomentMorph.h | RooMomentMorph.h | |||
---|---|---|---|---|
skipping to change at line 34 | skipping to change at line 34 | |||
class RooChangeTracker ; | class RooChangeTracker ; | |||
class RooMomentMorph : public RooAbsPdf { | class RooMomentMorph : public RooAbsPdf { | |||
public: | public: | |||
enum Setting { Linear, NonLinear, NonLinearPosFractions, NonLinearLinFrac tions, SineLinear } ; | enum Setting { Linear, NonLinear, NonLinearPosFractions, NonLinearLinFrac tions, SineLinear } ; | |||
RooMomentMorph() ; | RooMomentMorph() ; | |||
RooMomentMorph(const char *name, const char *title, RooAbsReal& _m, const RooArgList& varList, | RooMomentMorph(const char *name, const char *title, RooAbsReal& _m, const RooArgList& varList, | |||
const RooArgList& pdfList, const RooArgList& mrefList, const Setting& setting = NonLinearPosFractions); | const RooArgList& pdfList, const RooArgList& mrefList, Settin g setting = NonLinearPosFractions); | |||
RooMomentMorph(const char *name, const char *title, RooAbsReal& _m, const RooArgList& varList, | RooMomentMorph(const char *name, const char *title, RooAbsReal& _m, const RooArgList& varList, | |||
const RooArgList& pdfList, const TVectorD& mrefpoints, const Setting& setting = NonLinearPosFractions ); | const RooArgList& pdfList, const TVectorD& mrefpoints, Settin g setting = NonLinearPosFractions ); | |||
RooMomentMorph(const RooMomentMorph& other, const char* name=0) ; | RooMomentMorph(const RooMomentMorph& other, const char* name=0) ; | |||
virtual TObject* clone(const char* newname) const { return new RooMomentM orph(*this,newname); } | virtual TObject* clone(const char* newname) const { return new RooMomentM orph(*this,newname); } | |||
virtual ~RooMomentMorph(); | virtual ~RooMomentMorph(); | |||
void setMode(const Setting& setting) { _setting = setting; } | void setMode(const Setting& setting) { _setting = setting; } | |||
void useHorizontalMorphing(bool val) { _useHorizMorph = val; } | void useHorizontalMorphing(bool val) { _useHorizMorph = val; } | |||
virtual Bool_t selfNormalized() const { | virtual Bool_t selfNormalized() const { | |||
// P.d.f is self normalized | // P.d.f is self normalized | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
RooNumIntFactory.h | RooNumIntFactory.h | |||
---|---|---|---|---|
skipping to change at line 40 | skipping to change at line 40 | |||
class RooNumIntFactory : public TObject { | class RooNumIntFactory : public TObject { | |||
public: | public: | |||
static RooNumIntFactory& instance() ; | static RooNumIntFactory& instance() ; | |||
virtual ~RooNumIntFactory(); | virtual ~RooNumIntFactory(); | |||
Bool_t storeProtoIntegrator(RooAbsIntegrator* proto, const RooArgSet& def Config, const char* depName="") ; | Bool_t storeProtoIntegrator(RooAbsIntegrator* proto, const RooArgSet& def Config, const char* depName="") ; | |||
const RooAbsIntegrator* getProtoIntegrator(const char* name) ; | const RooAbsIntegrator* getProtoIntegrator(const char* name) ; | |||
const char* getDepIntegratorName(const char* name) ; | const char* getDepIntegratorName(const char* name) ; | |||
RooAbsIntegrator* createIntegrator(RooAbsFunc& func, const RooNumIntConfi g& config, Int_t ndim=0) ; | RooAbsIntegrator* createIntegrator(RooAbsFunc& func, const RooNumIntConfi g& config, Int_t ndim=0, Bool_t isBinned=kFALSE) ; | |||
static void cleanup() ; | static void cleanup() ; | |||
protected: | protected: | |||
friend class RooNumIntConfig ; | friend class RooNumIntConfig ; | |||
std::map<std::string,std::pair<RooAbsIntegrator*,std::string> > _map ; | std::map<std::string,std::pair<RooAbsIntegrator*,std::string> > _map ; | |||
RooNumIntFactory(); | RooNumIntFactory(); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
RooObjCacheManager.h | RooObjCacheManager.h | |||
---|---|---|---|---|
skipping to change at line 36 | skipping to change at line 36 | |||
#include "RooAbsCacheElement.h" | #include "RooAbsCacheElement.h" | |||
#include "RooCacheManager.h" | #include "RooCacheManager.h" | |||
#include <list> | #include <list> | |||
class RooNameSet ; | class RooNameSet ; | |||
class RooObjCacheManager : public RooCacheManager<RooAbsCacheElement> { | class RooObjCacheManager : public RooCacheManager<RooAbsCacheElement> { | |||
public: | public: | |||
RooObjCacheManager(RooAbsArg* owner=0, Int_t maxSize=10, Bool_t clearCach eOnServerRedirect=kTRUE) ; | RooObjCacheManager(RooAbsArg* owner=0, Int_t maxSize=10, Bool_t clearCach eOnServerRedirect=kTRUE, Bool_t allowOptimize=kFALSE) ; | |||
RooObjCacheManager(const RooObjCacheManager& other, RooAbsArg* owner=0) ; | RooObjCacheManager(const RooObjCacheManager& other, RooAbsArg* owner=0) ; | |||
virtual ~RooObjCacheManager() ; | virtual ~RooObjCacheManager() ; | |||
virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerLis t*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive */) ; | virtual Bool_t redirectServersHook(const RooAbsCollection& /*newServerLis t*/, Bool_t /*mustReplaceAll*/, Bool_t /*nameChange*/, Bool_t /*isRecursive */) ; | |||
virtual void operModeHook() ; | virtual void operModeHook() ; | |||
virtual void optimizeCacheMode(const RooArgSet& /*obs*/, RooArgSet& /*opt Set*/, RooLinkedList& /*processedNodes*/) ; | virtual void optimizeCacheMode(const RooArgSet& /*obs*/, RooArgSet& /*opt Set*/, RooLinkedList& /*processedNodes*/) ; | |||
virtual void printCompactTreeHook(std::ostream&, const char *) ; | virtual void printCompactTreeHook(std::ostream&, const char *) ; | |||
virtual void findConstantNodes(const RooArgSet& /*obs*/, RooArgSet& /*cac heList*/, RooLinkedList& /*processedNodes*/) ; | virtual void findConstantNodes(const RooArgSet& /*obs*/, RooArgSet& /*cac heList*/, RooLinkedList& /*processedNodes*/) ; | |||
virtual void insertObjectHook(RooAbsCacheElement&) ; | virtual void insertObjectHook(RooAbsCacheElement&) ; | |||
skipping to change at line 58 | skipping to change at line 58 | |||
void sterilize() ; | void sterilize() ; | |||
static void doClearObsList(Bool_t flag) { _clearObsList = flag ; } | static void doClearObsList(Bool_t flag) { _clearObsList = flag ; } | |||
static Bool_t clearObsList() { return _clearObsList ; } | static Bool_t clearObsList() { return _clearObsList ; } | |||
void setClearOnRedirect(Bool_t flag) { _clearOnRedirect = flag ; } | void setClearOnRedirect(Bool_t flag) { _clearOnRedirect = flag ; } | |||
protected: | protected: | |||
Bool_t _clearOnRedirect ; | Bool_t _clearOnRedirect ; | |||
Bool_t _allowOptimize ; | ||||
Bool_t _optCacheModeSeen ; //! | Bool_t _optCacheModeSeen ; //! | |||
RooArgSet* _optCacheObservables ; //! current optCacheObservables | RooArgSet* _optCacheObservables ; //! current optCacheObservables | |||
static Bool_t _clearObsList ; // Clear obslist on sterilize? | static Bool_t _clearObsList ; // Clear obslist on sterilize? | |||
ClassDef(RooObjCacheManager,2) // Cache manager for generic caches that c ontain RooAbsArg objects | ClassDef(RooObjCacheManager,3) // Cache manager for generic caches that c ontain RooAbsArg objects | |||
} ; | } ; | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
RooParamHistFunc.h | RooParamHistFunc.h | |||
---|---|---|---|---|
skipping to change at line 23 | skipping to change at line 23 | |||
#include "RooAbsReal.h" | #include "RooAbsReal.h" | |||
#include "RooAbsCategory.h" | #include "RooAbsCategory.h" | |||
#include "RooListProxy.h" | #include "RooListProxy.h" | |||
#include "RooSetProxy.h" | #include "RooSetProxy.h" | |||
#include "RooDataHist.h" | #include "RooDataHist.h" | |||
class RooParamHistFunc : public RooAbsReal { | class RooParamHistFunc : public RooAbsReal { | |||
public: | public: | |||
RooParamHistFunc() {} ; | RooParamHistFunc() {} ; | |||
RooParamHistFunc(const char *name, const char *title, RooDataHist& dh, Bo ol_t paramRelative=kTRUE); | RooParamHistFunc(const char *name, const char *title, RooDataHist& dh, Bo ol_t paramRelative=kTRUE); | |||
RooParamHistFunc(const char *name, const char *title, const RooAbsArg& x, RooDataHist& dh, Bool_t paramRelative=kTRUE); | ||||
RooParamHistFunc(const char *name, const char *title, RooDataHist& dh, co nst RooParamHistFunc& paramSource, Bool_t paramRelative=kTRUE) ; | RooParamHistFunc(const char *name, const char *title, RooDataHist& dh, co nst RooParamHistFunc& paramSource, Bool_t paramRelative=kTRUE) ; | |||
RooParamHistFunc(const RooParamHistFunc& other, const char* name=0) ; | RooParamHistFunc(const RooParamHistFunc& other, const char* name=0) ; | |||
virtual TObject* clone(const char* newname) const { return new RooParamHi stFunc(*this,newname); } | virtual TObject* clone(const char* newname) const { return new RooParamHi stFunc(*this,newname); } | |||
inline virtual ~RooParamHistFunc() { } | inline virtual ~RooParamHistFunc() { } | |||
virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou ble_t /*xlo*/, Double_t /*xhi*/) const ; | virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& /*obs*/, Dou ble_t /*xlo*/, Double_t /*xhi*/) const ; | |||
virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ; | virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Doub le_t xlo, Double_t xhi) const ; | |||
virtual Bool_t isBinnedDistribution(const RooArgSet&) const { return kTRU E ; } | virtual Bool_t isBinnedDistribution(const RooArgSet&) const { return kTRU E ; } | |||
virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; } | virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
RooParametricStepFunction.h | RooParametricStepFunction.h | |||
---|---|---|---|---|
skipping to change at line 29 | skipping to change at line 29 | |||
#include "RooAbsPdf.h" | #include "RooAbsPdf.h" | |||
#include "RooRealProxy.h" | #include "RooRealProxy.h" | |||
#include "RooListProxy.h" | #include "RooListProxy.h" | |||
class RooRealVar; | class RooRealVar; | |||
class RooArgList ; | class RooArgList ; | |||
class RooParametricStepFunction : public RooAbsPdf { | class RooParametricStepFunction : public RooAbsPdf { | |||
public: | public: | |||
RooParametricStepFunction() : _nBins(0), _coefIter(0) {} | ||||
RooParametricStepFunction(const char *name, const char *title, | RooParametricStepFunction(const char *name, const char *title, | |||
RooAbsReal& x, const RooArgList& coefList, TArrayD& limits, Int_t nBins=1) ; | RooAbsReal& x, const RooArgList& coefList, TArrayD& limits, Int_t nBins=1) ; | |||
RooParametricStepFunction(const RooParametricStepFunction& other, const c har* name = 0); | RooParametricStepFunction(const RooParametricStepFunction& other, const c har* name = 0); | |||
virtual TObject* clone(const char* newname) const { return new RooParamet ricStepFunction(*this, newname); } | virtual TObject* clone(const char* newname) const { return new RooParamet ricStepFunction(*this, newname); } | |||
virtual ~RooParametricStepFunction() ; | virtual ~RooParametricStepFunction() ; | |||
Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, cons t char* rangeName=0) const ; | Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, cons t char* rangeName=0) const ; | |||
Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ; | Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ; | |||
Int_t getnBins(); | Int_t getnBins(); | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
RooRealSumPdf.h | RooRealSumPdf.h | |||
---|---|---|---|---|
skipping to change at line 39 | skipping to change at line 39 | |||
RooRealSumPdf(const char *name, const char *title, const RooArgList& func List, const RooArgList& coefList, Bool_t extended=kFALSE) ; | RooRealSumPdf(const char *name, const char *title, const RooArgList& func List, const RooArgList& coefList, Bool_t extended=kFALSE) ; | |||
RooRealSumPdf(const char *name, const char *title, | RooRealSumPdf(const char *name, const char *title, | |||
RooAbsReal& func1, RooAbsReal& func2, RooAbsReal& coef1) ; | RooAbsReal& func1, RooAbsReal& func2, RooAbsReal& coef1) ; | |||
RooRealSumPdf(const RooRealSumPdf& other, const char* name=0) ; | RooRealSumPdf(const RooRealSumPdf& other, const char* name=0) ; | |||
virtual TObject* clone(const char* newname) const { return new RooRealSum Pdf(*this,newname) ; } | virtual TObject* clone(const char* newname) const { return new RooRealSum Pdf(*this,newname) ; } | |||
virtual ~RooRealSumPdf() ; | virtual ~RooRealSumPdf() ; | |||
Double_t evaluate() const ; | Double_t evaluate() const ; | |||
virtual Bool_t checkObservables(const RooArgSet* nset) const ; | virtual Bool_t checkObservables(const RooArgSet* nset) const ; | |||
virtual Bool_t forceAnalyticalInt(const RooAbsArg&) const { return kTRUE ; } | virtual Bool_t forceAnalyticalInt(const RooAbsArg& arg) const { return ar g.isFundamental() ; } | |||
Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, con st RooArgSet* normSet, const char* rangeName=0) const ; | Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& numVars, con st RooArgSet* normSet, const char* rangeName=0) const ; | |||
Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ; | Double_t analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=0) const ; | |||
const RooArgList& funcList() const { return _funcList ; } | const RooArgList& funcList() const { return _funcList ; } | |||
const RooArgList& coefList() const { return _coefList ; } | const RooArgList& coefList() const { return _coefList ; } | |||
virtual ExtendMode extendMode() const ; | virtual ExtendMode extendMode() const ; | |||
virtual Double_t expectedEvents(const RooArgSet* nset) const ; | virtual Double_t expectedEvents(const RooArgSet* nset) const ; | |||
virtual Double_t expectedEvents(const RooArgSet& nset) const { | virtual Double_t expectedEvents(const RooArgSet& nset) const { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
RooStatsUtils.h | RooStatsUtils.h | |||
---|---|---|---|---|
skipping to change at line 121 | skipping to change at line 121 | |||
// extract constraint terms from pdf | // extract constraint terms from pdf | |||
RooAbsPdf * MakeNuisancePdf(RooAbsPdf &pdf, const RooArgSet &observables , const char *name); | RooAbsPdf * MakeNuisancePdf(RooAbsPdf &pdf, const RooArgSet &observables , const char *name); | |||
RooAbsPdf * MakeNuisancePdf(const RooStats::ModelConfig &model, const ch ar *name); | RooAbsPdf * MakeNuisancePdf(const RooStats::ModelConfig &model, const ch ar *name); | |||
// remove constraints from pdf and return the unconstrained pdf | // remove constraints from pdf and return the unconstrained pdf | |||
RooAbsPdf * MakeUnconstrainedPdf(RooAbsPdf &pdf, const RooArgSet &observ ables, const char *name = NULL); | RooAbsPdf * MakeUnconstrainedPdf(RooAbsPdf &pdf, const RooArgSet &observ ables, const char *name = NULL); | |||
RooAbsPdf * MakeUnconstrainedPdf(const RooStats::ModelConfig &model, con st char *name = NULL); | RooAbsPdf * MakeUnconstrainedPdf(const RooStats::ModelConfig &model, con st char *name = NULL); | |||
// Create a TTree with the given name and description. All RooRealVars i n the RooDataSet are represented as branches that contain values of type Do uble_t. | // Create a TTree with the given name and description. All RooRealVars i n the RooDataSet are represented as branches that contain values of type Do uble_t. | |||
TTree* GetAsTTree(TString name, TString desc, const RooDataSet& data); | TTree* GetAsTTree(TString name, TString desc, const RooDataSet& data); | |||
// useful function to print in one line the content of a set with their | ||||
values | ||||
void PrintListContent(const RooArgList & l, std::ostream & os = std::cou | ||||
t); | ||||
} | } | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 5 lines changed or added | |||
RootFinder.h | RootFinder.h | |||
---|---|---|---|---|
// @(#)root/mathmore:$Id$ | // @(#)root/tmva $Id$ | |||
// Authors: L. Moneta, A. Zsenei 08/2005 | // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss | |||
/********************************************************************** | /************************************************************************** | |||
* * | ******** | |||
* Copyright (c) 2004 ROOT Foundation, CERN/PH-SFT * | * Project: TMVA - a Root-integrated toolkit for multivariate data analysis | |||
* * | * | |||
* This library is free software; you can redistribute it and/or * | * Package: TMVA | |||
* modify it under the terms of the GNU General Public License * | * | |||
* as published by the Free Software Foundation; either version 2 * | * Class : RootFinder | |||
* of the License, or (at your option) any later version. * | * | |||
* * | * Web : http://tmva.sourceforge.net | |||
* This library is distributed in the hope that it will be useful, * | * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * | * | |||
* General Public License for more details. * | * Description: | |||
* * | * | |||
* You should have received a copy of the GNU General Public License * | * Root finding using Brents algorithm | |||
* along with this library (see file COPYING); if not, write * | * | |||
* to the Free Software Foundation, Inc., 59 Temple Place, Suite * | * (translated from CERNLIB function RZERO) | |||
* 330, Boston, MA 02111-1307 USA, or contact the author. * | * | |||
* * | * | |||
**********************************************************************/ | * | |||
* Authors (alphabetical): | ||||
// Header file for class RootFinder | * | |||
// | * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland | |||
// Created by: moneta at Sun Nov 14 16:59:55 2004 | * | |||
// | * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, German | |||
// Last update: Sun Nov 14 16:59:55 2004 | y * | |||
// | * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada | |||
#ifndef ROOT_Math_RootFinder | * | |||
#define ROOT_Math_RootFinder | * | |||
* | ||||
* Copyright (c) 2005: | ||||
* | ||||
* CERN, Switzerland | ||||
* | ||||
* U. of Victoria, Canada | ||||
* | ||||
* MPI-K Heidelberg, 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_RootFinder | ||||
#define ROOT_TMVA_RootFinder | ||||
////////////////////////////////////////////////////////////////////////// | ||||
// // | ||||
// RootFinder // | ||||
// // | ||||
// Root finding using Brents algorithm // | ||||
// (translated from CERNLIB function RZERO) // | ||||
// // | ||||
////////////////////////////////////////////////////////////////////////// | ||||
#ifndef ROOT_Math_IFunctionfwd | #ifndef ROOT_TObject | |||
#include "Math/IFunctionfwd.h" | #include "TObject.h" | |||
#endif | #endif | |||
#ifndef ROOT_Math_IRootFinderMethod | namespace TMVA { | |||
#include "Math/IRootFinderMethod.h" | ||||
#endif | ||||
/** | class MsgLogger; | |||
@defgroup RootFinders One-dimensional Root-Finding algorithms | ||||
Various implementation esists in MathCore and MathMore | ||||
The user interacts with a proxy class ROOT::Math::RootFinder which creat | ||||
es behing | ||||
the chosen algorithms which are implemented using the ROOT::Math::IRootF | ||||
inderMethod interface | ||||
@ingroup NumAlgo | ||||
*/ | ||||
namespace ROOT { | ||||
namespace Math { | ||||
//_________________________________________________________________________ | ||||
____________ | ||||
/** | ||||
User Class to find the Root of one dimensional functions. | ||||
The GSL Methods are implemented in MathMore and they are loaded au | ||||
tomatically | ||||
via the plug-in manager | ||||
The possible types of Root-finding algorithms are: | ||||
<ul> | ||||
<li>Root Bracketing Algorithms which do not require function deriv | ||||
atives | ||||
<ol> | ||||
<li>RootFinder::kBRENT (default method implemented in MathCore) | ||||
<li>RootFinder::kGSL_BISECTION | ||||
<li>RootFinder::kGSL_FALSE_POS | ||||
<li>RootFinder::kGSL_BRENT | ||||
</ol> | ||||
<li>Root Finding Algorithms using Derivatives | ||||
<ol> | ||||
<li>RootFinder::kGSL_NEWTON | ||||
<li>RootFinder::kGSL_SECANT | ||||
<li>RootFinder::kGSL_STEFFENSON | ||||
</ol> | ||||
</ul> | ||||
This class does not cupport copying | ||||
@ingroup RootFinders | ||||
*/ | ||||
class RootFinder { | ||||
public: | ||||
enum EType { kBRENT, // Methods | ||||
from MathCore | ||||
kGSL_BISECTION, kGSL_FALSE_POS, kGSL_BRENT, // GSL Nor | ||||
mal | ||||
kGSL_NEWTON, kGSL_SECANT, kGSL_STEFFENSON // GSL Der | ||||
ivatives | ||||
}; | ||||
/** | ||||
Construct a Root-Finder algorithm | ||||
*/ | ||||
RootFinder(RootFinder::EType type = RootFinder::kBRENT); | ||||
virtual ~RootFinder(); | ||||
private: | ||||
// usually copying is non trivial, so we make this unaccessible | ||||
RootFinder(const RootFinder & ) {} | ||||
RootFinder & operator = (const RootFinder & rhs) | ||||
{ | ||||
if (this == &rhs) return *this; // time saving self-test | ||||
return *this; | ||||
} | ||||
public: | ||||
bool SetMethod(RootFinder::EType type = RootFinder::kBRENT); | ||||
/** | ||||
Provide to the solver the function and the initial search inter | ||||
val [xlow, xup] | ||||
for algorithms not using derivatives (bracketing algorithms) | ||||
The templated function f must be of a type implementing the \a | ||||
operator() method, | ||||
<em> double operator() ( double x ) </em> | ||||
Returns non zero if interval is not valid (i.e. does not contai | ||||
ns a root) | ||||
*/ | ||||
bool SetFunction( const IGenFunction & f, double xlow, double xup) | ||||
{ | ||||
return fSolver->SetFunction( f, xlow, xup); | ||||
} | ||||
/** | ||||
Provide to the solver the function and an initial estimate of t | ||||
he root, | ||||
for algorithms using derivatives. | ||||
The templated function f must be of a type implementing the \a | ||||
operator() | ||||
and the \a Gradient() methods. | ||||
<em> double operator() ( double x ) </em> | ||||
Returns non zero if starting point is not valid | ||||
*/ | ||||
bool SetFunction( const IGradFunction & f, double xstart) { | ||||
return fSolver->SetFunction( f, xstart); | ||||
} | ||||
template<class Function, class Derivative> | ||||
bool Solve(Function &f, Derivative &d, double start, | ||||
int maxIter = 100, double absTol = 1E-8, double relTol = | ||||
1E-10); | ||||
template<class Function> | ||||
bool Solve(Function &f, double min, double max, | ||||
int maxIter = 100, double absTol = 1E-8, double relTol = | ||||
1E-10); | ||||
/** | ||||
Compute the roots iterating until the estimate of the Root is | ||||
within the required tolerance returning | ||||
the iteration Status | ||||
*/ | ||||
bool Solve( int maxIter = 100, double absTol = 1E-8, double relTol | ||||
= 1E-10) { | ||||
return fSolver->Solve( maxIter, absTol, relTol ); | ||||
} | ||||
/** | ||||
Return the number of iteration performed to find the Root. | ||||
*/ | ||||
int Iterations() const { | ||||
return fSolver->Iterations(); | ||||
} | ||||
/** | ||||
Perform a single iteration and return the Status | ||||
*/ | ||||
int Iterate() { | ||||
return fSolver->Iterate(); | ||||
} | ||||
/** | ||||
Return the current and latest estimate of the Root | ||||
*/ | ||||
double Root() const { | ||||
return fSolver->Root(); | ||||
} | ||||
/** | ||||
Return the status of the last estimate of the Root | ||||
= 0 OK, not zero failure | ||||
*/ | ||||
int Status() const { | ||||
return fSolver->Status(); | ||||
} | ||||
/** | ||||
Return the current and latest estimate of the lower value of th | ||||
e Root-finding interval (for bracketing algorithms) | ||||
*/ | ||||
/* double XLower() const { */ | ||||
/* return fSolver->XLower(); */ | ||||
/* } */ | ||||
/** | ||||
Return the current and latest estimate of the upper value of th | ||||
e Root-finding interval (for bracketing algorithms) | ||||
*/ | ||||
/* double XUpper() const { */ | ||||
/* return fSolver->XUpper(); */ | ||||
/* } */ | ||||
/** | ||||
Get Name of the Root-finding solver algorithm | ||||
*/ | ||||
const char * Name() const { | ||||
return fSolver->Name(); | ||||
} | ||||
protected: | ||||
private: | ||||
IRootFinderMethod* fSolver; // type of algorithm to be used | ||||
}; | class RootFinder : public TObject { | |||
} // namespace Math | public: | |||
} // namespace ROOT | ||||
#ifndef ROOT_Math_WrappedFunction | RootFinder( Double_t (*rootVal)( Double_t ), | |||
#include "Math/WrappedFunction.h" | Double_t rootMin, Double_t rootMax, | |||
#endif | Int_t maxIterations = 100, | |||
Double_t absTolerance = 0.0 ); | ||||
virtual ~RootFinder( void ); | ||||
#ifndef ROOT_Math_Functor | // returns the root of the function | |||
#include "Math/Functor.h" | Double_t Root( Double_t refValue ); | |||
#endif | ||||
private: | ||||
Double_t fRootMin; // minimum root value | ||||
Double_t fRootMax; // maximum root value | ||||
Int_t fMaxIter; // maximum number of iterations | ||||
Double_t fAbsTol; // absolute tolerance deviation | ||||
template<class Function, class Derivative> | // function pointer | |||
bool ROOT::Math::RootFinder::Solve(Function &f, Derivative &d, double start | Double_t (*fGetRootVal)( Double_t ); | |||
, | ||||
int maxIter, double absTol, double relTol | ||||
) | ||||
{ | ||||
if (!fSolver) return false; | ||||
ROOT::Math::GradFunctor1D wf(f, d); | ||||
bool ret = fSolver->SetFunction(wf, start); | ||||
if (!ret) return false; | ||||
return Solve(maxIter, absTol, relTol); | ||||
} | ||||
template<class Function> | ||||
bool ROOT::Math::RootFinder::Solve(Function &f, double min, double max, | ||||
int maxIter, double absTol, double relTol | ||||
) | ||||
{ | ||||
if (!fSolver) return false; | ||||
ROOT::Math::WrappedFunction<Function &> wf(f); | ||||
bool ret = fSolver->SetFunction(wf, min, max); | ||||
if (!ret) return false; | ||||
return Solve(maxIter, absTol, relTol); | ||||
} | ||||
#endif /* ROOT_Math_RootFinder */ | mutable MsgLogger* fLogger; //! message logger | |||
MsgLogger& Log() const { return *fLogger; } | ||||
ClassDef(RootFinder,0) // Root finding using Brents algorithm | ||||
}; | ||||
} // namespace TMVA | ||||
#endif | ||||
End of changes. 11 change blocks. | ||||
254 lines changed or deleted | 84 lines changed or added | |||
SMatrix.h | SMatrix.h | |||
---|---|---|---|---|
skipping to change at line 496 | skipping to change at line 496 | |||
the current matrix is returned. | the current matrix is returned. | |||
\param ifail . ifail will be set to 0 when inversion is successfull. | \param ifail . ifail will be set to 0 when inversion is successfull. | |||
See ROOT::Math::SMatrix::Invert for the inversion algorithm | See ROOT::Math::SMatrix::Invert for the inversion algorithm | |||
*/ | */ | |||
SMatrix<T,D1,D2,R> Inverse(int & ifail ) const; | SMatrix<T,D1,D2,R> Inverse(int & ifail ) const; | |||
/** | /** | |||
Fast Invertion of a square Matrix ( this method changes the current m atrix). | Fast Invertion of a square Matrix ( this method changes the current m atrix). | |||
Return true if inversion is successfull. | Return true if inversion is successfull. | |||
The method used is based on direct inversion using the Cramer rule fo r | The method used is based on direct inversion using the Cramer rule fo r | |||
matrices upto 5x5. Afterwards the same defult algorithm of Invert() i s used. | matrices upto 5x5. Afterwards the same default algorithm of Invert() is used. | |||
Note that this method is faster but can suffer from much larger numer ical accuracy | Note that this method is faster but can suffer from much larger numer ical accuracy | |||
when the condition of the matrix is large | when the condition of the matrix is large | |||
*/ | */ | |||
bool InvertFast(); | bool InvertFast(); | |||
/** | /** | |||
Invert a square Matrix and returns a new matrix. In case the inversi on fails | Invert a square Matrix and returns a new matrix. In case the inversi on fails | |||
the current matrix is returned. | the current matrix is returned. | |||
\param ifail . ifail will be set to 0 when inversion is successfull. | \param ifail . ifail will be set to 0 when inversion is successfull. | |||
See ROOT::Math::SMatrix::InvertFast for the inversion algorithm | See ROOT::Math::SMatrix::InvertFast for the inversion algorithm | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
SVector.h | SVector.h | |||
---|---|---|---|---|
skipping to change at line 306 | skipping to change at line 306 | |||
SVector<T,D>& Place_at(const VecExpr<A,T,D2>& rhs, unsigned int row); | SVector<T,D>& Place_at(const VecExpr<A,T,D2>& rhs, unsigned int row); | |||
/** | /** | |||
return a subvector of size N starting at the value row | return a subvector of size N starting at the value row | |||
where N is the size of the returned vector (SubVector::kSize) | where N is the size of the returned vector (SubVector::kSize) | |||
Condition row+N <= D | Condition row+N <= D | |||
*/ | */ | |||
template <class SubVector > | template <class SubVector > | |||
SubVector Sub(unsigned int row) const; | SubVector Sub(unsigned int row) const; | |||
/** | ||||
Function to check if a vector is sharing same memory location of the | ||||
passed pointer | ||||
This function is used by the expression templates to avoid the alias | ||||
problem during | ||||
expression evaluation. When the vector is in use, for example in op | ||||
erations | ||||
like V = M * V, where M is a mtrix, a temporary object storing the i | ||||
ntermediate result is automatically | ||||
created when evaluating the expression. | ||||
*/ | ||||
bool IsInUse(const T* p) const; | ||||
/// used by operator<<() | /// used by operator<<() | |||
std::ostream& Print(std::ostream& os) const; | std::ostream& Print(std::ostream& os) const; | |||
private: | private: | |||
/** @name --- Data member --- */ | /** @name --- Data member --- */ | |||
/// SVector data | /// SVector data | |||
T fArray[D]; | T fArray[D]; | |||
}; // end of class SVector | }; // end of class SVector | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 14 lines changed or added | |||
SVector.icc | SVector.icc | |||
---|---|---|---|---|
skipping to change at line 192 | skipping to change at line 192 | |||
SVector<T,D>& SVector<T,D>::operator=(const T& a1) { | SVector<T,D>& SVector<T,D>::operator=(const T& a1) { | |||
// operator = for size 1 vectors | // operator = for size 1 vectors | |||
STATIC_CHECK( D == 1,SVector_dimension_not_right); | STATIC_CHECK( D == 1,SVector_dimension_not_right); | |||
fArray[0] = a1; | fArray[0] = a1; | |||
return *this; | return *this; | |||
} | } | |||
template <class T, unsigned int D> | template <class T, unsigned int D> | |||
template <class A> | template <class A> | |||
SVector<T,D>& SVector<T,D>::operator=(const VecExpr<A,T,D>& rhs) { | SVector<T,D>& SVector<T,D>::operator=(const VecExpr<A,T,D>& rhs) { | |||
for(unsigned int i=0; i<D; ++i) { | if (! rhs.IsInUse(fArray) ) { | |||
fArray[i] = rhs.apply(i); | for(unsigned int i=0; i<D; ++i) { | |||
fArray[i] = rhs.apply(i); | ||||
} | ||||
} | ||||
else { | ||||
// otherwise we need to create a temporary object | ||||
T tmp[D]; | ||||
for(unsigned int i=0; i<D; ++i) { | ||||
tmp[i] = rhs.apply(i); | ||||
} | ||||
for(unsigned int i=0; i<D; ++i) { | ||||
fArray[i] = tmp[i]; | ||||
} | ||||
} | } | |||
return *this; | return *this; | |||
} | } | |||
//========================================================================= ===== | //========================================================================= ===== | |||
// operator== | // operator== | |||
//========================================================================= ===== | //========================================================================= ===== | |||
template <class T, unsigned int D> | template <class T, unsigned int D> | |||
bool SVector<T,D>::operator==(const T& rhs) const { | bool SVector<T,D>::operator==(const T& rhs) const { | |||
bool rc = true; | bool rc = true; | |||
skipping to change at line 593 | skipping to change at line 605 | |||
assert(row + SubVector::kSize <= D); | assert(row + SubVector::kSize <= D); | |||
SubVector tmp; | SubVector tmp; | |||
// need to use std::copy ?? | // need to use std::copy ?? | |||
for(unsigned int i=0; i < SubVector::kSize; ++i) { | for(unsigned int i=0; i < SubVector::kSize; ++i) { | |||
tmp[i] = fArray[i+row]; | tmp[i] = fArray[i+row]; | |||
} | } | |||
return tmp; | return tmp; | |||
} | } | |||
// check if the given passed pointer is teh same contained in the vector | ||||
template <class T, unsigned int D> | ||||
bool SVector<T,D>::IsInUse( const T * p) const { | ||||
return p == fArray; | ||||
} | ||||
//========================================================================= ===== | //========================================================================= ===== | |||
// operator<< | // operator<< | |||
//========================================================================= ===== | //========================================================================= ===== | |||
template <class T, unsigned int D> | template <class T, unsigned int D> | |||
inline std::ostream& operator<<(std::ostream& os, const SVector<T,D>& rhs) { | inline std::ostream& operator<<(std::ostream& os, const SVector<T,D>& rhs) { | |||
return rhs.Print(os); | return rhs.Print(os); | |||
} | } | |||
} // namespace Math | } // namespace Math | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 20 lines changed or added | |||
ScanMinimizer.h | ScanMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 41 | skipping to change at line 41 | |||
public: | public: | |||
ScanMinimizer() : fSeedGenerator(SimplexSeedGenerator()), | ScanMinimizer() : fSeedGenerator(SimplexSeedGenerator()), | |||
fBuilder(ScanBuilder()) {} | fBuilder(ScanBuilder()) {} | |||
~ScanMinimizer() {} | ~ScanMinimizer() {} | |||
const MinimumSeedGenerator& SeedGenerator() const {return fSeedGenerator ;} | const MinimumSeedGenerator& SeedGenerator() const {return fSeedGenerator ;} | |||
const MinimumBuilder& Builder() const {return fBuilder;} | const MinimumBuilder& Builder() const {return fBuilder;} | |||
MinimumBuilder& Builder() {return fBuilder;} | ||||
private: | private: | |||
SimplexSeedGenerator fSeedGenerator; | SimplexSeedGenerator fSeedGenerator; | |||
ScanBuilder fBuilder; | ScanBuilder fBuilder; | |||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
SimplexMinimizer.h | SimplexMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 41 | skipping to change at line 41 | |||
public: | public: | |||
SimplexMinimizer() : fSeedGenerator(SimplexSeedGenerator()), | SimplexMinimizer() : fSeedGenerator(SimplexSeedGenerator()), | |||
fBuilder(SimplexBuilder()) {} | fBuilder(SimplexBuilder()) {} | |||
~SimplexMinimizer() {} | ~SimplexMinimizer() {} | |||
const MinimumSeedGenerator& SeedGenerator() const {return fSeedGenerator ;} | const MinimumSeedGenerator& SeedGenerator() const {return fSeedGenerator ;} | |||
const MinimumBuilder& Builder() const {return fBuilder;} | const MinimumBuilder& Builder() const {return fBuilder;} | |||
MinimumBuilder& Builder() {return fBuilder;} | ||||
private: | private: | |||
SimplexSeedGenerator fSeedGenerator; | SimplexSeedGenerator fSeedGenerator; | |||
SimplexBuilder fBuilder; | SimplexBuilder fBuilder; | |||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
Systematics.h | Systematics.h | |||
---|---|---|---|---|
skipping to change at line 47 | skipping to change at line 47 | |||
virtual void writeToFile(const std::string& FileName, | virtual void writeToFile(const std::string& FileName, | |||
const std::string& Directory); | const std::string& Directory); | |||
}; | }; | |||
*/ | */ | |||
class OverallSys { | class OverallSys { | |||
public: | public: | |||
OverallSys() : fLow(0), fHigh(0) {} | ||||
void SetName( const std::string& Name ) { fName = Name; } | void SetName( const std::string& Name ) { fName = Name; } | |||
std::string GetName() { return fName; } | std::string GetName() { return fName; } | |||
void SetLow( double Low ) { fLow = Low; } | void SetLow( double Low ) { fLow = Low; } | |||
void SetHigh( double High ) { fHigh = High; } | void SetHigh( double High ) { fHigh = High; } | |||
double GetLow() { return fLow; } | double GetLow() { return fLow; } | |||
double GetHigh() { return fHigh; } | double GetHigh() { return fHigh; } | |||
void Print(std::ostream& = std::cout); | void Print(std::ostream& = std::cout); | |||
void PrintXML(std::ostream&); | void PrintXML(std::ostream&); | |||
skipping to change at line 158 | skipping to change at line 160 | |||
// The Low and High Histograms | // The Low and High Histograms | |||
HistRef fhLow; | HistRef fhLow; | |||
HistRef fhHigh; | HistRef fhHigh; | |||
}; | }; | |||
class HistoFactor { | class HistoFactor { | |||
public: | public: | |||
HistoFactor() : fhLow(NULL), fhHigh(NULL) {;} | ||||
void SetName( const std::string& Name ) { fName = Name; } | void SetName( const std::string& Name ) { fName = Name; } | |||
std::string GetName() { return fName; } | std::string GetName() { return fName; } | |||
void SetInputFileLow( const std::string& InputFileLow ) { fInputFileLow = InputFileLow; } | void SetInputFileLow( const std::string& InputFileLow ) { fInputFileLow = InputFileLow; } | |||
void SetInputFileHigh( const std::string& InputFileHigh ) { fInputFileH igh = InputFileHigh; } | void SetInputFileHigh( const std::string& InputFileHigh ) { fInputFileH igh = InputFileHigh; } | |||
std::string GetInputFileLow() { return fInputFileLow; } | std::string GetInputFileLow() { return fInputFileLow; } | |||
std::string GetInputFileHigh() { return fInputFileHigh; } | std::string GetInputFileHigh() { return fInputFileHigh; } | |||
void SetHistoNameLow( const std::string& HistoNameLow ) { fHistoNameLow = HistoNameLow; } | void SetHistoNameLow( const std::string& HistoNameLow ) { fHistoNameLow = HistoNameLow; } | |||
skipping to change at line 210 | skipping to change at line 214 | |||
// The Low and High Histograms | // The Low and High Histograms | |||
HistRef fhLow; | HistRef fhLow; | |||
HistRef fhHigh; | HistRef fhHigh; | |||
}; | }; | |||
class ShapeSys { | class ShapeSys { | |||
public: | public: | |||
ShapeSys() : fConstraintType(Constraint::Gaussian), fhError(NULL) {} | ||||
void SetName( const std::string& Name ) { fName = Name; } | void SetName( const std::string& Name ) { fName = Name; } | |||
std::string GetName() { return fName; } | std::string GetName() { return fName; } | |||
void SetInputFile( const std::string& InputFile ) { fInputFile = InputF ile; } | void SetInputFile( const std::string& InputFile ) { fInputFile = InputF ile; } | |||
std::string GetInputFile() { return fInputFile; } | std::string GetInputFile() { return fInputFile; } | |||
void SetHistoName( const std::string& HistoName ) { fHistoName = HistoN ame; } | void SetHistoName( const std::string& HistoName ) { fHistoName = HistoN ame; } | |||
std::string GetHistoName() { return fHistoName; } | std::string GetHistoName() { return fHistoName; } | |||
void SetHistoPath( const std::string& HistoPath ) { fHistoPath = HistoP ath; } | void SetHistoPath( const std::string& HistoPath ) { fHistoPath = HistoP ath; } | |||
End of changes. 3 change blocks. | ||||
0 lines changed or deleted | 6 lines changed or added | |||
TArrayC.h | TArrayC.h | |||
---|---|---|---|---|
skipping to change at line 74 | skipping to change at line 74 | |||
obj = (TArrayC *) TArray::ReadArray(buf, TArrayC::Class()); | obj = (TArrayC *) TArray::ReadArray(buf, TArrayC::Class()); | |||
return buf; | return buf; | |||
} | } | |||
#if defined R__TEMPLATE_OVERLOAD_BUG | #if defined R__TEMPLATE_OVERLOAD_BUG | |||
template <> | template <> | |||
#endif | #endif | |||
inline TBuffer &operator<<(TBuffer &buf, const TArrayC *obj) | inline TBuffer &operator<<(TBuffer &buf, const TArrayC *obj) | |||
{ | { | |||
// Write a TArrayC object into buffer | // Write a TArrayC object into buffer | |||
return buf << (TArray*)obj; | return buf << (const TArray*)obj; | |||
} | } | |||
inline Char_t TArrayC::At(Int_t i) const | inline Char_t TArrayC::At(Int_t i) const | |||
{ | { | |||
if (!BoundsOk("TArrayC::At", i)) return 0; | if (!BoundsOk("TArrayC::At", i)) return 0; | |||
return fArray[i]; | return fArray[i]; | |||
} | } | |||
inline Char_t &TArrayC::operator[](Int_t i) | inline Char_t &TArrayC::operator[](Int_t i) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TArrayD.h | TArrayD.h | |||
---|---|---|---|---|
skipping to change at line 75 | skipping to change at line 75 | |||
obj = (TArrayD *) TArray::ReadArray(buf, TArrayD::Class()); | obj = (TArrayD *) TArray::ReadArray(buf, TArrayD::Class()); | |||
return buf; | return buf; | |||
} | } | |||
#if defined R__TEMPLATE_OVERLOAD_BUG | #if defined R__TEMPLATE_OVERLOAD_BUG | |||
template <> | template <> | |||
#endif | #endif | |||
inline TBuffer &operator<<(TBuffer &buf, const TArrayD *obj) | inline TBuffer &operator<<(TBuffer &buf, const TArrayD *obj) | |||
{ | { | |||
// Write a TArrayD object into buffer | // Write a TArrayD object into buffer | |||
return buf << (TArray*)obj; | return buf << (const TArray*)obj; | |||
} | } | |||
inline Double_t TArrayD::At(Int_t i) const | inline Double_t TArrayD::At(Int_t i) const | |||
{ | { | |||
if (!BoundsOk("TArrayD::At", i)) return 0; | if (!BoundsOk("TArrayD::At", i)) return 0; | |||
return fArray[i]; | return fArray[i]; | |||
} | } | |||
inline Double_t &TArrayD::operator[](Int_t i) | inline Double_t &TArrayD::operator[](Int_t i) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TArrayF.h | TArrayF.h | |||
---|---|---|---|---|
skipping to change at line 75 | skipping to change at line 75 | |||
obj = (TArrayF *) TArray::ReadArray(buf, TArrayF::Class()); | obj = (TArrayF *) TArray::ReadArray(buf, TArrayF::Class()); | |||
return buf; | return buf; | |||
} | } | |||
#if defined R__TEMPLATE_OVERLOAD_BUG | #if defined R__TEMPLATE_OVERLOAD_BUG | |||
template <> | template <> | |||
#endif | #endif | |||
inline TBuffer &operator<<(TBuffer &buf, const TArrayF *obj) | inline TBuffer &operator<<(TBuffer &buf, const TArrayF *obj) | |||
{ | { | |||
// Write a TArrayF object into buffer | // Write a TArrayF object into buffer | |||
return buf << (TArray*)obj; | return buf << (const TArray*)obj; | |||
} | } | |||
inline Float_t TArrayF::At(Int_t i) const | inline Float_t TArrayF::At(Int_t i) const | |||
{ | { | |||
if (!BoundsOk("TArrayF::At", i)) return 0; | if (!BoundsOk("TArrayF::At", i)) return 0; | |||
return fArray[i]; | return fArray[i]; | |||
} | } | |||
inline Float_t &TArrayF::operator[](Int_t i) | inline Float_t &TArrayF::operator[](Int_t i) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TArrayI.h | TArrayI.h | |||
---|---|---|---|---|
skipping to change at line 75 | skipping to change at line 75 | |||
obj = (TArrayI *) TArray::ReadArray(buf, TArrayI::Class()); | obj = (TArrayI *) TArray::ReadArray(buf, TArrayI::Class()); | |||
return buf; | return buf; | |||
} | } | |||
#if defined R__TEMPLATE_OVERLOAD_BUG | #if defined R__TEMPLATE_OVERLOAD_BUG | |||
template <> | template <> | |||
#endif | #endif | |||
inline TBuffer &operator<<(TBuffer &buf, const TArrayI *obj) | inline TBuffer &operator<<(TBuffer &buf, const TArrayI *obj) | |||
{ | { | |||
// Write a TArrayI object into buffer | // Write a TArrayI object into buffer | |||
return buf << (TArray*)obj; | return buf << (const TArray*)obj; | |||
} | } | |||
inline Int_t TArrayI::At(Int_t i) const | inline Int_t TArrayI::At(Int_t i) const | |||
{ | { | |||
if (!BoundsOk("TArrayI::At", i)) return 0; | if (!BoundsOk("TArrayI::At", i)) return 0; | |||
return fArray[i]; | return fArray[i]; | |||
} | } | |||
inline Int_t &TArrayI::operator[](Int_t i) | inline Int_t &TArrayI::operator[](Int_t i) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TArrayL.h | TArrayL.h | |||
---|---|---|---|---|
skipping to change at line 75 | skipping to change at line 75 | |||
obj = (TArrayL *) TArray::ReadArray(buf, TArrayL::Class()); | obj = (TArrayL *) TArray::ReadArray(buf, TArrayL::Class()); | |||
return buf; | return buf; | |||
} | } | |||
#if defined R__TEMPLATE_OVERLOAD_BUG | #if defined R__TEMPLATE_OVERLOAD_BUG | |||
template <> | template <> | |||
#endif | #endif | |||
inline TBuffer &operator<<(TBuffer &buf, const TArrayL *obj) | inline TBuffer &operator<<(TBuffer &buf, const TArrayL *obj) | |||
{ | { | |||
// Write a TArrayL object into buffer | // Write a TArrayL object into buffer | |||
return buf << (TArray*)obj; | return buf << (const TArray*)obj; | |||
} | } | |||
inline Long_t TArrayL::At(Int_t i) const | inline Long_t TArrayL::At(Int_t i) const | |||
{ | { | |||
if (!BoundsOk("TArrayL::At", i)) return 0; | if (!BoundsOk("TArrayL::At", i)) return 0; | |||
return fArray[i]; | return fArray[i]; | |||
} | } | |||
inline Long_t &TArrayL::operator[](Int_t i) | inline Long_t &TArrayL::operator[](Int_t i) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TArrayL64.h | TArrayL64.h | |||
---|---|---|---|---|
skipping to change at line 76 | skipping to change at line 76 | |||
return buf; | return buf; | |||
} | } | |||
#if defined R__TEMPLATE_OVERLOAD_BUG | #if defined R__TEMPLATE_OVERLOAD_BUG | |||
template <> | template <> | |||
#endif | #endif | |||
inline TBuffer &operator<<(TBuffer &buf, const TArrayL64 *obj) | inline TBuffer &operator<<(TBuffer &buf, const TArrayL64 *obj) | |||
{ | { | |||
// Write a TArrayL64 object into buffer. | // Write a TArrayL64 object into buffer. | |||
return buf << (TArray*)obj; | return buf << (const TArray*)obj; | |||
} | } | |||
inline Long64_t TArrayL64::At(Int_t i) const | inline Long64_t TArrayL64::At(Int_t i) const | |||
{ | { | |||
if (!BoundsOk("TArrayL64::At", i)) return 0; | if (!BoundsOk("TArrayL64::At", i)) return 0; | |||
return fArray[i]; | return fArray[i]; | |||
} | } | |||
inline Long64_t &TArrayL64::operator[](Int_t i) | inline Long64_t &TArrayL64::operator[](Int_t i) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TArrayS.h | TArrayS.h | |||
---|---|---|---|---|
skipping to change at line 75 | skipping to change at line 75 | |||
obj = (TArrayS *) TArray::ReadArray(buf, TArrayS::Class()); | obj = (TArrayS *) TArray::ReadArray(buf, TArrayS::Class()); | |||
return buf; | return buf; | |||
} | } | |||
#if defined R__TEMPLATE_OVERLOAD_BUG | #if defined R__TEMPLATE_OVERLOAD_BUG | |||
template <> | template <> | |||
#endif | #endif | |||
inline TBuffer &operator<<(TBuffer &buf, const TArrayS *obj) | inline TBuffer &operator<<(TBuffer &buf, const TArrayS *obj) | |||
{ | { | |||
// Write a TArrayS object into buffer | // Write a TArrayS object into buffer | |||
return buf << (TArray*)obj; | return buf << (const TArray*)obj; | |||
} | } | |||
inline Short_t TArrayS::At(Int_t i) const | inline Short_t TArrayS::At(Int_t i) const | |||
{ | { | |||
if (!BoundsOk("TArrayS::At", i)) return 0; | if (!BoundsOk("TArrayS::At", i)) return 0; | |||
return fArray[i]; | return fArray[i]; | |||
} | } | |||
inline Short_t &TArrayS::operator[](Int_t i) | inline Short_t &TArrayS::operator[](Int_t i) | |||
{ | { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TAttAxis.h | TAttAxis.h | |||
---|---|---|---|---|
skipping to change at line 61 | skipping to change at line 61 | |||
virtual Style_t GetLabelFont() const {return fLabelFont;} | virtual Style_t GetLabelFont() const {return fLabelFont;} | |||
virtual Float_t GetLabelOffset() const {return fLabelOffset;} | virtual Float_t GetLabelOffset() const {return fLabelOffset;} | |||
virtual Float_t GetLabelSize() const {return fLabelSize;} | virtual Float_t GetLabelSize() const {return fLabelSize;} | |||
virtual Float_t GetTitleOffset() const {return fTitleOffset;} | virtual Float_t GetTitleOffset() const {return fTitleOffset;} | |||
virtual Float_t GetTitleSize() const {return fTitleSize;} | virtual Float_t GetTitleSize() const {return fTitleSize;} | |||
virtual Float_t GetTickLength() const {return fTickLength;} | virtual Float_t GetTickLength() const {return fTickLength;} | |||
virtual Color_t GetTitleColor() const {return fTitleColor;} | virtual Color_t GetTitleColor() const {return fTitleColor;} | |||
virtual Style_t GetTitleFont() const {return fTitleFont;} | virtual Style_t GetTitleFont() const {return fTitleFont;} | |||
virtual void ResetAttAxis(Option_t *option=""); | virtual void ResetAttAxis(Option_t *option=""); | |||
virtual void SaveAttributes(ostream &out, const char *name, const ch ar *subname); | virtual void SaveAttributes(ostream &out, const char *name, const ch ar *subname); | |||
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE); // *ME NU* | virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE); // *M ENU* | |||
virtual void SetNdivisions(Int_t n1, Int_t n2, Int_t n3, Bool_t opti m=kTRUE); | virtual void SetNdivisions(Int_t n1, Int_t n2, Int_t n3, Bool_t opti m=kTRUE); | |||
virtual void SetAxisColor(Color_t color=1); // *MENU* | virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.); // *M | |||
virtual void SetLabelColor(Color_t color=1); // *MENU* | ENU* | |||
virtual void SetLabelFont(Style_t font=62); // *MENU* | virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.); // *M | |||
virtual void SetLabelOffset(Float_t offset=0.005); // *MENU* | ENU* | |||
virtual void SetLabelSize(Float_t size=0.04); // *MENU* | virtual void SetLabelFont(Style_t font=62); // *M | |||
virtual void SetTickLength(Float_t length=0.03); // *MENU* | ENU* | |||
virtual void SetTitleOffset(Float_t offset=1); // *MENU* | virtual void SetLabelOffset(Float_t offset=0.005); // *M | |||
virtual void SetTitleSize(Float_t size=0.04); // *MENU* | ENU* | |||
virtual void SetTitleColor(Color_t color=1); // *MENU* | virtual void SetLabelSize(Float_t size=0.04); // *M | |||
virtual void SetTitleFont(Style_t font=62); // *MENU* | ENU* | |||
virtual void SetTickLength(Float_t length=0.03); // *M | ||||
ENU* | ||||
virtual void SetTitleOffset(Float_t offset=1); // *M | ||||
ENU* | ||||
virtual void SetTitleSize(Float_t size=0.04); // *M | ||||
ENU* | ||||
virtual void SetTitleColor(Color_t color=1); // *M | ||||
ENU* | ||||
virtual void SetTitleFont(Style_t font=62); // *M | ||||
ENU* | ||||
ClassDef(TAttAxis,4); //Axis attributes | ClassDef(TAttAxis,4); //Axis attributes | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
11 lines changed or deleted | 21 lines changed or added | |||
TAttFill.h | TAttFill.h | |||
---|---|---|---|---|
skipping to change at line 49 | skipping to change at line 49 | |||
virtual ~TAttFill(); | virtual ~TAttFill(); | |||
void Copy(TAttFill &attfill) const; | void Copy(TAttFill &attfill) const; | |||
virtual Color_t GetFillColor() const { return fFillColor; } | virtual Color_t GetFillColor() const { return fFillColor; } | |||
virtual Style_t GetFillStyle() const { return fFillStyle; } | virtual Style_t GetFillStyle() const { return fFillStyle; } | |||
virtual Bool_t IsTransparent() const; | virtual Bool_t IsTransparent() const; | |||
virtual void Modify(); | virtual void Modify(); | |||
virtual void ResetAttFill(Option_t *option=""); | virtual void ResetAttFill(Option_t *option=""); | |||
virtual void SaveFillAttributes(ostream &out, const char *name, Int_ t coldef=1, Int_t stydef=1001); | virtual void SaveFillAttributes(ostream &out, const char *name, Int_ t coldef=1, Int_t stydef=1001); | |||
virtual void SetFillAttributes(); // *MENU* | virtual void SetFillAttributes(); // *MENU* | |||
virtual void SetFillColor(Color_t fcolor) { fFillColor = fcolor; } | virtual void SetFillColor(Color_t fcolor) { fFillColor = fcolor; } | |||
virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha); | ||||
virtual void SetFillStyle(Style_t fstyle) { fFillStyle = fstyle; } | virtual void SetFillStyle(Style_t fstyle) { fFillStyle = fstyle; } | |||
ClassDef(TAttFill,1) //Fill area attributes | ClassDef(TAttFill,1) //Fill area attributes | |||
}; | }; | |||
inline Bool_t TAttFill::IsTransparent() const | inline Bool_t TAttFill::IsTransparent() const | |||
{ return fFillStyle >= 4000 && fFillStyle <= 4100 ? kTRUE : kFALSE; } | { return fFillStyle >= 4000 && fFillStyle <= 4100 ? kTRUE : kFALSE; } | |||
enum EFillStyle {kFDotted1 = 3001, kFDotted2 = 3002, kFDotted3 = 30 03, | enum EFillStyle {kFDotted1 = 3001, kFDotted2 = 3002, kFDotted3 = 30 03, | |||
kFHatched1 = 3004, kHatched2 = 3005, kFHatched3 = 30 06, | kFHatched1 = 3004, kHatched2 = 3005, kFHatched3 = 30 06, | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
TAttFillEditor.h | TAttFillEditor.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
// TAttFillEditor // | // TAttFillEditor // | |||
// // | // // | |||
// Implements GUI for editing fill attributes. // // | // Implements GUI for editing fill attributes. // // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TGedFrame | #ifndef ROOT_TGedFrame | |||
#include "TGedFrame.h" | #include "TGedFrame.h" | |||
#endif | #endif | |||
#include "TGSlider.h" | ||||
class TGColorSelect; | class TGColorSelect; | |||
class TGedPatternSelect; | class TGedPatternSelect; | |||
class TAttFill; | class TAttFill; | |||
class TGNumberEntryField; | ||||
class TAttFillEditor : public TGedFrame { | class TAttFillEditor : public TGedFrame { | |||
protected: | protected: | |||
TAttFill *fAttFill; // fill attribute object | TAttFill *fAttFill; // fill attribute object | |||
TGColorSelect *fColorSelect; // fill color widget | TGColorSelect *fColorSelect; // fill color widget | |||
TGedPatternSelect *fPatternSelect; // fill pattern widget | TGedPatternSelect *fPatternSelect; // fill pattern widget | |||
TGHSlider *fAlpha; // fill opacity | ||||
TGNumberEntryField *fAlphaField; | ||||
virtual void ConnectSignals2Slots(); | virtual void ConnectSignals2Slots(); | |||
public: | public: | |||
TAttFillEditor(const TGWindow *p = 0, | TAttFillEditor(const TGWindow *p = 0, | |||
Int_t width = 140, Int_t height = 30, | Int_t width = 140, Int_t height = 30, | |||
UInt_t options = kChildFrame, | UInt_t options = kChildFrame, | |||
Pixel_t back = GetDefaultFrameBackground()); | Pixel_t back = GetDefaultFrameBackground()); | |||
virtual ~TAttFillEditor(); | virtual ~TAttFillEditor(); | |||
virtual void SetModel(TObject* obj); | virtual void SetModel(TObject* obj); | |||
virtual void DoFillColor(Pixel_t color); | virtual void DoFillColor(Pixel_t color); | |||
virtual void DoFillAlphaColor(ULong_t p); | ||||
virtual void DoFillPattern(Style_t color); | virtual void DoFillPattern(Style_t color); | |||
virtual void DoAlpha(); | ||||
virtual void DoAlphaField(); | ||||
virtual void DoLiveAlpha(Int_t a); | ||||
virtual void GetCurAlpha(); | ||||
ClassDef(TAttFillEditor,0) //GUI for editing fill attributes | ClassDef(TAttFillEditor,0) //GUI for editing fill attributes | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
0 lines changed or deleted | 10 lines changed or added | |||
TAttLine.h | TAttLine.h | |||
---|---|---|---|---|
skipping to change at line 53 | skipping to change at line 53 | |||
void Copy(TAttLine &attline) const; | void Copy(TAttLine &attline) const; | |||
Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double _t yp1, Double_t xp2, Double_t yp2 ); | Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double _t yp1, Double_t xp2, Double_t yp2 ); | |||
virtual Color_t GetLineColor() const {return fLineColor;} | virtual Color_t GetLineColor() const {return fLineColor;} | |||
virtual Style_t GetLineStyle() const {return fLineStyle;} | virtual Style_t GetLineStyle() const {return fLineStyle;} | |||
virtual Width_t GetLineWidth() const {return fLineWidth;} | virtual Width_t GetLineWidth() const {return fLineWidth;} | |||
virtual void Modify(); | virtual void Modify(); | |||
virtual void ResetAttLine(Option_t *option=""); | virtual void ResetAttLine(Option_t *option=""); | |||
virtual void SaveLineAttributes(ostream &out, const char *name, Int_ t coldef=1, Int_t stydef=1, Int_t widdef=1); | virtual void SaveLineAttributes(ostream &out, const char *name, Int_ t coldef=1, Int_t stydef=1, Int_t widdef=1); | |||
virtual void SetLineAttributes(); // *MENU* | virtual void SetLineAttributes(); // *MENU* | |||
virtual void SetLineColor(Color_t lcolor) { fLineColor = lcolor;} | virtual void SetLineColor(Color_t lcolor) { fLineColor = lcolor;} | |||
virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha); | ||||
virtual void SetLineStyle(Style_t lstyle) { fLineStyle = lstyle;} | virtual void SetLineStyle(Style_t lstyle) { fLineStyle = lstyle;} | |||
virtual void SetLineWidth(Width_t lwidth) { fLineWidth = lwidth;} | virtual void SetLineWidth(Width_t lwidth) { fLineWidth = lwidth;} | |||
ClassDef(TAttLine,1); //Line attributes | ClassDef(TAttLine,1); //Line attributes | |||
}; | }; | |||
enum ELineStyle { kSolid = 1, kDashed, kDotted, kDashDotted }; | enum ELineStyle { kSolid = 1, kDashed, kDotted, kDashDotted }; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
TAttLineEditor.h | TAttLineEditor.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
// TAttLineEditor // | // TAttLineEditor // | |||
// // | // // | |||
// Implements GUI for editing line attributes. // // | // Implements GUI for editing line attributes. // // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TGedFrame | #ifndef ROOT_TGedFrame | |||
#include "TGedFrame.h" | #include "TGedFrame.h" | |||
#endif | #endif | |||
#include "TGSlider.h" | ||||
class TGLineStyleComboBox; | class TGLineStyleComboBox; | |||
class TGLineWidthComboBox; | class TGLineWidthComboBox; | |||
class TGColorSelect; | class TGColorSelect; | |||
class TAttLine; | class TAttLine; | |||
class TGNumberEntryField; | ||||
class TAttLineEditor : public TGedFrame { | class TAttLineEditor : public TGedFrame { | |||
protected: | protected: | |||
TAttLine *fAttLine; // line attribute object | TAttLine *fAttLine; // line attribute object | |||
TGLineStyleComboBox *fStyleCombo; // line style combo box | TGLineStyleComboBox *fStyleCombo; // line style combo box | |||
TGLineWidthComboBox *fWidthCombo; // line width combo box | TGLineWidthComboBox *fWidthCombo; // line width combo box | |||
TGColorSelect *fColorSelect; // line color widget | TGColorSelect *fColorSelect; // line color widget | |||
TGHSlider *fAlpha; // fill opacity | ||||
TGNumberEntryField *fAlphaField; | ||||
virtual void ConnectSignals2Slots(); | virtual void ConnectSignals2Slots(); | |||
public: | public: | |||
TAttLineEditor(const TGWindow *p = 0, | TAttLineEditor(const TGWindow *p = 0, | |||
Int_t width = 140, Int_t height = 30, | Int_t width = 140, Int_t height = 30, | |||
UInt_t options = kChildFrame, | UInt_t options = kChildFrame, | |||
Pixel_t back = GetDefaultFrameBackground()); | Pixel_t back = GetDefaultFrameBackground()); | |||
virtual ~TAttLineEditor(); | virtual ~TAttLineEditor(); | |||
virtual void SetModel(TObject* obj); | virtual void SetModel(TObject* obj); | |||
virtual void DoLineColor(Pixel_t color); | virtual void DoLineColor(Pixel_t color); | |||
virtual void DoLineAlphaColor(ULong_t p); | ||||
virtual void DoLineStyle(Int_t style); | virtual void DoLineStyle(Int_t style); | |||
virtual void DoLineWidth(Int_t width); | virtual void DoLineWidth(Int_t width); | |||
virtual void DoAlpha(); | ||||
virtual void DoAlphaField(); | ||||
virtual void DoLiveAlpha(Int_t a); | ||||
virtual void GetCurAlpha(); | ||||
ClassDef(TAttLineEditor,0) // GUI for editing line attributes | ClassDef(TAttLineEditor,0) // GUI for editing line attributes | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
0 lines changed or deleted | 10 lines changed or added | |||
TAttMarker.h | TAttMarker.h | |||
---|---|---|---|---|
skipping to change at line 49 | skipping to change at line 49 | |||
TAttMarker(Color_t color, Style_t style, Size_t msize); | TAttMarker(Color_t color, Style_t style, Size_t msize); | |||
virtual ~TAttMarker(); | virtual ~TAttMarker(); | |||
void Copy(TAttMarker &attmarker) const; | void Copy(TAttMarker &attmarker) const; | |||
virtual Color_t GetMarkerColor() const {return fMarkerColor;} | virtual Color_t GetMarkerColor() const {return fMarkerColor;} | |||
virtual Style_t GetMarkerStyle() const {return fMarkerStyle;} | virtual Style_t GetMarkerStyle() const {return fMarkerStyle;} | |||
virtual Size_t GetMarkerSize() const {return fMarkerSize;} | virtual Size_t GetMarkerSize() const {return fMarkerSize;} | |||
virtual void Modify(); | virtual void Modify(); | |||
virtual void ResetAttMarker(Option_t *toption=""); | virtual void ResetAttMarker(Option_t *toption=""); | |||
virtual void SaveMarkerAttributes(ostream &out, const char *name, In t_t coldef=1, Int_t stydef=1, Int_t sizdef=1); | virtual void SaveMarkerAttributes(ostream &out, const char *name, In t_t coldef=1, Int_t stydef=1, Int_t sizdef=1); | |||
virtual void SetMarkerAttributes(); // *MENU* | virtual void SetMarkerAttributes(); // *MENU* | |||
virtual void SetMarkerColor(Color_t tcolor=1) { fMarkerColor = tcolo | virtual void SetMarkerColor(Color_t mcolor=1) { fMarkerColor = mcolo | |||
r;} | r;} | |||
virtual void SetMarkerColorAlpha(Color_t mcolor, Float_t malpha); | ||||
virtual void SetMarkerStyle(Style_t mstyle=1) { fMarkerStyle = mstyl e;} | virtual void SetMarkerStyle(Style_t mstyle=1) { fMarkerStyle = mstyl e;} | |||
virtual void SetMarkerSize(Size_t msize=1) { fMarkerSize = msize ;} | virtual void SetMarkerSize(Size_t msize=1) { fMarkerSize = msize ;} | |||
ClassDef(TAttMarker,2); //Marker attributes | ClassDef(TAttMarker,2); //Marker attributes | |||
}; | }; | |||
enum EMarkerStyle {kDot=1, kPlus, kStar, kCircle=4, kMultiply=5, | enum EMarkerStyle {kDot=1, kPlus, kStar, kCircle=4, kMultiply=5, | |||
kFullDotSmall=6, kFullDotMedium=7, kFullDotLarge=8, | kFullDotSmall=6, kFullDotMedium=7, kFullDotLarge=8, | |||
kFullCircle=20, kFullSquare=21, kFullTriangleUp=22, | kFullCircle=20, kFullSquare=21, kFullTriangleUp=22, | |||
kFullTriangleDown=23, kOpenCircle=24, kOpenSquare=25, | kFullTriangleDown=23, kOpenCircle=24, kOpenSquare=25, | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
TAttMarkerEditor.h | TAttMarkerEditor.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
// TAttMarkerEditor // | // TAttMarkerEditor // | |||
// // | // // | |||
// Implements GUI for editing marker attributes. // | // Implements GUI for editing marker attributes. // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TGedFrame | #ifndef ROOT_TGedFrame | |||
#include "TGedFrame.h" | #include "TGedFrame.h" | |||
#endif | #endif | |||
#include "TGSlider.h" | ||||
class TGNumberEntry; | class TGNumberEntry; | |||
class TGColorSelect; | class TGColorSelect; | |||
class TGedMarkerSelect; | class TGedMarkerSelect; | |||
class TAttMarker; | class TAttMarker; | |||
class TGNumberEntryField; | ||||
class TAttMarkerEditor : public TGedFrame { | class TAttMarkerEditor : public TGedFrame { | |||
protected: | protected: | |||
TAttMarker *fAttMarker; // marker attribute object | TAttMarker *fAttMarker; // marker attribute object | |||
TGNumberEntry *fMarkerSize; // marker size combo box | TGNumberEntry *fMarkerSize; // marker size combo box | |||
TGColorSelect *fColorSelect; // marker color | TGColorSelect *fColorSelect; // marker color | |||
TGedMarkerSelect *fMarkerType; // marker type | TGedMarkerSelect *fMarkerType; // marker type | |||
Bool_t fSizeForText; // true if "text" draw option use s marker size | Bool_t fSizeForText; // true if "text" draw option use s marker size | |||
TGHSlider *fAlpha; // fill opacity | ||||
TGNumberEntryField *fAlphaField; | ||||
virtual void ConnectSignals2Slots(); | virtual void ConnectSignals2Slots(); | |||
public: | public: | |||
TAttMarkerEditor(const TGWindow *p = 0, | TAttMarkerEditor(const TGWindow *p = 0, | |||
Int_t width = 140, Int_t height = 30, | Int_t width = 140, Int_t height = 30, | |||
UInt_t options = kChildFrame, | UInt_t options = kChildFrame, | |||
Pixel_t back = GetDefaultFrameBackground()); | Pixel_t back = GetDefaultFrameBackground()); | |||
virtual ~TAttMarkerEditor(); | virtual ~TAttMarkerEditor(); | |||
virtual void SetModel(TObject* obj); | virtual void SetModel(TObject* obj); | |||
virtual void DoMarkerColor(Pixel_t color); | virtual void DoMarkerColor(Pixel_t color); | |||
virtual void DoMarkerAlphaColor(ULong_t p); | ||||
virtual void DoMarkerSize(); | virtual void DoMarkerSize(); | |||
virtual void DoMarkerStyle(Style_t style); | virtual void DoMarkerStyle(Style_t style); | |||
virtual void DoAlpha(); | ||||
virtual void DoAlphaField(); | ||||
virtual void DoLiveAlpha(Int_t a); | ||||
virtual void GetCurAlpha(); | ||||
ClassDef(TAttMarkerEditor,0) // GUI for editing marker attributes | ClassDef(TAttMarkerEditor,0) // GUI for editing marker attributes | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
0 lines changed or deleted | 10 lines changed or added | |||
TAttText.h | TAttText.h | |||
---|---|---|---|---|
skipping to change at line 56 | skipping to change at line 56 | |||
virtual Color_t GetTextColor() const {return fTextColor;} | virtual Color_t GetTextColor() const {return fTextColor;} | |||
virtual Font_t GetTextFont() const {return fTextFont;} | virtual Font_t GetTextFont() const {return fTextFont;} | |||
virtual Float_t GetTextSize() const {return fTextSize;} | virtual Float_t GetTextSize() const {return fTextSize;} | |||
virtual void Modify(); | virtual void Modify(); | |||
virtual void ResetAttText(Option_t *toption=""); | virtual void ResetAttText(Option_t *toption=""); | |||
virtual void SaveTextAttributes(ostream &out, const char *name, Int_ t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t siz def=1); | virtual void SaveTextAttributes(ostream &out, const char *name, Int_ t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t siz def=1); | |||
virtual void SetTextAttributes(); // *MENU* | virtual void SetTextAttributes(); // *MENU* | |||
virtual void SetTextAlign(Short_t align=11) { fTextAlign = align;} | virtual void SetTextAlign(Short_t align=11) { fTextAlign = align;} | |||
virtual void SetTextAngle(Float_t tangle=0) { fTextAngle = tangle;} // *MENU* | virtual void SetTextAngle(Float_t tangle=0) { fTextAngle = tangle;} // *MENU* | |||
virtual void SetTextColor(Color_t tcolor=1) { fTextColor = tcolor;} | virtual void SetTextColor(Color_t tcolor=1) { fTextColor = tcolor;} | |||
virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha); | ||||
virtual void SetTextFont(Font_t tfont=62) { fTextFont = tfont;} | virtual void SetTextFont(Font_t tfont=62) { fTextFont = tfont;} | |||
virtual void SetTextSize(Float_t tsize=1) { fTextSize = tsize;} | virtual void SetTextSize(Float_t tsize=1) { fTextSize = tsize;} | |||
virtual void SetTextSizePixels(Int_t npixels); | virtual void SetTextSizePixels(Int_t npixels); | |||
ClassDef(TAttText,1) //Text attributes | ClassDef(TAttText,1) //Text attributes | |||
}; | }; | |||
enum ETextAlign {kHAlignLeft=10, kHAlignCenter=20, kHAlignRight=30, | enum ETextAlign {kHAlignLeft=10, kHAlignCenter=20, kHAlignRight=30, | |||
kVAlignBottom=1, kVAlignCenter=2, kVAlignTop=3}; | kVAlignBottom=1, kVAlignCenter=2, kVAlignTop=3}; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
TAttTextEditor.h | TAttTextEditor.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
// TAttTextEditor // | // TAttTextEditor // | |||
// // | // // | |||
// Implements GUI for editing text attributes. // | // Implements GUI for editing text attributes. // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TGedFrame | #ifndef ROOT_TGedFrame | |||
#include "TGedFrame.h" | #include "TGedFrame.h" | |||
#endif | #endif | |||
#include "TGSlider.h" | ||||
class TGComboBox; | class TGComboBox; | |||
class TGFontTypeComboBox; | class TGFontTypeComboBox; | |||
class TGColorSelect; | class TGColorSelect; | |||
class TAttText; | class TAttText; | |||
class TGNumberEntryField; | ||||
class TAttTextEditor : public TGedFrame { | class TAttTextEditor : public TGedFrame { | |||
protected: | protected: | |||
TAttText *fAttText; // text attribute object | TAttText *fAttText; // text attribute object | |||
TGFontTypeComboBox *fTypeCombo; // font style combo box | TGFontTypeComboBox *fTypeCombo; // font style combo box | |||
TGComboBox *fSizeCombo; // font size combo box | TGComboBox *fSizeCombo; // font size combo box | |||
TGComboBox *fAlignCombo; // font aligh combo box | TGComboBox *fAlignCombo; // font aligh combo box | |||
TGColorSelect *fColorSelect; // color selection widget | TGColorSelect *fColorSelect; // color selection widget | |||
TGHSlider *fAlpha; // fill opacity | ||||
TGNumberEntryField *fAlphaField; | ||||
void ConnectSignals2Slots(); | ||||
static TGComboBox *BuildFontSizeComboBox(TGFrame *parent, Int_t id); | static TGComboBox *BuildFontSizeComboBox(TGFrame *parent, Int_t id); | |||
static TGComboBox *BuildTextAlignComboBox(TGFrame *parent, Int_t id); | static TGComboBox *BuildTextAlignComboBox(TGFrame *parent, Int_t id); | |||
public: | public: | |||
TAttTextEditor(const TGWindow *p = 0, | TAttTextEditor(const TGWindow *p = 0, | |||
Int_t width = 140, Int_t height = 30, | Int_t width = 140, Int_t height = 30, | |||
UInt_t options = kChildFrame, | UInt_t options = kChildFrame, | |||
Pixel_t back = GetDefaultFrameBackground()); | Pixel_t back = GetDefaultFrameBackground()); | |||
virtual ~TAttTextEditor(); | virtual ~TAttTextEditor(); | |||
virtual void SetModel(TObject* obj); | virtual void SetModel(TObject* obj); | |||
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | |||
virtual void DoTextAlphaColor(ULong_t p); | ||||
virtual void DoAlpha(); | ||||
virtual void DoAlphaField(); | ||||
virtual void DoLiveAlpha(Int_t a); | ||||
virtual void GetCurAlpha(); | ||||
virtual void DoTextColor(Pixel_t color); | ||||
ClassDef(TAttTextEditor,0) //GUI for editing text attributes | ClassDef(TAttTextEditor,0) //GUI for editing text attributes | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 4 change blocks. | ||||
2 lines changed or deleted | 15 lines changed or added | |||
TBox.h | TBox.h | |||
---|---|---|---|---|
skipping to change at line 32 | skipping to change at line 32 | |||
#ifndef ROOT_TObject | #ifndef ROOT_TObject | |||
#include "TObject.h" | #include "TObject.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttLine | #ifndef ROOT_TAttLine | |||
#include "TAttLine.h" | #include "TAttLine.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttFill | #ifndef ROOT_TAttFill | |||
#include "TAttFill.h" | #include "TAttFill.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttBBox2D | ||||
#include "TAttBBox2D.h" | ||||
#endif | ||||
#ifndef ROOT_GuiTypes | ||||
#include "GuiTypes.h" | ||||
#endif | ||||
class TPoint; | ||||
class TBox : public TObject, public TAttLine, public TAttFill { | class TBox : public TObject, public TAttLine, public TAttFill, public TAttB Box2D { | |||
private: | private: | |||
TObject *fTip; //!tool tip associated with box | TObject *fTip; //!tool tip associated with box | |||
protected: | protected: | |||
Double_t fX1; //X of 1st point | Double_t fX1; //X of 1st point | |||
Double_t fY1; //Y of 1st point | Double_t fY1; //Y of 1st point | |||
Double_t fX2; //X of 2nd point | Double_t fX2; //X of 2nd point | |||
Double_t fY2; //Y of 2nd point | Double_t fY2; //Y of 2nd point | |||
Bool_t fResizing; //!True if box is being resized | Bool_t fResizing; //!True if box is being resized | |||
public: | public: | |||
//----- Private bits, clients can only test but not change them | // Private bits, clients can only test but not change them | |||
enum { | enum { | |||
kCannotMove = BIT(12) //if set the box cannot be moved/resized | kCannotMove = BIT(12) //if set the box cannot be moved/resized | |||
}; | }; | |||
TBox(); | TBox(); | |||
TBox(Double_t x1, Double_t y1,Double_t x2, Double_t y2); | TBox(Double_t x1, Double_t y1,Double_t x2, Double_t y2); | |||
TBox(const TBox &box); | TBox(const TBox &box); | |||
TBox& operator=(const TBox&); | TBox& operator=(const TBox&); | |||
virtual ~TBox(); | virtual ~TBox(); | |||
void Copy(TObject &box) const; | void Copy(TObject &box) const; | |||
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | |||
skipping to change at line 77 | skipping to change at line 85 | |||
virtual void ls(Option_t *option="") const; | virtual void ls(Option_t *option="") const; | |||
virtual void Paint(Option_t *option=""); | virtual void Paint(Option_t *option=""); | |||
virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y 2, Option_t *option=""); | virtual void PaintBox(Double_t x1, Double_t y1, Double_t x2, Double_t y 2, Option_t *option=""); | |||
virtual void Print(Option_t *option="") const; | virtual void Print(Option_t *option="") const; | |||
virtual void SavePrimitive(ostream &out, Option_t *option = ""); | virtual void SavePrimitive(ostream &out, Option_t *option = ""); | |||
virtual void SetX1(Double_t x1) {fX1=x1;} | virtual void SetX1(Double_t x1) {fX1=x1;} | |||
virtual void SetX2(Double_t x2) {fX2=x2;} | virtual void SetX2(Double_t x2) {fX2=x2;} | |||
virtual void SetY1(Double_t y1) {fY1=y1;} | virtual void SetY1(Double_t y1) {fY1=y1;} | |||
virtual void SetY2(Double_t y2) {fY2=y2;} | virtual void SetY2(Double_t y2) {fY2=y2;} | |||
virtual void SetToolTipText(const char *text, Long_t delayms = 1000); | virtual void SetToolTipText(const char *text, Long_t delayms = 1000); | |||
virtual Rectangle_t GetBBox(); | ||||
virtual TPoint GetBBoxCenter(); | ||||
virtual void SetBBoxCenter(const TPoint &p); | ||||
virtual void SetBBoxCenterX(const Int_t x); | ||||
virtual void SetBBoxCenterY(const Int_t y); | ||||
virtual void SetBBoxX1(const Int_t x); | ||||
virtual void SetBBoxX2(const Int_t x); | ||||
virtual void SetBBoxY1(const Int_t y); | ||||
virtual void SetBBoxY2(const Int_t y); | ||||
ClassDef(TBox,2) //Box class | ClassDef(TBox,3) //Box class | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
3 lines changed or deleted | 20 lines changed or added | |||
TCanvas.h | TCanvas.h | |||
---|---|---|---|---|
skipping to change at line 237 | skipping to change at line 237 | |||
static void SetFolder(Bool_t isfolder=kTRUE); | static void SetFolder(Bool_t isfolder=kTRUE); | |||
void SetPadSave(TPad *pad) {fPadSave = pad;} | void SetPadSave(TPad *pad) {fPadSave = pad;} | |||
void SetRetained(Bool_t retained=kTRUE) { fRetained=retaine d;} | void SetRetained(Bool_t retained=kTRUE) { fRetained=retaine d;} | |||
void SetTitle(const char *title=""); | void SetTitle(const char *title=""); | |||
virtual void ToggleEventStatus(); | virtual void ToggleEventStatus(); | |||
virtual void ToggleAutoExec(); | virtual void ToggleAutoExec(); | |||
virtual void ToggleToolBar(); | virtual void ToggleToolBar(); | |||
virtual void ToggleEditor(); | virtual void ToggleEditor(); | |||
virtual void ToggleToolTips(); | virtual void ToggleToolTips(); | |||
virtual void Update(); | virtual void Update(); | |||
//Still need this. | ||||
Bool_t UseGL() const { return fUseGL; } | ||||
void SetSupportGL(Bool_t support) {fUseGL = support;} | ||||
//Name is GetPainter, not GetPadPainter | // | |||
//to avoid name hiding and confusion. | Bool_t UseGL() const { return fUseGL; } | |||
//GetPadPainter and GetPainter are non-virtual (no need, in fact). | void SetSupportGL(Bool_t support) {fUseGL = support;} | |||
TVirtualPadPainter *GetCanvasPainter(); | TVirtualPadPainter *GetCanvasPainter(); | |||
void DeleteCanvasPainter(); | ||||
static TCanvas *MakeDefCanvas(); | static TCanvas *MakeDefCanvas(); | |||
static Bool_t SupportAlpha(); | static Bool_t SupportAlpha(); | |||
ClassDef(TCanvas,7) //Graphics canvas | ClassDef(TCanvas,7) //Graphics canvas | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
6 lines changed or deleted | 4 lines changed or added | |||
TClass.h | TClass.h | |||
---|---|---|---|---|
skipping to change at line 85 | skipping to change at line 85 | |||
public: | public: | |||
// TClass status bits | // TClass status bits | |||
enum { kClassSaved = BIT(12), kIgnoreTObjectStreamer = BIT(15), | enum { kClassSaved = BIT(12), kIgnoreTObjectStreamer = BIT(15), | |||
kUnloaded = BIT(16), kIsTObject = BIT(17), | kUnloaded = BIT(16), kIsTObject = BIT(17), | |||
kIsForeign = BIT(18), kIsEmulation = BIT(19), | kIsForeign = BIT(18), kIsEmulation = BIT(19), | |||
kStartWithTObject = BIT(20), // see comments for IsStartingWithT Object() | kStartWithTObject = BIT(20), // see comments for IsStartingWithT Object() | |||
kWarned = BIT(21), | kWarned = BIT(21), | |||
kHasNameMapNode = BIT(22) | kHasNameMapNode = BIT(22) | |||
}; | }; | |||
enum ENewType { kRealNew = 0, kClassNew, kDummyNew }; | enum ENewType { kRealNew = 0, kClassNew, kDummyNew }; | |||
enum ECheckSum { | ||||
kCurrentCheckSum = 0, | ||||
kNoEnum = 1, // Used since v3.3 | ||||
kNoRange = 2, // Up to v5.17 | ||||
kWithTypeDef = 3, // Up to v5.34.18 and v5.99/06 | ||||
kNoBaseCheckSum = 4, // Up to v5.34.18 and v5.99/06 | ||||
kLatestCheckSum = 5 | ||||
}; | ||||
private: | private: | |||
mutable TObjArray *fStreamerInfo; //Array of TVirtualStreamerInfo | mutable TObjArray *fStreamerInfo; //Array of TVirtualStreamerInfo | |||
mutable std::map<std::string, TObjArray*> *fConversionStreamerInfo; //Ar ray of the streamer infos derived from another class. | mutable std::map<std::string, TObjArray*> *fConversionStreamerInfo; //Ar ray of the streamer infos derived from another class. | |||
TList *fRealData; //linked list for persistent member s including base classes | TList *fRealData; //linked list for persistent member s including base classes | |||
TList *fBase; //linked list for base classes | TList *fBase; //linked list for base classes | |||
TList *fData; //linked list for data members | TList *fData; //linked list for data members | |||
TList *fMethod; //linked list for methods | TList *fMethod; //linked list for methods | |||
TList *fAllPubData; //all public data members (includin g from base classes) | TList *fAllPubData; //all public data members (includin g from base classes) | |||
skipping to change at line 253 | skipping to change at line 261 | |||
void Draw(Option_t *option=""); | void Draw(Option_t *option=""); | |||
void Dump() const { TDictionary::Dump(); } | void Dump() const { TDictionary::Dump(); } | |||
void Dump(void *obj) const; | void Dump(void *obj) const; | |||
char *EscapeChars(const char *text) const; | char *EscapeChars(const char *text) const; | |||
TVirtualStreamerInfo *FindStreamerInfo(UInt_t checksum) const; | TVirtualStreamerInfo *FindStreamerInfo(UInt_t checksum) const; | |||
TVirtualStreamerInfo *GetConversionStreamerInfo( const char* onfile_ classname, Int_t version ) const; | TVirtualStreamerInfo *GetConversionStreamerInfo( const char* onfile_ classname, Int_t version ) const; | |||
TVirtualStreamerInfo *FindConversionStreamerInfo( const char* onfile _classname, UInt_t checksum ) const; | TVirtualStreamerInfo *FindConversionStreamerInfo( const char* onfile _classname, UInt_t checksum ) const; | |||
TVirtualStreamerInfo *GetConversionStreamerInfo( const TClass* onfil e_cl, Int_t version ) const; | TVirtualStreamerInfo *GetConversionStreamerInfo( const TClass* onfil e_cl, Int_t version ) const; | |||
TVirtualStreamerInfo *FindConversionStreamerInfo( const TClass* onfi le_cl, UInt_t checksum ) const; | TVirtualStreamerInfo *FindConversionStreamerInfo( const TClass* onfi le_cl, UInt_t checksum ) const; | |||
Bool_t HasDefaultConstructor() const; | Bool_t HasDefaultConstructor() const; | |||
UInt_t GetCheckSum(UInt_t code=0) const; | UInt_t GetCheckSum(ECheckSum code = kCurrentCheckSum) const; | |||
TVirtualCollectionProxy *GetCollectionProxy() const; | TVirtualCollectionProxy *GetCollectionProxy() const; | |||
TVirtualIsAProxy *GetIsAProxy() const; | TVirtualIsAProxy *GetIsAProxy() const; | |||
Version_t GetClassVersion() const { fVersionUsed = kTRUE; retur n fClassVersion; } | Version_t GetClassVersion() const { fVersionUsed = kTRUE; retur n fClassVersion; } | |||
Int_t GetClassSize() const { return Size(); } | Int_t GetClassSize() const { return Size(); } | |||
TDataMember *GetDataMember(const char *datamember) const; | TDataMember *GetDataMember(const char *datamember) const; | |||
Long_t GetDataMemberOffset(const char *membername) const; | Long_t GetDataMemberOffset(const char *membername) const; | |||
const char *GetDeclFileName() const { return fDeclFileName; } | const char *GetDeclFileName() const { return fDeclFileName; } | |||
Short_t GetDeclFileLine() const { return fDeclFileLine; } | Short_t GetDeclFileLine() const { return fDeclFileLine; } | |||
ROOT::DelFunc_t GetDelete() const; | ROOT::DelFunc_t GetDelete() const; | |||
ROOT::DesFunc_t GetDestructor() const; | ROOT::DesFunc_t GetDestructor() const; | |||
skipping to change at line 310 | skipping to change at line 318 | |||
TVirtualRefProxy *GetReferenceProxy() const { return fRefProxy; } | TVirtualRefProxy *GetReferenceProxy() const { return fRefProxy; } | |||
const ROOT::TSchemaRuleSet *GetSchemaRules() const; | const ROOT::TSchemaRuleSet *GetSchemaRules() const; | |||
ROOT::TSchemaRuleSet *GetSchemaRules(Bool_t create = kFALSE); | ROOT::TSchemaRuleSet *GetSchemaRules(Bool_t create = kFALSE); | |||
const char *GetSharedLibs(); | const char *GetSharedLibs(); | |||
ShowMembersFunc_t GetShowMembersWrapper() const { return fShowMembers; } | ShowMembersFunc_t GetShowMembersWrapper() const { return fShowMembers; } | |||
TClassStreamer *GetStreamer() const; | TClassStreamer *GetStreamer() const; | |||
ClassStreamerFunc_t GetStreamerFunc() const; | ClassStreamerFunc_t GetStreamerFunc() const; | |||
TObjArray *GetStreamerInfos() const { return fStreamerInfo; } | TObjArray *GetStreamerInfos() const { return fStreamerInfo; } | |||
TVirtualStreamerInfo *GetStreamerInfo(Int_t version=0) const; | TVirtualStreamerInfo *GetStreamerInfo(Int_t version=0) const; | |||
TVirtualStreamerInfo *GetStreamerInfoAbstractEmulated(Int_t version= 0) const; | TVirtualStreamerInfo *GetStreamerInfoAbstractEmulated(Int_t version= 0) const; | |||
TVirtualStreamerInfo *FindStreamerInfoAbstractEmulated(UInt_t checks um) const; | ||||
const type_info *GetTypeInfo() const { return fTypeInfo; }; | const type_info *GetTypeInfo() const { return fTypeInfo; }; | |||
void IgnoreTObjectStreamer(Bool_t ignore=kTRUE); | void IgnoreTObjectStreamer(Bool_t ignore=kTRUE); | |||
Bool_t InheritsFrom(const char *cl) const; | Bool_t InheritsFrom(const char *cl) const; | |||
Bool_t InheritsFrom(const TClass *cl) const; | Bool_t InheritsFrom(const TClass *cl) const; | |||
void InterpretedShowMembers(void* obj, TMemberInspector &i nsp); | void InterpretedShowMembers(void* obj, TMemberInspector &i nsp); | |||
Bool_t IsFolder() const { return kTRUE; } | Bool_t IsFolder() const { return kTRUE; } | |||
Bool_t IsLoaded() const; | Bool_t IsLoaded() const; | |||
Bool_t IsForeign() const; | Bool_t IsForeign() const; | |||
Bool_t IsStartingWithTObject() const; | Bool_t IsStartingWithTObject() const; | |||
Bool_t IsVersioned() const { return !( GetClassVersion()<=1 && IsForeign() ); } | ||||
Bool_t IsTObject() const; | Bool_t IsTObject() const; | |||
void ls(Option_t *opt="") const; | void ls(Option_t *opt="") const; | |||
void MakeCustomMenuList(); | void MakeCustomMenuList(); | |||
Bool_t MatchLegacyCheckSum(UInt_t checksum) const; | ||||
void Move(void *arenaFrom, void *arenaTo) const; | void Move(void *arenaFrom, void *arenaTo) const; | |||
void *New(ENewType defConstructor = kClassNew) const; | void *New(ENewType defConstructor = kClassNew) const; | |||
void *New(void *arena, ENewType defConstructor = kClassNew) const; | void *New(void *arena, ENewType defConstructor = kClassNew) const; | |||
void *NewArray(Long_t nElements, ENewType defConstructor = kClassNew) const; | void *NewArray(Long_t nElements, ENewType defConstructor = kClassNew) const; | |||
void *NewArray(Long_t nElements, void *arena, ENewType defC onstructor = kClassNew) const; | void *NewArray(Long_t nElements, void *arena, ENewType defC onstructor = kClassNew) const; | |||
virtual void PostLoadCheck(); | virtual void PostLoadCheck(); | |||
Long_t Property() const; | Long_t Property() const; | |||
Int_t ReadBuffer(TBuffer &b, void *pointer, Int_t version, UInt_t start, UInt_t count); | Int_t ReadBuffer(TBuffer &b, void *pointer, Int_t version, UInt_t start, UInt_t count); | |||
Int_t ReadBuffer(TBuffer &b, void *pointer); | Int_t ReadBuffer(TBuffer &b, void *pointer); | |||
void RemoveRef(TClassRef *ref); | void RemoveRef(TClassRef *ref); | |||
End of changes. 5 change blocks. | ||||
1 lines changed or deleted | 12 lines changed or added | |||
TClassEdit.h | TClassEdit.h | |||
---|---|---|---|---|
skipping to change at line 31 | skipping to change at line 31 | |||
#include "ESTLType.h" | #include "ESTLType.h" | |||
#endif | #endif | |||
#ifdef R__OLDHPACC | #ifdef R__OLDHPACC | |||
namespace std { | namespace std { | |||
using ::string; | using ::string; | |||
using ::vector; | using ::vector; | |||
} | } | |||
#endif | #endif | |||
#if defined(__CYGWIN__) | ||||
// std::to_string is missing on cygwin with gcc 4.8.2-2 and 4.8.3 | ||||
#include <sstream> | ||||
namespace std { | ||||
template <typename T> | ||||
string to_string(T value) { | ||||
ostringstream os; | ||||
os << value; | ||||
return os.str(); | ||||
} | ||||
} | ||||
#endif | ||||
// TClassEdit is used to manipulate class and type names. | // TClassEdit is used to manipulate class and type names. | |||
// | // | |||
// This class does not dependent on any other ROOT facility | // This class does not dependent on any other ROOT facility | |||
// so that it can be used by rootcint. | // so that it can be used by rootcint. | |||
namespace TClassEdit { | namespace TClassEdit { | |||
enum EModType { | enum EModType { | |||
kNone = 0, | kNone = 0, | |||
kDropTrailStar = 1<<0, | kDropTrailStar = 1<<0, | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 13 lines changed or added | |||
TClassTable.h | TClassTable.h | |||
---|---|---|---|---|
skipping to change at line 48 | skipping to change at line 48 | |||
TClassRec *fNext; | TClassRec *fNext; | |||
}; | }; | |||
namespace ROOT { | namespace ROOT { | |||
class TMapTypeToClassRec; | class TMapTypeToClassRec; | |||
} | } | |||
class TClassTable : public TObject { | class TClassTable : public TObject { | |||
friend void ROOT::ResetClassVersion(TClass*, const char*, Short_t); | friend void ROOT::ResetClassVersion(TClass*, const char*, Short_t); | |||
friend class TROOT; | ||||
private: | private: | |||
typedef ROOT::TMapTypeToClassRec IdMap_t; | typedef ROOT::TMapTypeToClassRec IdMap_t; | |||
static TClassRec **fgTable; | static TClassRec **fgTable; | |||
static TClassRec **fgSortedTable; | static TClassRec **fgSortedTable; | |||
static IdMap_t *fgIdMap; | static IdMap_t *fgIdMap; | |||
static int fgSize; | static int fgSize; | |||
static int fgTally; | static int fgTally; | |||
static Bool_t fgSorted; | static Bool_t fgSorted; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
TColor.h | TColor.h | |||
---|---|---|---|---|
skipping to change at line 115 | skipping to change at line 115 | |||
static void RGB2HLS(Int_t r, Int_t g, Int_t b, Int_t &h, Int_t &l, In t_t &s); | static void RGB2HLS(Int_t r, Int_t g, Int_t b, Int_t &h, Int_t &l, In t_t &s); | |||
static void RGBtoHLS(Float_t r, Float_t g, Float_t b, Float_t &h, Flo at_t &l, Float_t &s) | static void RGBtoHLS(Float_t r, Float_t g, Float_t b, Float_t &h, Flo at_t &l, Float_t &s) | |||
{ TColor::RGB2HLS(r, g, b, h, l, s); } // backward com patible | { TColor::RGB2HLS(r, g, b, h, l, s); } // backward com patible | |||
static void RGB2HSV(Float_t r, Float_t g, Float_t b, Float_t &h, Floa t_t &s, Float_t &v); | static void RGB2HSV(Float_t r, Float_t g, Float_t b, Float_t &h, Floa t_t &s, Float_t &v); | |||
static Int_t GetColor(const char *hexcolor); | static Int_t GetColor(const char *hexcolor); | |||
static Int_t GetColor(Float_t r, Float_t g, Float_t b); | static Int_t GetColor(Float_t r, Float_t g, Float_t b); | |||
static Int_t GetColor(Int_t r, Int_t g, Int_t b); | static Int_t GetColor(Int_t r, Int_t g, Int_t b); | |||
static Int_t GetColor(ULong_t pixel); | static Int_t GetColor(ULong_t pixel); | |||
static Int_t GetColorBright(Int_t color); | static Int_t GetColorBright(Int_t color); | |||
static Int_t GetColorDark(Int_t color); | static Int_t GetColorDark(Int_t color); | |||
static Int_t GetColorTransparent(Int_t color, Float_t a); | ||||
static ULong_t Number2Pixel(Int_t ci); | static ULong_t Number2Pixel(Int_t ci); | |||
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b); | static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b); | |||
static ULong_t RGB2Pixel(Float_t r, Float_t g, Float_t b); | static ULong_t RGB2Pixel(Float_t r, Float_t g, Float_t b); | |||
static void Pixel2RGB(ULong_t pixel, Int_t &r, Int_t &g, Int_t &b); | static void Pixel2RGB(ULong_t pixel, Int_t &r, Int_t &g, Int_t &b); | |||
static void Pixel2RGB(ULong_t pixel, Float_t &r, Float_t &g, Float_t &b); | static void Pixel2RGB(ULong_t pixel, Float_t &r, Float_t &g, Float_t &b); | |||
static const char *PixelAsHexString(ULong_t pixel); | static const char *PixelAsHexString(ULong_t pixel); | |||
static void SaveColor(std::ostream &out, Int_t ci); | static void SaveColor(std::ostream &out, Int_t ci); | |||
static Bool_t IsGrayscale(); | static Bool_t IsGrayscale(); | |||
static void SetGrayscale(Bool_t set = kTRUE); | static void SetGrayscale(Bool_t set = kTRUE); | |||
static void SetPalette(Int_t ncolors, Int_t *colors,Float_t alpha=1.) ; | static void SetPalette(Int_t ncolors, Int_t *colors,Float_t alpha=1.) ; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
TColorGradient.h | TColorGradient.h | |||
---|---|---|---|---|
skipping to change at line 20 | skipping to change at line 20 | |||
*************************************************************************/ | *************************************************************************/ | |||
#ifndef ROOT_TColorGradient | #ifndef ROOT_TColorGradient | |||
#define ROOT_TColorGradient | #define ROOT_TColorGradient | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
// // | // // | |||
// TColorGradient // | // TColorGradient // | |||
// // | // // | |||
// TColorGradient extends basic TColor. // | // TColorGradient extends basic TColor. // | |||
// Actually, this is not a simple color, but linear gradient + shadow // | // Actually, this is not a simple color, but linear or radial gradient // | |||
// for filled area. By inheriting from TColor, gradients can be placed // | // for a filled area. By inheriting from TColor, gradients can be // | |||
// inside gROOT's list of colors and use it in all TAttXXX descendants // | // placed inside gROOT's list of colors and use it in all TAttXXX // | |||
// without modifying any existing code. // | // descendants without modifying any existing code. // | |||
// Shadow, of course, is not a property of any color, and gradient is // | ||||
// not, but this is the best way to add new attributes to filled area // | ||||
// without re-writing all the graphics code. // | ||||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#include <vector> | #include <vector> | |||
#ifndef ROOT_Rtypes | #ifndef ROOT_Rtypes | |||
#include "Rtypes.h" | #include "Rtypes.h" | |||
#endif | #endif | |||
#ifndef ROOT_TColor | #ifndef ROOT_TColor | |||
#include "TColor.h" | #include "TColor.h" | |||
#endif | #endif | |||
class TColorGradient : public TColor { | class TColorGradient : public TColor { | |||
public: | public: | |||
enum EGradientDirection { | typedef std::vector<Color_t>::size_type SizeType_t; | |||
kGDVertical, | ||||
kGDHorizontal | //TODO: Replace with enum class as soon as we have C++11 enabled by defa | |||
ult. | ||||
//CoordinateMode: both linear and radial gradients require some points - | ||||
the | ||||
//start and end points. | ||||
//We can use either pad's rectangle as a coordinate system | ||||
//or an object's bounding rect. | ||||
enum ECoordinateMode { | ||||
kPadMode,//NDC, in a pad's rectangle (pad is 0,0 - 1,1). | ||||
kObjectBoundingMode //NDC in an object's bounding rect (this rect is | ||||
0,0 - 1, 1). | ||||
}; | }; | |||
typedef std::vector<Color_t>::size_type SizeType_t; | struct Point { | |||
Double_t fX; | ||||
Double_t fY; | ||||
Point() | ||||
: fX(0.), fY(0.) | ||||
{ | ||||
} | ||||
Point(Double_t x, Double_t y) | ||||
: fX(x), fY(y) | ||||
{ | ||||
} | ||||
}; | ||||
private: | private: | |||
//At the moment, we have only linear gradient, vertical or horizontal. | //Positions of color nodes in a gradient, in NDC. | |||
EGradientDirection fGradientDirection; | ||||
//Positions of color nodes in gradient. Should be normalized : [0, 1]. | ||||
std::vector<Double_t> fColorPositions; | std::vector<Double_t> fColorPositions; | |||
std::vector<Double_t> fColors;//RGBA values. | std::vector<Double_t> fColors;//RGBA values. | |||
public: | //'default value' is kObjectBoundingMode. | |||
//TColorGradient(); | ECoordinateMode fCoordinateMode; | |||
protected: | ||||
TColorGradient(); | ||||
TColorGradient(Color_t newColor, EGradientDirection direction, UInt_t nP | TColorGradient(Color_t newColor, UInt_t nPoints, const Double_t *points, | |||
oints, | const Color_t *colorIndices, ECoordinateMode mode = kObje | |||
const Double_t *points, const Color_t *colorIndices); | ctBoundingMode); | |||
TColorGradient(Color_t newColor, EGradientDirection direction, UInt_t nP | TColorGradient(Color_t newColor, UInt_t nPoints, const Double_t *points, | |||
oints, | const Double_t *colors, ECoordinateMode mode = kObjectBou | |||
const Double_t *points, const Double_t *colors); | ndingMode); | |||
void ResetColor(EGradientDirection direction, UInt_t nPoints, const Doub | public: | |||
le_t *points, | void ResetColor(UInt_t nPoints, const Double_t *points, | |||
const Color_t *colorIndices); | const Color_t *colorIndices); | |||
void ResetColor(EGradientDirection direction, UInt_t nPoints, const Doub le_t *points, | void ResetColor(UInt_t nPoints, const Double_t *points, | |||
const Double_t *colorIndices); | const Double_t *colorIndices); | |||
EGradientDirection GetGradientDirection()const; | void SetCoordinateMode(ECoordinateMode mode); | |||
ECoordinateMode GetCoordinateMode()const; | ||||
SizeType_t GetNumberOfSteps()const; | SizeType_t GetNumberOfSteps()const; | |||
const Double_t *GetColorPositions()const; | const Double_t *GetColorPositions()const; | |||
const Double_t *GetColors()const; | const Double_t *GetColors()const; | |||
private: | private: | |||
void RegisterColor(Color_t colorIndex); | void RegisterColor(Color_t colorIndex); | |||
ClassDef(TColorGradient, 1) //Extended drawing parameters | ClassDef(TColorGradient, 1) //Gradient fill. | |||
}; | ||||
class TLinearGradient : public TColorGradient { | ||||
public: | ||||
//With C++11 we'll use inherited constructors!!! | ||||
TLinearGradient(); | ||||
TLinearGradient(Color_t newColor, UInt_t nPoints, const Double_t *points | ||||
, | ||||
const Color_t *colorIndices, ECoordinateMode mode = kObj | ||||
ectBoundingMode); | ||||
TLinearGradient(Color_t newColor, UInt_t nPoints, const Double_t *points | ||||
, | ||||
const Double_t *colors, ECoordinateMode mode = kObjectBo | ||||
undingMode); | ||||
//points are always in NDC (and also affected by fCoordinateMode). | ||||
void SetStartEnd(const Point &p1, const Point &p2); | ||||
const Point &GetStart()const; | ||||
const Point &GetEnd()const; | ||||
private: | ||||
Point fStart; | ||||
Point fEnd; | ||||
ClassDef(TLinearGradient, 1)//Linear gradient fill. | ||||
}; | ||||
// | ||||
//Radial gradient. Can be either "simple": you specify a center | ||||
//and radius in NDC coordinates (see comments about linear gradient | ||||
//and coordinate modes above), or "extended": you have two centers | ||||
//(start,end) and two radiuses (R1, R2) and interpolation between them; | ||||
//still start/end and radiuses are in NDC. | ||||
// | ||||
class TRadialGradient : public TColorGradient { | ||||
public: | ||||
enum EGradientType { | ||||
kSimple, | ||||
kExtended | ||||
}; | ||||
TRadialGradient(); | ||||
TRadialGradient(Color_t newColor, UInt_t nPoints, const Double_t *points | ||||
, | ||||
const Color_t *colorIndices, ECoordinateMode mode = kObj | ||||
ectBoundingMode); | ||||
TRadialGradient(Color_t newColor, UInt_t nPoints, const Double_t *points | ||||
, | ||||
const Double_t *colors, ECoordinateMode mode = kObjectBo | ||||
undingMode); | ||||
EGradientType GetGradientType()const; | ||||
//Extended gradient. | ||||
void SetStartEndR1R2(const Point &p1, Double_t r1, | ||||
const Point &p2, Double_t r2); | ||||
const Point &GetStart()const; | ||||
Double_t GetR1()const; | ||||
const Point &GetEnd()const; | ||||
Double_t GetR2()const; | ||||
//Simple radial gradient: the same as extended with | ||||
//start == end, r1 = 0, r2 = radius. | ||||
void SetRadialGradient(const Point ¢er, Double_t radius); | ||||
const Point &GetCenter()const; | ||||
Double_t GetRadius()const; | ||||
private: | ||||
Point fStart; | ||||
Double_t fR1; | ||||
Point fEnd; | ||||
Double_t fR2; | ||||
EGradientType fType; | ||||
ClassDef(TRadialGradient, 1)//Radial gradient fill. | ||||
}; | }; | |||
#endif | #endif | |||
End of changes. 11 change blocks. | ||||
28 lines changed or deleted | 126 lines changed or added | |||
TCurlyArc.h | TCurlyArc.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
/************************************************************************* | /************************************************************************* | |||
* 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. * | |||
*************************************************************************/ | *************************************************************************/ | |||
#ifndef ROOT_TCurlyArc | #ifndef ROOT_TCurlyArc | |||
#define ROOT_TCurlyArc | #define ROOT_TCurlyArc | |||
// | #ifndef ROOT_GuiTypes | |||
#include "GuiTypes.h" | ||||
#endif | ||||
class TPoint; | ||||
// This class implements a curly or wavy arc typically used | // This class implements a curly or wavy arc typically used | |||
// to draw Feynman diagrams. | // to draw Feynman diagrams. | |||
#include "TCurlyLine.h" | #include "TCurlyLine.h" | |||
class TCurlyArc : public TCurlyLine { | class TCurlyArc : public TCurlyLine { | |||
private: | private: | |||
Double_t fR1; // Radius of arc | Double_t fR1; // Radius of arc | |||
Double_t fPhimin; // start phi (degrees) | Double_t fPhimin; // start phi (degrees) | |||
skipping to change at line 50 | skipping to change at line 55 | |||
void ExecuteEvent(Int_t event, Int_t px, Int_t py); | void ExecuteEvent(Int_t event, Int_t px, Int_t py); | |||
Double_t GetRadius() const {return fR1;} | Double_t GetRadius() const {return fR1;} | |||
Double_t GetPhimin() const {return fPhimin;} | Double_t GetPhimin() const {return fPhimin;} | |||
Double_t GetPhimax() const {return fPhimax;} | Double_t GetPhimax() const {return fPhimax;} | |||
virtual void SetCenter(Double_t x1, Double_t y1); // *MENU* *ARGS={x1=>f X1,y1=>fY1} | virtual void SetCenter(Double_t x1, Double_t y1); // *MENU* *ARGS={x1=>f X1,y1=>fY1} | |||
virtual void SetRadius(Double_t radius); // *MENU* *ARGS={radiu s=>fR1} | virtual void SetRadius(Double_t radius); // *MENU* *ARGS={radiu s=>fR1} | |||
virtual void SetPhimin(Double_t phimin); // *MENU* *ARGS={phimi n=>fPhimin} | virtual void SetPhimin(Double_t phimin); // *MENU* *ARGS={phimi n=>fPhimin} | |||
virtual void SetPhimax(Double_t phimax); // *MENU* *ARGS={phima x=>fPhimax} | virtual void SetPhimax(Double_t phimax); // *MENU* *ARGS={phima x=>fPhimax} | |||
virtual void SavePrimitive(ostream &out, Option_t * = ""); | virtual void SavePrimitive(ostream &out, Option_t * = ""); | |||
static void SetDefaultWaveLength(Double_t WaveLength); | static void SetDefaultWaveLength(Double_t WaveLength); | |||
static void SetDefaultAmplitude (Double_t Amplitude ); | static void SetDefaultAmplitude (Double_t Amplitude ); | |||
static void SetDefaultIsCurly (Bool_t IsCurly ); | static void SetDefaultIsCurly (Bool_t IsCurly ); | |||
static Double_t GetDefaultWaveLength(); | static Double_t GetDefaultWaveLength(); | |||
static Double_t GetDefaultAmplitude (); | static Double_t GetDefaultAmplitude (); | |||
static Bool_t GetDefaultIsCurly (); | static Bool_t GetDefaultIsCurly (); | |||
virtual Rectangle_t GetBBox(); | ||||
virtual TPoint GetBBoxCenter(); | ||||
virtual void SetBBoxCenter(const TPoint &p); | ||||
virtual void SetBBoxCenterX(const Int_t x); | ||||
virtual void SetBBoxCenterY(const Int_t y); | ||||
virtual void SetBBoxX1(const Int_t x); | ||||
virtual void SetBBoxX2(const Int_t x); | ||||
virtual void SetBBoxY1(const Int_t y); | ||||
virtual void SetBBoxY2(const Int_t y); | ||||
ClassDef(TCurlyArc,2) // A curly arc | ClassDef(TCurlyArc,3) // A curly arc | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
8 lines changed or deleted | 22 lines changed or added | |||
TCurlyLine.h | TCurlyLine.h | |||
---|---|---|---|---|
skipping to change at line 14 | skipping to change at line 14 | |||
/************************************************************************* | /************************************************************************* | |||
* 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. * | |||
*************************************************************************/ | *************************************************************************/ | |||
#ifndef ROOT_TCurlyLine | #ifndef ROOT_TCurlyLine | |||
#define ROOT_TCurlyLine | #define ROOT_TCurlyLine | |||
// | ||||
// This class implements a curly or wavy polyline typically | // This class implements a curly or wavy polyline typically | |||
// used to draw Feynman diagrams. | // used to draw Feynman diagrams. | |||
#ifndef ROOT_Riosfwd | #ifndef ROOT_Riosfwd | |||
#include "Riosfwd.h" | #include "Riosfwd.h" | |||
#endif | #endif | |||
#ifndef ROOT_TPolyLine | #ifndef ROOT_TPolyLine | |||
#include "TPolyLine.h" | #include "TPolyLine.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttBBox2D | ||||
#include "TAttBBox2D.h" | ||||
#endif | ||||
#ifndef ROOT_GuiTypes | ||||
#include "GuiTypes.h" | ||||
#endif | ||||
class TPoint; | ||||
class TCurlyLine : public TPolyLine { | class TCurlyLine : public TPolyLine , public TAttBBox2D { | |||
protected: | protected: | |||
Double_t fX1; // start x, center for arc | Double_t fX1; // start x, center for arc | |||
Double_t fY1; // start y, center for arc | Double_t fY1; // start y, center for arc | |||
Double_t fX2; // end x | Double_t fX2; // end x | |||
Double_t fY2; // end y | Double_t fY2; // end y | |||
Double_t fWaveLength; // wavelength of sinusoid in percent of pad he ight | Double_t fWaveLength; // wavelength of sinusoid in percent of pad he ight | |||
Double_t fAmplitude; // amplitude of sinusoid in percent of pad hei ght | Double_t fAmplitude; // amplitude of sinusoid in percent of pad hei ght | |||
Int_t fNsteps; // used internally (controls precision) | Int_t fNsteps; // used internally (controls precision) | |||
Bool_t fIsCurly; // true: Gluon, false: Gamma | Bool_t fIsCurly; // true: Gluon, false: Gamma | |||
skipping to change at line 71 | skipping to change at line 78 | |||
virtual void SetStartPoint(Double_t x1, Double_t y1); | virtual void SetStartPoint(Double_t x1, Double_t y1); | |||
virtual void SetEndPoint (Double_t x2, Double_t y2); | virtual void SetEndPoint (Double_t x2, Double_t y2); | |||
virtual void SavePrimitive(ostream &out, Option_t * = ""); | virtual void SavePrimitive(ostream &out, Option_t * = ""); | |||
static void SetDefaultWaveLength(Double_t WaveLength); | static void SetDefaultWaveLength(Double_t WaveLength); | |||
static void SetDefaultAmplitude (Double_t Amplitude ); | static void SetDefaultAmplitude (Double_t Amplitude ); | |||
static void SetDefaultIsCurly (Bool_t IsCurly ); | static void SetDefaultIsCurly (Bool_t IsCurly ); | |||
static Double_t GetDefaultWaveLength(); | static Double_t GetDefaultWaveLength(); | |||
static Double_t GetDefaultAmplitude (); | static Double_t GetDefaultAmplitude (); | |||
static Bool_t GetDefaultIsCurly (); | static Bool_t GetDefaultIsCurly (); | |||
virtual Rectangle_t GetBBox(); | ||||
virtual TPoint GetBBoxCenter(); | ||||
virtual void SetBBoxCenter(const TPoint &p); | ||||
virtual void SetBBoxCenterX(const Int_t x); | ||||
virtual void SetBBoxCenterY(const Int_t y); | ||||
virtual void SetBBoxX1(const Int_t x); | ||||
virtual void SetBBoxX2(const Int_t x); | ||||
virtual void SetBBoxY1(const Int_t y); | ||||
virtual void SetBBoxY2(const Int_t y); | ||||
ClassDef(TCurlyLine,2) // A curly polyline | ClassDef(TCurlyLine,3) // A curly polyline | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
3 lines changed or deleted | 19 lines changed or added | |||
TDataSetManagerAliEn.h | TDataSetManagerAliEn.h | |||
---|---|---|---|---|
skipping to change at line 54 | skipping to change at line 54 | |||
class TAliEnFind : public TObject { | class TAliEnFind : public TObject { | |||
private: | private: | |||
TString fBasePath; | TString fBasePath; | |||
TString fFileName; | TString fFileName; | |||
TString fTreeName; | TString fTreeName; | |||
TString fRegexpRaw; | TString fRegexpRaw; | |||
TString fAnchor; | TString fAnchor; | |||
TString fQuery; | ||||
Bool_t fArchSubst; | Bool_t fArchSubst; | |||
TPMERegexp *fRegexp; | TPMERegexp *fRegexp; | |||
TString fSearchId; | TString fSearchId; | |||
TGridResult *fGridResult; | TGridResult *fGridResult; | |||
inline virtual void InvalidateSearchId(); | inline virtual void InvalidateSearchId(); | |||
inline virtual void InvalidateGridResult(); | inline virtual void InvalidateGridResult(); | |||
public: | public: | |||
TAliEnFind(const TString &basePath = "", const TString &fileName = "" , | TAliEnFind(const TString &basePath = "", const TString &fileName = "" , | |||
const TString &anchor = "", const Bool_t archSubst = kFALSE, | const TString &anchor = "", const Bool_t archSubst = kFALSE, | |||
const TString &treeName = "", const TString ®exp = ""); | const TString &treeName = "", const TString ®exp = "", | |||
const TString &query = ""); | ||||
TAliEnFind(const TAliEnFind &src); | TAliEnFind(const TAliEnFind &src); | |||
TAliEnFind &operator=(const TAliEnFind &rhs); | TAliEnFind &operator=(const TAliEnFind &rhs); | |||
virtual ~TAliEnFind(); | virtual ~TAliEnFind(); | |||
virtual TGridResult *GetGridResult(Bool_t forceNewQuery = kFALSE ); | virtual TGridResult *GetGridResult(Bool_t forceNewQuery = kFALSE ); | |||
virtual const TString &GetBasePath() const { return fBasePath; }; | virtual const TString &GetBasePath() const { return fBasePath; }; | |||
virtual const TString &GetFileName() const { return fFileName; }; | virtual const TString &GetFileName() const { return fFileName; }; | |||
skipping to change at line 114 | skipping to change at line 116 | |||
Long_t fCacheExpire_s; | Long_t fCacheExpire_s; | |||
Bool_t fReadFromSE; | Bool_t fReadFromSE; | |||
const TUrl *kfNoopRedirUrl; | const TUrl *kfNoopRedirUrl; | |||
const TUrl *kfNoopUnknownUrl; | const TUrl *kfNoopUnknownUrl; | |||
const TUrl *kfNoopNoneUrl; | const TUrl *kfNoopNoneUrl; | |||
static std::vector<Int_t> *ExpandRunSpec(TString &runSpec); | static std::vector<Int_t> *ExpandRunSpec(TString &runSpec); | |||
static Bool_t ParseCustomFindUri(TString &uri, TString &basePath, | static Bool_t ParseCustomFindUri(TString &uri, TString &basePath, | |||
TString &fileName, TString &anchor, TString &treeName, | TString &fileName, TString &anchor, TString &query, TString &treeN ame, | |||
TString ®exp); | TString ®exp); | |||
static Bool_t ParseOfficialDataUri(TString &uri, Bool_t sim, | static Bool_t ParseOfficialDataUri(TString &uri, Bool_t sim, | |||
TString &period, Int_t &year, std::vector<Int_t> *&runList, | TString &period, Int_t &year, std::vector<Int_t> *&runList, | |||
Bool_t &esd, Int_t &aodNum, TString &pass); | Bool_t &esd, Int_t &aodNum, TString &pass); | |||
static TUrl *AliEnWhereIs(TUrl *alienUrl, TString &closeSE, | static TUrl *AliEnWhereIs(TUrl *alienUrl, TString &closeSE, | |||
Bool_t onlyFromCloseSE); | Bool_t onlyFromCloseSE); | |||
virtual void Init(TString cacheDir, TString urlTpl, | virtual void Init(TString cacheDir, TString urlTpl, | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 4 lines changed or added | |||
TEllipse.h | TEllipse.h | |||
---|---|---|---|---|
skipping to change at line 32 | skipping to change at line 32 | |||
#ifndef ROOT_TObject | #ifndef ROOT_TObject | |||
#include "TObject.h" | #include "TObject.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttLine | #ifndef ROOT_TAttLine | |||
#include "TAttLine.h" | #include "TAttLine.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttFill | #ifndef ROOT_TAttFill | |||
#include "TAttFill.h" | #include "TAttFill.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttBBox2D | ||||
#include "TAttBBox2D.h" | ||||
#endif | ||||
#ifndef ROOT_GuiTypes | ||||
#include "GuiTypes.h" | ||||
#endif | ||||
class TPoint; | ||||
class TEllipse : public TObject, public TAttLine, public TAttFill { | class TEllipse : public TObject, public TAttLine, public TAttFill, public T AttBBox2D { | |||
protected: | protected: | |||
Double_t fX1; //X coordinate of centre | Double_t fX1; //X coordinate of centre | |||
Double_t fY1; //Y coordinate of centre | Double_t fY1; //Y coordinate of centre | |||
Double_t fR1; //first radius | Double_t fR1; //first radius | |||
Double_t fR2; //second radius | Double_t fR2; //second radius | |||
Double_t fPhimin; //Minimum angle (degrees) | Double_t fPhimin; //Minimum angle (degrees) | |||
Double_t fPhimax; //Maximum angle (degrees) | Double_t fPhimax; //Maximum angle (degrees) | |||
Double_t fTheta; //Rotation angle (degrees) | Double_t fTheta; //Rotation angle (degrees) | |||
public: | public: | |||
// TEllipse status bits | // TEllipse status bits | |||
enum { | enum { | |||
kNoEdges = BIT(9) // don't draw lines connecting center to edge s | kNoEdges = BIT(9) // don't draw lines connecting center to edge s | |||
}; | }; | |||
TEllipse(); | TEllipse(); | |||
TEllipse(Double_t x1, Double_t y1,Double_t r1,Double_t r2=0,Double_t phi min=0, Double_t phimax=360,Double_t theta=0); | TEllipse(Double_t x1, Double_t y1,Double_t r1,Double_t r2=0,Double_t phi min=0, Double_t phimax=360,Double_t theta=0); | |||
TEllipse(const TEllipse &ellipse); | TEllipse(const TEllipse &ellipse); | |||
virtual ~TEllipse(); | virtual ~TEllipse(); | |||
void Copy(TObject &ellipse) const; | void Copy(TObject &ellipse) const; | |||
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | |||
virtual void Draw(Option_t *option=""); | virtual void Draw(Option_t *option=""); | |||
virtual void DrawEllipse(Double_t x1, Double_t y1, Double_t r1,Double_ | virtual void DrawEllipse(Double_t x1, Double_t y1, Double_t r1,D | |||
t r2,Double_t phimin, Double_t phimax,Double_t theta,Option_t *option=""); | ouble_t r2,Double_t phimin, Double_t phimax,Double_t theta,Option_t *option | |||
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); | =""); | |||
Double_t GetX1() const {return fX1;} | virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); | |||
Double_t GetY1() const {return fY1;} | Double_t GetX1() const {return fX1;} | |||
Double_t GetR1() const {return fR1;} | Double_t GetY1() const {return fY1;} | |||
Double_t GetR2() const {return fR2;} | Double_t GetR1() const {return fR1;} | |||
Double_t GetPhimin() const {return fPhimin;} | Double_t GetR2() const {return fR2;} | |||
Double_t GetPhimax() const {return fPhimax;} | Double_t GetPhimin() const {return fPhimin;} | |||
Double_t GetTheta() const {return fTheta;} | Double_t GetPhimax() const {return fPhimax;} | |||
Bool_t GetNoEdges() const; | Double_t GetTheta() const {return fTheta;} | |||
virtual void ls(Option_t *option="") const; | Bool_t GetNoEdges() const; | |||
virtual void Paint(Option_t *option=""); | virtual void ls(Option_t *option="") const; | |||
virtual void PaintEllipse(Double_t x1, Double_t y1, Double_t r1,Double | virtual void Paint(Option_t *option=""); | |||
_t r2,Double_t phimin, Double_t phimax,Double_t theta,Option_t *option=""); | virtual void PaintEllipse(Double_t x1, Double_t y1, Double_t r1, | |||
virtual void Print(Option_t *option="") const; | Double_t r2,Double_t phimin, Double_t phimax,Double_t theta,Option_t *optio | |||
virtual void SavePrimitive(ostream &out, Option_t *option = ""); | n=""); | |||
virtual void SetNoEdges(Bool_t noEdges=kTRUE); // *TOGGLE* *GETTER=Get | virtual void Print(Option_t *option="") const; | |||
NoEdges | virtual void SavePrimitive(ostream &out, Option_t *option = ""); | |||
virtual void SetPhimin(Double_t phi=0) {fPhimin=phi;} // *MENU* | virtual void SetNoEdges(Bool_t noEdges=kTRUE); // *TOGGLE* *GETT | |||
virtual void SetPhimax(Double_t phi=360) {fPhimax=phi;} // *MENU* | ER=GetNoEdges | |||
virtual void SetR1(Double_t r1) {fR1=r1;} // *MENU* | virtual void SetPhimin(Double_t phi=0) {fPhimin=phi;} // *MENU | |||
virtual void SetR2(Double_t r2) {fR2=r2;} // *MENU* | * | |||
virtual void SetTheta(Double_t theta=0) {fTheta=theta;} // *MENU* | virtual void SetPhimax(Double_t phi=360) {fPhimax=phi;} // *MENU | |||
virtual void SetX1(Double_t x1) {fX1=x1;} // *MENU* | * | |||
virtual void SetY1(Double_t y1) {fY1=y1;} // *MENU* | virtual void SetR1(Double_t r1) {fR1=r1;} // *MENU* | |||
virtual void SetR2(Double_t r2) {fR2=r2;} // *MENU* | ||||
virtual void SetTheta(Double_t theta=0) {fTheta=theta;} // *MENU | ||||
* | ||||
virtual void SetX1(Double_t x1) {fX1=x1;} // *MENU* | ||||
virtual void SetY1(Double_t y1) {fY1=y1;} // *MENU* | ||||
virtual Rectangle_t GetBBox(); | ||||
virtual TPoint GetBBoxCenter(); | ||||
virtual void SetBBoxCenter(const TPoint &p); | ||||
virtual void SetBBoxCenterX(const Int_t x); | ||||
virtual void SetBBoxCenterY(const Int_t y); | ||||
virtual void SetBBoxX1(const Int_t x); | ||||
virtual void SetBBoxX2(const Int_t x); | ||||
virtual void SetBBoxY1(const Int_t y); | ||||
virtual void SetBBoxY2(const Int_t y); | ||||
ClassDef(TEllipse,2) //An ellipse | ClassDef(TEllipse,3) //An ellipse | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 4 change blocks. | ||||
30 lines changed or deleted | 52 lines changed or added | |||
TFilePrefetch.h | TFilePrefetch.h | |||
---|---|---|---|---|
skipping to change at line 107 | skipping to change at line 107 | |||
void AddReadBlock(TFPBlock*); | void AddReadBlock(TFPBlock*); | |||
Bool_t ReadBuffer(char*, Long64_t, Int_t); | Bool_t ReadBuffer(char*, Long64_t, Int_t); | |||
void ReadBlock(Long64_t*, Int_t*, Int_t); | void ReadBlock(Long64_t*, Int_t*, Int_t); | |||
TFPBlock *CreateBlockObj(Long64_t*, Int_t*, Int_t); | TFPBlock *CreateBlockObj(Long64_t*, Int_t*, Int_t); | |||
TThread *GetThread() const; | TThread *GetThread() const; | |||
Int_t ThreadStart(); | Int_t ThreadStart(); | |||
Bool_t SetCache(const char*); | Bool_t SetCache(const char*); | |||
Bool_t CheckCachePath(const char*); | ||||
Bool_t CheckBlockInCache(char*&, TFPBlock*); | Bool_t CheckBlockInCache(char*&, TFPBlock*); | |||
char *GetBlockFromCache(const char*, Int_t); | char *GetBlockFromCache(const char*, Int_t); | |||
void SaveBlockInCache(TFPBlock*); | void SaveBlockInCache(TFPBlock*); | |||
Int_t SumHex(const char*); | Int_t SumHex(const char*); | |||
Bool_t BinarySearchReadList(TFPBlock*, Long64_t, Int_t, Int_t*); | Bool_t BinarySearchReadList(TFPBlock*, Long64_t, Int_t, Int_t*); | |||
Long64_t GetWaitTime(); | Long64_t GetWaitTime(); | |||
void SetFile(TFile*); | void SetFile(TFile*); | |||
TCondition* GetCondNewBlock() const { return fNewBlockAdded; }; | TCondition* GetCondNewBlock() const { return fNewBlockAdded; }; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 0 lines changed or added | |||
TFoam.h | TFoam.h | |||
---|---|---|---|---|
skipping to change at line 121 | skipping to change at line 121 | |||
virtual Double_t GetMCwt(); // Provides generates MC weigh t | virtual Double_t GetMCwt(); // Provides generates MC weigh t | |||
virtual Double_t MCgenerate(Double_t *MCvect);// All three above functio n in one | virtual Double_t MCgenerate(Double_t *MCvect);// All three above functio n in one | |||
// Finalization | // Finalization | |||
virtual void GetIntegMC(Double_t&, Double_t&);// Provides Integrand and abs. error from MC run | virtual void GetIntegMC(Double_t&, Double_t&);// Provides Integrand and abs. error from MC run | |||
virtual void GetIntNorm(Double_t&, Double_t&);// Provides normalization Inegrand | virtual void GetIntNorm(Double_t&, Double_t&);// Provides normalization Inegrand | |||
virtual void GetWtParams(Double_t, Double_t&, Double_t&, Double_t&);// P rovides MC weight parameters | virtual void GetWtParams(Double_t, Double_t&, Double_t&, Double_t&);// P rovides MC weight parameters | |||
virtual void Finalize( Double_t&, Double_t&); // Prints summary of MC integration | virtual void Finalize( Double_t&, Double_t&); // Prints summary of MC integration | |||
virtual TFoamIntegrand *GetRho(){return fRho;} // Gets pointer of the d istribut. (after restoring from disk) | virtual TFoamIntegrand *GetRho(){return fRho;} // Gets pointer of the d istribut. (after restoring from disk) | |||
virtual TRandom *GetPseRan() const {return fPseRan;} // Gets pointer o f r.n. generator (after restoring from disk) | virtual TRandom *GetPseRan() const {return fPseRan;} // Gets pointer o f r.n. generator (after restoring from disk) | |||
virtual void SetRhoInt(void *Rho); // Set new integrand dis tr. in interactive mode | virtual void SetRhoInt(void *Rho); // Set new integrand dis tr. in interactive mode | |||
virtual void SetRhoInt(Double_t (*fun)(Int_t, Double_t *)); // Set ne w integrand distr. in compiled mode | ||||
virtual void SetRho(TFoamIntegrand *Rho); // Set new integrand dis tr. in compiled mode | virtual void SetRho(TFoamIntegrand *Rho); // Set new integrand dis tr. in compiled mode | |||
virtual void ResetRho(TFoamIntegrand *Rho); // Set new di stribution, delete old | virtual void ResetRho(TFoamIntegrand *Rho); // Set new di stribution, delete old | |||
virtual void SetPseRan(TRandom *PseRan){fPseRan=PseRan;} // Set new r. n. generator | virtual void SetPseRan(TRandom *PseRan){fPseRan=PseRan;} // Set new r. n. generator | |||
virtual void ResetPseRan(TRandom *PseRan); // Set new r. n.g, delete old | virtual void ResetPseRan(TRandom *PseRan); // Set new r. n.g, delete old | |||
// Getters and Setters | // Getters and Setters | |||
virtual void SetkDim(Int_t kDim){fDim = kDim;} // Sets dimens ion of cubical space | virtual void SetkDim(Int_t kDim){fDim = kDim;} // Sets dimens ion of cubical space | |||
virtual void SetnCells(Long_t nCells){fNCells =nCells;} // Sets maximum number of cells | virtual void SetnCells(Long_t nCells){fNCells =nCells;} // Sets maximum number of cells | |||
virtual void SetnSampl(Long_t nSampl){fNSampl =nSampl;} // Sets no of M C events in cell exploration | virtual void SetnSampl(Long_t nSampl){fNSampl =nSampl;} // Sets no of M C events in cell exploration | |||
virtual void SetnBin(Int_t nBin){fNBin = nBin;} // Sets no of b ins in histogs in cell exploration | virtual void SetnBin(Int_t nBin){fNBin = nBin;} // Sets no of b ins in histogs in cell exploration | |||
virtual void SetChat(Int_t Chat){fChat = Chat;} // Sets option Chat, chat level | virtual void SetChat(Int_t Chat){fChat = Chat;} // Sets option Chat, chat level | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
TGColorDialog.h | TGColorDialog.h | |||
---|---|---|---|---|
skipping to change at line 44 | skipping to change at line 44 | |||
// It uses 2 TGColorPalette's and the TGColorPick widgets. // | // It uses 2 TGColorPalette's and the TGColorPick widgets. // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TGFrame | #ifndef ROOT_TGFrame | |||
#include "TGFrame.h" | #include "TGFrame.h" | |||
#endif | #endif | |||
#ifndef ROOT_TGWidget | #ifndef ROOT_TGWidget | |||
#include "TGWidget.h" | #include "TGWidget.h" | |||
#endif | #endif | |||
#include "TColor.h" | ||||
class TGTextEntry; | class TGTextEntry; | |||
class TGTextBuffer; | class TGTextBuffer; | |||
class TGTab; | class TGTab; | |||
class TRootEmbeddedCanvas; | class TRootEmbeddedCanvas; | |||
class TColorWheel; | class TColorWheel; | |||
class TGLabel; | class TGLabel; | |||
class TGTextButton; | class TGTextButton; | |||
//---------------------------------------------------------------------- | //---------------------------------------------------------------------- | |||
skipping to change at line 171 | skipping to change at line 172 | |||
private: | private: | |||
TGColorDialog(const TGColorDialog&); // Not implemented | TGColorDialog(const TGColorDialog&); // Not implemented | |||
TGColorDialog& operator=(const TGColorDialog&); // Not implemented | TGColorDialog& operator=(const TGColorDialog&); // Not implemented | |||
protected: | protected: | |||
Pixel_t fCurrentColor; // currently selected color | Pixel_t fCurrentColor; // currently selected color | |||
Pixel_t fInitColor; // initially set color | Pixel_t fInitColor; // initially set color | |||
Int_t *fRetc; // return code (kMBOk, kMBCancel) | Int_t *fRetc; // return code (kMBOk, kMBCancel) | |||
Pixel_t *fRetColor; // return color | Pixel_t *fRetColor; // return color | |||
TColor *fRetTColor; // return TColor, needed for changed al pha | ||||
TGColorPalette *fPalette; // color palette | TGColorPalette *fPalette; // color palette | |||
TGColorPalette *fCpalette; // color palette | TGColorPalette *fCpalette; // color palette | |||
TGColorPick *fColors; // color pick widget | TGColorPick *fColors; // color pick widget | |||
TGFrame *fSample; // color sample frame | TGFrame *fSample; // color sample frame | |||
TGFrame *fSampleOld; // color sample frame | TGFrame *fSampleOld; // color sample frame | |||
TGTextEntry *fRte, *fGte, *fBte, *fHte, *fLte, *fSte; // RGB/HLS text | TGTextEntry *fRte, *fGte, *fBte, *fHte, *fLte, *fSte, *fAle; // RGB/H | |||
entries | LS text entries | |||
TGTextBuffer *fRtb, *fGtb, *fBtb, *fHtb, *fLtb, *fStb; // RGB/HLS asso | TGTextBuffer *fRtb, *fGtb, *fBtb, *fHtb, *fLtb, *fStb, *fAlb; // RGB/H | |||
ciated buffers | LS associated buffers | |||
Bool_t fWaitFor; // call WaitFor method in constructor | Bool_t fWaitFor; // call WaitFor method in constructor | |||
TGTab *fTab; //tab widget holding the color selecto rs | TGTab *fTab; //tab widget holding the color selecto rs | |||
TRootEmbeddedCanvas *fEcanvas; //embedded canvas holding the color wh eel | TRootEmbeddedCanvas *fEcanvas; //embedded canvas holding the color wh eel | |||
TColorWheel *fColorWheel; //color wheel | TColorWheel *fColorWheel; //color wheel | |||
TGLabel *fColorInfo; //color info | TGLabel *fColorInfo; //color info | |||
TGTextButton *fPreview; //preview button; | TGTextButton *fPreview; //preview button; | |||
void UpdateRGBentries(Pixel_t *c); | void UpdateRGBentries(Pixel_t *c); | |||
void UpdateHLSentries(Pixel_t *c); | void UpdateHLSentries(Pixel_t *c); | |||
void UpdateAlpha(Pixel_t *c); | ||||
virtual void CloseWindow(); | virtual void CloseWindow(); | |||
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | |||
public: | public: | |||
TGColorDialog(const TGWindow *p = 0, const TGWindow *m = 0, Int_t *retc = 0, | TGColorDialog(const TGWindow *p = 0, const TGWindow *m = 0, Int_t *retc = 0, | |||
Pixel_t *color = 0, Bool_t wait = kTRUE); | Pixel_t *color = 0, Bool_t wait = kTRUE); | |||
virtual ~TGColorDialog(); | virtual ~TGColorDialog(); | |||
TGColorPalette *GetPalette() const { return fPalette; } | TGColorPalette *GetPalette() const { return fPalette; } | |||
TGColorPalette *GetCustomPalette() const { return fCpalette; } | TGColorPalette *GetCustomPalette() const { return fCpalette; } | |||
virtual void ColorSelected(Pixel_t); //*SIGNAL* | virtual void ColorSelected(Pixel_t); //*SIGNAL* | |||
virtual void AlphaColorSelected(ULong_t); //*SIGNAL* | ||||
void DoPreview(); | void DoPreview(); | |||
virtual void SetCurrentColor(Pixel_t col); | virtual void SetCurrentColor(Pixel_t col); | |||
void SetColorInfo(Int_t event, Int_t px, Int_t py, TObject *sele cted); | void SetColorInfo(Int_t event, Int_t px, Int_t py, TObject *sele cted); | |||
ClassDef(TGColorDialog,0) // Color selection dialog | ClassDef(TGColorDialog,0) // Color selection dialog | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
4 lines changed or deleted | 8 lines changed or added | |||
TGColorSelect.h | TGColorSelect.h | |||
---|---|---|---|---|
skipping to change at line 123 | skipping to change at line 123 | |||
public: | public: | |||
TGColorPopup(const TGWindow *p = 0, const TGWindow *m = 0, Pixel_t color = 0); | TGColorPopup(const TGWindow *p = 0, const TGWindow *m = 0, Pixel_t color = 0); | |||
virtual ~TGColorPopup(); | virtual ~TGColorPopup(); | |||
virtual Bool_t HandleButton(Event_t *event); | virtual Bool_t HandleButton(Event_t *event); | |||
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | |||
void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h); | void PlacePopup(Int_t x, Int_t y, UInt_t w, UInt_t h); | |||
void EndPopup(); | void EndPopup(); | |||
void PreviewColor(Pixel_t color); | void PreviewColor(Pixel_t color); | |||
void PreviewAlphaColor(ULong_t color); | ||||
ClassDef(TGColorPopup,0) // Color selector popup | ClassDef(TGColorPopup,0) // Color selector popup | |||
}; | }; | |||
//---------------------------------------------------------------------- | //---------------------------------------------------------------------- | |||
class TGColorSelect : public TGCheckButton { | class TGColorSelect : public TGCheckButton { | |||
protected: | protected: | |||
Pixel_t fColor; // color value of the button | Pixel_t fColor; // color value of the button | |||
skipping to change at line 154 | skipping to change at line 155 | |||
public: | public: | |||
TGColorSelect(const TGWindow *p = 0, Pixel_t color = 0, | TGColorSelect(const TGWindow *p = 0, Pixel_t color = 0, | |||
Int_t id = -1); | Int_t id = -1); | |||
virtual ~TGColorSelect(); | virtual ~TGColorSelect(); | |||
virtual Bool_t HandleButton(Event_t *event); | virtual Bool_t HandleButton(Event_t *event); | |||
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | |||
void SetColor(Pixel_t color, Bool_t emit = kTRUE); | void SetColor(Pixel_t color, Bool_t emit = kTRUE); | |||
void SetAlphaColor(ULong_t color, Bool_t emit = kTRUE); | ||||
Pixel_t GetColor() const { return fColor; } | Pixel_t GetColor() const { return fColor; } | |||
void Enable(Bool_t on = kTRUE); //*TOGGLE* *GETTER=IsEnabled | void Enable(Bool_t on = kTRUE); //*TOGGLE* *GETTER=IsEnabled | |||
void Disable(); | void Disable(); | |||
// dummy methods just to remove from context menu | // dummy methods just to remove from context menu | |||
void SetDown(Bool_t on = kTRUE, Bool_t emit = kFALSE) { TGButton::SetDow n(on, emit); } | void SetDown(Bool_t on = kTRUE, Bool_t emit = kFALSE) { TGButton::SetDow n(on, emit); } | |||
void Rename(const char *title) { TGTextButton::SetTitle(title); } | void Rename(const char *title) { TGTextButton::SetTitle(title); } | |||
void SetEnabled(Bool_t e = kTRUE) {TGButton::SetEnabled(e); } | void SetEnabled(Bool_t e = kTRUE) {TGButton::SetEnabled(e); } | |||
virtual TGDimension GetDefaultSize() const { return TGDimension(43, 21); } | virtual TGDimension GetDefaultSize() const { return TGDimension(43, 21); } | |||
virtual void SavePrimitive(ostream &out, Option_t * = ""); | virtual void SavePrimitive(std::ostream &out, Option_t * = ""); | |||
virtual void ColorSelected(Pixel_t color = 0) | virtual void ColorSelected(Pixel_t color = 0) | |||
{ Emit("ColorSelected(Pixel_t)", color ? color : GetColor()); } //*SIGNAL* | { Emit("ColorSelected(Pixel_t)", color ? color : GetColor()); } //*SIGNAL* | |||
virtual void AlphaColorSelected(ULong_t colptr = 0) | ||||
{ Emit("AlphaColorSelected(ULong_t)", colptr); } //*SIGNAL* | ||||
ClassDef(TGColorSelect,0) // Color selection checkbutton | ClassDef(TGColorSelect,0) // Color selection checkbutton | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 4 change blocks. | ||||
1 lines changed or deleted | 5 lines changed or added | |||
TGLPadPainter.h | TGLPadPainter.h | |||
---|---|---|---|---|
skipping to change at line 30 | skipping to change at line 30 | |||
#ifndef ROOT_TGLFontmanager | #ifndef ROOT_TGLFontmanager | |||
#include "TGLFontManager.h" | #include "TGLFontManager.h" | |||
#endif | #endif | |||
#ifndef ROOT_TGLPadUtils | #ifndef ROOT_TGLPadUtils | |||
#include "TGLPadUtils.h" | #include "TGLPadUtils.h" | |||
#endif | #endif | |||
#ifndef ROOT_TPoint | #ifndef ROOT_TPoint | |||
#include "TPoint.h" | #include "TPoint.h" | |||
#endif | #endif | |||
class TLinearGradient; | ||||
class TRadialGradient; | ||||
/* | /* | |||
The _main_ purpose of TGLPadPainter is to enable 2d gl raphics | The _main_ purpose of TGLPadPainter is to enable 2d gl raphics | |||
inside standard TPad/TCanvas. | inside standard TPad/TCanvas. | |||
*/ | */ | |||
class TGLPadPainter : public TVirtualPadPainter { | class TGLPadPainter : public TVirtualPadPainter { | |||
private: | private: | |||
Rgl::Pad::PolygonStippleSet fSSet; | Rgl::Pad::PolygonStippleSet fSSet; | |||
Rgl::Pad::Tesselator fTess; | Rgl::Pad::Tesselator fTess; | |||
Rgl::Pad::MarkerPainter fMarker; | Rgl::Pad::MarkerPainter fMarker; | |||
Rgl::Pad::GLLimits fLimits; | Rgl::Pad::GLLimits fLimits; | |||
skipping to change at line 98 | skipping to change at line 100 | |||
void SetTextSize(Float_t tsize); | void SetTextSize(Float_t tsize); | |||
void SetTextSizePixels(Int_t npixels); | void SetTextSizePixels(Int_t npixels); | |||
//2. "Off-screen management" part. | //2. "Off-screen management" part. | |||
Int_t CreateDrawable(UInt_t w, UInt_t h); | Int_t CreateDrawable(UInt_t w, UInt_t h); | |||
void ClearDrawable(); | void ClearDrawable(); | |||
void CopyDrawable(Int_t id, Int_t px, Int_t py); | void CopyDrawable(Int_t id, Int_t px, Int_t py); | |||
void DestroyDrawable(); | void DestroyDrawable(); | |||
void SelectDrawable(Int_t device); | void SelectDrawable(Int_t device); | |||
//TASImage support. | ||||
void DrawPixels(const unsigned char *pixelData, UInt_t width, UInt_t | ||||
height, | ||||
Int_t dstX, Int_t dstY, Bool_t enableBlending); | ||||
void InitPainter(); | void InitPainter(); | |||
void InvalidateCS(); | void InvalidateCS(); | |||
void LockPainter(); | void LockPainter(); | |||
void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2); | void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2); | |||
void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) ; | void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t v2) ; | |||
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBo xMode mode); | void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2, EBo xMode mode); | |||
//TPad needs double and float versions. | //TPad needs double and float versions. | |||
void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y); | void DrawFillArea(Int_t n, const Double_t *x, const Double_t *y); | |||
skipping to change at line 131 | skipping to change at line 129 | |||
void DrawPolyMarker(Int_t n, const Float_t *x, const Float_t *y); | void DrawPolyMarker(Int_t n, const Float_t *x, const Float_t *y); | |||
void DrawText(Double_t x, Double_t y, const char *text, ETextMode mo de); | void DrawText(Double_t x, Double_t y, const char *text, ETextMode mo de); | |||
void DrawText(Double_t, Double_t, const wchar_t *, ETextMode); | void DrawText(Double_t, Double_t, const wchar_t *, ETextMode); | |||
void DrawTextNDC(Double_t x, Double_t y, const char *text, ETextMode mode); | void DrawTextNDC(Double_t x, Double_t y, const char *text, ETextMode mode); | |||
void DrawTextNDC(Double_t, Double_t, const wchar_t *, ETextMode); | void DrawTextNDC(Double_t, Double_t, const wchar_t *, ETextMode); | |||
//jpg, png, gif and bmp output. | //jpg, png, gif and bmp output. | |||
void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) c onst; | void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) c onst; | |||
//TASImage support. | ||||
void DrawPixels(const unsigned char *pixelData, UInt_t width, UInt_t | ||||
height, | ||||
Int_t dstX, Int_t dstY, Bool_t enableBlending); | ||||
private: | private: | |||
//Attention! GL_PROJECTION will become | //Attention! GL_PROJECTION will become | |||
//the current matrix after these calls. | //the current matrix after these calls. | |||
void SaveProjectionMatrix()const; | void SaveProjectionMatrix()const; | |||
void RestoreProjectionMatrix()const; | void RestoreProjectionMatrix()const; | |||
//Attention! GL_MODELVIEW will become the | //Attention! GL_MODELVIEW will become the | |||
//current matrix after these calls. | //current matrix after these calls. | |||
void SaveModelviewMatrix()const; | void SaveModelviewMatrix()const; | |||
void RestoreModelviewMatrix()const; | void RestoreModelviewMatrix()const; | |||
void SaveViewport(); | void SaveViewport(); | |||
void RestoreViewport(); | void RestoreViewport(); | |||
void DrawPolyMarker(); | void DrawPolyMarker(); | |||
//Aux. functions for a gradient and solid fill: | ||||
void DrawPolygonWithGradient(Int_t n, const Double_t *x, const Double_t | ||||
*y); | ||||
// | ||||
void DrawGradient(const TLinearGradient *gradient, Int_t n, const Double | ||||
_t *x, const Double_t *y); | ||||
void DrawGradient(const TRadialGradient *gradient, Int_t n, const Double | ||||
_t *x, const Double_t *y); | ||||
// | ||||
void DrawTesselation(Int_t n, const Double_t *x, const Double_t *y); | ||||
TGLPadPainter(const TGLPadPainter &rhs); | TGLPadPainter(const TGLPadPainter &rhs); | |||
TGLPadPainter & operator = (const TGLPadPainter &rhs); | TGLPadPainter & operator = (const TGLPadPainter &rhs); | |||
ClassDef(TGLPadPainter, 0) | ClassDef(TGLPadPainter, 0) | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 4 change blocks. | ||||
5 lines changed or deleted | 18 lines changed or added | |||
TGLPadUtils.h | TGLPadUtils.h | |||
---|---|---|---|---|
skipping to change at line 220 | skipping to change at line 220 | |||
public: | public: | |||
GLLimits(); | GLLimits(); | |||
Double_t GetMaxLineWidth()const; | Double_t GetMaxLineWidth()const; | |||
Double_t GetMaxPointSize()const; | Double_t GetMaxPointSize()const; | |||
private: | private: | |||
mutable Double_t fMaxLineWidth; | mutable Double_t fMaxLineWidth; | |||
mutable Double_t fMaxPointSize; | mutable Double_t fMaxPointSize; | |||
}; | }; | |||
//We have a lot of Rect_t/Point_t/TGLRect/TGLBoundingBox blah-blah-blah. | ||||
//What we do not have is a rectangle with floating point types. | ||||
template<class ValueType> | ||||
struct BoundingRect { | ||||
BoundingRect() : fXMin(), fYMin(), | ||||
fWidth(), fHeight(), | ||||
fXMax(), fYMax() | ||||
{ | ||||
} | ||||
ValueType fXMin; | ||||
ValueType fYMin; | ||||
ValueType fWidth; | ||||
ValueType fHeight; | ||||
//Sometimes it's more convenient: | ||||
ValueType fXMax; | ||||
ValueType fYMax; | ||||
}; | ||||
//It's explicitly instantiated for signed integer/fp types (in *.cxx). | ||||
template<class ValueType> | ||||
BoundingRect<ValueType> FindBoundingRect(Int_t nPoints, const ValueType *xs | ||||
, const ValueType *ys); | ||||
}//namespace Pad | }//namespace Pad | |||
}//namespace Rgl | }//namespace Rgl | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 25 lines changed or added | |||
TGLUtil.h | TGLUtil.h | |||
---|---|---|---|---|
skipping to change at line 1218 | skipping to change at line 1218 | |||
void DrawBoxFront(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMa x, | void DrawBoxFront(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMa x, | |||
Double_t zMin, Double_t zMax, Int_t fp); | Double_t zMin, Double_t zMax, Int_t fp); | |||
void DrawTransparentBox(Double_t xMin, Double_t xMax, Double_t yMin, Double _t yMax, | void DrawTransparentBox(Double_t xMin, Double_t xMax, Double_t yMin, Double _t yMax, | |||
Double_t zMin, Double_t zMax, Int_t fp); | Double_t zMin, Double_t zMax, Int_t fp); | |||
void DrawBoxFrontTextured(Double_t xMin, Double_t xMax, Double_t yMin, | void DrawBoxFrontTextured(Double_t xMin, Double_t xMax, Double_t yMin, | |||
Double_t yMax, Double_t zMin, Double_t zMax, | Double_t yMax, Double_t zMin, Double_t zMax, | |||
Double_t tMin, Double_t tMax, Int_t front); | Double_t tMin, Double_t tMax, Int_t front); | |||
void DrawBoxWithGradientFill(Double_t y1, Double_t y2, Double_t x1, Double_ | ||||
t x2, | ||||
const Double_t *rgba1, const Double_t *rgba2); | ||||
void DrawQuadStripWithRadialGradientFill(unsigned nPoints, const Double_t * | ||||
inner, | ||||
const Double_t *innerRGBA, const Do | ||||
uble_t *outer, | ||||
const Double_t *outerRGBA); | ||||
#ifndef __CINT__ | #ifndef __CINT__ | |||
void DrawTrapezoidTextured(const Double_t ver[][2], Double_t zMin, Double_t zMax, | void DrawTrapezoidTextured(const Double_t ver[][2], Double_t zMin, Double_t zMax, | |||
Double_t tMin, Double_t tMax); | Double_t tMin, Double_t tMax); | |||
void DrawTrapezoidTextured(const Double_t ver[][3], Double_t texMin, Double _t texMax); | void DrawTrapezoidTextured(const Double_t ver[][3], Double_t texMin, Double _t texMax); | |||
void DrawTrapezoidTextured2(const Double_t ver[][2], Double_t zMin, Double_ t zMax, | void DrawTrapezoidTextured2(const Double_t ver[][2], Double_t zMin, Double_ t zMax, | |||
Double_t tMin, Double_t tMax); | Double_t tMin, Double_t tMax); | |||
#endif | #endif | |||
void DrawCylinder(TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double _t yMin, | void DrawCylinder(TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double _t yMin, | |||
Double_t yMax, Double_t zMin, Double_t zMax); | Double_t yMax, Double_t zMin, Double_t zMax); | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 10 lines changed or added | |||
TGListView.h | TGListView.h | |||
---|---|---|---|---|
skipping to change at line 116 | skipping to change at line 116 | |||
virtual void Activate(Bool_t a); | virtual void Activate(Bool_t a); | |||
Bool_t IsActive() const { return fActive; } | Bool_t IsActive() const { return fActive; } | |||
TGString *GetItemName() const { return fItemName; } | TGString *GetItemName() const { return fItemName; } | |||
virtual const char *GetTitle() const { return fItemName->GetString(); } | virtual const char *GetTitle() const { return fItemName->GetString(); } | |||
virtual void SetTitle(const char *text) { *fItemName = text; } | virtual void SetTitle(const char *text) { *fItemName = text; } | |||
void SetItemName(const char *name) { *fItemName = name; } | void SetItemName(const char *name) { *fItemName = name; } | |||
const TGPicture *GetPicture() const { return fCurrent; } | const TGPicture *GetPicture() const { return fCurrent; } | |||
EListViewMode GetViewMode() const { return fViewMode; } | EListViewMode GetViewMode() const { return fViewMode; } | |||
void SetUserData(void *userData) { fUserData = userData; } | void SetUserData(void *userData) { fUserData = userData; } | |||
void *GetUserData() const { return fUserData; } | void *GetUserData() const { return fUserData; } | |||
virtual TGString **GetSubnames() const { return fSubnames; } | ||||
virtual TGString *GetSubname(Int_t idx) const { if (fSubnames) return | ||||
fSubnames[idx]; else return 0; } | ||||
virtual void SetSubnames(const char* n1="",const char* n2="",cons t char* n3="", | virtual void SetSubnames(const char* n1="",const char* n2="",cons t char* n3="", | |||
const char* n4="",const char* n5="",cons t char* n6="", | const char* n4="",const char* n5="",cons t char* n6="", | |||
const char* n7="",const char* n8="",cons t char* n9="", | const char* n7="",const char* n8="",cons t char* n9="", | |||
const char* n10="",const char* n11="",co nst char* n12=""); | const char* n10="",const char* n11="",co nst char* n12=""); | |||
virtual void SetPictures(const TGPicture *bigpic = 0, const TGPic ture *smallpic = 0); | virtual void SetPictures(const TGPicture *bigpic = 0, const TGPic ture *smallpic = 0); | |||
virtual void SetColumns(Int_t *cpos, Int_t *jmode) { fCpos = cpos ; fJmode = jmode; } | virtual void SetColumns(Int_t *cpos, Int_t *jmode) { fCpos = cpos ; fJmode = jmode; } | |||
virtual void SetCheckedEntry(Bool_t check = kTRUE) { fChecked = c heck; } | virtual void SetCheckedEntry(Bool_t check = kTRUE) { fChecked = c heck; } | |||
virtual TGDimension GetDefaultSize() const; | virtual TGDimension GetDefaultSize() const; | |||
virtual Int_t GetSubnameWidth(Int_t idx) const { return fCtw[idx]; } | virtual Int_t GetSubnameWidth(Int_t idx) const { return fCtw[idx]; } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added | |||
TGeoChecker.h | TGeoChecker.h | |||
---|---|---|---|---|
skipping to change at line 84 | skipping to change at line 84 | |||
void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Op tion_t *option=""); | void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Op tion_t *option=""); | |||
void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsampl es, Option_t *option); | void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsampl es, Option_t *option); | |||
Double_t CheckVoxels(TGeoVolume *vol, TGeoVoxelFinder *voxels, D ouble_t *xyz, Int_t npoints); | Double_t CheckVoxels(TGeoVolume *vol, TGeoVoxelFinder *voxels, D ouble_t *xyz, Int_t npoints); | |||
TH2F *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_t themax=180., | TH2F *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_t themax=180., | |||
Int_t nphi=90, Double_t phimin=0., Double_t phi max=360., | Int_t nphi=90, Double_t phimin=0., Double_t phi max=360., | |||
Double_t rmin=0., Double_t rmax=9999999, Option _t *option=""); | Double_t rmin=0., Double_t rmax=9999999, Option _t *option=""); | |||
void PrintOverlaps() const; | void PrintOverlaps() const; | |||
void RandomPoints(TGeoVolume *vol, Int_t npoints, Option_t * option); | void RandomPoints(TGeoVolume *vol, Int_t npoints, Option_t * option); | |||
void RandomRays(Int_t nrays, Double_t startx, Double_t start y, Double_t startz, const char *target_vol=0, Bool_t check_norm=kFALSE); | void RandomRays(Int_t nrays, Double_t startx, Double_t start y, Double_t startz, const char *target_vol=0, Bool_t check_norm=kFALSE); | |||
TGeoOverlap *MakeCheckOverlap(const char *name, TGeoVolume *vol1, TG eoVolume *vol2, TGeoMatrix *mat1, TGeoMatrix *mat2, Bool_t isovlp, Double_t ovlp); | TGeoOverlap *MakeCheckOverlap(const char *name, TGeoVolume *vol1, TG eoVolume *vol2, TGeoMatrix *mat1, TGeoMatrix *mat2, Bool_t isovlp, Double_t ovlp); | |||
void OpProgress(const char *opname, Long64_t current, Long64 _t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE); | void OpProgress(const char *opname, Long64_t current, Long64 _t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE, co nst char *msg=""); | |||
TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t ep sil, const char* g3path); | TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t ep sil, const char* g3path); | |||
void ShapeDistances(TGeoShape *shape, Int_t nsamples, Option _t *option); | void ShapeDistances(TGeoShape *shape, Int_t nsamples, Option _t *option); | |||
void ShapeSafety(TGeoShape *shape, Int_t nsamples, Option_t *option); | void ShapeSafety(TGeoShape *shape, Int_t nsamples, Option_t *option); | |||
void ShapeNormal(TGeoShape *shape, Int_t nsamples, Option_t *option); | void ShapeNormal(TGeoShape *shape, Int_t nsamples, Option_t *option); | |||
Double_t *ShootRay(Double_t *start, Double_t dirx, Double_t diry, Double_t dirz, Double_t *array, Int_t &nelem, Int_t &dim, Double_t *enpoin t=0) const; | Double_t *ShootRay(Double_t *start, Double_t dirx, Double_t diry, Double_t dirz, Double_t *array, Int_t &nelem, Int_t &dim, Double_t *enpoin t=0) const; | |||
void SetSelectedNode(TGeoNode *node) {fSelectedNode=node;} | void SetSelectedNode(TGeoNode *node) {fSelectedNode=node;} | |||
void SetNmeshPoints(Int_t npoints=1000); | void SetNmeshPoints(Int_t npoints=1000); | |||
void Test(Int_t npoints, Option_t *option); | void Test(Int_t npoints, Option_t *option); | |||
void TestOverlaps(const char *path); | void TestOverlaps(const char *path); | |||
Bool_t TestVoxels(TGeoVolume *vol, Int_t npoints=1000000); | Bool_t TestVoxels(TGeoVolume *vol, Int_t npoints=1000000); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TGeoHelix.h | TGeoHelix.h | |||
---|---|---|---|---|
skipping to change at line 49 | skipping to change at line 49 | |||
Double_t fStep; // current step | Double_t fStep; // current step | |||
Double_t fPhi; // phi angle | Double_t fPhi; // phi angle | |||
Double_t fPointInit[3]; // initial point | Double_t fPointInit[3]; // initial point | |||
Double_t fDirInit[3]; // normalized initial direction | Double_t fDirInit[3]; // normalized initial direction | |||
Double_t fPoint[3]; // point after a step | Double_t fPoint[3]; // point after a step | |||
Double_t fDir[3]; // direction after a step | Double_t fDir[3]; // direction after a step | |||
Double_t fB[3]; // normalized direction for magnetic field | Double_t fB[3]; // normalized direction for magnetic field | |||
Int_t fQ; // right/left-handed (+/- 1) - "char ge" | Int_t fQ; // right/left-handed (+/- 1) - "char ge" | |||
TGeoHMatrix *fMatrix; // transformation of local helix fra me to MARS | TGeoHMatrix *fMatrix; // transformation of local helix fra me to MARS | |||
TGeoHelix(const TGeoHelix&); // Not implemented | ||||
TGeoHelix &operator=(const TGeoHelix&); // Not implemented | ||||
public: | public: | |||
enum EGeoHelixTypes { | enum EGeoHelixTypes { | |||
kHelixNeedUpdate = BIT(16), | kHelixNeedUpdate = BIT(16), | |||
kHelixStraigth = BIT(17), | kHelixStraigth = BIT(17), | |||
kHelixCircle = BIT(18) | kHelixCircle = BIT(18) | |||
}; | }; | |||
// constructors | // constructors | |||
TGeoHelix(); | TGeoHelix(); | |||
TGeoHelix(Double_t curvature, Double_t step, Int_t charge=1); | TGeoHelix(Double_t curvature, Double_t step, Int_t charge=1); | |||
// destructor | // destructor | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
TGeoManager.h | TGeoManager.h | |||
---|---|---|---|---|
skipping to change at line 36 | skipping to change at line 36 | |||
class TGeoPNEntry; | class TGeoPNEntry; | |||
class TGeoVolume; | class TGeoVolume; | |||
class TGeoVolumeMulti; | class TGeoVolumeMulti; | |||
class TGeoMatrix; | class TGeoMatrix; | |||
class TGeoHMatrix; | class TGeoHMatrix; | |||
class TGeoMaterial; | class TGeoMaterial; | |||
class TGeoMedium; | class TGeoMedium; | |||
class TGeoShape; | class TGeoShape; | |||
class TVirtualGeoPainter; | class TVirtualGeoPainter; | |||
class THashList; | class THashList; | |||
class TGeoParallelWorld; | ||||
/////////////////////////////////////////////////////////////////////////// / | /////////////////////////////////////////////////////////////////////////// / | |||
// / / | // / / | |||
// TGeoManager - The manager class for any TGeo geometry. Provides user / / | // TGeoManager - The manager class for any TGeo geometry. Provides user / / | |||
// interface for geometry creation, navigation, state querying, / / | // interface for geometry creation, navigation, state querying, / / | |||
// visualization, IO, geometry checking and other utilities. / / | // visualization, IO, geometry checking and other utilities. / / | |||
// / / | // / / | |||
/////////////////////////////////////////////////////////////////////////// / | /////////////////////////////////////////////////////////////////////////// / | |||
class TGeoManager : public TNamed | class TGeoManager : public TNamed | |||
skipping to change at line 74 | skipping to change at line 75 | |||
TString fParticleName; //! particles to be drawn | TString fParticleName; //! particles to be drawn | |||
Double_t fVisDensity; // transparency threshold by de nsity | Double_t fVisDensity; // transparency threshold by de nsity | |||
Int_t fExplodedView; // exploded view mode | Int_t fExplodedView; // exploded view mode | |||
Int_t fVisOption; // global visualization option | Int_t fVisOption; // global visualization option | |||
Int_t fVisLevel; // maximum visualization depth | Int_t fVisLevel; // maximum visualization depth | |||
Int_t fNsegments; // number of segments to approx imate circles | Int_t fNsegments; // number of segments to approx imate circles | |||
Int_t fNtracks; // number of tracks | Int_t fNtracks; // number of tracks | |||
Int_t fMaxVisNodes; // maximum number of visible no des | Int_t fMaxVisNodes; // maximum number of visible no des | |||
TVirtualGeoTrack *fCurrentTrack; //! current track | TVirtualGeoTrack *fCurrentTrack; //! current track | |||
Int_t fNpdg; // number of different pdg's st ored | Int_t fNpdg; // number of different pdg's st ored | |||
Int_t fPdgId[256]; // pdg conversion table | Int_t fPdgId[1024]; // pdg conversion table | |||
Bool_t fClosed; //! flag that geometry is close d | Bool_t fClosed; //! flag that geometry is close d | |||
Bool_t fLoopVolumes; //! flag volume lists loop | Bool_t fLoopVolumes; //! flag volume lists loop | |||
Bool_t fStreamVoxels; // flag to allow voxelization I /O | Bool_t fStreamVoxels; // flag to allow voxelization I /O | |||
Bool_t fIsGeomReading; //! flag set when reading geome try | Bool_t fIsGeomReading; //! flag set when reading geome try | |||
Bool_t fIsGeomCleaning; //! flag to notify that the man ager is being destructed | Bool_t fIsGeomCleaning; //! flag to notify that the man ager is being destructed | |||
Bool_t fPhiCut; // flag for phi cuts | Bool_t fPhiCut; // flag for phi cuts | |||
Bool_t fTimeCut; // time cut for tracks | Bool_t fTimeCut; // time cut for tracks | |||
Bool_t fDrawExtra; //! flag that the list of physi cal nodes has to be drawn | Bool_t fDrawExtra; //! flag that the list of physi cal nodes has to be drawn | |||
Bool_t fMatrixTransform; //! flag for using GL matrix | Bool_t fMatrixTransform; //! flag for using GL matrix | |||
Bool_t fMatrixReflection; //! flag for GL reflections | Bool_t fMatrixReflection; //! flag for GL reflections | |||
skipping to change at line 136 | skipping to change at line 137 | |||
THashList *fHashVolumes; //! hash list of volumes provid ing fast search | THashList *fHashVolumes; //! hash list of volumes provid ing fast search | |||
THashList *fHashGVolumes; //! hash list of group volumes providing fast search | THashList *fHashGVolumes; //! hash list of group volumes providing fast search | |||
THashList *fHashPNE; //-> hash list of phisical node entries | THashList *fHashPNE; //-> hash list of phisical node entries | |||
mutable TObjArray *fArrayPNE; //! array of phisical node entr ies | mutable TObjArray *fArrayPNE; //! array of phisical node entr ies | |||
Int_t fSizePNEId; // size of the array of unique ID's for PN entries | Int_t fSizePNEId; // size of the array of unique ID's for PN entries | |||
Int_t fNPNEId; // number of PN entries having a unique ID | Int_t fNPNEId; // number of PN entries having a unique ID | |||
Int_t *fKeyPNEId; //[fSizePNEId] array of uid val ues for PN entries | Int_t *fKeyPNEId; //[fSizePNEId] array of uid val ues for PN entries | |||
Int_t *fValuePNEId; //[fSizePNEId] array of pointer s to PN entries with ID's | Int_t *fValuePNEId; //[fSizePNEId] array of pointer s to PN entries with ID's | |||
Int_t fMaxThreads; //! Max number of threads | Int_t fMaxThreads; //! Max number of threads | |||
Bool_t fMultiThread; //! Flag for multi-threading | Bool_t fMultiThread; //! Flag for multi-threading | |||
Bool_t fUsePWNav; // Activate usage of parallel w | ||||
orld in navigation | ||||
TGeoParallelWorld *fParallelWorld; // Parallel world | ||||
//--- private methods | //--- private methods | |||
Bool_t IsLoopingVolumes() const {return fLoopVolumes; } | Bool_t IsLoopingVolumes() const {return fLoopVolumes; } | |||
void Init(); | void Init(); | |||
Bool_t InitArrayPNE() const; | Bool_t InitArrayPNE() const; | |||
Bool_t InsertPNEId(Int_t uid, Int_t ientry); | Bool_t InsertPNEId(Int_t uid, Int_t ientry); | |||
void SetLoopVolumes(Bool_t flag=kTRUE) {fLoopVolumes=fl ag;} | void SetLoopVolumes(Bool_t flag=kTRUE) {fLoopVolumes=fl ag;} | |||
void UpdateElements(); | void UpdateElements(); | |||
void Voxelize(Option_t *option = 0); | void Voxelize(Option_t *option = 0); | |||
public: | public: | |||
// constructors | // constructors | |||
skipping to change at line 240 | skipping to change at line 242 | |||
void CheckGeometryFull(Int_t ntracks=1000000, Double_t vx=0., Double_t vy=0., Double_t vz=0., Option_t *option="ob"); // *MENU* | void CheckGeometryFull(Int_t ntracks=1000000, Double_t vx=0., Double_t vy=0., Double_t vz=0., Option_t *option="ob"); // *MENU* | |||
void CheckGeometry(Option_t *option=""); | void CheckGeometry(Option_t *option=""); | |||
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option =""); // *MENU* | void CheckOverlaps(Double_t ovlp=0.1, Option_t *option =""); // *MENU* | |||
void CheckPoint(Double_t x=0,Double_t y=0, Double_t z= 0, Option_t *option=""); // *MENU* | void CheckPoint(Double_t x=0,Double_t y=0, Double_t z= 0, Option_t *option=""); // *MENU* | |||
void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option); | void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option); | |||
void ConvertReflections(); | void ConvertReflections(); | |||
void DrawCurrentPoint(Int_t color=2); // *MENU* | void DrawCurrentPoint(Int_t color=2); // *MENU* | |||
void DrawTracks(Option_t *option=""); // *MENU* | void DrawTracks(Option_t *option=""); // *MENU* | |||
void SetParticleName(const char *pname) {fParticleName =pname;} | void SetParticleName(const char *pname) {fParticleName =pname;} | |||
const char *GetParticleName() const {return fParticleName.Dat a();} | const char *GetParticleName() const {return fParticleName.Dat a();} | |||
void DrawPath(const char *path); | void DrawPath(const char *path, Option_t *option=""); | |||
void PrintOverlaps() const; // *MENU* | void PrintOverlaps() const; // *MENU* | |||
void RandomPoints(const TGeoVolume *vol, Int_t npoints =10000, Option_t *option=""); | void RandomPoints(const TGeoVolume *vol, Int_t npoints =10000, Option_t *option=""); | |||
void RandomRays(Int_t nrays=1000, Double_t startx=0, D ouble_t starty=0, Double_t startz=0, const char *target_vol=0, Bool_t check _norm=kFALSE); | void RandomRays(Int_t nrays=1000, Double_t startx=0, D ouble_t starty=0, Double_t startz=0, const char *target_vol=0, Bool_t check _norm=kFALSE); | |||
TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Doubl e_t epsil=1E-5, | TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Doubl e_t epsil=1E-5, | |||
const char *g3path=""); | const char *g3path=""); | |||
void SetNmeshPoints(Int_t npoints=1000); | void SetNmeshPoints(Int_t npoints=1000); | |||
void SetCheckedNode(TGeoNode *node); | void SetCheckedNode(TGeoNode *node); | |||
void Test(Int_t npoints=1000000, Option_t *option=""); // *MENU* | void Test(Int_t npoints=1000000, Option_t *option=""); // *MENU* | |||
void TestOverlaps(const char* path=""); // *MENU* | void TestOverlaps(const char* path=""); // *MENU* | |||
Double_t Weight(Double_t precision=0.01, Option_t *option= "va"); // *MENU* | Double_t Weight(Double_t precision=0.01, Option_t *option= "va"); // *MENU* | |||
skipping to change at line 543 | skipping to change at line 545 | |||
//--- stack manipulation | //--- stack manipulation | |||
Int_t PushPath(Int_t startlevel=0) {return GetCurrentNa vigator()->PushPath(startlevel);} | Int_t PushPath(Int_t startlevel=0) {return GetCurrentNa vigator()->PushPath(startlevel);} | |||
Bool_t PopPath() {return GetCurrentNavigator()->PopPath( );} | Bool_t PopPath() {return GetCurrentNavigator()->PopPath( );} | |||
Bool_t PopPath(Int_t index) {return GetCurrentNavigator( )->PopPath(index);} | Bool_t PopPath(Int_t index) {return GetCurrentNavigator( )->PopPath(index);} | |||
Int_t PushPoint(Int_t startlevel=0) {return GetCurrentN avigator()->PushPoint(startlevel);} | Int_t PushPoint(Int_t startlevel=0) {return GetCurrentN avigator()->PushPoint(startlevel);} | |||
Bool_t PopPoint() {return GetCurrentNavigator()->PopPoin t();} | Bool_t PopPoint() {return GetCurrentNavigator()->PopPoin t();} | |||
Bool_t PopPoint(Int_t index) {return GetCurrentNavigator ()->PopPoint(index);} | Bool_t PopPoint(Int_t index) {return GetCurrentNavigator ()->PopPoint(index);} | |||
void PopDummy(Int_t ipop=9999) {return GetCurrentNavig ator()->PopDummy(ipop);} | void PopDummy(Int_t ipop=9999) {return GetCurrentNavig ator()->PopDummy(ipop);} | |||
ClassDef(TGeoManager, 12) // geometry manager | //--- parallel world navigation | |||
TGeoParallelWorld *CreateParallelWorld(const char *name); | ||||
TGeoParallelWorld *GetParallelWorld() const {return fParallelWorld;} | ||||
void SetUseParallelWorldNav(Bool_t flag); | ||||
Bool_t IsParallelWorldNav() const {return fUsePWNav;} | ||||
ClassDef(TGeoManager, 14) // geometry manager | ||||
}; | }; | |||
R__EXTERN TGeoManager *gGeoManager; | R__EXTERN TGeoManager *gGeoManager; | |||
#endif | #endif | |||
End of changes. 6 change blocks. | ||||
4 lines changed or deleted | 13 lines changed or added | |||
TGeoNode.h | TGeoNode.h | |||
---|---|---|---|---|
skipping to change at line 68 | skipping to change at line 68 | |||
Int_t fNovlp; // number of overlaps | Int_t fNovlp; // number of overlaps | |||
Int_t *fOverlaps; //[fNovlp] list of indices for overla pping brothers | Int_t *fOverlaps; //[fNovlp] list of indices for overla pping brothers | |||
TGeoExtension *fUserExtension; //! Transient user-defined extension to volumes | TGeoExtension *fUserExtension; //! Transient user-defined extension to volumes | |||
TGeoExtension *fFWExtension; //! Transient framework-defined exten sion to volumes | TGeoExtension *fFWExtension; //! Transient framework-defined exten sion to volumes | |||
TGeoNode(const TGeoNode&); | TGeoNode(const TGeoNode&); | |||
TGeoNode& operator=(const TGeoNode&); | TGeoNode& operator=(const TGeoNode&); | |||
public: | public: | |||
enum { | enum { | |||
kGeoNodeMatrix = BIT(10), | kGeoNodeMatrix = BIT(14), | |||
kGeoNodeOffset = BIT(11), | kGeoNodeOffset = BIT(15), | |||
kGeoNodeVC = BIT(12), | kGeoNodeVC = BIT(16), | |||
kGeoNodeOverlap = BIT(13) | kGeoNodeOverlap = BIT(17), | |||
kGeoNodeCloned = BIT(18) | ||||
}; | }; | |||
// constructors | // constructors | |||
TGeoNode(); | TGeoNode(); | |||
TGeoNode(const TGeoVolume *vol); | TGeoNode(const TGeoVolume *vol); | |||
// destructor | // destructor | |||
virtual ~TGeoNode(); | virtual ~TGeoNode(); | |||
void Browse(TBrowser *b); | void Browse(TBrowser *b); | |||
virtual void cd() const {;} | virtual void cd() const {;} | |||
skipping to change at line 109 | skipping to change at line 110 | |||
TGeoMedium *GetMedium() const {return fVolume->G etMedium();} | TGeoMedium *GetMedium() const {return fVolume->G etMedium();} | |||
TGeoVolume *GetMotherVolume() const {return fMother;} | TGeoVolume *GetMotherVolume() const {return fMother;} | |||
Int_t GetNdaughters() const {return fVolume->GetNdaughters() ;} | Int_t GetNdaughters() const {return fVolume->GetNdaughters() ;} | |||
TObjArray *GetNodes() const {return fVolume->GetNodes();} | TObjArray *GetNodes() const {return fVolume->GetNodes();} | |||
Int_t GetNumber() const {return fNumber;} | Int_t GetNumber() const {return fNumber;} | |||
Int_t *GetOverlaps(Int_t &novlp) const {novlp=fNovlp; return fOverlaps;} | Int_t *GetOverlaps(Int_t &novlp) const {novlp=fNovlp; return fOverlaps;} | |||
TGeoVolume *GetVolume() const {return fVolume;} | TGeoVolume *GetVolume() const {return fVolume;} | |||
virtual char *GetObjectInfo(Int_t px, Int_t py) const; | virtual char *GetObjectInfo(Int_t px, Int_t py) const; | |||
virtual Int_t GetOptimalVoxels() const {return 0;} | virtual Int_t GetOptimalVoxels() const {return 0;} | |||
void InspectNode() const; // *MENU* | void InspectNode() const; // *MENU* | |||
Bool_t IsCloned() const {return TObject::TestBit(kGeoNodeClon ed);} | ||||
virtual Bool_t IsFolder() const {return (GetNdaughters()?kTRUE:kFALSE );} | virtual Bool_t IsFolder() const {return (GetNdaughters()?kTRUE:kFALSE );} | |||
Bool_t IsOffset() const {return TObject::TestBit(kGeoNodeOffs et);} | Bool_t IsOffset() const {return TObject::TestBit(kGeoNodeOffs et);} | |||
Bool_t IsOnScreen() const; // *MENU* | Bool_t IsOnScreen() const; // *MENU* | |||
Bool_t IsOverlapping() const {return TObject::TestBit(kGeoNod eOverlap);} | Bool_t IsOverlapping() const {return TObject::TestBit(kGeoNod eOverlap);} | |||
Bool_t IsVirtual() const {return TObject::TestBit(kGeoNodeVC) ;} | Bool_t IsVirtual() const {return TObject::TestBit(kGeoNodeVC) ;} | |||
Bool_t IsVisible() const {return (TGeoAtt::IsVisible() && fVo lume->IsVisible());} | Bool_t IsVisible() const {return (TGeoAtt::IsVisible() && fVo lume->IsVisible());} | |||
Bool_t IsVisDaughters() const {return (TGeoAtt::IsVisDaughter s() && fVolume->IsVisDaughters());} | Bool_t IsVisDaughters() const {return (TGeoAtt::IsVisDaughter s() && fVolume->IsVisDaughters());} | |||
Bool_t MayOverlap(Int_t iother) const; | Bool_t MayOverlap(Int_t iother) const; | |||
virtual TGeoNode *MakeCopyNode() const {return 0;} | virtual TGeoNode *MakeCopyNode() const {return 0;} | |||
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const; | Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const; | |||
void SaveAttributes(std::ostream &out); | void SaveAttributes(std::ostream &out); | |||
void SetCurrentPoint(Double_t x, Double_t y, Double_t z) {f Volume->SetCurrentPoint(x,y,z);}// *MENU* | void SetCurrentPoint(Double_t x, Double_t y, Double_t z) {f Volume->SetCurrentPoint(x,y,z);}// *MENU* | |||
void SetVolume(TGeoVolume *volume) {fVolume = volume; } | void SetVolume(TGeoVolume *volume) {fVolume = volume; } | |||
void SetNumber(Int_t number) {fNumber=number;} | void SetNumber(Int_t number) {fNumber=number;} | |||
void SetCloned(Bool_t flag=kTRUE) {TObject::SetBit(k GeoNodeCloned, flag);} | ||||
void SetOverlapping(Bool_t flag=kTRUE) {TObject::SetBit(k GeoNodeOverlap, flag);} | void SetOverlapping(Bool_t flag=kTRUE) {TObject::SetBit(k GeoNodeOverlap, flag);} | |||
void SetVirtual() {TObject::SetBit(k GeoNodeVC, kTRUE);} | void SetVirtual() {TObject::SetBit(k GeoNodeVC, kTRUE);} | |||
void SetVisibility(Bool_t vis=kTRUE); // *MENU* | void SetVisibility(Bool_t vis=kTRUE); // *MENU* | |||
void SetInvisible() {SetVisibility(kFA LSE);} // *MENU* | void SetInvisible() {SetVisibility(kFA LSE);} // *MENU* | |||
void SetAllInvisible() {VisibleDaughters( kFALSE);} // *MENU* | void SetAllInvisible() {VisibleDaughters( kFALSE);} // *MENU* | |||
void SetMotherVolume(TGeoVolume *mother) {fMother = mother; } | void SetMotherVolume(TGeoVolume *mother) {fMother = mother; } | |||
void SetOverlaps(Int_t *ovlp, Int_t novlp); | void SetOverlaps(Int_t *ovlp, Int_t novlp); | |||
void SetUserExtension(TGeoExtension *ext); | void SetUserExtension(TGeoExtension *ext); | |||
void SetFWExtension(TGeoExtension *ext); | void SetFWExtension(TGeoExtension *ext); | |||
TGeoExtension *GetUserExtension() const {return fUserExtension;} | TGeoExtension *GetUserExtension() const {return fUserExtension;} | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 7 lines changed or added | |||
TGeoPainter.h | TGeoPainter.h | |||
---|---|---|---|---|
skipping to change at line 109 | skipping to change at line 109 | |||
virtual Int_t CountVisibleNodes(); | virtual Int_t CountVisibleNodes(); | |||
virtual void DefaultAngles(); | virtual void DefaultAngles(); | |||
virtual void DefaultColors(); | virtual void DefaultColors(); | |||
virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int _t py); | virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int _t py); | |||
virtual void Draw(Option_t *option=""); | virtual void Draw(Option_t *option=""); | |||
virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option= ""); | virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option= ""); | |||
virtual void DrawOverlap(void *ovlp, Option_t *option=""); | virtual void DrawOverlap(void *ovlp, Option_t *option=""); | |||
virtual void DrawCurrentPoint(Int_t color); | virtual void DrawCurrentPoint(Int_t color); | |||
virtual void DrawOnly(Option_t *option=""); | virtual void DrawOnly(Option_t *option=""); | |||
virtual void DrawPanel(); | virtual void DrawPanel(); | |||
virtual void DrawPath(const char *path); | virtual void DrawPath(const char *path, Option_t *option=""); | |||
virtual void DrawPolygon(const TGeoPolygon *poly); | virtual void DrawPolygon(const TGeoPolygon *poly); | |||
virtual void DrawShape(TGeoShape *shape, Option_t *option=""); | virtual void DrawShape(TGeoShape *shape, Option_t *option=""); | |||
virtual void DrawVolume(TGeoVolume *vol, Option_t *option=""); | virtual void DrawVolume(TGeoVolume *vol, Option_t *option=""); | |||
virtual void EditGeometry(Option_t *option=""); | virtual void EditGeometry(Option_t *option=""); | |||
virtual void EstimateCameraMove(Double_t tmin, Double_t tmax, Doub le_t *start, Double_t *end); | virtual void EstimateCameraMove(Double_t tmin, Double_t tmax, Doub le_t *start, Double_t *end); | |||
virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, I nt_t px, Int_t py); | virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, I nt_t px, Int_t py); | |||
virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_ t px, Int_t py); | virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_ t px, Int_t py); | |||
virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, I nt_t px, Int_t py); | virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, I nt_t px, Int_t py); | |||
virtual const char*GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int _t py) const; | virtual const char*GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int _t py) const; | |||
virtual void GetBombFactors(Double_t &bombx, Double_t &bomby, Doub le_t &bombz, Double_t &bombr) const | virtual void GetBombFactors(Double_t &bombx, Double_t &bomby, Doub le_t &bombz, Double_t &bombr) const | |||
skipping to change at line 142 | skipping to change at line 142 | |||
virtual Double_t *GetViewBox() {return &fCheckedBox[0];} | virtual Double_t *GetViewBox() {return &fCheckedBox[0];} | |||
virtual void GetViewAngles(Double_t &longitude, Double_t &latitude , Double_t &psi); | virtual void GetViewAngles(Double_t &longitude, Double_t &latitude , Double_t &psi); | |||
virtual Bool_t IsExplodedView() const {return ((fExplodedView==kGeoV isDefault)?kFALSE:kTRUE);} | virtual Bool_t IsExplodedView() const {return ((fExplodedView==kGeoV isDefault)?kFALSE:kTRUE);} | |||
virtual Bool_t IsRaytracing() const {return fIsRaytracing;} | virtual Bool_t IsRaytracing() const {return fIsRaytracing;} | |||
virtual Bool_t IsPaintingShape() const {return fIsPaintingShape;} | virtual Bool_t IsPaintingShape() const {return fIsPaintingShape;} | |||
TH2F *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_ t themax=180., | TH2F *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_ t themax=180., | |||
Int_t nphi=90, Double_t phimin=0., Double_t phi max=360., | Int_t nphi=90, Double_t phimin=0., Double_t phi max=360., | |||
Double_t rmin=0., Double_t rmax=9999999, Option _t *option=""); | Double_t rmin=0., Double_t rmax=9999999, Option _t *option=""); | |||
void Lock(Bool_t flag = kTRUE) {fVisLock = flag;} | void Lock(Bool_t flag = kTRUE) {fVisLock = flag;} | |||
virtual void ModifiedPad(Bool_t update=kFALSE) const; | virtual void ModifiedPad(Bool_t update=kFALSE) const; | |||
virtual void OpProgress(const char *opname, Long64_t current, Long 64_t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE); | virtual void OpProgress(const char *opname, Long64_t current, Long 64_t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE, const char *msg=""); | |||
virtual void Paint(Option_t *option=""); | virtual void Paint(Option_t *option=""); | |||
virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMa trix* global=0); | virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMa trix* global=0); | |||
Bool_t PaintShape(const TGeoShape & shape, Option_t * option ) const; | Bool_t PaintShape(const TGeoShape & shape, Option_t * option ) const; | |||
virtual void PaintShape(TGeoShape *shape, Option_t *option=""); | virtual void PaintShape(TGeoShape *shape, Option_t *option=""); | |||
virtual void PaintOverlap(void *ovlp, Option_t *option=""); | virtual void PaintOverlap(void *ovlp, Option_t *option=""); | |||
virtual void PaintVolume(TGeoVolume *vol, Option_t *option="", TGe oMatrix* global=0); | virtual void PaintVolume(TGeoVolume *vol, Option_t *option="", TGe oMatrix* global=0); | |||
virtual void PrintOverlaps() const; | virtual void PrintOverlaps() const; | |||
void PaintPhysicalNode(TGeoPhysicalNode *node, Option_t *o ption=""); | void PaintPhysicalNode(TGeoPhysicalNode *node, Option_t *o ption=""); | |||
virtual void RandomPoints(const TGeoVolume *vol, Int_t npoints, Op tion_t *option=""); | virtual void RandomPoints(const TGeoVolume *vol, Int_t npoints, Op tion_t *option=""); | |||
virtual void RandomRays(Int_t nrays, Double_t startx, Double_t sta rty, Double_t startz, const char *target_vol=0, Bool_t check_norm=kFALSE); | virtual void RandomRays(Int_t nrays, Double_t startx, Double_t sta rty, Double_t startz, const char *target_vol=0, Bool_t check_norm=kFALSE); | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
TGeoPatternFinder.h | TGeoPatternFinder.h | |||
---|---|---|---|---|
skipping to change at line 499 | skipping to change at line 499 | |||
}; | }; | |||
/////////////////////////////////////////////////////////////////////////// / | /////////////////////////////////////////////////////////////////////////// / | |||
// / / | // / / | |||
// TGeoPatternSphPhi - a spherical phi divison pattern / / | // TGeoPatternSphPhi - a spherical phi divison pattern / / | |||
// / / | // / / | |||
/////////////////////////////////////////////////////////////////////////// / | /////////////////////////////////////////////////////////////////////////// / | |||
class TGeoPatternSphPhi : public TGeoPatternFinder | class TGeoPatternSphPhi : public TGeoPatternFinder | |||
{ | { | |||
//new_code_start | ||||
private: | private: | |||
Double_t *fSinCos; | Double_t *fSinCos; //! Sincos table | |||
//new_code_end | ||||
protected: | ||||
TGeoPatternSphPhi(const TGeoPatternSphPhi& pfc); // Not implemented | ||||
TGeoPatternSphPhi& operator=(const TGeoPatternSphPhi& pfc); // Not imple | ||||
mented | ||||
Double_t *CreateSinCos(); | ||||
public: | public: | |||
TGeoPatternSphPhi(const TGeoPatternSphPhi& pfc) | ||||
: TGeoPatternFinder(pfc), fSinCos(pfc.fSinCos) {CreateThreadData(1);} | ||||
TGeoPatternSphPhi& operator=(const TGeoPatternSphPhi& pfc) | ||||
{if(this!=&pfc) {TGeoPatternFinder::operator=(pfc); fSinCos=pfc.fSinCo | ||||
s; CreateThreadData(1);} | ||||
return *this;} | ||||
// constructors | // constructors | |||
TGeoPatternSphPhi(); | TGeoPatternSphPhi(); | |||
TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions); | TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions); | |||
TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions, Double_t step); | TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions, Double_t step); | |||
TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions, Double_t start, Dou ble_t end); | TGeoPatternSphPhi(TGeoVolume *vol, Int_t ndivisions, Double_t start, Dou ble_t end); | |||
// destructor | // destructor | |||
virtual ~TGeoPatternSphPhi(); | virtual ~TGeoPatternSphPhi(); | |||
// methods | // methods | |||
virtual TGeoMatrix* CreateMatrix() const; | virtual TGeoMatrix* CreateMatrix() const; | |||
virtual void cd(Int_t idiv); | virtual void cd(Int_t idiv); | |||
End of changes. 4 change blocks. | ||||
10 lines changed or deleted | 6 lines changed or added | |||
TGeoPgon.h | TGeoPgon.h | |||
---|---|---|---|---|
skipping to change at line 33 | skipping to change at line 33 | |||
// - the range in phi; / / | // - the range in phi; / / | |||
// - the number of edges on each z plane; / / | // - the number of edges on each z plane; / / | |||
// - the number of z planes (at least two) where the inner/outer // | // - the number of z planes (at least two) where the inner/outer // | |||
// radii are changing; / / | // radii are changing; / / | |||
// - z coordinate, inner and outer radius for each z plane / / | // - z coordinate, inner and outer radius for each z plane / / | |||
// / / | // / / | |||
/////////////////////////////////////////////////////////////////////////// / | /////////////////////////////////////////////////////////////////////////// / | |||
class TGeoPgon : public TGeoPcon | class TGeoPgon : public TGeoPcon | |||
{ | { | |||
public: | ||||
struct ThreadData_t | ||||
{ | ||||
Int_t *fIntBuffer; //![fNedges+4] temporary int buffer array | ||||
Double_t *fDblBuffer; //![fNedges+4] temporary double buffer arra | ||||
y | ||||
ThreadData_t(); | ||||
~ThreadData_t(); | ||||
}; | ||||
ThreadData_t& GetThreadData() const; | ||||
void ClearThreadData() const; | ||||
void CreateThreadData(Int_t nthreads); | ||||
protected: | protected: | |||
// data members | // data members | |||
Int_t fNedges; // number of edges (at least one) | Int_t fNedges; // number of edges (at least one) | |||
mutable Int_t *fIntBuffer; //![fNedges+4] temporary int buffer ar | mutable std::vector<ThreadData_t*> fThreadData; //! Navigation data per | |||
ray | thread | |||
mutable Double_t *fDblBuffer; //![fNedges+4] temporary double buffer | mutable Int_t fThreadSize; //! Size for the navigat | |||
array | ion data array | |||
// internal utility methods | ||||
Int_t GetPhiCrossList(const Double_t *point, const Doubl e_t *dir, Int_t istart, Double_t *sphi, Int_t *iphi, Double_t stepmax=TGeoS hape::Big()) const; | Int_t GetPhiCrossList(const Double_t *point, const Doubl e_t *dir, Int_t istart, Double_t *sphi, Int_t *iphi, Double_t stepmax=TGeoS hape::Big()) const; | |||
Bool_t IsCrossingSlice(const Double_t *point, const Doubl e_t *dir, Int_t iphi, Double_t sstart, Int_t &ipl, Double_t &snext, Double_ t stepmax) const; | Bool_t IsCrossingSlice(const Double_t *point, const Doubl e_t *dir, Int_t iphi, Double_t sstart, Int_t &ipl, Double_t &snext, Double_ t stepmax) const; | |||
void LocatePhi(const Double_t *point, Int_t &ipsec) con st; | void LocatePhi(const Double_t *point, Int_t &ipsec) con st; | |||
Double_t Rpg(Double_t z, Int_t ipl, Bool_t inner, Double_t &a, Double_t &b) const; | Double_t Rpg(Double_t z, Int_t ipl, Bool_t inner, Double_t &a, Double_t &b) const; | |||
Double_t Rproj(Double_t z,const Double_t *point, const Doub le_t *dir, Double_t cphi, Double_t sphi, Double_t &a, Double_t &b) const; | Double_t Rproj(Double_t z,const Double_t *point, const Doub le_t *dir, Double_t cphi, Double_t sphi, Double_t &a, Double_t &b) const; | |||
Bool_t SliceCrossing(const Double_t *point, const Double_ t *dir, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax) const; | Bool_t SliceCrossing(const Double_t *point, const Double_ t *dir, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax) const; | |||
Bool_t SliceCrossingIn(const Double_t *point, const Doubl e_t *dir, Int_t ipl, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &sne xt, Double_t stepmax) const; | Bool_t SliceCrossingIn(const Double_t *point, const Doubl e_t *dir, Int_t ipl, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &sne xt, Double_t stepmax) const; | |||
Bool_t SliceCrossingZ(const Double_t *point, const Double _t *dir, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax) const; | Bool_t SliceCrossingZ(const Double_t *point, const Double _t *dir, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double_t stepmax) const; | |||
Bool_t SliceCrossingInZ(const Double_t *point, const Doub le_t *dir, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double _t stepmax) const; | Bool_t SliceCrossingInZ(const Double_t *point, const Doub le_t *dir, Int_t nphi, Int_t *iphi, Double_t *sphi, Double_t &snext, Double _t stepmax) const; | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 19 lines changed or added | |||
TGeoPhysicalNode.h | TGeoPhysicalNode.h | |||
---|---|---|---|---|
skipping to change at line 33 | skipping to change at line 33 | |||
#ifndef ROOT_TAttLine | #ifndef ROOT_TAttLine | |||
#include "TAttLine.h" | #include "TAttLine.h" | |||
#endif | #endif | |||
// forward declarations | // forward declarations | |||
class TGeoHMatrix; | class TGeoHMatrix; | |||
class TGeoMatrix; | class TGeoMatrix; | |||
class TGeoVolume; | class TGeoVolume; | |||
class TGeoNode; | class TGeoNode; | |||
class TGeoShape; | class TGeoShape; | |||
class TGeoNavigator; | ||||
/////////////////////////////////////////////////////////////////////////// /// | /////////////////////////////////////////////////////////////////////////// /// | |||
// // | // // | |||
// TGeoPhysicalNode - class representing an unique object associated with a // | // TGeoPhysicalNode - class representing an unique object associated with a // | |||
// path. // | // path. // | |||
// // | // // | |||
/////////////////////////////////////////////////////////////////////////// /// | /////////////////////////////////////////////////////////////////////////// /// | |||
class TGeoPhysicalNode : public TNamed, | class TGeoPhysicalNode : public TNamed, | |||
public TAttLine | public TAttLine | |||
skipping to change at line 83 | skipping to change at line 84 | |||
void Draw(Option_t *option=""); | void Draw(Option_t *option=""); | |||
Int_t GetLevel() const {return fLevel;} | Int_t GetLevel() const {return fLevel;} | |||
TGeoHMatrix *GetMatrix(Int_t level=-1) const; | TGeoHMatrix *GetMatrix(Int_t level=-1) const; | |||
TGeoHMatrix *GetOriginalMatrix() const {return fMatrixOrig;} | TGeoHMatrix *GetOriginalMatrix() const {return fMatrixOrig;} | |||
TGeoNode *GetMother(Int_t levup=1) const; | TGeoNode *GetMother(Int_t levup=1) const; | |||
TGeoNode *GetNode(Int_t level=-1) const; | TGeoNode *GetNode(Int_t level=-1) const; | |||
TGeoShape *GetShape(Int_t level=-1) const; | TGeoShape *GetShape(Int_t level=-1) const; | |||
TGeoVolume *GetVolume(Int_t level=-1) const; | TGeoVolume *GetVolume(Int_t level=-1) const; | |||
Bool_t IsAligned() const {return TObject::TestBit(kGeoPNodeAl igned);} | Bool_t IsAligned() const {return TObject::TestBit(kGeoPNodeAl igned);} | |||
Bool_t IsMatchingState(TGeoNavigator *nav) const; | ||||
Bool_t IsVolAttributes() const {return TObject::TestBit(kGeoP NodeVolAtt);} | Bool_t IsVolAttributes() const {return TObject::TestBit(kGeoP NodeVolAtt);} | |||
Bool_t IsVisible() const {return TObject::TestBit(kGeoPNodeVi sible);} | Bool_t IsVisible() const {return TObject::TestBit(kGeoPNodeVi sible);} | |||
Bool_t IsVisibleFull() const {return TObject::TestBit(kGeoPNo deFull);} | Bool_t IsVisibleFull() const {return TObject::TestBit(kGeoPNo deFull);} | |||
virtual void Print(Option_t *option="") const; | virtual void Print(Option_t *option="") const; | |||
void Refresh(); | void Refresh(); | |||
void SetMatrixOrig(const TGeoMatrix *local); | void SetMatrixOrig(const TGeoMatrix *local); | |||
void SetIsVolAtt(Bool_t flag=kTRUE) {TObject::SetBit(kGeoPN odeVolAtt,flag);} | void SetIsVolAtt(Bool_t flag=kTRUE) {TObject::SetBit(kGeoPN odeVolAtt,flag);} | |||
void SetVisibility(Bool_t flag=kTRUE) {TObject::SetBit(kGe oPNodeVisible,flag);} | void SetVisibility(Bool_t flag=kTRUE) {TObject::SetBit(kGe oPNodeVisible,flag);} | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
TGeoStateInfo.h | TGeoStateInfo.h | |||
---|---|---|---|---|
skipping to change at line 61 | skipping to change at line 61 | |||
// Xtru shape data | // Xtru shape data | |||
Int_t fXtruSeg; // current segment [0,fNvert-1] | Int_t fXtruSeg; // current segment [0,fNvert-1] | |||
Int_t fXtruIz; // current z plane [0,fNz-1] | Int_t fXtruIz; // current z plane [0,fNz-1] | |||
Double_t *fXtruXc; // [fNvert] current X positions fo r polygon vertices | Double_t *fXtruXc; // [fNvert] current X positions fo r polygon vertices | |||
Double_t *fXtruYc; // [fNvert] current Y positions fo r polygon vertices | Double_t *fXtruYc; // [fNvert] current Y positions fo r polygon vertices | |||
TGeoPolygon *fXtruPoly; // polygon defining section shape | TGeoPolygon *fXtruPoly; // polygon defining section shape | |||
TGeoStateInfo(); | TGeoStateInfo(); | |||
TGeoStateInfo(const TGeoStateInfo &other); | TGeoStateInfo(const TGeoStateInfo &other); | |||
TGeoStateInfo & operator=(const TGeoStateInfo &other); | TGeoStateInfo & operator=(const TGeoStateInfo &other); | |||
~TGeoStateInfo(); | virtual ~TGeoStateInfo(); | |||
ClassDef(TGeoStateInfo, 0) // No I/O for this structure | ||||
}; | }; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added | |||
TGeoVolume.h | TGeoVolume.h | |||
---|---|---|---|---|
skipping to change at line 79 | skipping to change at line 79 | |||
TGeoMedium *fMedium; // tracking medium | TGeoMedium *fMedium; // tracking medium | |||
static TGeoMedium *fgDummyMedium; //! dummy medium | static TGeoMedium *fgDummyMedium; //! dummy medium | |||
TGeoPatternFinder *fFinder; // finder object for divisions | TGeoPatternFinder *fFinder; // finder object for divisions | |||
TGeoVoxelFinder *fVoxels; // finder object for bounding boxes | TGeoVoxelFinder *fVoxels; // finder object for bounding boxes | |||
TGeoManager *fGeoManager; //! pointer to TGeoManager owning th is volume | TGeoManager *fGeoManager; //! pointer to TGeoManager owning th is volume | |||
TObject *fField; //! just a hook for now | TObject *fField; //! just a hook for now | |||
TString fOption; //! option - if any | TString fOption; //! option - if any | |||
Int_t fNumber; // volume serial number in the list of volumes | Int_t fNumber; // volume serial number in the list of volumes | |||
Int_t fNtotal; // total number of physical nodes | Int_t fNtotal; // total number of physical nodes | |||
Int_t fRefCount; // reference counter | ||||
TGeoExtension *fUserExtension; //! Transient user-defined extension to volumes | TGeoExtension *fUserExtension; //! Transient user-defined extension to volumes | |||
TGeoExtension *fFWExtension; //! Transient framework-defined exte nsion to volumes | TGeoExtension *fFWExtension; //! Transient framework-defined exte nsion to volumes | |||
TGeoVolume(const TGeoVolume&); | TGeoVolume(const TGeoVolume&); | |||
TGeoVolume& operator=(const TGeoVolume&); | TGeoVolume& operator=(const TGeoVolume&); | |||
public: | public: | |||
virtual void ClearThreadData() const; | virtual void ClearThreadData() const; | |||
virtual void CreateThreadData(Int_t nthreads); | virtual void CreateThreadData(Int_t nthreads); | |||
public: | public: | |||
enum EGeoVolumeTypes { | enum EGeoVolumeTypes { | |||
kVolumeReplicated = BIT(14), | kVolumeReplicated = BIT(14), | |||
kVolumeSelected = BIT(15), | kVolumeSelected = BIT(15), | |||
kVolumeDiv = BIT(16), | kVolumeDiv = BIT(16), | |||
kVolumeOverlap = BIT(17), | kVolumeOverlap = BIT(17), | |||
kVolumeImportNodes = BIT(18), | kVolumeImportNodes = BIT(18), | |||
kVolumeMulti = BIT(19), | kVolumeMulti = BIT(19), | |||
kVoxelsXYZ = BIT(20), | kVoxelsXYZ = BIT(20), // not used | |||
kVoxelsCyl = BIT(21), | kVoxelsCyl = BIT(21), // not used | |||
kVolumeClone = BIT(22), | kVolumeClone = BIT(22), | |||
kVolumeAdded = BIT(23) | kVolumeAdded = BIT(23), | |||
kVolumeOC = BIT(21) // overlapping candidates | ||||
}; | }; | |||
// constructors | // constructors | |||
TGeoVolume(); | TGeoVolume(); | |||
TGeoVolume(const char *name, const TGeoShape *shape, const TGeoMedium *m ed=0); | TGeoVolume(const char *name, const TGeoShape *shape, const TGeoMedium *m ed=0); | |||
// destructor | // destructor | |||
virtual ~TGeoVolume(); | virtual ~TGeoVolume(); | |||
// methods | // methods | |||
virtual void cd(Int_t inode) const; | virtual void cd(Int_t inode) const; | |||
void Browse(TBrowser *b); | void Browse(TBrowser *b); | |||
skipping to change at line 129 | skipping to change at line 131 | |||
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="") co nst; // *MENU* | void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="") co nst; // *MENU* | |||
void CheckShape(Int_t testNo, Int_t nsamples=10000, Option_t *option=""); // *MENU* | void CheckShape(Int_t testNo, Int_t nsamples=10000, Option_t *option=""); // *MENU* | |||
Int_t CountNodes(Int_t nlevels=1000, Int_t option=0); | Int_t CountNodes(Int_t nlevels=1000, Int_t option=0); | |||
Bool_t Contains(const Double_t *point) const {return fShape->Co ntains(point);} | Bool_t Contains(const Double_t *point) const {return fShape->Co ntains(point);} | |||
static void CreateDummyMedium(); | static void CreateDummyMedium(); | |||
static TGeoMedium *DummyMedium(); | static TGeoMedium *DummyMedium(); | |||
virtual Bool_t IsAssembly() const; | virtual Bool_t IsAssembly() const; | |||
virtual Bool_t IsFolder() const; | virtual Bool_t IsFolder() const; | |||
Bool_t IsRunTime() const {return fShape->IsRunTimeShape();} | Bool_t IsRunTime() const {return fShape->IsRunTimeShape();} | |||
virtual Bool_t IsVolumeMulti() const {return kFALSE;} | virtual Bool_t IsVolumeMulti() const {return kFALSE;} | |||
virtual void AddNode(const TGeoVolume *vol, Int_t copy_no, TGeoMatrix | virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat= | |||
*mat=0, Option_t *option=""); // most general case | 0, Option_t *option=""); // most general case | |||
void AddNodeOffset(const TGeoVolume *vol, Int_t copy_no, Doub | void AddNodeOffset(TGeoVolume *vol, Int_t copy_no, Double_t o | |||
le_t offset=0, Option_t *option=""); | ffset=0, Option_t *option=""); | |||
virtual void AddNodeOverlap(const TGeoVolume *vol, Int_t copy_no, TGe | virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatri | |||
oMatrix *mat=0, Option_t *option=""); | x *mat=0, Option_t *option=""); | |||
virtual TGeoVolume *Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option=""); | virtual TGeoVolume *Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option=""); | |||
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | |||
virtual void Draw(Option_t *option=""); // *MENU* | virtual void Draw(Option_t *option=""); // *MENU* | |||
virtual void DrawOnly(Option_t *option=""); // *MENU* | virtual void DrawOnly(Option_t *option=""); // *MENU* | |||
TH2F *LegoPlot(Int_t ntheta=20, Double_t themin=0., Double_t t hemax=180., | TH2F *LegoPlot(Int_t ntheta=20, Double_t themin=0., Double_t t hemax=180., | |||
Int_t nphi=60, Double_t phimin=0., Double_t phi max=360., | Int_t nphi=60, Double_t phimin=0., Double_t phi max=360., | |||
Double_t rmin=0., Double_t rmax=9999999, Option _t *option=""); // *MENU* | Double_t rmin=0., Double_t rmax=9999999, Option _t *option=""); // *MENU* | |||
virtual void Paint(Option_t *option=""); | virtual void Paint(Option_t *option=""); | |||
virtual void Print(Option_t *option="") const; // *MENU* | ||||
void PrintNodes() const; | void PrintNodes() const; | |||
void PrintVoxels() const; // *MENU* | void PrintVoxels() const; // *MENU* | |||
void ReplayCreation(const TGeoVolume *other); | void ReplayCreation(const TGeoVolume *other); | |||
void SetUserExtension(TGeoExtension *ext); | void SetUserExtension(TGeoExtension *ext); | |||
void SetFWExtension(TGeoExtension *ext); | void SetFWExtension(TGeoExtension *ext); | |||
Int_t GetRefCount() const {return fRefCount;} | ||||
TGeoExtension *GetUserExtension() const {return fUserExtension;} | TGeoExtension *GetUserExtension() const {return fUserExtension;} | |||
TGeoExtension *GetFWExtension() const {return fFWExtension;} | TGeoExtension *GetFWExtension() const {return fFWExtension;} | |||
TGeoExtension *GrabUserExtension() const; | TGeoExtension *GrabUserExtension() const; | |||
TGeoExtension *GrabFWExtension() const; | TGeoExtension *GrabFWExtension() const; | |||
void Grab() {fRefCount++;} | ||||
void Release() {fRefCount--; if (fRefCount==0) | ||||
delete this;} | ||||
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); | virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); | |||
Bool_t IsActive() const {return TGeoAtt::IsActive();} | Bool_t IsActive() const {return TGeoAtt::IsActive();} | |||
Bool_t IsActiveDaughters() const {return TGeoAtt::IsActiveDaugh ters();} | Bool_t IsActiveDaughters() const {return TGeoAtt::IsActiveDaugh ters();} | |||
Bool_t IsAdded() const {return TObject::TestBit(kVolumeAdde d);} | Bool_t IsAdded() const {return TObject::TestBit(kVolumeAdde d);} | |||
Bool_t IsOverlappingCandidate() const {return TObject::TestBit( kVolumeOC);} | ||||
Bool_t IsReplicated() const {return TObject::TestBit(kVolumeRep licated);} | Bool_t IsReplicated() const {return TObject::TestBit(kVolumeRep licated);} | |||
Bool_t IsSelected() const {return TObject::TestBit(kVolumeSele cted);} | Bool_t IsSelected() const {return TObject::TestBit(kVolumeSele cted);} | |||
Bool_t IsCylVoxels() const {return TObject::TestBit(kVoxelsCyl) ;} | Bool_t IsCylVoxels() const {return TObject::TestBit(kVoxelsCyl) ;} | |||
Bool_t IsXYZVoxels() const {return TObject::TestBit(kVoxelsXYZ) ;} | Bool_t IsXYZVoxels() const {return TObject::TestBit(kVoxelsXYZ) ;} | |||
Bool_t IsTopVolume() const; | Bool_t IsTopVolume() const; | |||
Bool_t IsValid() const {return fShape->IsValid();} | Bool_t IsValid() const {return fShape->IsValid();} | |||
virtual Bool_t IsVisible() const {return TGeoAtt::IsVisible();} | virtual Bool_t IsVisible() const {return TGeoAtt::IsVisible();} | |||
Bool_t IsVisibleDaughters() const {return TGeoAtt::IsVisDaughte rs();} | Bool_t IsVisibleDaughters() const {return TGeoAtt::IsVisDaughte rs();} | |||
Bool_t IsVisContainers() const {return TGeoAtt::IsVisContainers ();} | Bool_t IsVisContainers() const {return TGeoAtt::IsVisContainers ();} | |||
Bool_t IsVisLeaves() const {return TGeoAtt::IsVisLeaves();} | Bool_t IsVisLeaves() const {return TGeoAtt::IsVisLeaves();} | |||
skipping to change at line 223 | skipping to change at line 230 | |||
virtual void SavePrimitive(std::ostream &out, Option_t *option = ""); | virtual void SavePrimitive(std::ostream &out, Option_t *option = ""); | |||
void SelectVolume(Bool_t clear = kFALSE); | void SelectVolume(Bool_t clear = kFALSE); | |||
void SetActivity(Bool_t flag=kTRUE) {TGeoAtt::SetActivity(fla g);} | void SetActivity(Bool_t flag=kTRUE) {TGeoAtt::SetActivity(fla g);} | |||
void SetActiveDaughters(Bool_t flag=kTRUE) {TGeoAtt::SetActiv eDaughters(flag);} | void SetActiveDaughters(Bool_t flag=kTRUE) {TGeoAtt::SetActiv eDaughters(flag);} | |||
void SetAsTopVolume(); // *TOGGLE* *GETTER=IsTopVolume | void SetAsTopVolume(); // *TOGGLE* *GETTER=IsTopVolume | |||
void SetAdded() {TObject::SetBit(kVolumeAdded);} | void SetAdded() {TObject::SetBit(kVolumeAdded);} | |||
void SetReplicated() {TObject::SetBit(kVolumeReplicated);} | void SetReplicated() {TObject::SetBit(kVolumeReplicated);} | |||
void SetCurrentPoint(Double_t x, Double_t y, Double_t z); | void SetCurrentPoint(Double_t x, Double_t y, Double_t z); | |||
void SetCylVoxels(Bool_t flag=kTRUE) {TObject::SetBit(kVoxels Cyl, flag); TObject::SetBit(kVoxelsXYZ, !flag);} | void SetCylVoxels(Bool_t flag=kTRUE) {TObject::SetBit(kVoxels Cyl, flag); TObject::SetBit(kVoxelsXYZ, !flag);} | |||
void SetNodes(TObjArray *nodes) {fNodes = nodes; TObject::Set Bit(kVolumeImportNodes);} | void SetNodes(TObjArray *nodes) {fNodes = nodes; TObject::Set Bit(kVolumeImportNodes);} | |||
void SetOverlappingCandidate(Bool_t flag) {TObject::SetBit(kV olumeOC,flag);} | ||||
void SetShape(const TGeoShape *shape); | void SetShape(const TGeoShape *shape); | |||
void SetTransparency(Char_t transparency=0) {if (fMedium) fMe dium->GetMaterial()->SetTransparency(transparency);} // *MENU* | void SetTransparency(Char_t transparency=0) {if (fMedium) fMe dium->GetMaterial()->SetTransparency(transparency);} // *MENU* | |||
void SetField(TObject *field) {fField = field;} | void SetField(TObject *field) {fField = field;} | |||
void SetOption(const char *option); | void SetOption(const char *option); | |||
void SetAttVisibility(Bool_t vis) {TGeoAtt::SetVisibility(vis );} | void SetAttVisibility(Bool_t vis) {TGeoAtt::SetVisibility(vis );} | |||
virtual void SetVisibility(Bool_t vis=kTRUE); // *TOGGLE* *GETTER=IsV isible | virtual void SetVisibility(Bool_t vis=kTRUE); // *TOGGLE* *GETTER=IsV isible | |||
virtual void SetVisContainers(Bool_t flag=kTRUE); // *TOGGLE* *GETTER =IsVisContainers | virtual void SetVisContainers(Bool_t flag=kTRUE); // *TOGGLE* *GETTER =IsVisContainers | |||
virtual void SetVisLeaves(Bool_t flag=kTRUE); // *TOGGLE* *GETTER=IsV isLeaves | virtual void SetVisLeaves(Bool_t flag=kTRUE); // *TOGGLE* *GETTER=IsV isLeaves | |||
virtual void SetVisOnly(Bool_t flag=kTRUE); // *TOGGLE* *GETTER=IsVis Only | virtual void SetVisOnly(Bool_t flag=kTRUE); // *TOGGLE* *GETTER=IsVis Only | |||
virtual void SetLineColor(Color_t lcolor); | virtual void SetLineColor(Color_t lcolor); | |||
skipping to change at line 250 | skipping to change at line 258 | |||
void SetNtotal(Int_t ntotal) {fNtotal = ntotal;} | void SetNtotal(Int_t ntotal) {fNtotal = ntotal;} | |||
void SortNodes(); | void SortNodes(); | |||
void UnmarkSaved(); | void UnmarkSaved(); | |||
Bool_t Valid() const; | Bool_t Valid() const; | |||
void VisibleDaughters(Bool_t vis=kTRUE); // *TOGGLE* *GETTER= IsVisibleDaughters | void VisibleDaughters(Bool_t vis=kTRUE); // *TOGGLE* *GETTER= IsVisibleDaughters | |||
void InvisibleAll(Bool_t flag=kTRUE); // *TOGGLE* *GETTER=IsA llInvisible | void InvisibleAll(Bool_t flag=kTRUE); // *TOGGLE* *GETTER=IsA llInvisible | |||
void Voxelize(Option_t *option); | void Voxelize(Option_t *option); | |||
Double_t Weight(Double_t precision=0.01, Option_t *option="va"); // *MENU* | Double_t Weight(Double_t precision=0.01, Option_t *option="va"); // *MENU* | |||
Double_t WeightA() const; | Double_t WeightA() const; | |||
ClassDef(TGeoVolume, 5) // geometry volume descriptor | ClassDef(TGeoVolume, 6) // geometry volume descriptor | |||
}; | }; | |||
/////////////////////////////////////////////////////////////////////////// / | /////////////////////////////////////////////////////////////////////////// / | |||
// / / | // / / | |||
// TGeoVolumeMulti - class storing a list of volumes that have to / / | // TGeoVolumeMulti - class storing a list of volumes that have to / / | |||
// be handled togeather at build time / / | // be handled togeather at build time / / | |||
// / / | // / / | |||
/////////////////////////////////////////////////////////////////////////// / | /////////////////////////////////////////////////////////////////////////// / | |||
class TGeoVolumeMulti : public TGeoVolume | class TGeoVolumeMulti : public TGeoVolume | |||
skipping to change at line 283 | skipping to change at line 291 | |||
TGeoVolumeMulti(const TGeoVolumeMulti&); | TGeoVolumeMulti(const TGeoVolumeMulti&); | |||
TGeoVolumeMulti& operator=(const TGeoVolumeMulti&); | TGeoVolumeMulti& operator=(const TGeoVolumeMulti&); | |||
public: | public: | |||
TGeoVolumeMulti(); | TGeoVolumeMulti(); | |||
TGeoVolumeMulti(const char* name, TGeoMedium *med=0); | TGeoVolumeMulti(const char* name, TGeoMedium *med=0); | |||
virtual ~TGeoVolumeMulti(); | virtual ~TGeoVolumeMulti(); | |||
void AddVolume(TGeoVolume *vol); | void AddVolume(TGeoVolume *vol); | |||
TGeoVolume *GetVolume(Int_t id) const {return (TGeoVolume*)fVolumes- >At(id);} | TGeoVolume *GetVolume(Int_t id) const {return (TGeoVolume*)fVolumes- >At(id);} | |||
virtual void AddNode(const TGeoVolume *vol, Int_t copy_no, TGeoMatrix | virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat, | |||
*mat, Option_t *option=""); // most general case | Option_t *option=""); // most general case | |||
virtual void AddNodeOverlap(const TGeoVolume *vol, Int_t copy_no, TGe | virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatri | |||
oMatrix *mat, Option_t *option=""); | x *mat, Option_t *option=""); | |||
virtual TGeoVolume *Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option=""); | virtual TGeoVolume *Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option=""); | |||
TGeoShape *GetLastShape() const; | TGeoShape *GetLastShape() const; | |||
Int_t GetNvolumes() const {return fVolumes->GetEntriesFast();} | Int_t GetNvolumes() const {return fVolumes->GetEntriesFast();} | |||
Int_t GetAxis() const {return fNdiv;} | Int_t GetAxis() const {return fNdiv;} | |||
Int_t GetNdiv() const {return fNdiv;} | Int_t GetNdiv() const {return fNdiv;} | |||
Double_t GetStart() const {return fStart;} | Double_t GetStart() const {return fStart;} | |||
Double_t GetStep() const {return fStep;} | Double_t GetStep() const {return fStep;} | |||
virtual Bool_t IsVolumeMulti() const {return kTRUE;} | virtual Bool_t IsVolumeMulti() const {return kTRUE;} | |||
virtual TGeoVolume *MakeCopyVolume(TGeoShape *newshape); | virtual TGeoVolume *MakeCopyVolume(TGeoShape *newshape); | |||
virtual void SetLineColor(Color_t lcolor); | virtual void SetLineColor(Color_t lcolor); | |||
skipping to change at line 335 | skipping to change at line 343 | |||
protected: | protected: | |||
mutable std::vector<ThreadData_t*> fThreadData; //! Thread specific data vector | mutable std::vector<ThreadData_t*> fThreadData; //! Thread specific data vector | |||
mutable Int_t fThreadSize; //! Thread vector size | mutable Int_t fThreadSize; //! Thread vector size | |||
public: | public: | |||
TGeoVolumeAssembly(); | TGeoVolumeAssembly(); | |||
TGeoVolumeAssembly(const char *name); | TGeoVolumeAssembly(const char *name); | |||
virtual ~TGeoVolumeAssembly(); | virtual ~TGeoVolumeAssembly(); | |||
virtual void AddNode(const TGeoVolume *vol, Int_t copy_no, TGeoMatrix | virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat= | |||
*mat=0, Option_t *option=""); | 0, Option_t *option=""); | |||
virtual void AddNodeOverlap(const TGeoVolume *vol, Int_t copy_no, TGe | virtual void AddNodeOverlap(TGeoVolume *vol, Int_t copy_no, TGeoMatri | |||
oMatrix *mat, Option_t *option); | x *mat, Option_t *option); | |||
virtual TGeoVolume *CloneVolume() const; | virtual TGeoVolume *CloneVolume() const; | |||
virtual TGeoVolume *Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option=""); | virtual TGeoVolume *Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option=""); | |||
TGeoVolume *Divide(TGeoVolume *cell, TGeoPatternFinder *pattern, Opt ion_t *option="spacedout"); | TGeoVolume *Divide(TGeoVolume *cell, TGeoPatternFinder *pattern, Opt ion_t *option="spacedout"); | |||
virtual void DrawOnly(Option_t *) {;} | virtual void DrawOnly(Option_t *) {;} | |||
virtual Int_t GetCurrentNodeIndex() const; | virtual Int_t GetCurrentNodeIndex() const; | |||
virtual Int_t GetNextNodeIndex() const; | virtual Int_t GetNextNodeIndex() const; | |||
virtual Bool_t IsAssembly() const {return kTRUE;} | virtual Bool_t IsAssembly() const {return kTRUE;} | |||
virtual Bool_t IsVisible() const {return kFALSE;} | virtual Bool_t IsVisible() const {return kFALSE;} | |||
static TGeoVolumeAssembly *MakeAssemblyFromVolume(TGeoVolume *vol); | static TGeoVolumeAssembly *MakeAssemblyFromVolume(TGeoVolume *vol); | |||
void SetCurrentNodeIndex(Int_t index); | void SetCurrentNodeIndex(Int_t index); | |||
End of changes. 12 change blocks. | ||||
18 lines changed or deleted | 27 lines changed or added | |||
TH1Editor.h | TH1Editor.h | |||
---|---|---|---|---|
skipping to change at line 171 | skipping to change at line 171 | |||
virtual void DoBinMoved1(); | virtual void DoBinMoved1(); | |||
virtual void DoBinLabel1(); | virtual void DoBinLabel1(); | |||
virtual void DoOffsetMoved(Int_t num); | virtual void DoOffsetMoved(Int_t num); | |||
virtual void DoOffsetReleased(); | virtual void DoOffsetReleased(); | |||
virtual void DoOffsetPressed(); | virtual void DoOffsetPressed(); | |||
virtual void DoBinOffset(); | virtual void DoBinOffset(); | |||
virtual void DoApply(); | virtual void DoApply(); | |||
virtual void DoCancel(); | virtual void DoCancel(); | |||
virtual void PaintBox3D(Float_t *p1, Float_t *p2,Float_t *p3, Float_t *p 4); | virtual void PaintBox3D(Float_t *p1, Float_t *p2,Float_t *p3, Float_t *p 4); | |||
Int_t* Dividers(Int_t n); | Int_t* Dividers(Int_t n); | |||
virtual void RecursiveRemove(TObject* obj); | ||||
ClassDef(TH1Editor,0) // TH1 editor | ClassDef(TH1Editor,0) // TH1 editor | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
TH2Editor.h | TH2Editor.h | |||
---|---|---|---|---|
skipping to change at line 203 | skipping to change at line 203 | |||
virtual void DoXAxisRange(); | virtual void DoXAxisRange(); | |||
virtual void DoSliderYMoved(); | virtual void DoSliderYMoved(); | |||
virtual void DoSliderYPressed(); | virtual void DoSliderYPressed(); | |||
virtual void DoSliderYReleased(); | virtual void DoSliderYReleased(); | |||
virtual void DoYAxisRange(); | virtual void DoYAxisRange(); | |||
virtual void DoFillColor(Pixel_t); | virtual void DoFillColor(Pixel_t); | |||
virtual void DoFillPattern(Style_t); | virtual void DoFillPattern(Style_t); | |||
Int_t* Dividers(Int_t n); | Int_t* Dividers(Int_t n); | |||
virtual void RecursiveRemove(TObject* obj); | ||||
ClassDef(TH2Editor,0) // TH2 editor | ClassDef(TH2Editor,0) // TH2 editor | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added | |||
TH3.h | TH3.h | |||
---|---|---|---|---|
skipping to change at line 115 | skipping to change at line 115 | |||
virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z); | virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z); | |||
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t; | virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") cons t; | |||
virtual Long64_t Merge(TCollection *list); | virtual Long64_t Merge(TCollection *list); | |||
TH1D *ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Int_t firstzbin=0, | TH1D *ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Int_t firstzbin=0, | |||
Int_t lastzbin=-1, Option_t *option="") con st; // *MENU* | Int_t lastzbin=-1, Option_t *option="") con st; // *MENU* | |||
TH1D *ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Int_t firstzbin=0, | TH1D *ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Int_t firstzbin=0, | |||
Int_t lastzbin=-1, Option_t *option="") con st; // *MENU* | Int_t lastzbin=-1, Option_t *option="") con st; // *MENU* | |||
TH1D *ProjectionZ(const char *name="_pz", Int_t firstxbin=0, Int_t lastxbin=-1, Int_t firstybin=0, | TH1D *ProjectionZ(const char *name="_pz", Int_t firstxbin=0, Int_t lastxbin=-1, Int_t firstybin=0, | |||
Int_t lastybin=-1, Option_t *option="") con st; // *MENU* | Int_t lastybin=-1, Option_t *option="") con st; // *MENU* | |||
TH1 *Project3D(Option_t *option="x") const; // *MENU* | TH1 *Project3D(Option_t *option="x") const; // *MENU* | |||
TProfile2D *Project3DProfile(Option_t *option="xy") const; // *MENU * | virtual TProfile2D *Project3DProfile(Option_t *option="xy") const; // * MENU* | |||
virtual void PutStats(Double_t *stats); | virtual void PutStats(Double_t *stats); | |||
virtual TH3 *RebinX(Int_t ngroup = 2, const char *newname = ""); | virtual TH3 *RebinX(Int_t ngroup = 2, const char *newname = ""); | |||
virtual TH3 *RebinY(Int_t ngroup = 2, const char *newname = ""); | virtual TH3 *RebinY(Int_t ngroup = 2, const char *newname = ""); | |||
virtual TH3 *RebinZ(Int_t ngroup = 2, const char *newname = ""); | virtual TH3 *RebinZ(Int_t ngroup = 2, const char *newname = ""); | |||
virtual TH3 *Rebin3D(Int_t nxgroup = 2, Int_t nygroup = 2, Int_t nzg roup = 2, const char *newname = ""); | virtual TH3 *Rebin3D(Int_t nxgroup = 2, Int_t nygroup = 2, Int_t nzg roup = 2, const char *newname = ""); | |||
virtual void Reset(Option_t *option=""); | virtual void Reset(Option_t *option=""); | |||
virtual void SetShowProjection(const char *option="xy",Int_t nbins=1 ); // *MENU* | virtual void SetShowProjection(const char *option="xy",Int_t nbins=1 ); // *MENU* | |||
protected: | protected: | |||
TH1D *DoProject1D(const char* name, const char * title, TAxis* pr | ||||
ojX, | virtual TH1D *DoProject1D(const char* name, const char * title, T | |||
Axis* projX, | ||||
bool computeErrors, bool originalRange, | bool computeErrors, bool originalRange, | |||
bool useUF, bool useOF) const; | bool useUF, bool useOF) const; | |||
TH2D *DoProject2D(const char* name, const char * title, TAxis* pr ojX, TAxis* projY, | virtual TH2D *DoProject2D(const char* name, const char * title, T Axis* projX, TAxis* projY, | |||
bool computeErrors, bool originalRange, | bool computeErrors, bool originalRange, | |||
bool useUF, bool useOF) const; | bool useUF, bool useOF) const; | |||
TProfile2D *DoProjectProfile2D(const char* name, const char * title, TAx | virtual TProfile2D *DoProjectProfile2D(const char* name, const char * t | |||
is* projX, TAxis* projY, | itle, TAxis* projX, TAxis* projY, | |||
bool originalRange, bool useUF, boo | bool originalRange, bool useUF, b | |||
l useOF) const; | ool useOF) const; | |||
// these functions are need to be used inside TProfile3D::DoProjectProfi | ||||
le2D | ||||
static TH1D *DoProject1D(const TH3 & h, const char* name, const | ||||
char * title, TAxis* projX, | ||||
bool computeErrors, bool originalRange, | ||||
bool useUF, bool useOF) { | ||||
return h.DoProject1D(name, title, projX, computeErrors, originalRange | ||||
, useUF, useOF); | ||||
} | ||||
static TH2D *DoProject2D(const TH3 & h, const char* name, const | ||||
char * title, TAxis* projX, TAxis* projY, | ||||
bool computeErrors, bool originalRange, | ||||
bool useUF, bool useOF) { | ||||
return h.DoProject2D(name, title, projX,projY, computeErrors, origina | ||||
lRange, useUF, useOF); | ||||
} | ||||
ClassDef(TH3,5) //3-Dim histogram base class | ClassDef(TH3,5) //3-Dim histogram base class | |||
}; | }; | |||
//________________________________________________________________________ | //________________________________________________________________________ | |||
class TH3C : public TH3, public TArrayC { | class TH3C : public TH3, public TArrayC { | |||
public: | public: | |||
TH3C(); | TH3C(); | |||
TH3C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Doubl e_t xup | TH3C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Doubl e_t xup | |||
End of changes. 4 change blocks. | ||||
8 lines changed or deleted | 26 lines changed or added | |||
TLine.h | TLine.h | |||
---|---|---|---|---|
skipping to change at line 26 | skipping to change at line 26 | |||
// // | // // | |||
// TLine // | // TLine // | |||
// // | // // | |||
// A line segment. // | // A line segment. // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TObject | #ifndef ROOT_TObject | |||
#include "TObject.h" | #include "TObject.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttLine | #ifndef ROOT_TAttLine | |||
#include "TAttLine.h" | #include "TAttLine.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttBBox2D | ||||
#include "TAttBBox2D.h" | ||||
#endif | ||||
#ifndef ROOT_GuiTypes | ||||
#include "GuiTypes.h" | ||||
#endif | ||||
class TPoint; | ||||
class TLine : public TObject, public TAttLine { | class TLine : public TObject, public TAttLine, public TAttBBox2D { | |||
protected: | protected: | |||
Double_t fX1; //X of 1st point | Double_t fX1; //X of 1st point | |||
Double_t fY1; //Y of 1st point | Double_t fY1; //Y of 1st point | |||
Double_t fX2; //X of 2nd point | Double_t fX2; //X of 2nd point | |||
Double_t fY2; //Y of 2nd point | Double_t fY2; //Y of 2nd point | |||
public: | public: | |||
// TLine status bits | // TLine status bits | |||
enum { | enum { | |||
kLineNDC = BIT(14), // Use NDC coordinates | kLineNDC = BIT(14), // Use NDC coordinates | |||
kVertical = BIT(15), // Line is vertical | kVertical = BIT(15), // Line is vertical | |||
kHorizontal = BIT(16) // Line is horizontal | kHorizontal = BIT(16) // Line is horizontal | |||
}; | }; | |||
TLine(); | TLine(); | |||
TLine(Double_t x1, Double_t y1,Double_t x2, Double_t y2); | TLine(Double_t x1, Double_t y1,Double_t x2, Double_t y2); | |||
TLine(const TLine &line); | TLine(const TLine &line); | |||
virtual ~TLine(); | virtual ~TLine(); | |||
void Copy(TObject &line) const; | void Copy(TObject &line) const; | |||
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); | |||
virtual TLine *DrawLine(Double_t x1, Double_t y1,Double_t x2, Double_t y | virtual TLine *DrawLine(Double_t x1, Double_t y1,Double_t x2, Doub | |||
2); | le_t y2); | |||
virtual TLine *DrawLineNDC(Double_t x1, Double_t y1,Double_t x2, Double_ | virtual TLine *DrawLineNDC(Double_t x1, Double_t y1,Double_t x2, D | |||
t y2); | ouble_t y2); | |||
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); | virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); | |||
Double_t GetX1() const {return fX1;} | Double_t GetX1() const {return fX1;} | |||
Double_t GetX2() const {return fX2;} | Double_t GetX2() const {return fX2;} | |||
Double_t GetY1() const {return fY1;} | Double_t GetY1() const {return fY1;} | |||
Double_t GetY2() const {return fY2;} | Double_t GetY2() const {return fY2;} | |||
Bool_t IsHorizontal(); | Bool_t IsHorizontal(); | |||
Bool_t IsVertical(); | Bool_t IsVertical(); | |||
virtual void ls(Option_t *option="") const; | virtual void ls(Option_t *option="") const; | |||
virtual void Paint(Option_t *option=""); | virtual void Paint(Option_t *option=""); | |||
virtual void PaintLine(Double_t x1, Double_t y1,Double_t x2, Double_t | virtual void PaintLine(Double_t x1, Double_t y1,Double_t x2, Dou | |||
y2); | ble_t y2); | |||
virtual void PaintLineNDC(Double_t u1, Double_t v1,Double_t u2, Double | virtual void PaintLineNDC(Double_t u1, Double_t v1,Double_t u2, | |||
_t v2); | Double_t v2); | |||
virtual void Print(Option_t *option="") const; | virtual void Print(Option_t *option="") const; | |||
virtual void SavePrimitive(ostream &out, Option_t *option = ""); | virtual void SavePrimitive(ostream &out, Option_t *option = ""); | |||
virtual void SetNDC(Bool_t isNDC=kTRUE); | virtual void SetNDC(Bool_t isNDC=kTRUE); | |||
void SetHorizontal(Bool_t set = kTRUE); // *TOGGLE* *GETTER=Is | void SetHorizontal(Bool_t set = kTRUE); // *TOGGLE* *GET | |||
Horizontal | TER=IsHorizontal | |||
void SetVertical(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsVe | void SetVertical(Bool_t set = kTRUE); // *TOGGLE* *GETTE | |||
rtical | R=IsVertical | |||
virtual void SetX1(Double_t x1) {fX1=x1;} | virtual void SetX1(Double_t x1) {fX1=x1;} | |||
virtual void SetX2(Double_t x2) {fX2=x2;} | virtual void SetX2(Double_t x2) {fX2=x2;} | |||
virtual void SetY1(Double_t y1) {fY1=y1;} | virtual void SetY1(Double_t y1) {fY1=y1;} | |||
virtual void SetY2(Double_t y2) {fY2=y2;} | virtual void SetY2(Double_t y2) {fY2=y2;} | |||
virtual Rectangle_t GetBBox(); | ||||
virtual TPoint GetBBoxCenter(); | ||||
virtual void SetBBoxCenter(const TPoint &p); | ||||
virtual void SetBBoxCenterX(const Int_t x); | ||||
virtual void SetBBoxCenterY(const Int_t y); | ||||
virtual void SetBBoxX1(const Int_t x); | ||||
virtual void SetBBoxX2(const Int_t x); | ||||
virtual void SetBBoxY1(const Int_t y); | ||||
virtual void SetBBoxY2(const Int_t y); | ||||
ClassDef(TLine,2) //A line segment | ClassDef(TLine,3) //A line segment | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
33 lines changed or deleted | 49 lines changed or added | |||
TMarker.h | TMarker.h | |||
---|---|---|---|---|
skipping to change at line 26 | skipping to change at line 26 | |||
// // | // // | |||
// TMarker // | // TMarker // | |||
// // | // // | |||
// Marker. // | // Marker. // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TAttMarker | #ifndef ROOT_TAttMarker | |||
#include "TAttMarker.h" | #include "TAttMarker.h" | |||
#endif | #endif | |||
#ifndef ROOT_TNamed | #ifndef ROOT_TNamed | |||
#include "TNamed.h" | #include "TNamed.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttBBox2D | ||||
#include "TAttBBox2D.h" | ||||
#endif | ||||
#ifndef ROOT_GuiTypes | ||||
#include "GuiTypes.h" | ||||
#endif | ||||
class TMarker : public TObject, public TAttMarker { | class TPoint; | |||
class TMarker : public TObject, public TAttMarker, public TAttBBox2D { | ||||
protected: | protected: | |||
Double_t fX; //X position of marker (left,center,etc..) | Double_t fX; //X position of marker (left,center,etc..) | |||
Double_t fY; //Y position of marker (left,center,etc..) | Double_t fY; //Y position of marker (left,center,etc..) | |||
public: | public: | |||
// TMarker status bits | // TMarker status bits | |||
enum { kMarkerNDC = BIT(14) }; | enum { kMarkerNDC = BIT(14) }; | |||
TMarker(); | TMarker(); | |||
skipping to change at line 63 | skipping to change at line 70 | |||
virtual void ls(Option_t *option="") const; | virtual void ls(Option_t *option="") const; | |||
virtual void Paint(Option_t *option=""); | virtual void Paint(Option_t *option=""); | |||
virtual void PaintMarker(Double_t x, Double_t y); | virtual void PaintMarker(Double_t x, Double_t y); | |||
virtual void PaintMarkerNDC(Double_t u, Double_t v); | virtual void PaintMarkerNDC(Double_t u, Double_t v); | |||
virtual void Print(Option_t *option="") const; | virtual void Print(Option_t *option="") const; | |||
virtual void SavePrimitive(ostream &out, Option_t *option = ""); | virtual void SavePrimitive(ostream &out, Option_t *option = ""); | |||
virtual void SetNDC(Bool_t isNDC=kTRUE); | virtual void SetNDC(Bool_t isNDC=kTRUE); | |||
virtual void SetX(Double_t x) { fX = x;} // *MENU* | virtual void SetX(Double_t x) { fX = x;} // *MENU* | |||
virtual void SetY(Double_t y) { fY = y;} // *MENU* | virtual void SetY(Double_t y) { fY = y;} // *MENU* | |||
virtual Rectangle_t GetBBox(); | ||||
virtual TPoint GetBBoxCenter(); | ||||
virtual void SetBBoxCenter(const TPoint &p); | ||||
virtual void SetBBoxCenterX(const Int_t x); | ||||
virtual void SetBBoxCenterY(const Int_t y); | ||||
virtual void SetBBoxX1(const Int_t x); | ||||
virtual void SetBBoxX2(const Int_t x); | ||||
virtual void SetBBoxY1(const Int_t y); | ||||
virtual void SetBBoxY2(const Int_t y); | ||||
static void DisplayMarkerTypes(); | static void DisplayMarkerTypes(); | |||
ClassDef(TMarker,2) //Marker | ClassDef(TMarker,3) //Marker | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 5 change blocks. | ||||
3 lines changed or deleted | 20 lines changed or added | |||
TMath.h | TMath.h | |||
---|---|---|---|---|
skipping to change at line 786 | skipping to change at line 786 | |||
return TMath::GeomMean(a, a+n); | return TMath::GeomMean(a, a+n); | |||
} | } | |||
template <typename Iterator> | template <typename Iterator> | |||
Double_t TMath::RMS(Iterator first, Iterator last) | Double_t TMath::RMS(Iterator first, Iterator last) | |||
{ | { | |||
// Return the Standard Deviation of an array defined by the iterators. | // Return the Standard Deviation of an array defined by the iterators. | |||
// Note that this function returns the sigma(standard deviation) and | // Note that this function returns the sigma(standard deviation) and | |||
// not the root mean square of the array. | // not the root mean square of the array. | |||
// Use the two pass algorithm, which is slower (! a factor of 2) but muc | ||||
h more | ||||
// precise. Since we have a vector the 2 pass algorithm is still faster | ||||
than the | ||||
// Welford algorithm. (See also ROOT-5545) | ||||
Double_t n = 0; | Double_t n = 0; | |||
Double_t tot = 0, tot2 =0, adouble; | Double_t tot = 0; | |||
Double_t mean = TMath::Mean(first,last); | ||||
while ( first != last ) { | while ( first != last ) { | |||
adouble=Double_t(*first); | Double_t x = Double_t(*first); | |||
tot += adouble; tot2 += adouble*adouble; | tot += (x - mean)*(x - mean); | |||
++first; | ++first; | |||
++n; | ++n; | |||
} | } | |||
Double_t n1 = 1./n; | Double_t rms = (n > 1) ? TMath::Sqrt(tot/(n-1)) : 0.0; | |||
Double_t mean = tot*n1; | ||||
Double_t rms = TMath::Sqrt(TMath::Abs(tot2*n1 -mean*mean)); | ||||
return rms; | return rms; | |||
} | } | |||
template <typename T> | template <typename T> | |||
Double_t TMath::RMS(Long64_t n, const T *a) | Double_t TMath::RMS(Long64_t n, const T *a) | |||
{ | { | |||
// Return the Standard Deviation of an array a with length n. | // Return the Standard Deviation of an array a with length n. | |||
// Note that this function returns the sigma(standard deviation) and | // Note that this function returns the sigma(standard deviation) and | |||
// not the root mean square of the array. | // not the root mean square of the array. | |||
End of changes. 4 change blocks. | ||||
6 lines changed or deleted | 11 lines changed or added | |||
TMathText.h | TMathText.h | |||
---|---|---|---|---|
skipping to change at line 29 | skipping to change at line 29 | |||
#endif | #endif | |||
#ifndef ROOT_TAttFill | #ifndef ROOT_TAttFill | |||
#include "TAttFill.h" | #include "TAttFill.h" | |||
#endif | #endif | |||
class TMathTextRenderer; | class TMathTextRenderer; | |||
class TMathText | class TMathText | |||
: public TText, public TAttFill { | : public TText, public TAttFill { | |||
protected: | protected: | |||
void *fRenderer; | void *fRenderer; //!TMathText Painter | |||
TMathText &operator=(const TMathText &); | TMathText &operator=(const TMathText &); | |||
void Render(const Double_t x, const Double_t y, | void Render(const Double_t x, const Double_t y, | |||
const Double_t size, const Double_t angle, | const Double_t size, const Double_t angle, | |||
const Char_t *t, const Int_t length) ; | const Char_t *t, const Int_t length) ; | |||
void GetSize(Double_t &x0, Double_t &y0, | void GetSize(Double_t &x0, Double_t &y0, | |||
Double_t &x1, Double_t &y1, | Double_t &x1, Double_t &y1, | |||
const Double_t size, const Double_t angle, | const Double_t size, const Double_t angle, | |||
const Char_t *t, const Int_t length ); | const Char_t *t, const Int_t length ); | |||
void GetAlignPoint(Double_t &x0, Double_t &y0, | void GetAlignPoint(Double_t &x0, Double_t &y0, | |||
skipping to change at line 67 | skipping to change at line 67 | |||
Double_t GetXsize(void); | Double_t GetXsize(void); | |||
Double_t GetYsize(void); | Double_t GetYsize(void); | |||
virtual void Paint(Option_t *option = ""); | virtual void Paint(Option_t *option = ""); | |||
virtual void PaintMathText( | virtual void PaintMathText( | |||
Double_t x, Double_t y, Double_t angle, Double_t siz e, | Double_t x, Double_t y, Double_t angle, Double_t siz e, | |||
const char *text); | const char *text); | |||
virtual void SavePrimitive( | virtual void SavePrimitive( | |||
std::ostream &out, Option_t *option = ""); | std::ostream &out, Option_t *option = ""); | |||
friend class TMathTextRenderer; | friend class TMathTextRenderer; | |||
ClassDef(TMathText,1) //TeX mathematical formula | ClassDef(TMathText,2) //TeX mathematical formula | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
TMatrixTUtils.h | TMatrixTUtils.h | |||
---|---|---|---|---|
skipping to change at line 127 | skipping to change at line 127 | |||
Int_t fInc; // if ptr = @a[row,i], then ptr+ inc = @a[row,i+1] | Int_t fInc; // if ptr = @a[row,i], then ptr+ inc = @a[row,i+1] | |||
const Element *fPtr; // pointer to the a[row,0] | const Element *fPtr; // pointer to the a[row,0] | |||
public: | public: | |||
TMatrixTRow_const() { fMatrix = 0; fRowInd = 0; fInc = 0; fPtr = 0; } | TMatrixTRow_const() { fMatrix = 0; fRowInd = 0; fInc = 0; fPtr = 0; } | |||
TMatrixTRow_const(const TMatrixT <Element> &matrix,Int_t row); | TMatrixTRow_const(const TMatrixT <Element> &matrix,Int_t row); | |||
TMatrixTRow_const(const TMatrixTSym<Element> &matrix,Int_t row); | TMatrixTRow_const(const TMatrixTSym<Element> &matrix,Int_t row); | |||
TMatrixTRow_const(const TMatrixTRow_const<Element>& trc): | TMatrixTRow_const(const TMatrixTRow_const<Element>& trc): | |||
fMatrix(trc.fMatrix), fRowInd(trc.fRowInd), fInc(trc.fInc), fPtr(trc.fP tr) { } | fMatrix(trc.fMatrix), fRowInd(trc.fRowInd), fInc(trc.fInc), fPtr(trc.fP tr) { } | |||
TMatrixTRow_const<Element>& operator=(const TMatrixTRow_const<Element>& t rc) { | TMatrixTRow_const<Element>& operator=(const TMatrixTRow_const<Element>& t rc) { | |||
fMatrix=trc.fMatrix; fRowInd=trc.fRowInd; fInc=trc.fInc; fPtr=trc.fPtr; return *this;} | if(this != &trc) { fMatrix=trc.fMatrix; fRowInd=trc.fRowInd; fInc=trc.f Inc; fPtr=trc.fPtr; } return *this;} | |||
virtual ~TMatrixTRow_const() { } | virtual ~TMatrixTRow_const() { } | |||
inline const TMatrixTBase<Element> *GetMatrix () const { return fMatrix ; } | inline const TMatrixTBase<Element> *GetMatrix () const { return fMatrix ; } | |||
inline Int_t GetRowIndex() const { return fRowInd ; } | inline Int_t GetRowIndex() const { return fRowInd ; } | |||
inline Int_t GetInc () const { return fInc; } | inline Int_t GetInc () const { return fInc; } | |||
inline const Element *GetPtr () const { return fPtr; } | inline const Element *GetPtr () const { return fPtr; } | |||
inline const Element &operator ()(Int_t i) const { | inline const Element &operator ()(Int_t i) const { | |||
R__ASSERT(fMatrix->IsValid()); | R__ASSERT(fMatrix->IsValid()); | |||
const Int_t acoln = i-fMatrix->GetColLwb(); | const Int_t acoln = i-fMatrix->GetColLwb(); | |||
if (acoln < fMatrix->GetNcols() && acoln >= 0) | if (acoln < fMatrix->GetNcols() && acoln >= 0) | |||
skipping to change at line 222 | skipping to change at line 222 | |||
Int_t fInc; // if ptr = @a[i,col], then ptr+ inc = @a[i+1,col] | Int_t fInc; // if ptr = @a[i,col], then ptr+ inc = @a[i+1,col] | |||
const Element *fPtr; // pointer to the a[0,col] colum n | const Element *fPtr; // pointer to the a[0,col] colum n | |||
public: | public: | |||
TMatrixTColumn_const() { fMatrix = 0; fColInd = 0; fInc = 0; fPtr = 0; } | TMatrixTColumn_const() { fMatrix = 0; fColInd = 0; fInc = 0; fPtr = 0; } | |||
TMatrixTColumn_const(const TMatrixT <Element> &matrix,Int_t col); | TMatrixTColumn_const(const TMatrixT <Element> &matrix,Int_t col); | |||
TMatrixTColumn_const(const TMatrixTSym<Element> &matrix,Int_t col); | TMatrixTColumn_const(const TMatrixTSym<Element> &matrix,Int_t col); | |||
TMatrixTColumn_const(const TMatrixTColumn_const<Element>& trc): | TMatrixTColumn_const(const TMatrixTColumn_const<Element>& trc): | |||
fMatrix(trc.fMatrix), fColInd(trc.fColInd), fInc(trc.fInc), fPtr(trc.f Ptr) { } | fMatrix(trc.fMatrix), fColInd(trc.fColInd), fInc(trc.fInc), fPtr(trc.f Ptr) { } | |||
TMatrixTColumn_const<Element>& operator=(const TMatrixTColumn_const<Elem ent>& trc) { | TMatrixTColumn_const<Element>& operator=(const TMatrixTColumn_const<Elem ent>& trc) { | |||
fMatrix=trc.fMatrix; fColInd=trc.fColInd; fInc=trc.fInc; fPtr=trc.fPtr ; return *this;} | if(this != &trc) { fMatrix=trc.fMatrix; fColInd=trc.fColInd; fInc=trc. fInc; fPtr=trc.fPtr; } return *this;} | |||
virtual ~TMatrixTColumn_const() { } | virtual ~TMatrixTColumn_const() { } | |||
inline const TMatrixTBase <Element> *GetMatrix () const { return fMatri x; } | inline const TMatrixTBase <Element> *GetMatrix () const { return fMatri x; } | |||
inline Int_t GetColIndex() const { return fColIn d; } | inline Int_t GetColIndex() const { return fColIn d; } | |||
inline Int_t GetInc () const { return fInc; } | inline Int_t GetInc () const { return fInc; } | |||
inline const Element *GetPtr () const { return fPtr; } | inline const Element *GetPtr () const { return fPtr; } | |||
inline const Element &operator ()(Int_t i) const { | inline const Element &operator ()(Int_t i) const { | |||
R__ASSERT(fMatrix->IsValid()); | R__ASSERT(fMatrix->IsValid()); | |||
const Int_t arown = i-fMatrix->GetRowLwb(); | const Int_t arown = i-fMatrix->GetRowLwb(); | |||
if (arown < fMatrix->GetNrows() && arown >= 0) | if (arown < fMatrix->GetNrows() && arown >= 0) | |||
skipping to change at line 318 | skipping to change at line 318 | |||
Int_t fNdiag; // number of diag elems, min(nro ws,ncols) | Int_t fNdiag; // number of diag elems, min(nro ws,ncols) | |||
const Element *fPtr; // pointer to the a[0,0] | const Element *fPtr; // pointer to the a[0,0] | |||
public: | public: | |||
TMatrixTDiag_const() { fMatrix = 0; fInc = 0; fNdiag = 0; fPtr = 0; } | TMatrixTDiag_const() { fMatrix = 0; fInc = 0; fNdiag = 0; fPtr = 0; } | |||
TMatrixTDiag_const(const TMatrixT <Element> &matrix); | TMatrixTDiag_const(const TMatrixT <Element> &matrix); | |||
TMatrixTDiag_const(const TMatrixTSym<Element> &matrix); | TMatrixTDiag_const(const TMatrixTSym<Element> &matrix); | |||
TMatrixTDiag_const(const TMatrixTDiag_const<Element>& trc): | TMatrixTDiag_const(const TMatrixTDiag_const<Element>& trc): | |||
fMatrix(trc.fMatrix), fInc(trc.fInc), fNdiag(trc.fNdiag), fPtr(trc.fPtr ) { } | fMatrix(trc.fMatrix), fInc(trc.fInc), fNdiag(trc.fNdiag), fPtr(trc.fPtr ) { } | |||
TMatrixTDiag_const<Element>& operator=(const TMatrixTDiag_const<Element> & trc) { | TMatrixTDiag_const<Element>& operator=(const TMatrixTDiag_const<Element> & trc) { | |||
fMatrix=trc.fMatrix; fInc=trc.fInc; fNdiag=trc.fNdiag; fPtr=trc.fPtr; return *this;} | if(this != &trc) { fMatrix=trc.fMatrix; fInc=trc.fInc; fNdiag=trc.fNd iag; fPtr=trc.fPtr; } return *this;} | |||
virtual ~TMatrixTDiag_const() { } | virtual ~TMatrixTDiag_const() { } | |||
inline const TMatrixTBase<Element> *GetMatrix() const { return fMatrix; } | inline const TMatrixTBase<Element> *GetMatrix() const { return fMatrix; } | |||
inline const Element *GetPtr () const { return fPtr; } | inline const Element *GetPtr () const { return fPtr; } | |||
inline Int_t GetInc () const { return fInc; } | inline Int_t GetInc () const { return fInc; } | |||
inline const Element &operator ()(Int_t i) const { | inline const Element &operator ()(Int_t i) const { | |||
R__ASSERT(fMatrix->IsValid()); | R__ASSERT(fMatrix->IsValid()); | |||
if (i < fNdiag && i >= 0) | if (i < fNdiag && i >= 0) | |||
return fPtr[i*fInc]; | return fPtr[i*fInc]; | |||
else { | else { | |||
skipping to change at line 407 | skipping to change at line 407 | |||
Int_t fNelems; // | Int_t fNelems; // | |||
const Element *fPtr; // pointer to the a[0,0] | const Element *fPtr; // pointer to the a[0,0] | |||
public: | public: | |||
TMatrixTFlat_const() { fMatrix = 0; fNelems = 0; fPtr = 0; } | TMatrixTFlat_const() { fMatrix = 0; fNelems = 0; fPtr = 0; } | |||
TMatrixTFlat_const(const TMatrixT <Element> &matrix); | TMatrixTFlat_const(const TMatrixT <Element> &matrix); | |||
TMatrixTFlat_const(const TMatrixTSym<Element> &matrix); | TMatrixTFlat_const(const TMatrixTSym<Element> &matrix); | |||
TMatrixTFlat_const(const TMatrixTFlat_const<Element>& trc): | TMatrixTFlat_const(const TMatrixTFlat_const<Element>& trc): | |||
fMatrix(trc.fMatrix), fNelems(trc.fNelems), fPtr(trc.fPtr) { } | fMatrix(trc.fMatrix), fNelems(trc.fNelems), fPtr(trc.fPtr) { } | |||
TMatrixTFlat_const<Element>& operator=(const TMatrixTFlat_const<Element> & trc) { | TMatrixTFlat_const<Element>& operator=(const TMatrixTFlat_const<Element> & trc) { | |||
fMatrix=trc.fMatrix; fNelems=trc.fNelems; fPtr=trc.fPtr; return *this;} | if(this != &trc) { fMatrix=trc.fMatrix; fNelems=trc.fNelems; fPtr=trc .fPtr; } return *this;} | |||
virtual ~TMatrixTFlat_const() { } | virtual ~TMatrixTFlat_const() { } | |||
inline const TMatrixTBase<Element> *GetMatrix() const { return fMatrix; } | inline const TMatrixTBase<Element> *GetMatrix() const { return fMatrix; } | |||
inline const Element *GetPtr () const { return fPtr; } | inline const Element *GetPtr () const { return fPtr; } | |||
inline const Element &operator ()(Int_t i) const { | inline const Element &operator ()(Int_t i) const { | |||
R__ASSERT(fMatrix->IsValid()); | R__ASSERT(fMatrix->IsValid()); | |||
if (i < fNelems && i >= 0) | if (i < fNelems && i >= 0) | |||
return fPtr[i]; | return fPtr[i]; | |||
else { | else { | |||
Error("operator()","Request element(%d) outside matrix range of 0 - %d",i,fNelems); | Error("operator()","Request element(%d) outside matrix range of 0 - %d",i,fNelems); | |||
skipping to change at line 587 | skipping to change at line 587 | |||
Int_t fNindex; // index range | Int_t fNindex; // index range | |||
const Int_t *fColPtr; // column index pointer | const Int_t *fColPtr; // column index pointer | |||
const Element *fDataPtr; // data pointer | const Element *fDataPtr; // data pointer | |||
public: | public: | |||
TMatrixTSparseRow_const() { fMatrix = 0; fRowInd = 0; fNindex = 0; fColP tr = 0; fDataPtr = 0; } | TMatrixTSparseRow_const() { fMatrix = 0; fRowInd = 0; fNindex = 0; fColP tr = 0; fDataPtr = 0; } | |||
TMatrixTSparseRow_const(const TMatrixTSparse<Element> &matrix,Int_t row) ; | TMatrixTSparseRow_const(const TMatrixTSparse<Element> &matrix,Int_t row) ; | |||
TMatrixTSparseRow_const(const TMatrixTSparseRow_const<Element>& trc): | TMatrixTSparseRow_const(const TMatrixTSparseRow_const<Element>& trc): | |||
fMatrix(trc.fMatrix), fRowInd(trc.fRowInd), fNindex(trc.fNindex), fCol Ptr(trc.fColPtr), fDataPtr(trc.fDataPtr) { } | fMatrix(trc.fMatrix), fRowInd(trc.fRowInd), fNindex(trc.fNindex), fCol Ptr(trc.fColPtr), fDataPtr(trc.fDataPtr) { } | |||
TMatrixTSparseRow_const<Element>& operator=(const TMatrixTSparseRow_cons t<Element>& trc) { | TMatrixTSparseRow_const<Element>& operator=(const TMatrixTSparseRow_cons t<Element>& trc) { | |||
fMatrix=trc.fMatrix; fRowInd=trc.fRowInd; fNindex=trc.fNindex; fColPtr =trc.fColPtr; fDataPtr=trc.fDataPtr; return *this;} | if(this != &trc) { fMatrix=trc.fMatrix; fRowInd=trc.fRowInd; fNindex=t rc.fNindex; fColPtr=trc.fColPtr; fDataPtr=trc.fDataPtr; } return *this;} | |||
virtual ~TMatrixTSparseRow_const() { } | virtual ~TMatrixTSparseRow_const() { } | |||
inline const TMatrixTBase<Element> *GetMatrix () const { return fMatrix ; } | inline const TMatrixTBase<Element> *GetMatrix () const { return fMatrix ; } | |||
inline const Element *GetDataPtr () const { return fDataPt r; } | inline const Element *GetDataPtr () const { return fDataPt r; } | |||
inline const Int_t *GetColPtr () const { return fColPtr ; } | inline const Int_t *GetColPtr () const { return fColPtr ; } | |||
inline Int_t GetRowIndex() const { return fRowInd ; } | inline Int_t GetRowIndex() const { return fRowInd ; } | |||
inline Int_t GetNindex () const { return fNindex ; } | inline Int_t GetNindex () const { return fNindex ; } | |||
Element operator()(Int_t i) const; | Element operator()(Int_t i) const; | |||
inline Element operator[](Int_t i) const { return (*(const TMatrixTSpars eRow_const<Element> *)this)(i); } | inline Element operator[](Int_t i) const { return (*(const TMatrixTSpars eRow_const<Element> *)this)(i); } | |||
skipping to change at line 651 | skipping to change at line 651 | |||
const TMatrixTSparse<Element> *fMatrix; // the matrix I am the diagona l of | const TMatrixTSparse<Element> *fMatrix; // the matrix I am the diagona l of | |||
Int_t fNdiag; // number of diag elems, min(nro ws,ncols) | Int_t fNdiag; // number of diag elems, min(nro ws,ncols) | |||
const Element *fDataPtr; // data pointer | const Element *fDataPtr; // data pointer | |||
public: | public: | |||
TMatrixTSparseDiag_const() { fMatrix = 0; fNdiag = 0; fDataPtr = 0; } | TMatrixTSparseDiag_const() { fMatrix = 0; fNdiag = 0; fDataPtr = 0; } | |||
TMatrixTSparseDiag_const(const TMatrixTSparse<Element> &matrix); | TMatrixTSparseDiag_const(const TMatrixTSparse<Element> &matrix); | |||
TMatrixTSparseDiag_const(const TMatrixTSparseDiag_const<Element>& trc): | TMatrixTSparseDiag_const(const TMatrixTSparseDiag_const<Element>& trc): | |||
fMatrix(trc.fMatrix), fNdiag(trc.fNdiag), fDataPtr(trc.fDataPtr) { } | fMatrix(trc.fMatrix), fNdiag(trc.fNdiag), fDataPtr(trc.fDataPtr) { } | |||
TMatrixTSparseDiag_const<Element>& operator=(const TMatrixTSparseDiag_co nst<Element>& trc) { | TMatrixTSparseDiag_const<Element>& operator=(const TMatrixTSparseDiag_co nst<Element>& trc) { | |||
fMatrix=trc.fMatrix; fNdiag=trc.fNdiag; fDataPtr=trc.fDataPtr; return *this;} | if(this != &trc) { fMatrix=trc.fMatrix; fNdiag=trc.fNdiag; fDataPtr= trc.fDataPtr; } return *this;} | |||
virtual ~TMatrixTSparseDiag_const() { } | virtual ~TMatrixTSparseDiag_const() { } | |||
inline const TMatrixTBase<Element> *GetMatrix () const { return fMatrix; } | inline const TMatrixTBase<Element> *GetMatrix () const { return fMatrix; } | |||
inline const Element *GetDataPtr() const { return fDataPtr ; } | inline const Element *GetDataPtr() const { return fDataPtr ; } | |||
inline Int_t GetNdiags () const { return fNdiag; } | inline Int_t GetNdiags () const { return fNdiag; } | |||
Element operator ()(Int_t i) const; | Element operator ()(Int_t i) const; | |||
inline Element operator [](Int_t i) const { return (*(const TMatrixTSpar seRow_const<Element> *)this)(i); } | inline Element operator [](Int_t i) const { return (*(const TMatrixTSpar seRow_const<Element> *)this)(i); } | |||
ClassDef(TMatrixTSparseDiag_const,0) // Template of Sparse Matrix Diago nal Access class | ClassDef(TMatrixTSparseDiag_const,0) // Template of Sparse Matrix Diago nal Access class | |||
End of changes. 6 change blocks. | ||||
6 lines changed or deleted | 6 lines changed or added | |||
TMinuitMinimizer.h | TMinuitMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 104 | skipping to change at line 104 | |||
/// set upper limit variable (override if minimizer supports them ) | /// set upper limit variable (override if minimizer supports them ) | |||
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ); | virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::stri ng & name , double val , double step , double upper ); | |||
/// set fixed variable (override if minimizer supports them ) | /// set fixed variable (override if minimizer supports them ) | |||
virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */); | virtual bool SetFixedVariable(unsigned int /* ivar */, const std::string & /* name */, double /* val */); | |||
/// set the value of an existing variable | /// set the value of an existing variable | |||
virtual bool SetVariableValue(unsigned int , double ); | virtual bool SetVariableValue(unsigned int , double ); | |||
/// set the step size of an existing variable | ||||
virtual bool SetVariableStepSize(unsigned int , double ); | ||||
/// set the lower-limit of an existing variable | ||||
virtual bool SetVariableLowerLimit(unsigned int , double ); | ||||
/// set the upper-limit of an existing variable | ||||
virtual bool SetVariableUpperLimit(unsigned int , double ); | ||||
/// set the limits of an existing variable | ||||
virtual bool SetVariableLimits(unsigned int ivar, double lower, double u | ||||
pper); | ||||
/// fix an existing variable | ||||
virtual bool FixVariable(unsigned int); | ||||
/// release an existing variable | ||||
virtual bool ReleaseVariable(unsigned int); | ||||
/// query if an existing variable is fixed (i.e. considered constant in | ||||
the minimization) | ||||
/// note that by default all variables are not fixed | ||||
virtual bool IsFixedVariable(unsigned int) const; | ||||
/// get variable settings in a variable object (like ROOT::Fit::ParamsSe | ||||
ttings) | ||||
virtual bool GetVariableSettings(unsigned int, ROOT::Fit::ParameterSetti | ||||
ngs & ) const; | ||||
/// method to perform the minimization | /// method to perform the minimization | |||
virtual bool Minimize(); | virtual bool Minimize(); | |||
/// return minimum function value | /// return minimum function value | |||
virtual double MinValue() const; | virtual double MinValue() const; | |||
/// return expected distance reached from the minimum | /// return expected distance reached from the minimum | |||
virtual double Edm() const; | virtual double Edm() const; | |||
/// return pointer to X values at the minimum | /// return pointer to X values at the minimum | |||
skipping to change at line 231 | skipping to change at line 249 | |||
///release a parameter that is fixed when it is redefined | ///release a parameter that is fixed when it is redefined | |||
void DoReleaseFixParameter( int ivar); | void DoReleaseFixParameter( int ivar); | |||
/// retrieve minimum parameters and errors from TMinuit | /// retrieve minimum parameters and errors from TMinuit | |||
void RetrieveParams(); | void RetrieveParams(); | |||
/// retrieve error matrix from TMinuit | /// retrieve error matrix from TMinuit | |||
void RetrieveErrorMatrix(); | void RetrieveErrorMatrix(); | |||
/// check TMinuit instance | ||||
bool CheckMinuitInstance() const; | ||||
///check parameter | ||||
bool CheckVarIndex(unsigned int ivar) const; | ||||
private: | private: | |||
bool fUsed; | bool fUsed; | |||
bool fMinosRun; | bool fMinosRun; | |||
unsigned int fDim; | unsigned int fDim; | |||
std::vector<double> fParams; | std::vector<double> fParams; // vector of output values | |||
std::vector<double> fErrors; | std::vector<double> fErrors; // vector of output errors | |||
std::vector<double> fCovar; | std::vector<double> fCovar; // vector storing the covariance matrix | |||
ROOT::Minuit::EMinimizerType fType; | ROOT::Minuit::EMinimizerType fType; | |||
TMinuit * fMinuit; | TMinuit * fMinuit; | |||
// need to have a static copy of the function | // need to have a static copy of the function | |||
//NOTE: This is NOT thread safe. | //NOTE: This is NOT thread safe. | |||
static ROOT::Math::IMultiGenFunction * fgFunc; | static ROOT::Math::IMultiGenFunction * fgFunc; | |||
static TMinuit * fgMinuit; | static TMinuit * fgMinuit; | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 31 lines changed or added | |||
TPad.h | TPad.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
// TPad // | // TPad // | |||
// // | // // | |||
// A Graphics pad. // | // A Graphics pad. // | |||
// // | // // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TVirtualPad | #ifndef ROOT_TVirtualPad | |||
#include "TVirtualPad.h" | #include "TVirtualPad.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttBBox2D | ||||
#include "TAttBBox2D.h" | ||||
#endif | ||||
#ifndef ROOT_GuiTypes | ||||
#include "GuiTypes.h" | ||||
#endif | ||||
class TVirtualViewer3D; | class TVirtualViewer3D; | |||
class TVirtualPadPainter; | class TVirtualPadPainter; | |||
class TBrowser; | class TBrowser; | |||
class TBox; | class TBox; | |||
class TLegend; | class TLegend; | |||
class TArrow; | ||||
class TPoint; | ||||
class TPad : public TVirtualPad { | class TPad : public TVirtualPad, public TAttBBox2D { | |||
private: | private: | |||
TObject *fTip; //! tool tip associated with box | TObject *fTip; //! tool tip associated with box | |||
protected: | protected: | |||
Double_t fX1; // X of lower X coordinate | Double_t fX1; // X of lower X coordinate | |||
Double_t fY1; // Y of lower Y coordinate | Double_t fY1; // Y of lower Y coordinate | |||
Double_t fX2; // X of upper X coordinate | Double_t fX2; // X of upper X coordinate | |||
Double_t fY2; // Y of upper Y coordinate | Double_t fY2; // Y of upper Y coordinate | |||
skipping to change at line 68 | skipping to change at line 76 | |||
Double_t fAbsPixeltoXk; // Conversion coefficient for absolute pixel to X World | Double_t fAbsPixeltoXk; // Conversion coefficient for absolute pixel to X World | |||
Double_t fPixeltoXk; // Conversion coefficient for pixel to X World | Double_t fPixeltoXk; // Conversion coefficient for pixel to X World | |||
Double_t fPixeltoX; // xworld = fPixeltoXk + fPixeltoX*x pixel | Double_t fPixeltoX; // xworld = fPixeltoXk + fPixeltoX*x pixel | |||
Double_t fAbsPixeltoYk; // Conversion coefficient for absolute pixel to Y World | Double_t fAbsPixeltoYk; // Conversion coefficient for absolute pixel to Y World | |||
Double_t fPixeltoYk; // Conversion coefficient for pixel to Y World | Double_t fPixeltoYk; // Conversion coefficient for pixel to Y World | |||
Double_t fPixeltoY; // yworld = fPixeltoYk + fPixeltoY*y pixel | Double_t fPixeltoY; // yworld = fPixeltoYk + fPixeltoY*y pixel | |||
Double_t fXlowNDC; // X bottom left corner of pad in NDC [ 0,1] | Double_t fXlowNDC; // X bottom left corner of pad in NDC [ 0,1] | |||
Double_t fYlowNDC; // Y bottom left corner of pad in NDC [ 0,1] | Double_t fYlowNDC; // Y bottom left corner of pad in NDC [ 0,1] | |||
Double_t fXUpNDC; | ||||
Double_t fYUpNDC; | ||||
Double_t fWNDC; // Width of pad along X in NDC | Double_t fWNDC; // Width of pad along X in NDC | |||
Double_t fHNDC; // Height of pad along Y in NDC | Double_t fHNDC; // Height of pad along Y in NDC | |||
Double_t fAbsXlowNDC; // Absolute X top left corner of pad in NDC [0,1] | Double_t fAbsXlowNDC; // Absolute X top left corner of pad in NDC [0,1] | |||
Double_t fAbsYlowNDC; // Absolute Y top left corner of pad in NDC [0,1] | Double_t fAbsYlowNDC; // Absolute Y top left corner of pad in NDC [0,1] | |||
Double_t fAbsWNDC; // Absolute Width of pad along X in NDC | Double_t fAbsWNDC; // Absolute Width of pad along X in NDC | |||
Double_t fAbsHNDC; // Absolute Height of pad along Y in ND C | Double_t fAbsHNDC; // Absolute Height of pad along Y in ND C | |||
Double_t fUxmin; // Minimum value on the X axis | Double_t fUxmin; // Minimum value on the X axis | |||
Double_t fUymin; // Minimum value on the Y axis | Double_t fUymin; // Minimum value on the Y axis | |||
skipping to change at line 138 | skipping to change at line 148 | |||
void PaintDate(); | void PaintDate(); | |||
virtual void SavePrimitive(std::ostream &out, Option_t *option = ""); | virtual void SavePrimitive(std::ostream &out, Option_t *option = ""); | |||
virtual void SetBatch(Bool_t batch=kTRUE); | virtual void SetBatch(Bool_t batch=kTRUE); | |||
private: | private: | |||
TPad(const TPad &pad); // cannot copy pads, use TObject::Clone() | TPad(const TPad &pad); // cannot copy pads, use TObject::Clone() | |||
TPad &operator=(const TPad &rhs); // idem | TPad &operator=(const TPad &rhs); // idem | |||
void CopyBackgroundPixmap(Int_t x, Int_t y); | void CopyBackgroundPixmap(Int_t x, Int_t y); | |||
void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y); | void CopyBackgroundPixmaps(TPad *start, TPad *stop, Int_t x, Int_t y); | |||
void DrawDist(Rectangle_t aBBox, Rectangle_t bBBox, char mode); | ||||
public: | public: | |||
// TPad status bits | // TPad status bits | |||
enum { | enum { | |||
kFraming = BIT(6), | kFraming = BIT(6), | |||
kHori = BIT(9), | kHori = BIT(9), | |||
kClipFrame = BIT(10), | kClipFrame = BIT(10), | |||
kPrintingPS = BIT(11), | kPrintingPS = BIT(11), | |||
kCannotMove = BIT(12), | kCannotMove = BIT(12), | |||
kClearAfterCR = BIT(14) | kClearAfterCR = BIT(14) | |||
skipping to change at line 181 | skipping to change at line 192 | |||
virtual void CopyPixmap(); | virtual void CopyPixmap(); | |||
virtual void CopyPixmaps(); | virtual void CopyPixmaps(); | |||
virtual void DeleteExec(const char *name); | virtual void DeleteExec(const char *name); | |||
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, F loat_t ymargin=0.01, Int_t color=0); // *MENU* | virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, F loat_t ymargin=0.01, Int_t color=0); // *MENU* | |||
virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ym argin=0.01, Int_t color=0); | virtual void DivideSquare(Int_t n, Float_t xmargin=0.01, Float_t ym argin=0.01, Int_t color=0); | |||
virtual void Draw(Option_t *option=""); | virtual void Draw(Option_t *option=""); | |||
virtual void DrawClassObject(const TObject *obj, Option_t *option=" "); | virtual void DrawClassObject(const TObject *obj, Option_t *option=" "); | |||
static void DrawColorTable(); | static void DrawColorTable(); | |||
virtual void DrawCrosshair(); | virtual void DrawCrosshair(); | |||
TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title=""); | TH1F *DrawFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax, const char *title=""); | |||
/// void DrawLine(Double_t x1, Double_t y1, Double_t x2, Dou | ||||
ble_t y2); | ||||
/// void DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, | ||||
Double_t v2); | ||||
/// void DrawText(Double_t x, Double_t y, const char *text); | ||||
/// void DrawTextNDC(Double_t u, Double_t v, const char *tex | ||||
t); | ||||
virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxi s *axis); | virtual void ExecuteEventAxis(Int_t event, Int_t px, Int_t py, TAxi s *axis); | |||
virtual TObject *FindObject(const char *name) const; | virtual TObject *FindObject(const char *name) const; | |||
virtual TObject *FindObject(const TObject *obj) const; | virtual TObject *FindObject(const TObject *obj) const; | |||
virtual void UseCurrentStyle(); // *MENU* | virtual void UseCurrentStyle(); // *MENU* | |||
virtual Short_t GetBorderMode() const { return fBorderMode;} | virtual Short_t GetBorderMode() const { return fBorderMode;} | |||
virtual Short_t GetBorderSize() const { return fBorderSize;} | virtual Short_t GetBorderSize() const { return fBorderSize;} | |||
Int_t GetCrosshair() const; | Int_t GetCrosshair() const; | |||
virtual Int_t GetCanvasID() const; | virtual Int_t GetCanvasID() const; | |||
virtual TCanvasImp *GetCanvasImp() const; | virtual TCanvasImp *GetCanvasImp() const; | |||
TFrame *GetFrame(); | TFrame *GetFrame(); | |||
skipping to change at line 345 | skipping to change at line 352 | |||
virtual void SetTicks(Int_t valuex = 1, Int_t valuey = 1) {fTickx = valuex; fTicky = valuey; Modified();} | virtual void SetTicks(Int_t valuex = 1, Int_t valuey = 1) {fTickx = valuex; fTicky = valuey; Modified();} | |||
virtual void SetTickx(Int_t value = 1) {fTickx = value; Modified(); } // *TOGGLE* | virtual void SetTickx(Int_t value = 1) {fTickx = value; Modified(); } // *TOGGLE* | |||
virtual void SetTicky(Int_t value = 1) {fTicky = value; Modified(); } // *TOGGLE* | virtual void SetTicky(Int_t value = 1) {fTicky = value; Modified(); } // *TOGGLE* | |||
virtual void SetTitle(const char *title="") {fTitle = title;} | virtual void SetTitle(const char *title="") {fTitle = title;} | |||
virtual void SetTheta(Double_t theta=30) {fTheta = theta; Modified( );} | virtual void SetTheta(Double_t theta=30) {fTheta = theta; Modified( );} | |||
virtual void SetPhi(Double_t phi=30) {fPhi = phi; Modified();} | virtual void SetPhi(Double_t phi=30) {fPhi = phi; Modified();} | |||
virtual void SetToolTipText(const char *text, Long_t delayms = 1000 ); | virtual void SetToolTipText(const char *text, Long_t delayms = 1000 ); | |||
virtual void SetVertical(Bool_t vert=kTRUE); | virtual void SetVertical(Bool_t vert=kTRUE); | |||
virtual void SetView(TView *view = 0); | virtual void SetView(TView *view = 0); | |||
virtual void SetViewer3D(TVirtualViewer3D *viewer3d) {fViewer3D = v iewer3d;} | virtual void SetViewer3D(TVirtualViewer3D *viewer3d) {fViewer3D = v iewer3d;} | |||
// | ||||
virtual void SetGLDevice(Int_t dev) {fGLDevice = dev;} | virtual void SetGLDevice(Int_t dev) {fGLDevice = dev;} | |||
virtual void SetCopyGLDevice(Bool_t copy) {fCopyGLDevice = copy;} | virtual void SetCopyGLDevice(Bool_t copy) {fCopyGLDevice = copy;} | |||
// | ||||
virtual void ShowGuidelines(TObject *object, const Int_t event, con | ||||
st char mode = 'i', const bool cling = true); | ||||
virtual void Update(); | virtual void Update(); | |||
/// virtual void UpdateFillAttributes(Int_t col, Int_t sty); | ||||
/// virtual void UpdateLineAttributes(Int_t col, Int_t sty, Int_t wi | ||||
dth); | ||||
/// virtual void UpdateMarkerAttributes(Int_t col, Int_t sty, Float_ | ||||
t msiz); | ||||
/// virtual void UpdateTextAttributes(Int_t align,Float_t angle,Int_ | ||||
t col,Int_t font,Float_t tsize); | ||||
Int_t UtoAbsPixel(Double_t u) const {return Int_t(fUtoAbsPix elk + u*fUtoPixel);} | Int_t UtoAbsPixel(Double_t u) const {return Int_t(fUtoAbsPix elk + u*fUtoPixel);} | |||
Int_t VtoAbsPixel(Double_t v) const {return Int_t(fVtoAbsPix elk + v*fVtoPixel);} | Int_t VtoAbsPixel(Double_t v) const {return Int_t(fVtoAbsPix elk + v*fVtoPixel);} | |||
Int_t UtoPixel(Double_t u) const; | Int_t UtoPixel(Double_t u) const; | |||
Int_t VtoPixel(Double_t v) const; | Int_t VtoPixel(Double_t v) const; | |||
virtual TObject *WaitPrimitive(const char *pname="", const char *emode= ""); | virtual TObject *WaitPrimitive(const char *pname="", const char *emode= ""); | |||
Int_t XtoAbsPixel(Double_t x) const; | Int_t XtoAbsPixel(Double_t x) const; | |||
Int_t YtoAbsPixel(Double_t y) const; | Int_t YtoAbsPixel(Double_t y) const; | |||
Double_t XtoPad(Double_t x) const; | Double_t XtoPad(Double_t x) const; | |||
Double_t YtoPad(Double_t y) const; | Double_t YtoPad(Double_t y) const; | |||
Int_t XtoPixel(Double_t x) const; | Int_t XtoPixel(Double_t x) const; | |||
skipping to change at line 379 | skipping to change at line 383 | |||
virtual void DeleteToolTip(TObject *tip); | virtual void DeleteToolTip(TObject *tip); | |||
virtual void ResetToolTip(TObject *tip); | virtual void ResetToolTip(TObject *tip); | |||
virtual void CloseToolTip(TObject *tip); | virtual void CloseToolTip(TObject *tip); | |||
virtual void x3d(Option_t *type=""); // Depreciated | virtual void x3d(Option_t *type=""); // Depreciated | |||
virtual TVirtualViewer3D *GetViewer3D(Option_t * type = ""); | virtual TVirtualViewer3D *GetViewer3D(Option_t * type = ""); | |||
virtual Bool_t HasViewer3D() const { return (fViewer3D); } | virtual Bool_t HasViewer3D() const { return (fViewer3D); } | |||
virtual void ReleaseViewer3D(Option_t * type = ""); | virtual void ReleaseViewer3D(Option_t * type = ""); | |||
virtual Rectangle_t GetBBox(); | ||||
virtual TPoint GetBBoxCenter(); | ||||
virtual void SetBBoxCenter(const TPoint &p); | ||||
virtual void SetBBoxCenterX(const Int_t x); | ||||
virtual void SetBBoxCenterY(const Int_t y); | ||||
virtual void SetBBoxX1(const Int_t x); | ||||
virtual void SetBBoxX2(const Int_t x); | ||||
virtual void SetBBoxY1(const Int_t y); | ||||
virtual void SetBBoxY2(const Int_t y); | ||||
virtual void RecordPave(const TObject *obj); // *SIGNA L* | virtual void RecordPave(const TObject *obj); // *SIGNA L* | |||
virtual void RecordLatex(const TObject *obj); // *SIGNA L* | virtual void RecordLatex(const TObject *obj); // *SIGNA L* | |||
virtual void EventPave() { Emit("EventPave()"); } // *SIGNA L* | virtual void EventPave() { Emit("EventPave()"); } // *SIGNA L* | |||
virtual void StartEditing() { Emit("StartEditing()"); } // *SIGNA L* | virtual void StartEditing() { Emit("StartEditing()"); } // *SIGNA L* | |||
ClassDef(TPad,10) //A Graphics pad | ClassDef(TPad,11) //A Graphics pad | |||
}; | }; | |||
//---- inlines ------------------------------------------------------------ | ||||
----- | ||||
//_________________________________________________________________________ _____ | //_________________________________________________________________________ _____ | |||
inline void TPad::Modified(Bool_t flag) | inline void TPad::Modified(Bool_t flag) | |||
{ | { | |||
if (!fModified && flag) Emit("Modified()"); | if (!fModified && flag) Emit("Modified()"); | |||
fModified = flag; | fModified = flag; | |||
} | } | |||
//_________________________________________________________________________ _____ | //_________________________________________________________________________ _____ | |||
inline void TPad::AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Dou ble_t &y) | inline void TPad::AbsPixeltoXY(Int_t xpixel, Int_t ypixel, Double_t &x, Dou ble_t &y) | |||
{ | { | |||
End of changes. 12 change blocks. | ||||
21 lines changed or deleted | 27 lines changed or added | |||
TPerfStats.h | TPerfStats.h | |||
---|---|---|---|---|
skipping to change at line 133 | skipping to change at line 133 | |||
void SimpleEvent(EEventType type); | void SimpleEvent(EEventType type); | |||
void PacketEvent(const char *slave, const char *slavename, const char *f ilename, | void PacketEvent(const char *slave, const char *slavename, const char *f ilename, | |||
Long64_t eventsprocessed, Double_t latency, | Long64_t eventsprocessed, Double_t latency, | |||
Double_t proctime, Double_t cputime, Long64_t bytesRead ); | Double_t proctime, Double_t cputime, Long64_t bytesRead ); | |||
void FileEvent(const char *slave, const char *slavename, const char *nod ename, const char *filename, | void FileEvent(const char *slave, const char *slavename, const char *nod ename, const char *filename, | |||
Bool_t isStart); | Bool_t isStart); | |||
void FileOpenEvent(TFile *file, const char *filename, Double_t start); | void FileOpenEvent(TFile *file, const char *filename, Double_t start); | |||
void FileReadEvent(TFile *file, Int_t len, Double_t start); | void FileReadEvent(TFile *file, Int_t len, Double_t start); | |||
void FileUnzipEvent(TFile *file, Long64_t pos, Double_t start, Int_t com plen, Int_t objlen); | void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t compl en, Int_t objlen); | |||
void RateEvent(Double_t proctime, Double_t deltatime, | void RateEvent(Double_t proctime, Double_t deltatime, | |||
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); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TPolyMarker3D.h | TPolyMarker3D.h | |||
---|---|---|---|---|
skipping to change at line 42 | skipping to change at line 42 | |||
#ifndef ROOT_TString | #ifndef ROOT_TString | |||
#include "TString.h" | #include "TString.h" | |||
#endif | #endif | |||
class TH1; | class TH1; | |||
class TCollection; | class TCollection; | |||
class TPolyMarker3D : public TObject, public TAttMarker, public TAtt3D | class TPolyMarker3D : public TObject, public TAttMarker, public TAtt3D | |||
{ | { | |||
protected: | protected: | |||
Int_t fN; //number of points | Int_t fN; //Number of allocated points | |||
Float_t *fP; //[3*fN] Array of X,Y,Z coordinates | Float_t *fP; //[3*fN] Array of X,Y,Z coordinates | |||
TString fOption; //options | TString fOption; //Options | |||
Int_t fLastPoint; //The index of the last filled point | Int_t fLastPoint; //The index of the last filled point | |||
TString fName; //name of polymarker | TString fName; //Name of polymarker | |||
TPolyMarker3D& operator=(const TPolyMarker3D&); | TPolyMarker3D& operator=(const TPolyMarker3D&); | |||
public: | public: | |||
TPolyMarker3D(); | TPolyMarker3D(); | |||
TPolyMarker3D(Int_t n, Marker_t marker=1, Option_t *option=""); | TPolyMarker3D(Int_t n, Marker_t marker=1, Option_t *option=""); | |||
TPolyMarker3D(Int_t n, Float_t *p, Marker_t marker=1, Option_t *option=" "); | TPolyMarker3D(Int_t n, Float_t *p, Marker_t marker=1, Option_t *option=" "); | |||
TPolyMarker3D(Int_t n, Double_t *p, Marker_t marker=1, Option_t *option= ""); | TPolyMarker3D(Int_t n, Double_t *p, Marker_t marker=1, Option_t *option= ""); | |||
TPolyMarker3D(const TPolyMarker3D &p); | TPolyMarker3D(const TPolyMarker3D &p); | |||
virtual ~TPolyMarker3D(); | virtual ~TPolyMarker3D(); | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||
TProfile2D.h | TProfile2D.h | |||
---|---|---|---|---|
skipping to change at line 55 | skipping to change at line 55 | |||
virtual Int_t BufferFill(Double_t, Double_t) {return -2;} //may not u se | virtual Int_t BufferFill(Double_t, Double_t) {return -2;} //may not u se | |||
virtual Int_t BufferFill(Double_t, Double_t, Double_t) {return -2;} / /may not use | virtual Int_t BufferFill(Double_t, Double_t, Double_t) {return -2;} / /may not use | |||
virtual Int_t BufferFill(Double_t x, Double_t y, Double_t z, Double_t w); | virtual Int_t BufferFill(Double_t x, Double_t y, Double_t z, Double_t w); | |||
// helper methods for the Merge unification in TProfileHelper | // helper methods for the Merge unification in TProfileHelper | |||
void SetBins(const Int_t* nbins, const Double_t* range) { SetBins(nbins[ 0], range[0], range[1], | void SetBins(const Int_t* nbins, const Double_t* range) { SetBins(nbins[ 0], range[0], range[1], | |||
nbins[ 1], range[2], range[3]); }; | nbins[ 1], range[2], range[3]); }; | |||
Int_t Fill(const Double_t* v) { return Fill(v[0], v[1], v[2], v[3]); }; | Int_t Fill(const Double_t* v) { return Fill(v[0], v[1], v[2], v[3]); }; | |||
virtual TProfile *DoProfile(bool onX, const char *name, Int_t firstbin, | ||||
Int_t lastbin, Option_t *option) const; | ||||
using TH2::Fill; | using TH2::Fill; | |||
Int_t Fill(Double_t, Double_t) {return TH2::Fill(0); } //May NotUse | Int_t Fill(Double_t, Double_t) {return TH2::Fill(0); } //May NotUse | |||
private: | private: | |||
Double_t *GetB() {return &fBinEntries.fArray[0];} | Double_t *GetB() {return &fBinEntries.fArray[0];} | |||
Double_t *GetB2() {return (fBinSumw2.fN ? &fBinSumw2.fArray[0] : 0 ); } | Double_t *GetB2() {return (fBinSumw2.fN ? &fBinSumw2.fArray[0] : 0 ); } | |||
Double_t *GetW() {return &fArray[0];} | Double_t *GetW() {return &fArray[0];} | |||
Double_t *GetW2() {return &fSumw2.fArray[0];} | Double_t *GetW2() {return &fSumw2.fArray[0];} | |||
void SetBins(Int_t, Double_t, Double_t) | void SetBins(Int_t, Double_t, Double_t) | |||
{ MayNotUse("SetBins(Int_t, Double_t, Double_t"); } | { MayNotUse("SetBins(Int_t, Double_t, Double_t"); } | |||
skipping to change at line 125 | skipping to change at line 127 | |||
virtual Double_t GetZmin() const {return fZmin;} | virtual Double_t GetZmin() const {return fZmin;} | |||
virtual Double_t GetZmax() const {return fZmax;} | virtual Double_t GetZmax() const {return fZmax;} | |||
virtual void LabelsDeflate(Option_t *axis="X"); | virtual void LabelsDeflate(Option_t *axis="X"); | |||
virtual void LabelsInflate(Option_t *axis="X"); | virtual void LabelsInflate(Option_t *axis="X"); | |||
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X") ; | virtual void LabelsOption(Option_t *option="h", Option_t *axis="X") ; | |||
virtual Long64_t Merge(TCollection *list); | virtual Long64_t Merge(TCollection *list); | |||
virtual Bool_t Multiply(TF1 *h1, Double_t c1=1); | virtual Bool_t Multiply(TF1 *h1, Double_t c1=1); | |||
virtual Bool_t Multiply(const TH1 *h1); | virtual Bool_t Multiply(const TH1 *h1); | |||
virtual Bool_t Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU* | virtual Bool_t Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU* | |||
TH2D *ProjectionXY(const char *name="_pxy", Option_t *option ="e") const; | TH2D *ProjectionXY(const char *name="_pxy", Option_t *option ="e") const; | |||
TProfile *ProfileX(const char *name="_pfx", Int_t firstybin=0, I | ||||
nt_t lastybin=-1, Option_t *option="") const; // *MENU* | ||||
TProfile *ProfileY(const char *name="_pfy", Int_t firstxbin=0, I | ||||
nt_t lastxbin=-1, Option_t *option="") const; // *MENU* | ||||
virtual void PutStats(Double_t *stats); | virtual void PutStats(Double_t *stats); | |||
virtual void Reset(Option_t *option=""); | virtual void Reset(Option_t *option=""); | |||
virtual void RebinAxis(Double_t x, TAxis *axis); | virtual void RebinAxis(Double_t x, TAxis *axis); | |||
virtual TProfile2D *Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *newname=""); | virtual TProfile2D *Rebin2D(Int_t nxgroup=2, Int_t nygroup=2, const char *newname=""); | |||
virtual TProfile2D *RebinX(Int_t ngroup=2, const char *newname=""); | virtual TProfile2D *RebinX(Int_t ngroup=2, const char *newname=""); | |||
virtual TProfile2D *RebinY(Int_t ngroup=2, const char *newname=""); | virtual TProfile2D *RebinY(Int_t ngroup=2, const char *newname=""); | |||
virtual void SavePrimitive(ostream &out, Option_t *option = ""); | virtual void SavePrimitive(ostream &out, Option_t *option = ""); | |||
virtual void Scale(Double_t c1=1, Option_t *option=""); | virtual void Scale(Double_t c1=1, Option_t *option=""); | |||
virtual void SetBinEntries(Int_t bin, Double_t w); | virtual void SetBinEntries(Int_t bin, Double_t w); | |||
virtual void SetBins(Int_t nbinsx, Double_t xmin, Double_t xmax, In t_t nbinsy, Double_t ymin, Double_t ymax); | virtual void SetBins(Int_t nbinsx, Double_t xmin, Double_t xmax, In t_t nbinsy, Double_t ymin, Double_t ymax); | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 7 lines changed or added | |||
TProfile3D.h | TProfile3D.h | |||
---|---|---|---|---|
skipping to change at line 66 | skipping to change at line 66 | |||
using TH3::Fill; | using TH3::Fill; | |||
Int_t Fill(Double_t, Double_t,Double_t) {return TH3::Fill(0) ; } //MayNotUse | Int_t Fill(Double_t, Double_t,Double_t) {return TH3::Fill(0) ; } //MayNotUse | |||
Int_t Fill(const char *, const char *, const char *, Double_ t) {return TH3::Fill(0); } //MayNotUse | Int_t Fill(const char *, const char *, const char *, Double_ t) {return TH3::Fill(0); } //MayNotUse | |||
Int_t Fill(const char *, Double_t , const char *, Double_t) {return TH3::Fill(0); } //MayNotUse | Int_t Fill(const char *, Double_t , const char *, Double_t) {return TH3::Fill(0); } //MayNotUse | |||
Int_t Fill(const char *, const char *, Double_t, Double_t) { return TH3::Fill(0); } //MayNotUse | Int_t Fill(const char *, const char *, Double_t, Double_t) { return TH3::Fill(0); } //MayNotUse | |||
Int_t Fill(Double_t, const char *, const char *, Double_t) { return TH3::Fill(0); } //MayNotUse | Int_t Fill(Double_t, const char *, const char *, Double_t) { return TH3::Fill(0); } //MayNotUse | |||
Int_t Fill(Double_t, const char *, Double_t, Double_t) {retu rn TH3::Fill(0); } //MayNotUse | Int_t Fill(Double_t, const char *, Double_t, Double_t) {retu rn TH3::Fill(0); } //MayNotUse | |||
Int_t Fill(Double_t, Double_t, const char *, Double_t) {retu rn TH3::Fill(0); } //MayNotUse | Int_t Fill(Double_t, Double_t, const char *, Double_t) {retu rn TH3::Fill(0); } //MayNotUse | |||
virtual TProfile2D *DoProjectProfile2D(const char* name, const char * ti | ||||
tle, TAxis* projX, TAxis* projY, | ||||
bool originalRange, bool useUF, b | ||||
ool useOF) const; | ||||
private: | private: | |||
Double_t *GetB() {return &fBinEntries.fArray[0];} | Double_t *GetB() {return &fBinEntries.fArray[0];} | |||
Double_t *GetB2() {return (fBinSumw2.fN ? &fBinSumw2.fArray[0] : 0 ); } | Double_t *GetB2() {return (fBinSumw2.fN ? &fBinSumw2.fArray[0] : 0 ); } | |||
Double_t *GetW() {return &fArray[0];} | Double_t *GetW() {return &fArray[0];} | |||
Double_t *GetW2() {return &fSumw2.fArray[0];} | Double_t *GetW2() {return &fSumw2.fArray[0];} | |||
void SetBins(Int_t, Double_t, Double_t) | void SetBins(Int_t, Double_t, Double_t) | |||
{ MayNotUse("SetBins(Int_t, Double_t, Double_t"); } | { MayNotUse("SetBins(Int_t, Double_t, Double_t"); } | |||
void SetBins(Int_t, const Double_t*) | void SetBins(Int_t, const Double_t*) | |||
{ MayNotUse("SetBins(Int_t, const Double_t*"); } | { MayNotUse("SetBins(Int_t, const Double_t*"); } | |||
void SetBins(Int_t, Double_t, Double_t, Int_t, Double_t, Double_t) | void SetBins(Int_t, Double_t, Double_t, Int_t, Double_t, Double_t) | |||
skipping to change at line 123 | skipping to change at line 126 | |||
virtual TArrayD *GetBinSumw2() {return &fBinSumw2;} | virtual TArrayD *GetBinSumw2() {return &fBinSumw2;} | |||
virtual const TArrayD *GetBinSumw2() const {return &fBinSumw2;} | virtual const TArrayD *GetBinSumw2() const {return &fBinSumw2;} | |||
Option_t *GetErrorOption() const; | Option_t *GetErrorOption() const; | |||
virtual void GetStats(Double_t *stats) const; | virtual void GetStats(Double_t *stats) const; | |||
virtual Double_t GetTmin() const {return fTmin;} | virtual Double_t GetTmin() const {return fTmin;} | |||
virtual Double_t GetTmax() const {return fTmax;} | virtual Double_t GetTmax() const {return fTmax;} | |||
virtual Long64_t Merge(TCollection *list); | virtual Long64_t Merge(TCollection *list); | |||
virtual Bool_t Multiply(TF1 *h1, Double_t c1=1); | virtual Bool_t Multiply(TF1 *h1, Double_t c1=1); | |||
virtual Bool_t Multiply(const TH1 *h1); | virtual Bool_t Multiply(const TH1 *h1); | |||
virtual Bool_t Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU* | virtual Bool_t Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option=""); // *MENU* | |||
TH3D *ProjectionXYZ(const char *name="_pxyz", Option_t *opti | virtual TH3D *ProjectionXYZ(const char *name="_pxyz", Option_t *opti | |||
on="e") const; | on="e") const; | |||
virtual TProfile2D *Project3DProfile(Option_t *option="xy") const; // * | ||||
MENU* | ||||
virtual void PutStats(Double_t *stats); | virtual void PutStats(Double_t *stats); | |||
virtual void Reset(Option_t *option=""); | virtual void Reset(Option_t *option=""); | |||
virtual void RebinAxis(Double_t x, TAxis *axis); | virtual void RebinAxis(Double_t x, TAxis *axis); | |||
virtual void SavePrimitive(ostream &out, Option_t *option = ""); | virtual void SavePrimitive(ostream &out, Option_t *option = ""); | |||
virtual void Scale(Double_t c1=1, Option_t *option=""); | virtual void Scale(Double_t c1=1, Option_t *option=""); | |||
virtual void SetBinEntries(Int_t bin, Double_t w); | virtual void SetBinEntries(Int_t bin, Double_t w); | |||
virtual void SetBins(Int_t nbinsx, Double_t xmin, Double_t xmax, | virtual void SetBins(Int_t nbinsx, Double_t xmin, Double_t xmax, | |||
Int_t nbinsy, Double_t ymin, Double_t ymax, | Int_t nbinsy, Double_t ymin, Double_t ymax, | |||
Int_t nbinsz, Double_t zmin, Double_t zmax); | Int_t nbinsz, Double_t zmin, Double_t zmax); | |||
virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, con st Double_t * yBins, Int_t nz, | virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, con st Double_t * yBins, Int_t nz, | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 9 lines changed or added | |||
TProofMgr.h | TProofMgr.h | |||
---|---|---|---|---|
skipping to change at line 113 | skipping to change at line 113 | |||
virtual TList *QuerySessions(Option_t *opt = "S"); | virtual TList *QuerySessions(Option_t *opt = "S"); | |||
virtual TObjString *ReadBuffer(const char *, Long64_t, Int_t) | virtual TObjString *ReadBuffer(const char *, Long64_t, Int_t) | |||
{ return (TObjString *)0; } | { return (TObjString *)0; } | |||
virtual TObjString *ReadBuffer(const char *, const char *) | virtual TObjString *ReadBuffer(const char *, const char *) | |||
{ return (TObjString *)0; } | { return (TObjString *)0; } | |||
virtual Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); | virtual Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); | |||
virtual void ShowWorkers(); | virtual void ShowWorkers(); | |||
virtual Int_t SendMsgToUsers(const char *, const char * = 0); | virtual Int_t SendMsgToUsers(const char *, const char * = 0); | |||
virtual void SetAlias(const char *alias="") { TNamed::SetTitle(al ias); } | virtual void SetAlias(const char *alias="") { TNamed::SetTitle(al ias); } | |||
virtual void SetMssUrl(const char *mss) { fMssUrl = mss; } | virtual void SetMssUrl(const char *mss) { fMssUrl = mss; } | |||
virtual void SetROOTVersion(const char *) { } | virtual Int_t SetROOTVersion(const char *) { return 0; } | |||
virtual void ShowROOTVersions() { } | virtual void ShowROOTVersions() { } | |||
virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); } | virtual void ShutdownSession(Int_t id) { DetachSession(id,"S"); } | |||
virtual void ShutdownSession(TProof *p) { DetachSession(p,"S"); } | virtual void ShutdownSession(TProof *p) { DetachSession(p,"S"); } | |||
// Remote file system actions | // Remote file system actions | |||
virtual Int_t Cp(const char *, const char * = 0, const char * = 0) { return -1; } | virtual Int_t Cp(const char *, const char * = 0, const char * = 0) { return -1; } | |||
virtual void Find(const char * = "~/", const char * = 0, const ch ar * = 0) { } | virtual void Find(const char * = "~/", const char * = 0, const ch ar * = 0) { } | |||
virtual void Grep(const char *, const char * = 0, const char * = 0) { } | virtual void Grep(const char *, const char * = 0, const char * = 0) { } | |||
virtual void Ls(const char * = "~/", const char * = 0, const char * = 0) { } | virtual void Ls(const char * = "~/", const char * = 0, const char * = 0) { } | |||
virtual void More(const char *, const char * = 0, const char * = 0) { } | virtual void More(const char *, const char * = 0, const char * = 0) { } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TPyDispatcher.h | TPyDispatcher.h | |||
---|---|---|---|---|
skipping to change at line 17 | skipping to change at line 17 | |||
// // | // // | |||
// Dispatcher for CINT callbacks into python code. // | // Dispatcher for CINT callbacks into python code. // | |||
// // | // // | |||
/////////////////////////////////////////////////////////////////////////// /// | /////////////////////////////////////////////////////////////////////////// /// | |||
// ROOT | // ROOT | |||
#ifndef ROOT_TObject | #ifndef ROOT_TObject | |||
#include "TObject.h" | #include "TObject.h" | |||
#endif | #endif | |||
class TDNDData; | ||||
class TEveDigitSet; | ||||
class TEveElement; | ||||
class TEveTrack; | ||||
class TEveWindow; | ||||
class TGFrame; | ||||
class TGListTreeItem; | ||||
class TGMdiFrame; | ||||
class TGLPhysicalShape; | ||||
class TGShutterItem; | ||||
class TGLVEntry; | ||||
class TGLViewerBase; | ||||
class TGVFileSplitter; | ||||
class TList; | ||||
class TObject; | ||||
class TPad; | ||||
class TProofProgressInfo; | ||||
class TQCommand; | ||||
class TSlave; | ||||
class TSocket; | ||||
class TVirtualPad; | ||||
struct Event_t; | ||||
// Python | // Python | |||
struct _object; | struct _object; | |||
typedef _object PyObject; | typedef _object PyObject; | |||
class TPyDispatcher : public TObject { | class TPyDispatcher : public TObject { | |||
public: | public: | |||
TPyDispatcher( PyObject* callable ); | TPyDispatcher( PyObject* callable ); | |||
TPyDispatcher( const TPyDispatcher& ); | TPyDispatcher( const TPyDispatcher& ); | |||
TPyDispatcher& operator=( const TPyDispatcher& ); | TPyDispatcher& operator=( const TPyDispatcher& ); | |||
~TPyDispatcher(); | ~TPyDispatcher(); | |||
public: | public: | |||
#ifndef __CINT__ | #ifndef __CINT__ | |||
PyObject* DispatchVA( const char* format = 0, ... ); | PyObject* DispatchVA( const char* format = 0, ... ); | |||
#else | #else | |||
PyObject* DispatchVA( const char* format, ... ); | PyObject* DispatchVA( const char* format, ... ); | |||
#endif | #endif | |||
PyObject* DispatchVA1( const char* clname, void* obj, const char* format , ... ); | ||||
// pre-defined dispatches, same as per TQObject::Emit(); note that | // pre-defined dispatches, same as per TQObject::Emit(); note that | |||
// Emit() maps exclusively to this set, so several builtin types (e.g. | // Emit() maps exclusively to this set, so several builtin types (e.g. | |||
// Int_t, Bool_t, Float_t, etc.) have been omitted here | // Int_t, Bool_t, Float_t, etc.) have been omitted here | |||
PyObject* Dispatch() { return DispatchVA( 0 ); } | PyObject* Dispatch() { return DispatchVA( 0 ); } | |||
PyObject* Dispatch( const char* param ) { return DispatchVA( "s", param ); } | PyObject* Dispatch( const char* param ) { return DispatchVA( "s", param ); } | |||
PyObject* Dispatch( Double_t param ) { return DispatchVA( "d", param ); } | PyObject* Dispatch( Double_t param ) { return DispatchVA( "d", param ); } | |||
PyObject* Dispatch( Long_t param ) { return DispatchVA( "l", param ); } | PyObject* Dispatch( Long_t param ) { return DispatchVA( "l", param ); } | |||
PyObject* Dispatch( Long64_t param ) { return DispatchVA( "L", param ); } | PyObject* Dispatch( Long64_t param ) { return DispatchVA( "L", param ); } | |||
// further selection of pre-defined, existing dispatches | ||||
PyObject* Dispatch( Bool_t param ) { return DispatchVA( "i", param | ||||
); } | ||||
PyObject* Dispatch( char* param ) { return DispatchVA( "s", param | ||||
); } | ||||
PyObject* Dispatch( const char* text, Int_t len ) { return DispatchVA( " | ||||
si", text, len ); } | ||||
PyObject* Dispatch( Int_t param ) { return DispatchVA( "i", param | ||||
); } | ||||
PyObject* Dispatch( Int_t x, Int_t y ) { return DispatchVA( "ii", x, y | ||||
); } | ||||
PyObject* Dispatch( ULong_t param ) { return DispatchVA( "k", param | ||||
); } | ||||
// ULong_t also for Handle_t (and Window_t, etc. ... ) | ||||
PyObject* Dispatch( Event_t* event ) { return DispatchVA1( "Event_t", | ||||
event, 0 ); } | ||||
PyObject* Dispatch( Event_t* event, ULong_t wid ) { return DispatchVA1( | ||||
"Event_t", event, "k", wid ); } | ||||
PyObject* Dispatch( TEveDigitSet* qs, Int_t idx ) { return DispatchVA1( | ||||
"TEveDigitSet", qs, "i", idx ); } | ||||
PyObject* Dispatch( TEveElement* el ) { return DispatchVA1( "TEveEleme | ||||
nt", el, 0 ); } | ||||
PyObject* Dispatch( TEveTrack* et ) { return DispatchVA1( "TEveTrack | ||||
", et, 0 ); } | ||||
PyObject* Dispatch( TEveWindow* window ) { return DispatchVA1( "TEveWind | ||||
ow", window, 0 ); } | ||||
PyObject* Dispatch( TGFrame* frame ) { return DispatchVA1( "TGFrame", | ||||
frame, 0 ); } | ||||
PyObject* Dispatch( TGFrame* frame, Int_t btn ) { | ||||
return DispatchVA1( "TGFrame", frame, "i", btn ); } | ||||
PyObject* Dispatch( TGFrame* frame, Int_t btn, Int_t x, Int_t y ) { | ||||
return DispatchVA1( "TGFrame", frame, "iii", btn, x, y ); } | ||||
PyObject* Dispatch( TGFrame* frame, UInt_t keysym, UInt_t mask ) { | ||||
return DispatchVA1( "TGFrame", frame, "II", keysym, mask ); } | ||||
PyObject* Dispatch( TGListTreeItem* entry ) { return DispatchVA1( "TGLis | ||||
tTreeItem", entry, 0 ); } | ||||
PyObject* Dispatch( TGListTreeItem* entry, UInt_t mask ) { | ||||
return DispatchVA1( "TGListTreeItem", entry, "I", mask ); } | ||||
PyObject* Dispatch( TGListTreeItem* entry, UInt_t keysym, UInt_t mask ) | ||||
{ | ||||
return DispatchVA1( "TGListTreeItem", entry, "II", keysym, mask ); } | ||||
PyObject* Dispatch( TGListTreeItem* entry, Int_t btn ) { | ||||
return DispatchVA1( "TGListTreeItem", entry, "i", btn ); } | ||||
PyObject* Dispatch( TGListTreeItem* entry, Int_t btn, Int_t x, Int_t y ) | ||||
{ | ||||
return DispatchVA1( "TGListTreeItem", entry, "iii", btn, x, y ); } | ||||
PyObject* Dispatch( TGLVEntry* entry, Int_t btn ) { | ||||
return DispatchVA1( "TGLVEntry", entry, "i", btn ); } | ||||
PyObject* Dispatch( TGLVEntry* entry, Int_t btn, Int_t x, Int_t y ) { | ||||
return DispatchVA1( "TGLVEntry", entry, "iii", btn, x, y ); } | ||||
PyObject* Dispatch( TGLViewerBase* viewer ) { | ||||
return DispatchVA1( "TGLViewerBase", viewer, 0 ); } | ||||
PyObject* Dispatch( TGLPhysicalShape* shape ) { | ||||
return DispatchVA1( "TGLPhysicalShape", shape, 0 ); } | ||||
PyObject* Dispatch( TGLPhysicalShape* shape, UInt_t u1, UInt_t u2 ) { | ||||
return DispatchVA1( "TGLPhysicalShape", shape, "II", u1, u2 ); } | ||||
PyObject* Dispatch( TGMdiFrame* frame ) { return DispatchVA1( "TGMdiFram | ||||
e", frame, 0 ); } | ||||
PyObject* Dispatch( TGShutterItem* item ) { return DispatchVA1( "TGShutt | ||||
erItem", item, 0 ); } | ||||
PyObject* Dispatch( TGVFileSplitter* frame ) { return DispatchVA1( "TGVF | ||||
ileSplitter", frame, 0 ); } | ||||
PyObject* Dispatch( TList* objs ) { return DispatchVA1( "TList", o | ||||
bjs, 0 ); } | ||||
PyObject* Dispatch( TObject* obj ) { return DispatchVA1( "TObject", | ||||
obj, 0 ); } | ||||
PyObject* Dispatch( TObject* obj, Bool_t check ) { | ||||
return DispatchVA1( "TObject", obj, "i", check ); } | ||||
PyObject* Dispatch( TObject* obj, UInt_t state ) { | ||||
return DispatchVA1( "TObject", obj, "I", state ); } | ||||
PyObject* Dispatch( TObject* obj, UInt_t button, UInt_t state ) { | ||||
return DispatchVA1( "TObject", obj, "II", button, state ); } | ||||
PyObject* Dispatch( TSocket* sock ) { return DispatchVA1( "TSocket", | ||||
sock, 0 ); } | ||||
PyObject* Dispatch( TVirtualPad* pad ) { return DispatchVA1( "TVirtualP | ||||
ad", pad, 0 ); } | ||||
PyObject* Dispatch( TPad* selpad, TObject* selected, Int_t event ); | ||||
PyObject* Dispatch( Int_t event, Int_t x, Int_t y, TObject* selected ); | ||||
PyObject* Dispatch( TVirtualPad* pad, TObject* obj, Int_t event ); | ||||
PyObject* Dispatch( TGListTreeItem* item, TDNDData* data ); | ||||
PyObject* Dispatch( const char* name, const TList* attr ); | ||||
// for PROOF | ||||
PyObject* Dispatch( const char* msg, Bool_t all ) { return DispatchVA( " | ||||
si", msg, all ); } | ||||
PyObject* Dispatch( Long64_t total, Long64_t processed ) { | ||||
return DispatchVA( "LL", total, processed ); | ||||
} | ||||
PyObject* Dispatch( Long64_t total, Long64_t processed, Long64_t bytesre | ||||
ad, | ||||
Float_t initTime, Float_t procTime, | ||||
Float_t evtrti, Float_t mbrti ) { | ||||
return DispatchVA( "LLLffff", total, processed, bytesread, initTime, | ||||
procTime, evtrti, mbrti ); | ||||
} | ||||
PyObject* Dispatch( Long64_t total, Long64_t processed, Long64_t bytesre | ||||
ad, | ||||
Float_t initTime, Float_t procTime, | ||||
Float_t evtrti, Float_t mbrti, | ||||
Int_t actw, Int_t tses, Float_t eses ) { | ||||
return DispatchVA( "LLLffffiif", | ||||
total, processed, bytesread, initTime, procTime, evtrti, mbrti, ac | ||||
tw, tses, eses ); | ||||
} | ||||
PyObject* Dispatch( const char* sel, Int_t sz, Long64_t fst, Long64_t en | ||||
t ) { | ||||
return DispatchVA( "siLL", sel, sz, fst, ent ); | ||||
} | ||||
PyObject* Dispatch( const char* msg, Bool_t status, Int_t done, Int_t to | ||||
tal ) { | ||||
return DispatchVA( "siii", msg, status, done, total ); | ||||
} | ||||
PyObject* Dispatch( TSlave* slave, Long64_t total, Long64_t processed ) | ||||
{ | ||||
return DispatchVA1( "TSlave", slave, "LL", total, processed ); | ||||
} | ||||
PyObject* Dispatch( TProofProgressInfo* pi ) { return DispatchVA1( "TPro | ||||
ofProgressInfo", pi, 0 ); } | ||||
PyObject* Dispatch( TSlave* slave ) { return DispatchVA( "TSlave", slave | ||||
, 0 ); } | ||||
PyObject* Dispatch( TSlave* slave, TProofProgressInfo* pi ); | ||||
ClassDef( TPyDispatcher, 1 ); // Python dispatcher class | ClassDef( TPyDispatcher, 1 ); // Python dispatcher class | |||
private: | private: | |||
PyObject* fCallable; //! callable object to be dispatched | PyObject* fCallable; //! callable object to be dispatched | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
0 lines changed or deleted | 150 lines changed or added | |||
TRootCanvas.h | TRootCanvas.h | |||
---|---|---|---|---|
skipping to change at line 88 | skipping to change at line 88 | |||
TGHorizontal3DLine *fHorizontal1; // toolbar sepatator | TGHorizontal3DLine *fHorizontal1; // toolbar sepatator | |||
TGLayoutHints *fVertical1Layout; // layout hints for separator | TGLayoutHints *fVertical1Layout; // layout hints for separator | |||
TGLayoutHints *fVertical2Layout; // layout hints for separator | TGLayoutHints *fVertical2Layout; // layout hints for separator | |||
TGLayoutHints *fHorizontal1Layout; // layout hints for separator | TGLayoutHints *fHorizontal1Layout; // layout hints for separator | |||
TGDockableFrame *fToolDock; // dockable frame holding the toolbar | TGDockableFrame *fToolDock; // dockable frame holding the toolbar | |||
TGLayoutHints *fDockLayout; // layout hints for dockable f rame widget | TGLayoutHints *fDockLayout; // layout hints for dockable f rame widget | |||
const TGPicture *fIconPic; // icon picture | const TGPicture *fIconPic; // icon picture | |||
TGToolTip *fToolTip; // tooltip for object info | TGToolTip *fToolTip; // tooltip for object info | |||
TVirtualPadEditor *fEditor; // pointer to currently loaded pad edi tor | TVirtualPadEditor *fEditor; // pointer to currently loaded pad edi tor | |||
Bool_t fEmbedded; // true if embedded in any other frame (e.g. in the browser) | ||||
Int_t fCanvasID; // index in fWindows array of TGX11 | Int_t fCanvasID; // index in fWindows array of TGX11 | |||
Bool_t fAutoFit; // when true canvas container keeps sa me size as canvas | Bool_t fAutoFit; // when true canvas container keeps sa me size as canvas | |||
Int_t fButton; // currently pressed button | Int_t fButton; // currently pressed button | |||
TRootCanvas(const TRootCanvas&); // Not implemented | TRootCanvas(const TRootCanvas&); // Not implemented | |||
TRootCanvas& operator=(const TRootCanvas&); // Not implemented | TRootCanvas& operator=(const TRootCanvas&); // Not implemented | |||
void CreateCanvas(const char *name); | void CreateCanvas(const char *name); | |||
void CreateEditor(); | void CreateEditor(); | |||
Bool_t HandleContainerButton(Event_t *ev); | Bool_t HandleContainerButton(Event_t *ev); | |||
skipping to change at line 147 | skipping to change at line 148 | |||
void ShowEditor(Bool_t show = kTRUE); | void ShowEditor(Bool_t show = kTRUE); | |||
void ShowToolBar(Bool_t show = kTRUE); | void ShowToolBar(Bool_t show = kTRUE); | |||
void ShowToolTips(Bool_t show = kTRUE); | void ShowToolTips(Bool_t show = kTRUE); | |||
Bool_t HasEditor() const; | Bool_t HasEditor() const; | |||
Bool_t HasMenuBar() const; | Bool_t HasMenuBar() const; | |||
Bool_t HasStatusBar() const; | Bool_t HasStatusBar() const; | |||
Bool_t HasToolBar() const; | Bool_t HasToolBar() const; | |||
Bool_t HasToolTips() const; | Bool_t HasToolTips() const; | |||
void Activated(Int_t id); | ||||
TGMenuBar *GetMenuBar() const { return fMenuBar; } | TGMenuBar *GetMenuBar() const { return fMenuBar; } | |||
TGLayoutHints *GetMenuBarItemLayout() const { return fMenuBarItemLayout; } | TGLayoutHints *GetMenuBarItemLayout() const { return fMenuBarItemLayout; } | |||
TGStatusBar *GetStatusBar() const { return fStatusBar; } | TGStatusBar *GetStatusBar() const { return fStatusBar; } | |||
TGDockableFrame *GetToolDock() const { return fToolDock; } | TGDockableFrame *GetToolDock() const { return fToolDock; } | |||
// overridden from TGMainFrame | // overridden from TGMainFrame | |||
void CloseWindow(); | void CloseWindow(); | |||
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2); | |||
void ReallyDelete(); | void ReallyDelete(); | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 3 lines changed or added | |||
TStreamerElement.h | TStreamerElement.h | |||
---|---|---|---|---|
skipping to change at line 138 | skipping to change at line 138 | |||
}; | }; | |||
//________________________________________________________________________ | //________________________________________________________________________ | |||
class TStreamerBase : public TStreamerElement { | class TStreamerBase : public TStreamerElement { | |||
private: | private: | |||
TStreamerBase(const TStreamerBase &); // Not implemented | TStreamerBase(const TStreamerBase &); // Not implemented | |||
TStreamerBase&operator=(const TStreamerBase&); // Not implemented | TStreamerBase&operator=(const TStreamerBase&); // Not implemented | |||
protected: | protected: | |||
Int_t fBaseVersion; //version number of the base class FI | Int_t fBaseVersion; //version number of the base class (u | |||
XME: What for? What about the schema evolution issues? | sed during memberwise streaming) | |||
UInt_t &fBaseCheckSum; //!checksum of the base class (used d | ||||
uring memberwise streaming) | ||||
TClass *fBaseClass; //!pointer to base class | TClass *fBaseClass; //!pointer to base class | |||
TClass *fNewBaseClass; //!pointer to new base class if renam ed | TClass *fNewBaseClass; //!pointer to new base class if renam ed | |||
ClassStreamerFunc_t fStreamerFunc; //!Pointer to a wrapper around a cust | ClassStreamerFunc_t fStreamerFunc; //!Pointer to a wrapper around a cu | |||
om streamer member function. | stom streamer member function. | |||
TVirtualStreamerInfo *fStreamerInfo; //!Pointer to the current StreamerI | ||||
nfo for the baset class. | ||||
TString fErrorMsg; //!Error message in case of checksu | ||||
m/version mismatch. | ||||
void InitStreaming(); | ||||
public: | public: | |||
TStreamerBase(); | TStreamerBase(); | |||
TStreamerBase(const char *name, const char *title, Int_t offset); | TStreamerBase(const char *name, const char *title, Int_t offset); | |||
virtual ~TStreamerBase(); | virtual ~TStreamerBase(); | |||
Int_t GetBaseVersion() {return fBaseVersion;} | Int_t GetBaseVersion() {return fBaseVersion;} | |||
UInt_t GetBaseCheckSum() {return fBaseCheckSum;} | ||||
virtual TClass *GetClassPointer() const; | virtual TClass *GetClassPointer() const; | |||
const char *GetErrorMessage() const { return fErrorMsg; } | ||||
const char *GetInclude() const; | const char *GetInclude() const; | |||
TClass *GetNewBaseClass() { return fNewBaseClass; } | TClass *GetNewBaseClass() { return fNewBaseClass; } | |||
ULong_t GetMethod() const {return 0;} | ULong_t GetMethod() const {return 0;} | |||
Int_t GetSize() const; | Int_t GetSize() const; | |||
TVirtualStreamerInfo *GetBaseStreamerInfo () const { return fStreamerInf o; } | ||||
virtual void Init(TObject *obj=0); | virtual void Init(TObject *obj=0); | |||
Bool_t IsBase() const; | Bool_t IsBase() const; | |||
virtual void ls(Option_t *option="") const; | virtual void ls(Option_t *option="") const; | |||
Int_t ReadBuffer (TBuffer &b, char *pointer); | Int_t ReadBuffer (TBuffer &b, char *pointer); | |||
void SetNewBaseClass( TClass* cl ) { fNewBaseClass = cl; } | void SetNewBaseClass( TClass* cl ) { fNewBaseClass = cl; Ini tStreaming(); } | |||
void SetBaseVersion(Int_t v) {fBaseVersion = v;} | void SetBaseVersion(Int_t v) {fBaseVersion = v;} | |||
void SetBaseCheckSum(UInt_t cs) {fBaseCheckSum = cs;} | ||||
void SetErrorMessage(const char *msg) { fErrorMsg = msg; } | ||||
virtual void Update(const TClass *oldClass, TClass *newClass); | virtual void Update(const TClass *oldClass, TClass *newClass); | |||
Int_t WriteBuffer(TBuffer &b, char *pointer); | Int_t WriteBuffer(TBuffer &b, char *pointer); | |||
ClassDef(TStreamerBase,3) //Streamer element of type base class | ClassDef(TStreamerBase,3) //Streamer element of type base class | |||
}; | }; | |||
//________________________________________________________________________ | //________________________________________________________________________ | |||
class TStreamerBasicPointer : public TStreamerElement { | class TStreamerBasicPointer : public TStreamerElement { | |||
private: | private: | |||
End of changes. 7 change blocks. | ||||
5 lines changed or deleted | 18 lines changed or added | |||
TStreamerInfo.h | TStreamerInfo.h | |||
---|---|---|---|---|
skipping to change at line 189 | skipping to change at line 189 | |||
TStreamerInfo(TClass *cl); | TStreamerInfo(TClass *cl); | |||
virtual ~TStreamerInfo(); | virtual ~TStreamerInfo(); | |||
void Build(); | void Build(); | |||
void BuildCheck(TFile *file = 0); | void BuildCheck(TFile *file = 0); | |||
void BuildEmulated(TFile *file); | void BuildEmulated(TFile *file); | |||
void BuildOld(); | void BuildOld(); | |||
virtual Bool_t BuildFor( const TClass *cl ); | virtual Bool_t BuildFor( const TClass *cl ); | |||
void CallShowMembers(void* obj, TMemberInspector &insp) c onst; | void CallShowMembers(void* obj, TMemberInspector &insp) c onst; | |||
void Clear(Option_t *); | void Clear(Option_t *); | |||
TObject *Clone(const char *newname = "") const; | TObject *Clone(const char *newname = "") const; | |||
Bool_t CompareContent(TClass *cl,TVirtualStreamerInfo *info , Bool_t warn, Bool_t complete); | Bool_t CompareContent(TClass *cl,TVirtualStreamerInfo *info , Bool_t warn, Bool_t complete, TFile *file); | |||
void Compile(); | void Compile(); | |||
void ComputeSize(); | void ComputeSize(); | |||
void ForceWriteInfo(TFile *file, Bool_t force=kFALSE); | void ForceWriteInfo(TFile *file, Bool_t force=kFALSE); | |||
Int_t GenerateHeaderFile(const char *dirname, const TList *subClasses = 0, const TList *extrainfos = 0); | Int_t GenerateHeaderFile(const char *dirname, const TList *subClasses = 0, const TList *extrainfos = 0); | |||
TClass *GetActualClass(const void *obj) const; | TClass *GetActualClass(const void *obj) const; | |||
TClass *GetClass() const {return fClass;} | TClass *GetClass() const {return fClass;} | |||
UInt_t GetCheckSum() const {return fCheckSum;} | UInt_t GetCheckSum() const {return fCheckSum;} | |||
UInt_t GetCheckSum(UInt_t code) const; | UInt_t GetCheckSum(TClass::ECheckSum code) const; | |||
Int_t GetClassVersion() const {return fClassVersion;} | Int_t GetClassVersion() const {return fClassVersion;} | |||
Int_t GetDataMemberOffset(TDataMember *dm, TMemberStreamer *&streamer) const; | Int_t GetDataMemberOffset(TDataMember *dm, TMemberStreamer *&streamer) const; | |||
TObjArray *GetElements() const {return fElements;} | TObjArray *GetElements() const {return fElements;} | |||
ULong_t *GetElems() const {return fElem;} | ULong_t *GetElems() const {return fElem;} | |||
TStreamerInfoActions::TActionSequence *GetReadMemberWiseActions(Bool_t f orCollection) { return forCollection ? fReadMemberWise : fReadObjectWise; } | TStreamerInfoActions::TActionSequence *GetReadMemberWiseActions(Bool_t f orCollection) { return forCollection ? fReadMemberWise : fReadObjectWise; } | |||
TStreamerInfoActions::TActionSequence *GetReadObjectWiseActions() { retu rn fReadObjectWise; } | TStreamerInfoActions::TActionSequence *GetReadObjectWiseActions() { retu rn fReadObjectWise; } | |||
TStreamerInfoActions::TActionSequence *GetWriteMemberWiseActions(Bool_t forCollection) { return forCollection ? fWriteMemberWise : fWriteObjectWise ; } | TStreamerInfoActions::TActionSequence *GetWriteMemberWiseActions(Bool_t forCollection) { return forCollection ? fWriteMemberWise : fWriteObjectWise ; } | |||
TStreamerInfoActions::TActionSequence *GetWriteObjectWiseActions() { ret urn fWriteObjectWise; } | TStreamerInfoActions::TActionSequence *GetWriteObjectWiseActions() { ret urn fWriteObjectWise; } | |||
Int_t GetNdata() const {return fNdata;} | Int_t GetNdata() const {return fNdata;} | |||
Int_t GetNumber() const {return fNumber;} | Int_t GetNumber() const {return fNumber;} | |||
skipping to change at line 229 | skipping to change at line 229 | |||
Int_t *GetTypes() const {return fType;} | Int_t *GetTypes() const {return fType;} | |||
template <typename T> T GetTypedValue(char *pointer, Int_t i, Int_t j, I nt_t len) const; | template <typename T> T GetTypedValue(char *pointer, Int_t i, Int_t j, I nt_t len) const; | |||
template <typename T> T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const; | template <typename T> T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const; | |||
template <typename T> T GetTypedValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const; | template <typename T> T GetTypedValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const; | |||
template <typename T> T GetTypedValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const; | template <typename T> T GetTypedValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const; | |||
Double_t GetValue(char *pointer, Int_t i, Int_t j, Int_t len) const { return GetTypedValue<Double_t>(pointer, i, j, len); } | Double_t GetValue(char *pointer, Int_t i, Int_t j, Int_t len) const { return GetTypedValue<Double_t>(pointer, i, j, len); } | |||
Double_t GetValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueClones<Double_t>(clo nes, i, j, k, eoffset); } | Double_t GetValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueClones<Double_t>(clo nes, i, j, k, eoffset); } | |||
Double_t GetValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueSTL<Double_t>( cont, i, j, k, eoffset); } | Double_t GetValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueSTL<Double_t>( cont, i, j, k, eoffset); } | |||
Double_t GetValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueSTLP<Double_t >(cont, i, j, k, eoffset); } | Double_t GetValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const { return GetTypedValueSTLP<Double_t >(cont, i, j, k, eoffset); } | |||
void ls(Option_t *option="") const; | void ls(Option_t *option="") const; | |||
Bool_t MatchLegacyCheckSum(UInt_t checksum) const; | ||||
TVirtualStreamerInfo *NewInfo(TClass *cl) {return new TStreamerInfo(cl); } | TVirtualStreamerInfo *NewInfo(TClass *cl) {return new TStreamerInfo(cl); } | |||
void *New(void *obj = 0); | void *New(void *obj = 0); | |||
void *NewArray(Long_t nElements, void* ary = 0); | void *NewArray(Long_t nElements, void* ary = 0); | |||
void Destructor(void* p, Bool_t dtorOnly = kFALSE); | void Destructor(void* p, Bool_t dtorOnly = kFALSE); | |||
void DeleteArray(void* p, Bool_t dtorOnly = kFALSE); | void DeleteArray(void* p, Bool_t dtorOnly = kFALSE); | |||
void PrintValue(const char *name, char *pointer, Int_t i, Int_t len, Int_t lenmax=1000) const; | void PrintValue(const char *name, char *pointer, Int_t i, Int_t len, Int_t lenmax=1000) const; | |||
void PrintValueClones(const char *name, TClonesArray *clo nes, Int_t i, Int_t eoffset, Int_t lenmax=1000) const; | void PrintValueClones(const char *name, TClonesArray *clo nes, Int_t i, Int_t eoffset, Int_t lenmax=1000) const; | |||
void PrintValueSTL(const char *name, TVirtualCollectionPr oxy *cont, Int_t i, Int_t eoffset, Int_t lenmax=1000) const; | void PrintValueSTL(const char *name, TVirtualCollectionPr oxy *cont, Int_t i, Int_t eoffset, Int_t lenmax=1000) const; | |||
#ifdef R__BROKEN_FUNCTION_TEMPLATES | #ifdef R__BROKEN_FUNCTION_TEMPLATES | |||
End of changes. 3 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added | |||
TText.h | TText.h | |||
---|---|---|---|---|
skipping to change at line 26 | skipping to change at line 26 | |||
// // | // // | |||
// TText // | // TText // | |||
// // | // // | |||
// Text. // | // Text. // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
#ifndef ROOT_TAttText | #ifndef ROOT_TAttText | |||
#include "TAttText.h" | #include "TAttText.h" | |||
#endif | #endif | |||
#ifndef ROOT_TNamed | #ifndef ROOT_TNamed | |||
#include "TNamed.h" | #include "TNamed.h" | |||
#endif | #endif | |||
#ifndef ROOT_TAttBBox2D | ||||
#include "TAttBBox2D.h" | ||||
#endif | ||||
#ifndef ROOT_GuiTypes | ||||
#include "GuiTypes.h" | ||||
#endif | ||||
class TText : public TNamed, public TAttText { | class TPoint; | |||
class TText : public TNamed, public TAttText, public TAttBBox2D { | ||||
protected: | protected: | |||
Double_t fX; // X position of text (left,center,etc..) | Double_t fX; // X position of text (left,center,etc..) | |||
Double_t fY; // Y position of text (left,center,etc..) | Double_t fY; // Y position of text (left,center,etc..) | |||
void *fWcsTitle; //!Used by TMathText | void *fWcsTitle; //!Used by TMathText | |||
public: | public: | |||
// TText status bits | // TText status bits | |||
enum { kTextNDC = BIT(14) }; | enum { kTextNDC = BIT(14) }; | |||
skipping to change at line 83 | skipping to change at line 90 | |||
virtual void PaintTextNDC(Double_t u, Double_t v, const wchar_t *tex t); | virtual void PaintTextNDC(Double_t u, Double_t v, const wchar_t *tex t); | |||
virtual void Print(Option_t *option="") const; | virtual void Print(Option_t *option="") const; | |||
virtual void SavePrimitive(std::ostream &out, Option_t *option = "") ; | virtual void SavePrimitive(std::ostream &out, Option_t *option = "") ; | |||
virtual void SetMbTitle(const wchar_t *title=L""); // *MENU* | virtual void SetMbTitle(const wchar_t *title=L""); // *MENU* | |||
virtual void SetNDC(Bool_t isNDC=kTRUE); | virtual void SetNDC(Bool_t isNDC=kTRUE); | |||
virtual void SetText(Double_t x, Double_t y, const char *text) {fX=x ; fY=y; SetTitle(text);} // *MENU* *ARGS={x=>fX,y=>fY,text=>fTitle} | virtual void SetText(Double_t x, Double_t y, const char *text) {fX=x ; fY=y; SetTitle(text);} // *MENU* *ARGS={x=>fX,y=>fY,text=>fTitle} | |||
virtual void SetText(Double_t x, Double_t y, const wchar_t *text) {f X=x; fY=y; SetMbTitle(text);} | virtual void SetText(Double_t x, Double_t y, const wchar_t *text) {f X=x; fY=y; SetMbTitle(text);} | |||
virtual void SetX(Double_t x) { fX = x; } // *MENU* | virtual void SetX(Double_t x) { fX = x; } // *MENU* | |||
virtual void SetY(Double_t y) { fY = y; } // *MENU* | virtual void SetY(Double_t y) { fY = y; } // *MENU* | |||
ClassDef(TText,2) //Text | virtual Rectangle_t GetBBox(); | |||
virtual TPoint GetBBoxCenter(); | ||||
virtual void SetBBoxCenter(const TPoint &p); | ||||
virtual void SetBBoxCenterX(const Int_t x); | ||||
virtual void SetBBoxCenterY(const Int_t y); | ||||
virtual void SetBBoxX1(const Int_t x); //Not Implemented | ||||
virtual void SetBBoxX2(const Int_t x); //Not Implemented | ||||
virtual void SetBBoxY1(const Int_t y); //Not Implemented | ||||
virtual void SetBBoxY2(const Int_t y); //Not Implemented | ||||
ClassDef(TText,3) //Text | ||||
}; | }; | |||
#endif | #endif | |||
End of changes. 4 change blocks. | ||||
3 lines changed or deleted | 20 lines changed or added | |||
TTreePerfStats.h | TTreePerfStats.h | |||
---|---|---|---|---|
skipping to change at line 99 | skipping to change at line 99 | |||
virtual Double_t GetUnzipTime() const {return fUnzipTime; } | virtual Double_t GetUnzipTime() const {return fUnzipTime; } | |||
virtual void Paint(Option_t *chopt=""); | virtual void Paint(Option_t *chopt=""); | |||
virtual void Print(Option_t *option="") const; | virtual void Print(Option_t *option="") const; | |||
virtual void SimpleEvent(EEventType) {} | virtual void SimpleEvent(EEventType) {} | |||
virtual void PacketEvent(const char *, const char *, const char *, | virtual void PacketEvent(const char *, const char *, const char *, | |||
Long64_t , Double_t ,Double_t , Double_t ,Long6 4_t ) {} | Long64_t , Double_t ,Double_t , Double_t ,Long6 4_t ) {} | |||
virtual void FileEvent(const char *, const char *, const char *, con st char *, Bool_t) {} | virtual void FileEvent(const char *, const char *, const char *, con st char *, Bool_t) {} | |||
virtual void FileOpenEvent(TFile *, const char *, Double_t) {} | virtual void FileOpenEvent(TFile *, const char *, Double_t) {} | |||
virtual void FileReadEvent(TFile *file, Int_t len, Double_t start); | virtual void FileReadEvent(TFile *file, Int_t len, Double_t start); | |||
virtual void FileUnzipEvent(TFile *file, Long64_t pos, Double_t star t, Int_t complen, Int_t objlen); | virtual void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int_t complen, Int_t objlen); | |||
virtual void RateEvent(Double_t , Double_t , Long64_t , Long64_t) {} | virtual void RateEvent(Double_t , Double_t , Long64_t , Long64_t) {} | |||
virtual void SaveAs(const char *filename="",Option_t *option="") con st; | virtual void SaveAs(const char *filename="",Option_t *option="") con st; | |||
virtual void SavePrimitive(ostream &out, Option_t *option = ""); | virtual void SavePrimitive(ostream &out, Option_t *option = ""); | |||
virtual void SetBytesRead(Long64_t nbytes) {fBytesRead = nbytes;} | virtual void SetBytesRead(Long64_t nbytes) {fBytesRead = nbytes;} | |||
virtual void SetBytesReadExtra(Long64_t nbytes) {fBytesReadExtra = n bytes;} | virtual void SetBytesReadExtra(Long64_t nbytes) {fBytesReadExtra = n bytes;} | |||
virtual void SetCompress(Double_t cx) {fCompress = cx;} | virtual void SetCompress(Double_t cx) {fCompress = cx;} | |||
virtual void SetDiskTime(Double_t t) {fDiskTime = t;} | virtual void SetDiskTime(Double_t t) {fDiskTime = t;} | |||
virtual void SetNumEvents(Long64_t) {} | virtual void SetNumEvents(Long64_t) {} | |||
virtual void SetCpuTime(Double_t cptime) {fCpuTime = cptime;} | virtual void SetCpuTime(Double_t cptime) {fCpuTime = cptime;} | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TUnfold.h | TUnfold.h | |||
---|---|---|---|---|
// @(#)root/hist:$Id$ | ||||
// Author: Stefan Schmitt | // Author: Stefan Schmitt | |||
// DESY, 13/10/08 | // DESY, 13/10/08 | |||
// Version 16, some cleanup, more getter functions, query version number | // Version 17.1, bug fixes in GetFoldedOutput, GetOutput | |||
// | // | |||
// History: | // History: | |||
// Version 17.0, error matrix with SetInput, store fL not fLSquared | ||||
// Version 16.2, in parallel to bug-fix in TUnfoldSys | ||||
// Version 16.1, in parallel to bug-fix in TUnfold.C | ||||
// Version 16.0, some cleanup, more getter functions, query version numb | ||||
er | ||||
// Version 15, simplified L-curve scan, new tau definition, new eror cal c. | // Version 15, simplified L-curve scan, new tau definition, new eror cal c. | |||
// Version 14, with changes in TUnfoldSys.cxx | // Version 14, with changes in TUnfoldSys.cxx | |||
// Version 13, new methods for derived classes | // Version 13, new methods for derived classes | |||
// Version 12, with support for preconditioned matrix inversion | // Version 12, with support for preconditioned matrix inversion | |||
// Version 11, regularisation methods have return values | // Version 11, regularisation methods have return values | |||
// Version 10, with bug-fix in TUnfold.cxx | // Version 10, with bug-fix in TUnfold.cxx | |||
// Version 9, implements method for optimized inversion of sparse matrix | // Version 9, implements method for optimized inversion of sparse matrix | |||
// Version 8, replace all TMatrixSparse matrix operations by private cod e | // Version 8, replace all TMatrixSparse matrix operations by private cod e | |||
// Version 7, fix problem with TMatrixDSparse,TMatrixD multiplication | // Version 7, fix problem with TMatrixDSparse,TMatrixD multiplication | |||
// Version 6, completely remove definition of class XY | // Version 6, completely remove definition of class XY | |||
skipping to change at line 31 | skipping to change at line 34 | |||
// Version 2, with changed ScanLcurve() arguments | // Version 2, with changed ScanLcurve() arguments | |||
// Version 1, added ScanLcurve() method | // Version 1, added ScanLcurve() method | |||
// Version 0, stable version of basic unfolding algorithm | // Version 0, stable version of basic unfolding algorithm | |||
#ifndef ROOT_TUnfold | #ifndef ROOT_TUnfold | |||
#define ROOT_TUnfold | #define ROOT_TUnfold | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
// // | // // | |||
// // | // // | |||
// TUnfold provides functionality to correct data // | ||||
// for migration effects. // | ||||
// // | ||||
// Citation: S.Schmitt, JINST 7 (2012) T10003 [arXiv:1205.6201] // | ||||
// // | ||||
// // | ||||
// TUnfold solves the inverse problem // | // TUnfold solves the inverse problem // | |||
// // | // // | |||
// T -1 2 T // | // T -1 2 T // | |||
// chi**2 = (y-Ax) Vyy (y-Ax) + tau (L(x-x0)) L(x-x0) // | // chi**2 = (y-Ax) Vyy (y-Ax) + tau (L(x-x0)) L(x-x0) // | |||
// // | // // | |||
// Monte Carlo input // | // Monte Carlo input // | |||
// y: vector of measured quantities (dimension ny) // | // y: vector of measured quantities (dimension ny) // | |||
// Vyy: covariance matrix for y (dimension ny x ny) // | // Vyy: covariance matrix for y (dimension ny x ny) // | |||
// A: migration matrix (dimension ny x nx) // | // A: migration matrix (dimension ny x nx) // | |||
// x: unknown underlying distribution (dimension nx) // | // x: unknown underlying distribution (dimension nx) // | |||
skipping to change at line 58 | skipping to change at line 67 | |||
// The algorithm is based on "standard" matrix inversion, with the // | // The algorithm is based on "standard" matrix inversion, with the // | |||
// known limitations in numerical accuracy and computing cost for // | // known limitations in numerical accuracy and computing cost for // | |||
// matrices with large dimensions. // | // matrices with large dimensions. // | |||
// // | // // | |||
// Thus the algorithm should not used for large dimensions of x and y // | // Thus the algorithm should not used for large dimensions of x and y // | |||
// dim(x) should not exceed O(100) // | // dim(x) should not exceed O(100) // | |||
// dim(y) should not exceed O(500) // | // dim(y) should not exceed O(500) // | |||
// // | // // | |||
////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////// | |||
/* | ||||
This file is part of TUnfold. | ||||
TUnfold is free software: you can redistribute it and/or modify | ||||
it under the terms of the GNU General Public License as published by | ||||
the Free Software Foundation, either version 3 of the License, or | ||||
(at your option) any later version. | ||||
TUnfold is distributed in the hope that it will be useful, | ||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
GNU General Public License for more details. | ||||
You should have received a copy of the GNU General Public License | ||||
along with TUnfold. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | ||||
#include <TH1D.h> | #include <TH1D.h> | |||
#include <TH2D.h> | #include <TH2D.h> | |||
#include <TObject.h> | #include <TObject.h> | |||
#include <TArrayI.h> | #include <TArrayI.h> | |||
#include <TSpline.h> | #include <TSpline.h> | |||
#include <TMatrixDSparse.h> | #include <TMatrixDSparse.h> | |||
#include <TMatrixD.h> | #include <TMatrixD.h> | |||
#include <TObjArray.h> | #include <TObjArray.h> | |||
#include <TString.h> | ||||
#define TUnfold_VERSION "V16.0" | #define TUnfold_VERSION "V17.1" | |||
#define TUnfold_CLASS_VERSION 17 | ||||
class TUnfold : public TObject { | class TUnfold : public TObject { | |||
private: | private: | |||
void InitTUnfold(void); // initialize all data members | void InitTUnfold(void); // initialize all data members | |||
public: | public: | |||
enum EConstraint { | enum EConstraint { | |||
kEConstraintNone =0, // use no extra constraint | kEConstraintNone =0, // use no extra constraint | |||
kEConstraintArea =1 // enforce preservation of the area | kEConstraintArea =1 // enforce preservation of the area | |||
}; | }; | |||
enum ERegMode { // regularisation scheme | enum ERegMode { // regularisation scheme | |||
kRegModeNone = 0, // no regularisation | kRegModeNone = 0, // no regularisation | |||
kRegModeSize = 1, // regularise the size of the output | kRegModeSize = 1, // regularise the size of the output | |||
kRegModeDerivative = 2, // regularize the 1st derivative of the out put | kRegModeDerivative = 2, // regularize the 1st derivative of the out put | |||
kRegModeCurvature = 3, // regularize the 2nd derivative of the out put | kRegModeCurvature = 3, // regularize the 2nd derivative of the out put | |||
kRegModeMixed = 4 // mixed regularisation pattern | kRegModeMixed = 4 // mixed regularisation pattern | |||
}; | }; | |||
protected: | protected: | |||
TMatrixDSparse * fA; // Input: matrix | TMatrixDSparse * fA; // Input: matrix | |||
TMatrixDSparse *fLsquared; // Input: regularisation conditions squared | TMatrixDSparse *fL; // Input: regularisation conditions | |||
TMatrixDSparse *fVyy; // Input: covariance matrix for y | TMatrixDSparse *fVyy; // Input: covariance matrix for y | |||
TMatrixD *fY; // Input: y | TMatrixD *fY; // Input: y | |||
TMatrixD *fX0; // Input: x0 | TMatrixD *fX0; // Input: x0 | |||
Double_t fTauSquared; // Input: regularisation parameter | Double_t fTauSquared; // Input: regularisation parameter | |||
Double_t fBiasScale; // Input: scale factor for the bias | Double_t fBiasScale; // Input: scale factor for the bias | |||
TArrayI fXToHist; // Input: matrix indices -> histogram bins | TArrayI fXToHist; // Input: matrix indices -> histogram bins | |||
TArrayI fHistToX; // Input: histogram bins -> matrix indices | TArrayI fHistToX; // Input: histogram bins -> matrix indices | |||
TArrayD fSumOverY; // Input: sum of all columns | TArrayD fSumOverY; // Input: sum of all columns | |||
EConstraint fConstraint; // Input: type of constraint to use | EConstraint fConstraint; // Input: type of constraint to use | |||
ERegMode fRegMode; // Input: type of regularisation | ERegMode fRegMode; // Input: type of regularisation | |||
private: | private: | |||
Int_t fIgnoredBins; // number of input bins which are dropped b | ||||
ecause they have error=0 | ||||
Double_t fEpsMatrix; // machine accuracy for eingenvalue analysi | ||||
s | ||||
TMatrixD *fX; // Result: x | TMatrixD *fX; // Result: x | |||
TMatrixDSparse *fVyyInv; // Result: inverse of covariance matrix on y | ||||
TMatrixDSparse *fVxx; // Result: covariance matrix on x | TMatrixDSparse *fVxx; // Result: covariance matrix on x | |||
TMatrixDSparse *fVxxInv; // Result: inverse of covariance matrix on x | TMatrixDSparse *fVxxInv; // Result: inverse of covariance matrix on x | |||
TMatrixDSparse *fAx; // Result: Ax | TMatrixDSparse *fAx; // Result: Ax | |||
Double_t fChi2A; // Result: chi**2 contribution from (y-Ax)V (y-Ax) | Double_t fChi2A; // Result: chi**2 contribution from (y-Ax)V (y-Ax) | |||
Double_t fLXsquared; // Result: chi**2 contribution from (x-s*x0 )Lsquared(x-s*x0) | Double_t fLXsquared; // Result: chi**2 contribution from (x-s*x0 )Lsquared(x-s*x0) | |||
Double_t fRhoMax; // Result: maximum global correlation | Double_t fRhoMax; // Result: maximum global correlation | |||
Double_t fRhoAvg; // Result: average global correlation | Double_t fRhoAvg; // Result: average global correlation | |||
Int_t fNdf; // Result: number of degrees of freedom | Int_t fNdf; // Result: number of degrees of freedom | |||
TMatrixDSparse *fDXDAM[2]; // Result: part of derivative dx_k/dA_ij | TMatrixDSparse *fDXDAM[2]; // Result: part of derivative dx_k/dA_ij | |||
TMatrixDSparse *fDXDAZ[2]; // Result: part of derivative dx_k/dA_ij | TMatrixDSparse *fDXDAZ[2]; // Result: part of derivative dx_k/dA_ij | |||
TMatrixDSparse *fDXDtauSquared; // Result: derivative dx/dtau | TMatrixDSparse *fDXDtauSquared; // Result: derivative dx/dtau | |||
TMatrixDSparse *fDXDY; // Result: derivative dx/dy | TMatrixDSparse *fDXDY; // Result: derivative dx/dy | |||
TMatrixDSparse *fEinv; // Result: matrix E^(-1) | TMatrixDSparse *fEinv; // Result: matrix E^(-1) | |||
TMatrixDSparse *fE; // Result: matrix E | TMatrixDSparse *fE; // Result: matrix E | |||
protected: | protected: | |||
TUnfold(void); // for derived classes | TUnfold(void); // for derived classes | |||
// Int_t IsNotSymmetric(TMatrixDSparse const &m) const; | ||||
virtual Double_t DoUnfold(void); // the unfolding algorithm | virtual Double_t DoUnfold(void); // the unfolding algorithm | |||
virtual void ClearResults(void); // clear all results | virtual void ClearResults(void); // clear all results | |||
void ClearHistogram(TH1 *h,Double_t x=0.) const; | ||||
virtual TString GetOutputBinName(Int_t iBinX) const; // name a bin | ||||
TMatrixDSparse *MultiplyMSparseM(const TMatrixDSparse *a,const TMatrixD *b) const; // multiply sparse and non-sparse matrix | TMatrixDSparse *MultiplyMSparseM(const TMatrixDSparse *a,const TMatrixD *b) const; // multiply sparse and non-sparse matrix | |||
TMatrixDSparse *MultiplyMSparseMSparse(const TMatrixDSparse *a,const TMa trixDSparse *b) const; // multiply sparse and sparse matrix | TMatrixDSparse *MultiplyMSparseMSparse(const TMatrixDSparse *a,const TMa trixDSparse *b) const; // multiply sparse and sparse matrix | |||
TMatrixDSparse *MultiplyMSparseTranspMSparse(const TMatrixDSparse *a,con st TMatrixDSparse *b) const; // multiply transposed sparse and sparse matri x | TMatrixDSparse *MultiplyMSparseTranspMSparse(const TMatrixDSparse *a,con st TMatrixDSparse *b) const; // multiply transposed sparse and sparse matri x | |||
TMatrixDSparse *MultiplyMSparseMSparseTranspVector | TMatrixDSparse *MultiplyMSparseMSparseTranspVector | |||
(const TMatrixDSparse *m1,const TMatrixDSparse *m2, | (const TMatrixDSparse *m1,const TMatrixDSparse *m2, | |||
const TMatrixTBase<Double_t> *v) const; // calculate M_ij = sum_k [m 1_ik*m2_jk*v[k] ]. the pointer v may be zero (means no scaling). | const TMatrixTBase<Double_t> *v) const; // calculate M_ij = sum_k [m 1_ik*m2_jk*v[k] ]. the pointer v may be zero (means no scaling). | |||
TMatrixD *InvertMSparse(const TMatrixDSparse *A) const; // invert sparse | TMatrixDSparse *InvertMSparseSymmPos(const TMatrixDSparse *A,Int_t *rank | |||
matrix | ) const; // invert symmetric (semi-)positive sparse matrix | |||
static Bool_t InvertMConditioned(TMatrixD *A); // invert matrix includin | void AddMSparse(TMatrixDSparse *dest,Double_t f,const TMatrixDSparse *sr | |||
g preconditioning | c) const; // replacement for dest += f*src | |||
void AddMSparse(TMatrixDSparse *dest,Double_t f,const TMatrixDSparse *sr | ||||
c); // replacement for dest += f*src | ||||
TMatrixDSparse *CreateSparseMatrix(Int_t nrow,Int_t ncol,Int_t nele,Int_ t *row,Int_t *col,Double_t *data) const; // create a TMatrixDSparse from an array | TMatrixDSparse *CreateSparseMatrix(Int_t nrow,Int_t ncol,Int_t nele,Int_ t *row,Int_t *col,Double_t *data) const; // create a TMatrixDSparse from an array | |||
inline Int_t GetNx(void) const { | inline Int_t GetNx(void) const { | |||
return fA->GetNcols(); | return fA->GetNcols(); | |||
} // number of non-zero output bins | } // number of non-zero output bins | |||
inline Int_t GetNy(void) const { | inline Int_t GetNy(void) const { | |||
return fA->GetNrows(); | return fA->GetNrows(); | |||
} // number of input bins | } // number of input bins | |||
void ErrorMatrixToHist(TH2 *ematrix,const TMatrixDSparse *emat,const Int | void ErrorMatrixToHist(TH2 *ematrix,const TMatrixDSparse *emat,const Int | |||
_t *binMap, | _t *binMap,Bool_t doClear) const; // return an error matrix as histogram | |||
Bool_t doClear) const; // return an error matrix | Double_t GetRhoIFromMatrix(TH1 *rhoi,const TMatrixDSparse *eOrig,const I | |||
as histogram | nt_t *binMap,TH2 *invEmat) const; // return global correlation coefficients | |||
inline const TMatrixDSparse *GetDXDY(void) const { return fDXDY; } // ac cess derivative dx/dy | inline const TMatrixDSparse *GetDXDY(void) const { return fDXDY; } // ac cess derivative dx/dy | |||
inline const TMatrixDSparse *GetDXDAM(int i) const { return fDXDAM[i]; } // access matrix parts of the derivative dx/dA | inline const TMatrixDSparse *GetDXDAM(int i) const { return fDXDAM[i]; } // access matrix parts of the derivative dx/dA | |||
inline const TMatrixDSparse *GetDXDAZ(int i) const { return fDXDAZ[i]; } // access vector parts of the derivative dx/dA | inline const TMatrixDSparse *GetDXDAZ(int i) const { return fDXDAZ[i]; } // access vector parts of the derivative dx/dA | |||
inline const TMatrixDSparse *GetDXDtauSquared(void) const { return fDXDt auSquared; } // get derivative dx/dtauSquared | inline const TMatrixDSparse *GetDXDtauSquared(void) const { return fDXDt auSquared; } // get derivative dx/dtauSquared | |||
inline const TMatrixDSparse *GetAx(void) const { return fAx; } // get ve ctor Ax | inline const TMatrixDSparse *GetAx(void) const { return fAx; } // get ve ctor Ax | |||
inline const TMatrixDSparse *GetEinv(void) const { return fEinv; } // ge t matrix E^-1 | inline const TMatrixDSparse *GetEinv(void) const { return fEinv; } // ge t matrix E^-1 | |||
inline const TMatrixDSparse *GetE(void) const { return fE; } // get matr ix E | inline const TMatrixDSparse *GetE(void) const { return fE; } // get matr ix E | |||
inline const TMatrixDSparse *GetVxx(void) const { return fVxx; } // get covariance matrix of x | inline const TMatrixDSparse *GetVxx(void) const { return fVxx; } // get covariance matrix of x | |||
inline const TMatrixDSparse *GetVxxInv(void) const { return fVxxInv; } / / get inverse of covariance matrix of x | inline const TMatrixDSparse *GetVxxInv(void) const { return fVxxInv; } / / get inverse of covariance matrix of x | |||
inline const TMatrixDSparse *GetVyyInv(void) const { return fVyyInv; } / / get inverse of covariance matrix of y | ||||
inline const TMatrixD *GetX(void) const { return fX; } // get result vec tor x | inline const TMatrixD *GetX(void) const { return fX; } // get result vec tor x | |||
inline Int_t GetRowFromBin(int ix) const { return fHistToX[ix]; } // con | ||||
vert histogram bin number to matrix row | ||||
inline Int_t GetBinFromRow(int ix) const { return fXToHist[ix]; } // con | ||||
vert matrix row to histogram bin number | ||||
static void DeleteMatrix(TMatrixD **m); // delete and invalidate pointer | static void DeleteMatrix(TMatrixD **m); // delete and invalidate pointer | |||
static void DeleteMatrix(TMatrixDSparse **m); // delete and invalidate p ointer | static void DeleteMatrix(TMatrixDSparse **m); // delete and invalidate p ointer | |||
Bool_t AddRegularisationCondition(Int_t i0,Double_t f0,Int_t i1=-1,Doubl | ||||
e_t f1=0.,Int_t i2=-1,Double_t f2=0.); // add regularisation condition for | ||||
a triplet of output bins | ||||
Bool_t AddRegularisationCondition(Int_t nEle,const Int_t *indices,const | ||||
Double_t *rowData); // add a regularisation condition | ||||
public: | public: | |||
enum EHistMap { // mapping between unfolding matrix and TH2 axes | enum EHistMap { // mapping between unfolding matrix and TH2 axes | |||
kHistMapOutputHoriz = 0, // map unfolding output to x-axis of TH2 ma trix | kHistMapOutputHoriz = 0, // map unfolding output to x-axis of TH2 ma trix | |||
kHistMapOutputVert = 1 // map unfolding output to y-axis of TH2 ma trix | kHistMapOutputVert = 1 // map unfolding output to y-axis of TH2 ma trix | |||
}; | }; | |||
TUnfold(const TH2 *hist_A, EHistMap histmap, | TUnfold(const TH2 *hist_A, EHistMap histmap, | |||
ERegMode regmode = kRegModeSize, | ERegMode regmode = kRegModeSize, | |||
EConstraint constraint=kEConstraintArea); // constructor | EConstraint constraint=kEConstraintArea); // constructor | |||
virtual ~ TUnfold(void); // delete data members | virtual ~TUnfold(void); // delete data members | |||
static const char*GetTUnfoldVersion(void); | static const char*GetTUnfoldVersion(void); | |||
void SetBias(const TH1 *bias); // set alternative bias | void SetBias(const TH1 *bias); // set alternative bias | |||
void SetConstraint(EConstraint constraint); // set type of constraint fo r the next unfolding | void SetConstraint(EConstraint constraint); // set type of constraint fo r the next unfolding | |||
Int_t RegularizeSize(int bin, Double_t scale = 1.0); // regularise the size of one output bin | Int_t RegularizeSize(int bin, Double_t scale = 1.0); // regularise the size of one output bin | |||
Int_t RegularizeDerivative(int left_bin, int right_bin, Double_t scale = 1.0); // regularize difference of two output bins (1st derivative) | Int_t RegularizeDerivative(int left_bin, int right_bin, Double_t scale = 1.0); // regularize difference of two output bins (1st derivative) | |||
Int_t RegularizeCurvature(int left_bin, int center_bin, int right_bin, D ouble_t scale_left = 1.0, Double_t scale_right = 1.0); // regularize curva ture of three output bins (2nd derivative) | Int_t RegularizeCurvature(int left_bin, int center_bin, int right_bin, D ouble_t scale_left = 1.0, Double_t scale_right = 1.0); // regularize curva ture of three output bins (2nd derivative) | |||
Int_t RegularizeBins(int start, int step, int nbin, ERegMode regmode); // regularize a 1-dimensional curve | Int_t RegularizeBins(int start, int step, int nbin, ERegMode regmode); // regularize a 1-dimensional curve | |||
Int_t RegularizeBins2D(int start_bin, int step1, int nbin1, int step2, i nt nbin2, ERegMode regmode); // regularize a 2-dimensional grid | Int_t RegularizeBins2D(int start_bin, int step1, int nbin1, int step2, i nt nbin2, ERegMode regmode); // regularize a 2-dimensional grid | |||
Double_t DoUnfold(Double_t tau, | Double_t DoUnfold(Double_t tau, | |||
const TH1 *hist_y, Double_t scaleBias=0.0); // do the unfolding | const TH1 *hist_y, Double_t scaleBias=0.0); // do the unfolding | |||
virtual Int_t SetInput(const TH1 *hist_y, Double_t scaleBias=0.0,Double_ t oneOverZeroError=0.0); // define input distribution for ScanLCurve | virtual Int_t SetInput(const TH1 *hist_y, Double_t scaleBias=0.0,Double_ t oneOverZeroError=0.0,const TH2 *hist_vyy=0,const TH2 *hist_vyy_inv=0); // define input distribution | |||
virtual Double_t DoUnfold(Double_t tau); // Unfold with given choice of tau | virtual Double_t DoUnfold(Double_t tau); // Unfold with given choice of tau | |||
virtual Int_t ScanLcurve(Int_t nPoint,Double_t tauMin, | virtual Int_t ScanLcurve(Int_t nPoint,Double_t tauMin, | |||
Double_t tauMax,TGraph **lCurve, | Double_t tauMax,TGraph **lCurve, | |||
TSpline **logTauX=0,TSpline **logTauY=0); // sca | TSpline **logTauX=0,TSpline **logTauY=0); // sca | |||
n the L curve using successive calls to DoUnfold(Double_t) | n the L curve using successive calls to DoUnfold(Double_t) at various tau | |||
TH1D *GetOutput(const char *name,const char *title, Double_t x0 = 0.0, D | void GetProbabilityMatrix(TH2 *A,EHistMap histmap) const; // get the mat | |||
ouble_t x1 = 0.0) const; // get unfolding result | rix A of probabilities | |||
TH1D *GetBias(const char *name,const char *title, Double_t x0 = 0.0, Dou | void GetNormalisationVector(TH1 *s,const Int_t *binMap=0) const; // get | |||
ble_t x1 = 0.0) const; // get bias | the vector of normalisation factors, equivalent to the initial bias vector | |||
TH1D *GetFoldedOutput(const char *name,const char *title, Double_t y0 = | ||||
0.0, Double_t y1 = 0.0) const; // get folded unfolding result | void GetOutput(TH1 *output,const Int_t *binMap=0) const; // get output d | |||
TH1D *GetInput(const char *name,const char *title, Double_t y0 = 0.0, Do | istribution, arbitrary bin mapping | |||
uble_t y1 = 0.0) const; // get unfolding input | ||||
TH2D *GetRhoIJ(const char *name,const char *title, Double_t x0 = 0.0, Do | void GetBias(TH1 *bias,const Int_t *binMap=0) const; // get bias (includ | |||
uble_t x1 = 0.0) const; // get correlation coefficients | ind biasScale) | |||
TH2D *GetEmatrix(const char*name,const char *title, Double_t x0 = 0.0, D | ||||
ouble_t x1 = 0.0) const; // get error matrix | void GetFoldedOutput(TH1 *folded,const Int_t *binMap=0) const; // get un | |||
TH1D *GetRhoI(const char*name,const char *title, Double_t x0 = 0.0, Doub | folding result folded back through the matrix | |||
le_t x1 = 0.0) const; // get global correlation coefficients | ||||
TH2D *GetLsquared(const char*name,const char *title, Double_t x0 = 0.0, | void GetInput(TH1 *inputData,const Int_t *binMap=0) const; // get input | |||
Double_t x1 = 0.0) const; // get regularisation conditions squared | data | |||
void GetOutput(TH1 *output,const Int_t *binMap=0) const; // get output d | void GetRhoIJ(TH2 *rhoij,const Int_t *binMap=0) const; // get correlatio | |||
istribution, averaged over bins | n coefficients, arbitrary bin mapping | |||
void GetEmatrix(TH2 *ematrix,const Int_t *binMap=0) const; // get error | ||||
matrix, averaged over bins | void GetEmatrix(TH2 *ematrix,const Int_t *binMap=0) const; // get error | |||
Double_t GetRhoI(TH1 *rhoi,TH2 *ematrixinv=0,const Int_t *binMap=0) cons | matrix, arbitrary bin mapping | |||
t; // get global correlation coefficients and inverse of error matrix, aver | ||||
aged over bins | Double_t GetRhoI(TH1 *rhoi,const Int_t *binMap=0,TH2 *invEmat=0) const; | |||
void GetRhoIJ(TH2 *rhoij,const Int_t *binMap=0) const; // get correlatio | // get global correlation coefficients, arbitrary bin mapping | |||
n coefficients, averaged over bins | ||||
Double_t GetTau(void) const; // regularisation parameter | void GetLsquared(TH2 *lsquared) const; // get regularisation conditions | |||
inline Double_t GetRhoMax(void) const { return fRhoMax; } // maximum glo | squared | |||
bal correlation | ||||
inline Double_t GetRhoAvg(void) const { return fRhoAvg; } // average gl | inline Int_t GetNr(void) const { return fL->GetNrows(); } // number of r | |||
obal correlation | egularisation conditions | |||
inline Double_t GetChi2A(void) const { return fChi2A; } // chi**2 contr | void GetL(TH2 *l) const; // get matrix of regularisation conditions | |||
ibution from A | ||||
Double_t GetChi2L(void) const; // chi**2 contribution from L | void GetInputInverseEmatrix(TH2 *ematrix); // get input data inverse o | |||
virtual Double_t GetLcurveX(void) const; // x axis of L curve | f error matrix | |||
virtual Double_t GetLcurveY(void) const; // y axis of L curve | ||||
inline Int_t GetNdf(void) const { return fNdf; } // number of degrees | Double_t GetTau(void) const; // get regularisation parameter | |||
of freedom | inline Double_t GetRhoMax(void) const { return fRhoMax; } // get maximum | |||
Int_t GetNpar(void) const; // number of parameters | global correlation | |||
inline Double_t GetRhoAvg(void) const { return fRhoAvg; } // get averag | ||||
e global correlation | ||||
inline Double_t GetChi2A(void) const { return fChi2A; } // get chi**2 c | ||||
ontribution from A | ||||
Double_t GetChi2L(void) const; // get chi**2 contribution from L | ||||
virtual Double_t GetLcurveX(void) const; // get value on x axis o | ||||
f L curve | ||||
virtual Double_t GetLcurveY(void) const; // get value on y axis o | ||||
f L curve | ||||
inline Int_t GetNdf(void) const { return fNdf; } // get number of degr | ||||
ees of freedom | ||||
Int_t GetNpar(void) const; // get number of parameters | ||||
inline Double_t GetEpsMatrix(void) const { return fEpsMatrix; } // get | ||||
accuracy for eingenvalue analysis | ||||
void SetEpsMatrix(Double_t eps); // set accuracy for eigenvalue analysis | ||||
ClassDef(TUnfold, 0) //Unfolding with support for L-curve analysis | ClassDef(TUnfold, TUnfold_CLASS_VERSION) //Unfolding with support for L- curve analysis | |||
}; | }; | |||
#endif | #endif | |||
End of changes. 21 change blocks. | ||||
59 lines changed or deleted | 119 lines changed or added | |||
TUnfoldSys.h | TUnfoldSys.h | |||
---|---|---|---|---|
// @(#)root/hist:$Id$ | ||||
// Author: Stefan Schmitt | // Author: Stefan Schmitt | |||
// DESY, 23/01/09 | // DESY, 23/01/09 | |||
// Version 16, parallel to changes in TUnfold | // Version 17.1, bug fix with background uncertainty | |||
// | // | |||
// History: | // History: | |||
// Version 17.0, possibility to specify an error matrix with SetInput | ||||
// Version 16.2, bug-fix with the calculation of background errors | ||||
// Version 16.1, parallel to changes in TUnfold | ||||
// Version 16.0, parallel to changes in TUnfold | ||||
// Version 15, fix bugs with uncorr. uncertainties, add backgnd subtrac tion | // Version 15, fix bugs with uncorr. uncertainties, add backgnd subtrac tion | |||
// Version 14, with changes in TUnfoldSys.cxx | // Version 14, with changes in TUnfoldSys.cxx | |||
// Version 13, support for systematic errors | // Version 13, support for systematic errors | |||
#ifndef ROOT_TUnfoldSys | #ifndef ROOT_TUnfoldSys | |||
#define ROOT_TUnfoldSys | #define ROOT_TUnfoldSys | |||
#include <TUnfold.h> | ////////////////////////////////////////////////////////////////////////// | |||
// // | ||||
// // | ||||
// TUnfoldSys, an extension of the class TUnfold to correct for // | ||||
// migration effects. It provides methods for background subtraction // | ||||
// and propagation of systematic uncertainties // | ||||
// // | ||||
// Citation: S.Schmitt, JINST 7 (2012) T10003 [arXiv:1205.6201] // | ||||
// // | ||||
////////////////////////////////////////////////////////////////////////// | ||||
/* | ||||
This file is part of TUnfold. | ||||
TUnfold is free software: you can redistribute it and/or modify | ||||
it under the terms of the GNU General Public License as published by | ||||
the Free Software Foundation, either version 3 of the License, or | ||||
(at your option) any later version. | ||||
TUnfold is distributed in the hope that it will be useful, | ||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
GNU General Public License for more details. | ||||
You should have received a copy of the GNU General Public License | ||||
along with TUnfold. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | ||||
#include "TUnfold.h" | ||||
class TMap; | class TMap; | |||
class TUnfoldSys : public TUnfold { | class TUnfoldSys : public TUnfold { | |||
private: | private: | |||
void InitTUnfoldSys(void); // initialize all data members | void InitTUnfoldSys(void); // initialize all data members | |||
protected: | protected: | |||
TMatrixDSparse *fDAinRelSq; // Input: normalized errors from input matr ix | TMatrixDSparse *fDAinRelSq; // Input: normalized errors from input matr ix | |||
TMatrixD* fDAinColRelSq; // Input: normalized column err.sq. (inp.ma tr.) | TMatrixD* fDAinColRelSq; // Input: normalized column err.sq. (inp.ma tr.) | |||
TMatrixD* fAoutside; // Input: underflow/overflow bins | TMatrixD* fAoutside; // Input: underflow/overflow bins | |||
TMap *fSysIn; // Input: correlated errors | TMap *fSysIn; // Input: correlated errors | |||
TMap *fBgrIn; // Input: size of background sources | TMap *fBgrIn; // Input: size of background sources | |||
TMap *fBgrErrUncorrIn; // Input: uncorrelated error from bgr sourc | TMap *fBgrErrUncorrInSq; // Input: uncorr error squared from bgr sou | |||
es | rces | |||
TMap *fBgrErrCorrIn; // Input: background sources correlated err | TMap *fBgrErrScaleIn; // Input: background sources correlated err | |||
or | or | |||
Double_t fDtau; // Input: error on tau | Double_t fDtau; // Input: error on tau | |||
TMatrixD *fYData; // Input: fY prior to bgr subtraction | TMatrixD *fYData; // Input: fY prior to bgr subtraction | |||
TMatrixDSparse *fVyyData; // Input: error on fY prior to bgr subtract ion | TMatrixDSparse *fVyyData; // Input: error on fY prior to bgr subtract ion | |||
TMatrixDSparse *fEmatUncorrX; // Result: syst.error from fDA2 on fX | TMatrixDSparse *fEmatUncorrX; // Result: syst.error from fDA2 on fX | |||
TMatrixDSparse *fEmatUncorrAx; // Result: syst.error from fDA2 on fA x | TMatrixDSparse *fEmatUncorrAx; // Result: syst.error from fDA2 on fA x | |||
TMap *fDeltaCorrX; // Result: syst.shift from fSysIn on fX | TMap *fDeltaCorrX; // Result: syst.shift from fSysIn on fX | |||
TMap *fDeltaCorrAx; // Result: syst.shift from fSysIn on fAx | TMap *fDeltaCorrAx; // Result: syst.shift from fSysIn on fAx | |||
TMatrixDSparse *fDeltaSysTau; // Result: systematic shift from tau | TMatrixDSparse *fDeltaSysTau; // Result: systematic shift from tau | |||
protected: | protected: | |||
TUnfoldSys(void); // for derived classes | TUnfoldSys(void); // for derived classes | |||
virtual void ClearResults(void); // clear all results | virtual void ClearResults(void); // clear all results | |||
virtual void PrepareSysError(void); // common calculations for syst.erro rs | virtual void PrepareSysError(void); // common calculations for syst.erro rs | |||
virtual TMatrixDSparse *PrepareUncorrEmat(const TMatrixDSparse *m1,const TMatrixDSparse *m2); // calculate uncorrelated error matrix | virtual TMatrixDSparse *PrepareUncorrEmat(const TMatrixDSparse *m1,const TMatrixDSparse *m2); // calculate uncorrelated error matrix | |||
virtual TMatrixDSparse *PrepareCorrEmat(const TMatrixDSparse *m1,const T MatrixDSparse *m2,const TMatrixDSparse *dsys); // calculate correlated erro r matrix | virtual TMatrixDSparse *PrepareCorrEmat(const TMatrixDSparse *m1,const T MatrixDSparse *m2,const TMatrixDSparse *dsys); // calculate correlated erro r matrix | |||
void ScaleColumnsByVector(TMatrixDSparse *m,const TMatrixTBase<Double_t> *v) const; // scale columns of m by the corresponding rows of v | void ScaleColumnsByVector(TMatrixDSparse *m,const TMatrixTBase<Double_t> *v) const; // scale columns of m by the corresponding rows of v | |||
void VectorMapToHist(TH1 *hist_delta,const TMatrixDSparse *delta,const I nt_t *binMap); // map and sum vector delta, save in hist_delta | void VectorMapToHist(TH1 *hist_delta,const TMatrixDSparse *delta,const I nt_t *binMap); // map and sum vector delta, save in hist_delta | |||
void GetEmatrixFromVyy(const TMatrixDSparse *vyy,TH2 *ematrix,const Int_ t *binMap,Bool_t clearEmat); // propagate error matrix vyy to the result | void GetEmatrixFromVyy(const TMatrixDSparse *vyy,TH2 *ematrix,const Int_ t *binMap,Bool_t clearEmat); // propagate error matrix vyy to the result | |||
void DoBackgroundSubtraction(void); | void DoBackgroundSubtraction(void); | |||
TMatrixDSparse *GetSummedErrorMatrixYY(void); | ||||
TMatrixDSparse *GetSummedErrorMatrixXX(void); | ||||
public: | public: | |||
enum ESysErrMode { // meaning of the argument to AddSysError() | enum ESysErrMode { // meaning of the argument to AddSysError() | |||
kSysErrModeMatrix=0, // matrix is an alternative to the default matrix , the errors are the difference to the original matrix | kSysErrModeMatrix=0, // matrix is an alternative to the default matrix , the errors are the difference to the original matrix | |||
kSysErrModeShift=1, // matrix gives the absolute shifts | kSysErrModeShift=1, // matrix gives the absolute shifts | |||
kSysErrModeRelative=2 // matrix gives the relative shifts | kSysErrModeRelative=2 // matrix gives the relative shifts | |||
}; | }; | |||
TUnfoldSys(const TH2 *hist_A, EHistMap histmap, ERegMode regmode = kRegM odeSize, | TUnfoldSys(const TH2 *hist_A, EHistMap histmap, ERegMode regmode = kRegM odeSize, | |||
EConstraint constraint=kEConstraintNone); // constructor | EConstraint constraint=kEConstraintArea); // constructor | |||
virtual ~ TUnfoldSys(void); // delete data members | virtual ~ TUnfoldSys(void); // delete data members | |||
void AddSysError(const TH2 *sysError,const char *name, EHistMap histmap, | void AddSysError(const TH2 *sysError,const char *name, EHistMap histmap, | |||
ESysErrMode mode); // add a systematic error source | ESysErrMode mode); // add a systematic error source | |||
void GetDeltaSysSource(TH1 *hist_delta,const char *source, | Bool_t GetDeltaSysSource(TH1 *hist_delta,const char *source, | |||
const Int_t *binMap=0); // get systematic shifts from one systematic source | const Int_t *binMap=0); // get systematic shifts from one systematic source | |||
void SubtractBackground(const TH1 *hist_bgr,const char *name, | void SubtractBackground(const TH1 *hist_bgr,const char *name, | |||
Double_t scale=1.0, | Double_t scale=1.0, | |||
Double_t scale_error=0.0); // subtract backgroun d prior to unfolding | Double_t scale_error=0.0); // subtract backgroun d prior to unfolding | |||
virtual Int_t SetInput(const TH1 *hist_y,Double_t scaleBias=0.0,Double_t | void GetBackground(TH1 *bgr,const char *bgrSource=0,const Int_t *binMap= | |||
oneOverZeroError=0.0); // define input consistently in case of background | 0,Int_t includeError=3,Bool_t clearHist=kTRUE) const; // get background as | |||
subtraction | histogram | |||
void GetDeltaSysBackgroundScale(TH1 *delta,const char *source, | virtual Int_t SetInput(const TH1 *hist_y,Double_t scaleBias=0.0,Double_t | |||
oneOverZeroError=0.0,const TH2 *hist_vyy=0,const TH2 *hist_vyy_inv=0); // | ||||
define input consistently in case of background subtraction | ||||
Bool_t GetDeltaSysBackgroundScale(TH1 *delta,const char *source, | ||||
const Int_t *binMap=0); // get correlated u ncertainty induced by the scale uncertainty of a background source | const Int_t *binMap=0); // get correlated u ncertainty induced by the scale uncertainty of a background source | |||
void SetTauError(Double_t delta_tau); // set uncertainty on tau | void SetTauError(Double_t delta_tau); // set uncertainty on tau | |||
void GetDeltaSysTau(TH1 *delta,const Int_t *binMap=0); // get correlated uncertainty from varying tau | Bool_t GetDeltaSysTau(TH1 *delta,const Int_t *binMap=0); // get correlat ed uncertainty from varying tau | |||
void GetEmatrixSysUncorr(TH2 *ematrix,const Int_t *binMap=0,Bool_t clear Emat=kTRUE); // get error matrix contribution from uncorrelated errors on t he matrix A | void GetEmatrixSysUncorr(TH2 *ematrix,const Int_t *binMap=0,Bool_t clear Emat=kTRUE); // get error matrix contribution from uncorrelated errors on t he matrix A | |||
void GetEmatrixSysSource(TH2 *ematrix,const char *source, | void GetEmatrixSysSource(TH2 *ematrix,const char *source, | |||
const Int_t *binMap=0,Bool_t clearEmat=kTRUE); // get error matrix from one systematic source | const Int_t *binMap=0,Bool_t clearEmat=kTRUE); // get error matrix from one systematic source | |||
void GetEmatrixSysBackgroundUncorr(TH2 *ematrix,const char *source, | void GetEmatrixSysBackgroundUncorr(TH2 *ematrix,const char *source, | |||
const Int_t *binMap=0,Bool_t clearEmat=k TRUE); // get error matrix from uncorrelated error of one background source | const Int_t *binMap=0,Bool_t clearEmat=k TRUE); // get error matrix from uncorrelated error of one background source | |||
void GetEmatrixSysBackgroundScale(TH2 *ematrix,const char *source, | void GetEmatrixSysBackgroundScale(TH2 *ematrix,const char *source, | |||
const Int_t *binMap=0,Bool_t clearEmat=kT RUE); // get error matrix from the scale error of one background source | const Int_t *binMap=0,Bool_t clearEmat=kT RUE); // get error matrix from the scale error of one background source | |||
void GetEmatrixSysTau(TH2 *ematrix, | void GetEmatrixSysTau(TH2 *ematrix, | |||
const Int_t *binMap=0,Bool_t clearEmat=kTRUE); // get error matrix from tau variation | const Int_t *binMap=0,Bool_t clearEmat=kTRUE); // get error matrix from tau variation | |||
void GetEmatrixInput(TH2 *ematrix,const Int_t *binMap=0,Bool_t clearEmat =kTRUE); // get error contribution from input vector | void GetEmatrixInput(TH2 *ematrix,const Int_t *binMap=0,Bool_t clearEmat =kTRUE); // get error contribution from input vector | |||
void GetEmatrixTotal(TH2 *ematrix,const Int_t *binMap=0); // get total e rror including systematic,statistical,background,tau errors | void GetEmatrixTotal(TH2 *ematrix,const Int_t *binMap=0); // get total e rror including systematic,statistical,background,tau errors | |||
void GetRhoItotal(TH1 *rhoi,const Int_t *binMap=0,TH2 *invEmat=0); // ge t global correlation coefficients including systematic,statistical,backgrou nd,tau errors | ||||
Double_t GetChi2Sys(void); // get total chi**2 including all systematic errors | Double_t GetChi2Sys(void); // get total chi**2 including all systematic errors | |||
ClassDef(TUnfoldSys, TUnfold_CLASS_VERSION) //Unfolding with support for | ||||
ClassDef(TUnfoldSys, 0) //Unfolding with support for systematic error pr | systematic error propagation | |||
opagation | ||||
}; | }; | |||
#endif | #endif | |||
End of changes. 12 change blocks. | ||||
17 lines changed or deleted | 53 lines changed or added | |||
TVirtualGeoPainter.h | TVirtualGeoPainter.h | |||
---|---|---|---|---|
skipping to change at line 90 | skipping to change at line 90 | |||
virtual void DefaultAngles() = 0; | virtual void DefaultAngles() = 0; | |||
virtual void DefaultColors() = 0; | virtual void DefaultColors() = 0; | |||
virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int _t py) = 0; | virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int _t py) = 0; | |||
virtual void Draw(Option_t *option="") = 0; | virtual void Draw(Option_t *option="") = 0; | |||
virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option= "") = 0; | virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option= "") = 0; | |||
virtual void DrawShape(TGeoShape *shape, Option_t *option="") = 0; | virtual void DrawShape(TGeoShape *shape, Option_t *option="") = 0; | |||
virtual void DrawOnly(Option_t *option="") = 0; | virtual void DrawOnly(Option_t *option="") = 0; | |||
virtual void DrawOverlap(void *ovlp, Option_t *option="") = 0; | virtual void DrawOverlap(void *ovlp, Option_t *option="") = 0; | |||
virtual void DrawCurrentPoint(Int_t color) = 0; | virtual void DrawCurrentPoint(Int_t color) = 0; | |||
virtual void DrawPanel() = 0; | virtual void DrawPanel() = 0; | |||
virtual void DrawPath(const char *path) = 0; | virtual void DrawPath(const char *path, Option_t *option="") = 0; | |||
virtual void DrawPolygon(const TGeoPolygon *poly) = 0; | virtual void DrawPolygon(const TGeoPolygon *poly) = 0; | |||
virtual void DrawVolume(TGeoVolume *vol, Option_t *option="") = 0; | virtual void DrawVolume(TGeoVolume *vol, Option_t *option="") = 0; | |||
virtual void EditGeometry(Option_t *option="") = 0; | virtual void EditGeometry(Option_t *option="") = 0; | |||
virtual void EstimateCameraMove(Double_t /*tmin*/, Double_t /*tmax */, Double_t *, Double_t * ) {;} | virtual void EstimateCameraMove(Double_t /*tmin*/, Double_t /*tmax */, Double_t *, Double_t * ) {;} | |||
virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_ t px, Int_t py) = 0; | virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_ t px, Int_t py) = 0; | |||
virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, I nt_t px, Int_t py) = 0; | virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, I nt_t px, Int_t py) = 0; | |||
virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, I nt_t px, Int_t py) = 0; | virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, I nt_t px, Int_t py) = 0; | |||
virtual Int_t GetColor(Int_t base, Float_t light) const = 0; | virtual Int_t GetColor(Int_t base, Float_t light) const = 0; | |||
virtual Int_t GetNsegments() const = 0; | virtual Int_t GetNsegments() const = 0; | |||
virtual void GetBombFactors(Double_t &bombx, Double_t &bomby, Doub le_t &bombz, Double_t &bombr) const = 0; | virtual void GetBombFactors(Double_t &bombx, Double_t &bomby, Doub le_t &bombz, Double_t &bombr) const = 0; | |||
skipping to change at line 118 | skipping to change at line 118 | |||
virtual const char*GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int _t py) const = 0; | virtual const char*GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int _t py) const = 0; | |||
virtual void GrabFocus(Int_t nfr=0, Double_t dlong=0, Double_t dla t=0, Double_t dpsi=0) =0; | virtual void GrabFocus(Int_t nfr=0, Double_t dlong=0, Double_t dla t=0, Double_t dpsi=0) =0; | |||
virtual Double_t *GetViewBox() = 0; | virtual Double_t *GetViewBox() = 0; | |||
virtual Bool_t IsPaintingShape() const = 0; | virtual Bool_t IsPaintingShape() const = 0; | |||
virtual Bool_t IsRaytracing() const = 0; | virtual Bool_t IsRaytracing() const = 0; | |||
virtual Bool_t IsExplodedView() const = 0; | virtual Bool_t IsExplodedView() const = 0; | |||
virtual TH2F *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_ t themax=180., | virtual TH2F *LegoPlot(Int_t ntheta=60, Double_t themin=0., Double_ t themax=180., | |||
Int_t nphi=90, Double_t phimin=0., Double_t phi max=360., | Int_t nphi=90, Double_t phimin=0., Double_t phi max=360., | |||
Double_t rmin=0., Double_t rmax=9999999, Option _t *option="") = 0; | Double_t rmin=0., Double_t rmax=9999999, Option _t *option="") = 0; | |||
virtual void ModifiedPad(Bool_t update=kFALSE) const = 0; | virtual void ModifiedPad(Bool_t update=kFALSE) const = 0; | |||
virtual void OpProgress(const char *opname, Long64_t current, Long 64_t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE) = 0; | virtual void OpProgress(const char *opname, Long64_t current, Long 64_t size, TStopwatch *watch=0, Bool_t last=kFALSE, Bool_t refresh=kFALSE, const char *msg="") = 0; | |||
virtual void Paint(Option_t *option="") = 0; | virtual void Paint(Option_t *option="") = 0; | |||
virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMa trix* global=0) = 0; | virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMa trix* global=0) = 0; | |||
virtual void PaintShape(TGeoShape *shape, Option_t *option="") = 0 ; | virtual void PaintShape(TGeoShape *shape, Option_t *option="") = 0 ; | |||
virtual void PaintOverlap(void *ovlp, Option_t *option="") = 0; | virtual void PaintOverlap(void *ovlp, Option_t *option="") = 0; | |||
virtual void PrintOverlaps() const = 0; | virtual void PrintOverlaps() const = 0; | |||
virtual void PaintVolume(TGeoVolume *vol, Option_t *option="", TGe oMatrix* global=0) = 0; | virtual void PaintVolume(TGeoVolume *vol, Option_t *option="", TGe oMatrix* global=0) = 0; | |||
virtual void RandomPoints(const TGeoVolume *vol, Int_t npoints, Op tion_t *option="") = 0; | virtual void RandomPoints(const TGeoVolume *vol, Int_t npoints, Op tion_t *option="") = 0; | |||
virtual void RandomRays(Int_t nrays, Double_t startx, Double_t sta rty, Double_t startz, const char *target_vol, Bool_t check_norm) = 0; | virtual void RandomRays(Int_t nrays, Double_t startx, Double_t sta rty, Double_t startz, const char *target_vol, Bool_t check_norm) = 0; | |||
virtual void Raytrace(Option_t *option="") = 0; | virtual void Raytrace(Option_t *option="") = 0; | |||
virtual TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char* g3path) = 0; | virtual TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char* g3path) = 0; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
TVirtualMC.h | TVirtualMC.h | |||
---|---|---|---|---|
skipping to change at line 27 | skipping to change at line 27 | |||
// // | // // | |||
// // | // // | |||
// Abstract Monte Carlo interface // | // Abstract Monte Carlo interface // | |||
// // | // // | |||
// // | // // | |||
/////////////////////////////////////////////////////////////////////////// //// | /////////////////////////////////////////////////////////////////////////// //// | |||
#include "TMCProcess.h" | #include "TMCProcess.h" | |||
#include "TMCParticleType.h" | #include "TMCParticleType.h" | |||
#include "TMCOptical.h" | #include "TMCOptical.h" | |||
#include "TMCtls.h" | ||||
#include "TVirtualMCApplication.h" | #include "TVirtualMCApplication.h" | |||
#include "TVirtualMCStack.h" | #include "TVirtualMCStack.h" | |||
#include "TVirtualMCDecayer.h" | #include "TVirtualMCDecayer.h" | |||
#include "TVirtualMagField.h" | #include "TVirtualMagField.h" | |||
#include "TRandom.h" | #include "TRandom.h" | |||
#include "TString.h" | #include "TString.h" | |||
#include "TError.h" | #include "TError.h" | |||
#if defined(__linux__) && !defined(__CINT__) | ||||
#include <pthread.h> | ||||
#endif | ||||
class TLorentzVector; | class TLorentzVector; | |||
class TGeoHMatrix; | class TGeoHMatrix; | |||
class TArrayI; | class TArrayI; | |||
class TArrayD; | class TArrayD; | |||
class TVirtualMC : public TNamed { | class TVirtualMC : public TNamed { | |||
public: | public: | |||
// Standard constructor | // Standard constructor | |||
// isRootGeometrySupported = True if implementation of TVirtualMC | // isRootGeometrySupported = True if implementation of TVirtualMC | |||
skipping to change at line 868 | skipping to change at line 865 | |||
// Return the magnetic field | // Return the magnetic field | |||
virtual TVirtualMagField* GetMagField() const { return fMagField; } | virtual TVirtualMagField* GetMagField() const { return fMagField; } | |||
protected: | protected: | |||
TVirtualMCApplication* fApplication; //! User MC application | TVirtualMCApplication* fApplication; //! User MC application | |||
private: | private: | |||
TVirtualMC(const TVirtualMC &mc); | TVirtualMC(const TVirtualMC &mc); | |||
TVirtualMC & operator=(const TVirtualMC &); | TVirtualMC & operator=(const TVirtualMC &); | |||
#if defined(__linux__) && !defined(__CINT__) | #if !defined(__CINT__) | |||
static __thread TVirtualMC* fgMC; // Monte Carlo singleton instance | static TMCThreadLocal TVirtualMC* fgMC; // Monte Carlo singleton instan | |||
ce | ||||
#else | #else | |||
static TVirtualMC* fgMC; // Monte Carlo singleton instance | static TVirtualMC* fgMC; // Monte Carlo singleton instan ce | |||
#endif | #endif | |||
TVirtualMCStack* fStack; //! Particles stack | TVirtualMCStack* fStack; //! Particles stack | |||
TVirtualMCDecayer* fDecayer; //! External decayer | TVirtualMCDecayer* fDecayer; //! External decayer | |||
TRandom* fRandom; //! Random number generator | TRandom* fRandom; //! Random number generator | |||
TVirtualMagField* fMagField;//! Magnetic field | TVirtualMagField* fMagField;//! Magnetic field | |||
ClassDef(TVirtualMC,1) //Interface to Monte Carlo | ClassDef(TVirtualMC,1) //Interface to Monte Carlo | |||
}; | }; | |||
#if defined(__linux__) && !defined(__CINT__) | #if !defined(__CINT__) | |||
R__EXTERN __thread TVirtualMC *gMC; | R__EXTERN TMCThreadLocal TVirtualMC *gMC; | |||
#else | #else | |||
R__EXTERN TVirtualMC *gMC; | R__EXTERN TVirtualMC *gMC; | |||
#endif | #endif | |||
#endif //ROOT_TVirtualMC | #endif //ROOT_TVirtualMC | |||
End of changes. 6 change blocks. | ||||
10 lines changed or deleted | 8 lines changed or added | |||
TVirtualMCApplication.h | TVirtualMCApplication.h | |||
---|---|---|---|---|
skipping to change at line 28 | skipping to change at line 28 | |||
// Interface to a user Monte Carlo application. | // Interface to a user Monte Carlo application. | |||
// | // | |||
#ifndef ROOT_TNamed | #ifndef ROOT_TNamed | |||
#include "TNamed.h" | #include "TNamed.h" | |||
#endif | #endif | |||
#ifndef ROOT_TMath | #ifndef ROOT_TMath | |||
#include "TMath.h" | #include "TMath.h" | |||
#endif | #endif | |||
#if defined(__linux__) && !defined(__CINT__) | #include "TMCtls.h" | |||
#include <pthread.h> | ||||
#endif | ||||
class TVirtualMCApplication : public TNamed { | class TVirtualMCApplication : public TNamed { | |||
public: | public: | |||
// Standard constructor | // Standard constructor | |||
TVirtualMCApplication(const char *name, const char *title); | TVirtualMCApplication(const char *name, const char *title); | |||
// Default constructor | // Default constructor | |||
TVirtualMCApplication(); | TVirtualMCApplication(); | |||
skipping to change at line 115 | skipping to change at line 113 | |||
// New functions for multi-threading applications | // New functions for multi-threading applications | |||
virtual TVirtualMCApplication* CloneForWorker() const { return 0;} | virtual TVirtualMCApplication* CloneForWorker() const { return 0;} | |||
virtual void InitForWorker() const {} | virtual void InitForWorker() const {} | |||
virtual void BeginWorkerRun() const {} | virtual void BeginWorkerRun() const {} | |||
virtual void FinishWorkerRun() const {} | virtual void FinishWorkerRun() const {} | |||
virtual void Merge(TVirtualMCApplication* /*localMCApplication*/) {} | virtual void Merge(TVirtualMCApplication* /*localMCApplication*/) {} | |||
private: | private: | |||
// static data members | // static data members | |||
#if defined(__linux__) && !defined(__CINT__) | #if !defined(__CINT__) | |||
static __thread TVirtualMCApplication* fgInstance; // singleton instance | static TMCThreadLocal TVirtualMCApplication* fgInstance; // singleton in | |||
stance | ||||
#else | #else | |||
static TVirtualMCApplication* fgInstance; // singleton instance | static TVirtualMCApplication* fgInstance; // singleton in stance | |||
#endif | #endif | |||
ClassDef(TVirtualMCApplication,1) //Interface to MonteCarlo application | ClassDef(TVirtualMCApplication,1) //Interface to MonteCarlo application | |||
}; | }; | |||
inline void TVirtualMCApplication::Field(const Double_t* /*x*/, Double_t* b ) const { | inline void TVirtualMCApplication::Field(const Double_t* /*x*/, Double_t* b ) const { | |||
// No magnetic field | // No magnetic field | |||
b[0] = 0; b[1] = 0; b[2] = 0; | b[0] = 0; b[1] = 0; b[2] = 0; | |||
} | } | |||
End of changes. 3 change blocks. | ||||
6 lines changed or deleted | 5 lines changed or added | |||
TVirtualPad.h | TVirtualPad.h | |||
---|---|---|---|---|
skipping to change at line 231 | skipping to change at line 231 | |||
virtual void SetTicks(Int_t valuex = 1, Int_t valuey = 1) = 0; | virtual void SetTicks(Int_t valuex = 1, Int_t valuey = 1) = 0; | |||
virtual void SetTickx(Int_t value = 1) = 0; | virtual void SetTickx(Int_t value = 1) = 0; | |||
virtual void SetTicky(Int_t value = 1) = 0; | virtual void SetTicky(Int_t value = 1) = 0; | |||
virtual void SetTitle(const char *title="") = 0; | virtual void SetTitle(const char *title="") = 0; | |||
virtual void SetTheta(Double_t theta=30) = 0; | virtual void SetTheta(Double_t theta=30) = 0; | |||
virtual void SetPhi(Double_t phi=30) = 0; | virtual void SetPhi(Double_t phi=30) = 0; | |||
virtual void SetToolTipText(const char *text, Long_t delayms = 1000) = 0; | virtual void SetToolTipText(const char *text, Long_t delayms = 1000) = 0; | |||
virtual void SetVertical(Bool_t vert=kTRUE) = 0; | virtual void SetVertical(Bool_t vert=kTRUE) = 0; | |||
virtual void SetView(TView *view=0) = 0; | virtual void SetView(TView *view=0) = 0; | |||
virtual void SetViewer3D(TVirtualViewer3D * /*viewer3d*/) {} | virtual void SetViewer3D(TVirtualViewer3D * /*viewer3d*/) {} | |||
virtual void ShowGuidelines(TObject *object, const Int_t event, cons t char mode = 'i', const bool cling = true) = 0; | ||||
virtual TObject *WaitPrimitive(const char *pname="", const char *emode=" ") = 0; | virtual TObject *WaitPrimitive(const char *pname="", const char *emode=" ") = 0; | |||
virtual void Update() = 0; | virtual void Update() = 0; | |||
virtual Int_t UtoAbsPixel(Double_t u) const = 0; | virtual Int_t UtoAbsPixel(Double_t u) const = 0; | |||
virtual Int_t VtoAbsPixel(Double_t v) const = 0; | virtual Int_t VtoAbsPixel(Double_t v) const = 0; | |||
virtual Int_t UtoPixel(Double_t u) const = 0; | virtual Int_t UtoPixel(Double_t u) const = 0; | |||
virtual Int_t VtoPixel(Double_t v) const = 0; | virtual Int_t VtoPixel(Double_t v) const = 0; | |||
virtual Int_t XtoAbsPixel(Double_t x) const = 0; | virtual Int_t XtoAbsPixel(Double_t x) const = 0; | |||
virtual Int_t YtoAbsPixel(Double_t y) const = 0; | virtual Int_t YtoAbsPixel(Double_t y) const = 0; | |||
virtual Double_t XtoPad(Double_t x) const = 0; | virtual Double_t XtoPad(Double_t x) const = 0; | |||
virtual Double_t YtoPad(Double_t y) const = 0; | virtual Double_t YtoPad(Double_t y) const = 0; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added | |||
TVirtualPerfStats.h | TVirtualPerfStats.h | |||
---|---|---|---|---|
skipping to change at line 61 | skipping to change at line 61 | |||
Double_t proctime, Double_t cputime, | Double_t proctime, Double_t cputime, | |||
Long64_t bytesRead) = 0; | Long64_t bytesRead) = 0; | |||
virtual void FileEvent(const char *slave, const char *slavename, const c har *nodename, | virtual void FileEvent(const char *slave, const char *slavename, const c har *nodename, | |||
const char *filename, Bool_t isStart) = 0; | const char *filename, Bool_t isStart) = 0; | |||
virtual void FileOpenEvent(TFile *file, const char *filename, Double_t s tart) = 0; | virtual void FileOpenEvent(TFile *file, const char *filename, Double_t s tart) = 0; | |||
virtual void FileReadEvent(TFile *file, Int_t len, Double_t start) = 0; | virtual void FileReadEvent(TFile *file, Int_t len, Double_t start) = 0; | |||
virtual void FileUnzipEvent(TFile *file, Long64_t pos, Double_t start, I nt_t complen, Int_t objlen) = 0; | virtual void UnzipEvent(TObject *tree, Long64_t pos, Double_t start, Int _t complen, Int_t objlen) = 0; | |||
virtual void RateEvent(Double_t proctime, Double_t deltatime, | virtual void RateEvent(Double_t proctime, Double_t deltatime, | |||
Long64_t eventsprocessed, Long64_t bytesRead) = 0 ; | Long64_t eventsprocessed, Long64_t bytesRead) = 0 ; | |||
virtual void SetBytesRead(Long64_t num) = 0; | virtual void SetBytesRead(Long64_t num) = 0; | |||
virtual Long64_t GetBytesRead() const = 0; | virtual Long64_t GetBytesRead() const = 0; | |||
virtual void SetNumEvents(Long64_t num) = 0; | virtual void SetNumEvents(Long64_t num) = 0; | |||
virtual Long64_t GetNumEvents() const = 0; | virtual Long64_t GetNumEvents() const = 0; | |||
static const char *EventType(EEventType type); | static const char *EventType(EEventType type); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TVirtualStreamerInfo.h | TVirtualStreamerInfo.h | |||
---|---|---|---|---|
skipping to change at line 115 | skipping to change at line 115 | |||
TVirtualStreamerInfo(); | TVirtualStreamerInfo(); | |||
TVirtualStreamerInfo(TClass * /*cl*/); | TVirtualStreamerInfo(TClass * /*cl*/); | |||
virtual ~TVirtualStreamerInfo(); | virtual ~TVirtualStreamerInfo(); | |||
virtual void Build() = 0; | virtual void Build() = 0; | |||
virtual void BuildCheck(TFile *file = 0) = 0; | virtual void BuildCheck(TFile *file = 0) = 0; | |||
virtual void BuildEmulated(TFile *file) = 0; | virtual void BuildEmulated(TFile *file) = 0; | |||
virtual void BuildOld() = 0; | virtual void BuildOld() = 0; | |||
virtual Bool_t BuildFor( const TClass *cl ) = 0; | virtual Bool_t BuildFor( const TClass *cl ) = 0; | |||
virtual void CallShowMembers(void* obj, TMemberInspector &insp) c onst = 0; | virtual void CallShowMembers(void* obj, TMemberInspector &insp) c onst = 0; | |||
virtual void Clear(Option_t *) = 0; | virtual void Clear(Option_t *) = 0; | |||
virtual Bool_t CompareContent(TClass *cl,TVirtualStreamerInfo *info , Bool_t warn, Bool_t complete) = 0; | virtual Bool_t CompareContent(TClass *cl,TVirtualStreamerInfo *info , Bool_t warn, Bool_t complete, TFile *file) = 0; | |||
virtual void Compile() = 0; | virtual void Compile() = 0; | |||
virtual void ForceWriteInfo(TFile *file, Bool_t force=kFALSE) = 0 ; | virtual void ForceWriteInfo(TFile *file, Bool_t force=kFALSE) = 0 ; | |||
virtual Int_t GenerateHeaderFile(const char *dirname, const TList *subClasses = 0, const TList *extrainfos = 0) = 0; | virtual Int_t GenerateHeaderFile(const char *dirname, const TList *subClasses = 0, const TList *extrainfos = 0) = 0; | |||
virtual TClass *GetActualClass(const void *obj) const = 0; | virtual TClass *GetActualClass(const void *obj) const = 0; | |||
virtual TClass *GetClass() const = 0; | virtual TClass *GetClass() const = 0; | |||
virtual UInt_t GetCheckSum() const = 0; | virtual UInt_t GetCheckSum() const = 0; | |||
virtual Int_t GetClassVersion() const = 0; | virtual Int_t GetClassVersion() const = 0; | |||
virtual ULong_t *GetElems() const = 0; | virtual ULong_t *GetElems() const = 0; | |||
virtual TObjArray *GetElements() const = 0; | virtual TObjArray *GetElements() const = 0; | |||
virtual Int_t GetOffset(const char *) const = 0; | virtual Int_t GetOffset(const char *) const = 0; | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
TVirtualX.h | TVirtualX.h | |||
---|---|---|---|---|
skipping to change at line 124 | skipping to change at line 124 | |||
virtual Int_t GetDoubleBuffer(Int_t wid); | virtual Int_t GetDoubleBuffer(Int_t wid); | |||
virtual void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h); | virtual void GetGeometry(Int_t wid, Int_t &x, Int_t &y, UInt_t &w, UInt_t &h); | |||
virtual const char *DisplayName(const char * = 0); | virtual const char *DisplayName(const char * = 0); | |||
virtual Handle_t GetNativeEvent() const; | virtual Handle_t GetNativeEvent() const; | |||
virtual ULong_t GetPixel(Color_t cindex); | virtual ULong_t GetPixel(Color_t cindex); | |||
virtual void GetPlanes(Int_t &nplanes); | virtual void GetPlanes(Int_t &nplanes); | |||
virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b ); | virtual void GetRGB(Int_t index, Float_t &r, Float_t &g, Float_t &b ); | |||
virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess); | virtual void GetTextExtent(UInt_t &w, UInt_t &h, char *mess); | |||
virtual void GetTextExtent(UInt_t &w, UInt_t &h, wchar_t *mess); | virtual void GetTextExtent(UInt_t &w, UInt_t &h, wchar_t *mess); | |||
virtual Int_t GetFontAscent() const; | virtual Int_t GetFontAscent() const; | |||
virtual Int_t GetFontDescent() const ; | virtual Int_t GetFontAscent(const char *mess) const; | |||
virtual Int_t GetFontDescent() const; | ||||
virtual Int_t GetFontDescent(const char *mess) const; | ||||
virtual Float_t GetTextMagnitude(); | virtual Float_t GetTextMagnitude(); | |||
virtual Window_t GetWindowID(Int_t wid); | virtual Window_t GetWindowID(Int_t wid); | |||
virtual Bool_t HasTTFonts() const; | virtual Bool_t HasTTFonts() const; | |||
virtual Int_t InitWindow(ULong_t window); | virtual Int_t InitWindow(ULong_t window); | |||
virtual Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h); | virtual Int_t AddWindow(ULong_t qwid, UInt_t w, UInt_t h); | |||
virtual Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h); | virtual Int_t AddPixmap(ULong_t pixid, UInt_t w, UInt_t h); | |||
virtual void RemoveWindow(ULong_t qwid); | virtual void RemoveWindow(ULong_t qwid); | |||
virtual void MoveWindow(Int_t wid, Int_t x, Int_t y); | virtual void MoveWindow(Int_t wid, Int_t x, Int_t y); | |||
virtual Int_t OpenPixmap(UInt_t w, UInt_t h); | virtual Int_t OpenPixmap(UInt_t w, UInt_t h); | |||
virtual void QueryPointer(Int_t &ix, Int_t &iy); | virtual void QueryPointer(Int_t &ix, Int_t &iy); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added | |||
TVirtualX.interface.h | TVirtualX.interface.h | |||
---|---|---|---|---|
skipping to change at line 29 | skipping to change at line 29 | |||
virtual void ClearWindow(); | virtual void ClearWindow(); | |||
virtual void ClosePixmap(); | virtual void ClosePixmap(); | |||
virtual void CloseWindow(); | virtual void CloseWindow(); | |||
virtual void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos); | virtual void CopyPixmap(Int_t wid, Int_t xpos, Int_t ypos); | |||
//TVirtualX has two versions of CreateOpenGLContext | //TVirtualX has two versions of CreateOpenGLContext | |||
using TVirtualX::CreateOpenGLContext; | using TVirtualX::CreateOpenGLContext; | |||
//TVirtualX has these two methods with wchar_t | //TVirtualX has these two methods with wchar_t | |||
using TVirtualX::DrawText; | using TVirtualX::DrawText; | |||
using TVirtualX::GetTextExtent;; | using TVirtualX::GetTextExtent; | |||
//TVirtualX now has versions with parameters also, | ||||
//but TGQt defines only versions without parameters. | ||||
using TVirtualX::GetFontAscent; | ||||
using TVirtualX::GetFontDescent; | ||||
virtual void CreateOpenGLContext(Int_t wid=0); | virtual void CreateOpenGLContext(Int_t wid=0); | |||
virtual void DeleteOpenGLContext(Int_t wid=0); | virtual void DeleteOpenGLContext(Int_t wid=0); | |||
virtual void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMo de mode); | virtual void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, EBoxMo de mode); | |||
virtual void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, | virtual void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, | |||
Int_t nx, Int_t ny, Int_t *ic); | Int_t nx, Int_t ny, Int_t *ic); | |||
virtual void DrawFillArea(Int_t n, TPoint *xy); | virtual void DrawFillArea(Int_t n, TPoint *xy); | |||
virtual void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2); | virtual void DrawLine(Int_t x1, Int_t y1, Int_t x2, Int_t y2); | |||
virtual void DrawPolyLine(Int_t n, TPoint *xy); | virtual void DrawPolyLine(Int_t n, TPoint *xy); | |||
virtual void DrawPolyMarker(Int_t n, TPoint *xy); | virtual void DrawPolyMarker(Int_t n, TPoint *xy); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 6 lines changed or added | |||
TXMLEngine.h | TXMLEngine.h | |||
---|---|---|---|---|
skipping to change at line 96 | skipping to change at line 96 | |||
const char* type = "text/css", | const char* type = "text/css", | |||
const char* title = 0, | const char* title = 0, | |||
int alternate = -1, | int alternate = -1, | |||
const char* media = 0, | const char* media = 0, | |||
const char* charset = 0); | const char* charset = 0); | |||
void UnlinkNode(XMLNodePointer_t node); | void UnlinkNode(XMLNodePointer_t node); | |||
void FreeNode(XMLNodePointer_t xmlnode); | void FreeNode(XMLNodePointer_t xmlnode); | |||
void UnlinkFreeNode(XMLNodePointer_t xmlnode); | void UnlinkFreeNode(XMLNodePointer_t xmlnode); | |||
const char* GetNodeName(XMLNodePointer_t xmlnode); | const char* GetNodeName(XMLNodePointer_t xmlnode); | |||
const char* GetNodeContent(XMLNodePointer_t xmlnode); | const char* GetNodeContent(XMLNodePointer_t xmlnode); | |||
XMLNodePointer_t GetChild(XMLNodePointer_t xmlnode); | void SetNodeContent(XMLNodePointer_t xmlnode, const char* c | |||
ontent, Int_t len = 0); | ||||
void AddNodeContent(XMLNodePointer_t xmlnode, const char* c | ||||
ontent, Int_t len = 0); | ||||
XMLNodePointer_t GetChild(XMLNodePointer_t xmlnode, Bool_t realnode = k | ||||
TRUE); | ||||
XMLNodePointer_t GetParent(XMLNodePointer_t xmlnode); | XMLNodePointer_t GetParent(XMLNodePointer_t xmlnode); | |||
XMLNodePointer_t GetNext(XMLNodePointer_t xmlnode); | XMLNodePointer_t GetNext(XMLNodePointer_t xmlnode, Bool_t realnode = kT | |||
void ShiftToNext(XMLNodePointer_t &xmlnode, Bool_t tonode = | RUE); | |||
true); | void ShiftToNext(XMLNodePointer_t &xmlnode, Bool_t realnode | |||
= kTRUE); | ||||
Bool_t IsXmlNode(XMLNodePointer_t xmlnode); | ||||
Bool_t IsEmptyNode(XMLNodePointer_t xmlnode); | Bool_t IsEmptyNode(XMLNodePointer_t xmlnode); | |||
Bool_t IsContentNode(XMLNodePointer_t xmlnode); | ||||
Bool_t IsCommentNode(XMLNodePointer_t xmlnode); | ||||
void SkipEmpty(XMLNodePointer_t &xmlnode); | void SkipEmpty(XMLNodePointer_t &xmlnode); | |||
void CleanNode(XMLNodePointer_t xmlnode); | void CleanNode(XMLNodePointer_t xmlnode); | |||
XMLDocPointer_t NewDoc(const char* version = "1.0"); | XMLDocPointer_t NewDoc(const char* version = "1.0"); | |||
void AssignDtd(XMLDocPointer_t xmldoc, const char* dtdname, const char* rootname); | void AssignDtd(XMLDocPointer_t xmldoc, const char* dtdname, const char* rootname); | |||
void FreeDoc(XMLDocPointer_t xmldoc); | void FreeDoc(XMLDocPointer_t xmldoc); | |||
void SaveDoc(XMLDocPointer_t xmldoc, const char* filename, Int_t layout = 1); | void SaveDoc(XMLDocPointer_t xmldoc, const char* filename, Int_t layout = 1); | |||
void DocSetRootElement(XMLDocPointer_t xmldoc, XMLNodePoint er_t xmlnode); | void DocSetRootElement(XMLDocPointer_t xmldoc, XMLNodePoint er_t xmlnode); | |||
XMLNodePointer_t DocGetRootElement(XMLDocPointer_t xmldoc); | XMLNodePointer_t DocGetRootElement(XMLDocPointer_t xmldoc); | |||
XMLDocPointer_t ParseFile(const char* filename, Int_t maxbuf = 100000) ; | XMLDocPointer_t ParseFile(const char* filename, Int_t maxbuf = 100000) ; | |||
XMLDocPointer_t ParseString(const char* xmlstring); | XMLDocPointer_t ParseString(const char* xmlstring); | |||
End of changes. 3 change blocks. | ||||
4 lines changed or deleted | 13 lines changed or added | |||
TXProofMgr.h | TXProofMgr.h | |||
---|---|---|---|---|
skipping to change at line 82 | skipping to change at line 82 | |||
TProofLog *GetSessionLogs(Int_t ridx = 0, const char *stag = 0, | TProofLog *GetSessionLogs(Int_t ridx = 0, const char *stag = 0, | |||
const char *pattern = "-v \"| SvcMsg\"", | const char *pattern = "-v \"| SvcMsg\"", | |||
Bool_t rescan = kFALSE); | Bool_t rescan = kFALSE); | |||
Bool_t MatchUrl(const char *url); | Bool_t MatchUrl(const char *url); | |||
void ShowROOTVersions(); | void ShowROOTVersions(); | |||
TList *QuerySessions(Option_t *opt = "S"); | TList *QuerySessions(Option_t *opt = "S"); | |||
TObjString *ReadBuffer(const char *file, Long64_t ofs, Int_t len); | TObjString *ReadBuffer(const char *file, Long64_t ofs, Int_t len); | |||
TObjString *ReadBuffer(const char *file, const char *pattern); | TObjString *ReadBuffer(const char *file, const char *pattern); | |||
Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); | Int_t Reset(Bool_t hard = kFALSE, const char *usr = 0); | |||
Int_t SendMsgToUsers(const char *msg, const char *usr = 0); | Int_t SendMsgToUsers(const char *msg, const char *usr = 0); | |||
void SetROOTVersion(const char *tag); | Int_t SetROOTVersion(const char *tag); | |||
void ShowWorkers(); | void ShowWorkers(); | |||
// Remote file system actions | // Remote file system actions | |||
Int_t Cp(const char *src, const char *dst = 0, const char *opts = 0); | Int_t Cp(const char *src, const char *dst = 0, const char *opts = 0); | |||
void Find(const char *what = "~/", const char *how = "-type f", c onst char *where = 0); | void Find(const char *what = "~/", const char *how = "-type f", c onst char *where = 0); | |||
void Grep(const char *what, const char *how = 0, const char *wher e = 0); | void Grep(const char *what, const char *how = 0, const char *wher e = 0); | |||
void Ls(const char *what = "~/", const char *how = 0, const char *where = 0); | void Ls(const char *what = "~/", const char *how = 0, const char *where = 0); | |||
void More(const char *what, const char *how = 0, const char *wher e = 0); | void More(const char *what, const char *how = 0, const char *wher e = 0); | |||
Int_t Rm(const char *what, const char *how = 0, const char *where = 0); | Int_t Rm(const char *what, const char *how = 0, const char *where = 0); | |||
void Tail(const char *what, const char *how = 0, const char *wher e = 0); | void Tail(const char *what, const char *how = 0, const char *wher e = 0); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
ToyMCStudy.h | ToyMCStudy.h | |||
---|---|---|---|---|
skipping to change at line 51 | skipping to change at line 51 | |||
#include <vector> | #include <vector> | |||
namespace RooStats { | namespace RooStats { | |||
class ToyMCStudy: public RooAbsStudy { | class ToyMCStudy: public RooAbsStudy { | |||
public: | public: | |||
// need to have constructor without arguments for proof | // need to have constructor without arguments for proof | |||
ToyMCStudy(const char *name = "ToyMCStudy", const char *title = "ToyM CStudy") : | ToyMCStudy(const char *name = "ToyMCStudy", const char *title = "ToyM CStudy") : | |||
RooAbsStudy(name, title), | RooAbsStudy(name, title), | |||
fRandomSeed(0), | ||||
fToyMCSampler(NULL) | fToyMCSampler(NULL) | |||
{ | { | |||
// In this case, this is the normal output. The SamplingDistributi on | // In this case, this is the normal output. The SamplingDistributi on | |||
// instances are stored as detailed output. | // instances are stored as detailed output. | |||
storeDetailedOutput(kTRUE); | storeDetailedOutput(kTRUE); | |||
} | } | |||
RooAbsStudy* clone(const char* /*newname*/="") const { return new ToyMCStudy(*this) ; } | RooAbsStudy* clone(const char* /*newname*/="") const { return new ToyMCStudy(*this) ; } | |||
virtual ~ToyMCStudy() {} | virtual ~ToyMCStudy() {} | |||
skipping to change at line 72 | skipping to change at line 73 | |||
// RooAbsStudy interfaces | // RooAbsStudy interfaces | |||
virtual Bool_t initialize(void); | virtual Bool_t initialize(void); | |||
virtual Bool_t execute(void); | virtual Bool_t execute(void); | |||
virtual Bool_t finalize(void); | virtual Bool_t finalize(void); | |||
RooDataSet* merge(); | RooDataSet* merge(); | |||
void SetToyMCSampler(ToyMCSampler& t) { fToyMCSampler = &t; } | void SetToyMCSampler(ToyMCSampler& t) { fToyMCSampler = &t; } | |||
void SetParamPoint(const RooArgSet& paramPoint) { fParamPoint.add(par amPoint); } | void SetParamPoint(const RooArgSet& paramPoint) { fParamPoint.add(par amPoint); } | |||
void SetRandomSeed(unsigned int seed) { fRandomSeed = seed; } | ||||
protected: | protected: | |||
unsigned int fRandomSeed; | ||||
ToyMCSampler *fToyMCSampler; | ToyMCSampler *fToyMCSampler; | |||
RooArgSet fParamPoint; | RooArgSet fParamPoint; | |||
protected: | protected: | |||
ClassDef(ToyMCStudy,1); // toy MC study for parallel processing | ClassDef(ToyMCStudy,2); // toy MC study for parallel processing | |||
}; | }; | |||
class ToyMCPayload : public TNamed { | class ToyMCPayload : public TNamed { | |||
public: | public: | |||
ToyMCPayload() { | ToyMCPayload() { | |||
// proof constructor, do not use | // proof constructor, do not use | |||
fDataSet = NULL; | fDataSet = NULL; | |||
End of changes. 4 change blocks. | ||||
1 lines changed or deleted | 5 lines changed or added | |||
TransformationHandler.h | TransformationHandler.h | |||
---|---|---|---|---|
skipping to change at line 122 | skipping to change at line 122 | |||
const TString& GetCallerName() const { return fCallerName; } | const TString& GetCallerName() const { return fCallerName; } | |||
// setting file dir for histograms | // setting file dir for histograms | |||
TDirectory* GetRootDir() const { return fRootBaseDir; } | TDirectory* GetRootDir() const { return fRootBaseDir; } | |||
void SetRootDir( TDirectory *d ) { fRootBaseDir = d; } | void SetRootDir( TDirectory *d ) { fRootBaseDir = d; } | |||
void PlotVariables( const std::vector<Event*>& events, TDir ectory* theDirectory = 0 ); | void PlotVariables( const std::vector<Event*>& events, TDir ectory* theDirectory = 0 ); | |||
private: | private: | |||
std::vector<TMVA::Event*>* TransformCollection( VariableTransformBase | // std::vector<TMVA::Event*>* TransformCollection( VariableTrans | |||
* trf, | formBase* trf, | |||
Int_t cls, | // Int_t cls, | |||
std::vector<TMVA::Eve | // std::vector<TMVA::E | |||
nt*>* events, | vent*>* events, | |||
Bool_t replace ) cons | // Bool_t replace ) co | |||
t; | nst; | |||
const TMVA::VariableInfo& Variable(UInt_t ivar) const { return fDataS etInfo.GetVariableInfos().at(ivar); } | const TMVA::VariableInfo& Variable(UInt_t ivar) const { return fDataS etInfo.GetVariableInfos().at(ivar); } | |||
const TMVA::VariableInfo& Target (UInt_t itgt) const { return fDataS etInfo.GetTargetInfos()[itgt]; } | const TMVA::VariableInfo& Target (UInt_t itgt) const { return fDataS etInfo.GetTargetInfos()[itgt]; } | |||
DataSet* Data() { return fDataSetInfo.GetDataSet(); } | DataSet* Data() { return fDataSetInfo.GetDataSet(); } | |||
DataSetInfo& fDataSetInfo; // pointer to the datasetinfo | DataSetInfo& fDataSetInfo; // pointer to the datasetinfo | |||
TList fTransformations; //! list of t ransformations | TList fTransformations; //! list of t ransformations | |||
std::vector< Int_t > fTransformationsReferenceClasses; //! reference classes for the transformations | std::vector< Int_t > fTransformationsReferenceClasses; //! reference classes for the transformations | |||
std::vector<std::vector<TMVA::TransformationHandler::VariableStat> > fVariableStats; // first the variables, then the targets | std::vector<std::vector<TMVA::TransformationHandler::VariableStat> > fVariableStats; // first the variables, then the targets | |||
End of changes. 1 change blocks. | ||||
7 lines changed or deleted | 7 lines changed or added | |||
Util.h | Util.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
#ifndef ROOT_Math_Util | #ifndef ROOT_Math_Util | |||
#define ROOT_Math_Util | #define ROOT_Math_Util | |||
#include <string> | #include <string> | |||
#include <sstream> | #include <sstream> | |||
#include <cmath> | #include <cmath> | |||
#include <limits> | #include <limits> | |||
// for defining unused variables in the interfaces | ||||
// and have still them in the documentation | ||||
#define MATH_UNUSED(var) (void)var | ||||
namespace ROOT { | namespace ROOT { | |||
namespace Math { | namespace Math { | |||
/** | /** | |||
namespace defining Utility functions needed by mathcore | namespace defining Utility functions needed by mathcore | |||
*/ | */ | |||
namespace Util { | namespace Util { | |||
/** | /** | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 4 lines changed or added | |||
VariableMetricBuilder.h | VariableMetricBuilder.h | |||
---|---|---|---|---|
skipping to change at line 31 | skipping to change at line 31 | |||
namespace Minuit2 { | namespace Minuit2 { | |||
/** | /** | |||
Build (find) function minimum using the Variable Metric method (MIGRAD) | Build (find) function minimum using the Variable Metric method (MIGRAD) | |||
*/ | */ | |||
class VariableMetricBuilder : public MinimumBuilder { | class VariableMetricBuilder : public MinimumBuilder { | |||
public: | public: | |||
VariableMetricBuilder() : fEstimator(VariableMetricEDMEstimator()), | VariableMetricBuilder() : fEstimator(VariableMetricEDMEstimator()), | |||
fErrorUpdator(DavidonErrorUpdator()) {} | fErrorUpdator(DavidonErrorUpdator()) {} | |||
~VariableMetricBuilder() {} | ~VariableMetricBuilder() {} | |||
virtual FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, const MinimumSeed&, const MnStrategy&, unsigned int, double) const; | virtual FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, const MinimumSeed&, const MnStrategy&, unsigned int, double) const; | |||
FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, const Mi nimumSeed&, std::vector<MinimumState> &, unsigned int, double) const; | FunctionMinimum Minimum(const MnFcn&, const GradientCalculator&, const M inimumSeed&, std::vector<MinimumState> &, unsigned int, double) const; | |||
const VariableMetricEDMEstimator& Estimator() const {return fEstimator;} | const VariableMetricEDMEstimator& Estimator() const {return fEstimator;} | |||
const DavidonErrorUpdator& ErrorUpdator() const {return fErrorUpdator;} | const DavidonErrorUpdator& ErrorUpdator() const {return fErrorUpdator;} | |||
void AddResult(std::vector<MinimumState>& result, const MinimumState & s | ||||
tate, bool store = false) const; | ||||
private: | private: | |||
VariableMetricEDMEstimator fEstimator; | VariableMetricEDMEstimator fEstimator; | |||
DavidonErrorUpdator fErrorUpdator; | DavidonErrorUpdator fErrorUpdator; | |||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
#endif // ROOT_Minuit2_VariableMetricBuilder | #endif // ROOT_Minuit2_VariableMetricBuilder | |||
End of changes. 6 change blocks. | ||||
9 lines changed or deleted | 12 lines changed or added | |||
VariableMetricMinimizer.h | VariableMetricMinimizer.h | |||
---|---|---|---|---|
skipping to change at line 41 | skipping to change at line 41 | |||
public: | public: | |||
VariableMetricMinimizer() : fMinSeedGen(MnSeedGenerator()), | VariableMetricMinimizer() : fMinSeedGen(MnSeedGenerator()), | |||
fMinBuilder(VariableMetricBuilder()) {} | fMinBuilder(VariableMetricBuilder()) {} | |||
~VariableMetricMinimizer() {} | ~VariableMetricMinimizer() {} | |||
const MinimumSeedGenerator& SeedGenerator() const {return fMinSeedGen;} | const MinimumSeedGenerator& SeedGenerator() const {return fMinSeedGen;} | |||
const MinimumBuilder& Builder() const {return fMinBuilder;} | const MinimumBuilder& Builder() const {return fMinBuilder;} | |||
MinimumBuilder& Builder() {return fMinBuilder;} | ||||
private: | private: | |||
MnSeedGenerator fMinSeedGen; | MnSeedGenerator fMinSeedGen; | |||
VariableMetricBuilder fMinBuilder; | VariableMetricBuilder fMinBuilder; | |||
}; | }; | |||
} // namespace Minuit2 | } // namespace Minuit2 | |||
} // namespace ROOT | } // namespace ROOT | |||
End of changes. 1 change blocks. | ||||
0 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 lxbuild102.cern.ch 2.6.18-308.11.1.el5 #1 SMP Tue Jul 10 16:05:16 CEST 2012 i686 i686 i386 GNU/Linux" | #define BUILD_NODE "Linux lxbuild102.cern.ch 2.6.18-308.11.1.el5 #1 SMP Tue Jul 10 16:05:16 CEST 2012 i686 i686 i386 GNU/Linux" | |||
#define CXX "g++" | #define CXX "g++" | |||
#define COMPILER "/afs/cern.ch/sw/lcg/contrib/gcc/4.3.6/i686-slc5-gcc43-opt /bin/g++" | #define COMPILER "/afs/cern.ch/sw/lcg/contrib/gcc/4.3.6/i686-slc5-gcc43-opt /bin/g++" | |||
#define COMPILERVERS "gcc436" | #define COMPILERVERS "gcc436" | |||
#define MAKESHAREDLIB "cd $BuildDir ; g++ -c $Opt -pipe -m32 -msse -mfpmat | #define MAKESHAREDLIB "cd $BuildDir ; g++ -c $Opt -pipe -m32 -msse -mfpmat | |||
h=sse -Wall -W -Woverloaded-virtual -fPIC -pthread $IncludePath $SourceFile | h=sse -W -Woverloaded-virtual -fPIC -pthread $IncludePath $SourceFiles ; g+ | |||
s ; g++ $ObjectFiles -shared -Wl,-soname,$LibName.so -m32 -O2 -Wl,--no-und | + $ObjectFiles -shared -Wl,-soname,$LibName.so -m32 -O2 -Wl,--no-undefined | |||
efined -Wl,--as-needed $LinkedLibs -o $SharedLib" | -Wl,--as-needed $LinkedLibs -o $SharedLib" | |||
#define MAKEEXE "cd $BuildDir ; g++ -c -pipe -m32 -msse -mfpmath=sse -Wall | #define MAKEEXE "cd $BuildDir ; g++ -c -pipe -m32 -msse -mfpmath=sse -W -W | |||
-W -Woverloaded-virtual -fPIC -pthread $IncludePath $SourceFiles; g++ $Obj | overloaded-virtual -fPIC -pthread $IncludePath $SourceFiles; g++ $ObjectFil | |||
ectFiles -m32 -O2 -Wl,--no-undefined -Wl,--as-needed -o $ExeName $LinkedLi | es -m32 -O2 -Wl,--no-undefined -Wl,--as-needed -o $ExeName $LinkedLibs -lm | |||
bs -lm -ldl -pthread -rdynamic" | -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 -lRint " | #define LINKEDLIBS "-L$ROOTSYS/lib -lCore -lCint -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. | ||||
8 lines changed or deleted | 8 lines changed or added | |||
exp.h | exp.h | |||
---|---|---|---|---|
skipping to change at line 132 | skipping to change at line 132 | |||
x -= z * details::C1F; | x -= z * details::C1F; | |||
x -= z * details::C2F; | x -= z * details::C2F; | |||
const int32_t n = int32_t ( z ); | const int32_t n = int32_t ( z ); | |||
const float x2 = x * x; | const float x2 = x * x; | |||
z = x*details::PX1expf; | z = x*details::PX1expf; | |||
z += details::PX2expf; | z += details::PX2expf; | |||
z *= x; | z *= x; | |||
z += details::PX2expf; | ||||
z *= x; | ||||
z += details::PX3expf; | z += details::PX3expf; | |||
z *= x; | z *= x; | |||
z += details::PX4expf; | z += details::PX4expf; | |||
z *= x; | z *= x; | |||
z += details::PX5expf; | z += details::PX5expf; | |||
z *= x; | z *= x; | |||
z += details::PX6expf; | z += details::PX6expf; | |||
z *= x2; | z *= x2; | |||
z += x + 1.0f; | z += x + 1.0f; | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 0 lines changed or added | |||