Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19302546
D42.1759178285.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D42.1759178285.diff
View Options
diff --git a/doc/ReleaseNotes.md b/doc/ReleaseNotes.md
--- a/doc/ReleaseNotes.md
+++ b/doc/ReleaseNotes.md
@@ -1,5 +1,9 @@
# Laura++ release notes
+2nd December 2020 Thomas Latham
+* Fix LauFormulaPar to follow change in behaviour of TFormula
+ - see https://phab.hepforge.org/T129
+
27th November 2020 Dan Johnson
* Allow slope of NR exponential model to vary negative - improves fit stability in low-statistics fits
- see https://phab.hepforge.org/T128
@@ -13,7 +17,7 @@
- See https://phab.hepforge.org/T93
22nd May 2020 Thomas Latham
-* Fix uninitialised variable (related to rho-omega mixin) in LauIsobarDynamics
+* Fix uninitialised variable (related to rho-omega mixing) in LauIsobarDynamics
12th December 2019 Thomas Latham & Daniel Johnson
* Fix issue with generation of events for categories with small expected yield
@@ -24,6 +28,7 @@
6th - 20th November 2019 Thomas Latham
* Adopt CMake as the build system
+ - See https://phab.hepforge.org/T33
===
## Laura++ v3r5
diff --git a/inc/LauFormulaPar.hh b/inc/LauFormulaPar.hh
--- a/inc/LauFormulaPar.hh
+++ b/inc/LauFormulaPar.hh
@@ -166,9 +166,7 @@
//! Vector of LauParameters in the formula
std::vector<LauParameter*> paramVec_;
- //! Array
- Double_t* dummy_;
- //! Array
+ //! Array to hold parameter values to pass to formula
Double_t* paramArray_;
//! Choice to use Gaussian constraint
diff --git a/src/LauFormulaPar.cc b/src/LauFormulaPar.cc
--- a/src/LauFormulaPar.cc
+++ b/src/LauFormulaPar.cc
@@ -46,8 +46,7 @@
name_(forName),
formula_(forName,formula),
paramVec_(params),
- dummy_(0),
- paramArray_(0),
+ paramArray_(nullptr),
gaussConstraint_(kFALSE),
constraintMean_(0.0),
constraintWidth_(0.0)
@@ -59,21 +58,17 @@
gSystem->Exit(EXIT_FAILURE);
}
- if (formula_.GetNdim() != 1){
- std::cerr<<"ERROR in LauFormulaPar::evaluate : Given formula of dimension: "<<formula_.GetNdim()<<" and not 1"<<std::endl;
+ if (formula_.GetNdim() != 0){
+ std::cerr<<"ERROR in LauFormulaPar::evaluate : Given formula of dimension: "<<formula_.GetNdim()<<" and not 0"<<std::endl;
gSystem->Exit(EXIT_FAILURE);
}
- // Dummy array for TFormula
- dummy_ = new Double_t[1];
-
// Array of input parameters
paramArray_ = new Double_t[nPars];
}
LauFormulaPar::~LauFormulaPar()
{
- delete[] dummy_;
delete[] paramArray_;
}
@@ -81,8 +76,7 @@
name_(rhs.name_),
formula_(rhs.formula_),
paramVec_(rhs.paramVec_),
- dummy_(0),
- paramArray_(0),
+ paramArray_(nullptr),
gaussConstraint_(rhs.gaussConstraint_),
constraintMean_(rhs.constraintMean_),
constraintWidth_(rhs.constraintWidth_)
@@ -94,14 +88,11 @@
gSystem->Exit(EXIT_FAILURE);
}
- if (formula_.GetNdim() != 1){
- std::cerr<<"ERROR in LauFormulaPar::evaluate : Given formula of dimension: "<<formula_.GetNdim()<<" and not 1"<<std::endl;
+ if (formula_.GetNdim() != 0){
+ std::cerr<<"ERROR in LauFormulaPar::evaluate : Given formula of dimension: "<<formula_.GetNdim()<<" and not 0"<<std::endl;
gSystem->Exit(EXIT_FAILURE);
}
- // Dummy array for TFormula
- dummy_ = new Double_t[1];
-
// Array of input parameters
paramArray_ = new Double_t[nPars];
}
@@ -121,8 +112,6 @@
paramArray_ = new Double_t[nNewPars];
}
- // NB no need to recreate dummy_
-
gaussConstraint_ = rhs.gaussConstraint_;
constraintMean_ = rhs.constraintMean_;
constraintWidth_ = rhs.constraintWidth_;
@@ -139,7 +128,7 @@
paramArray_[i] = paramVec_[i]->value();
}
- return formula_.EvalPar(dummy_,paramArray_);
+ return formula_.EvalPar(nullptr,paramArray_);
}
Double_t LauFormulaPar::unblindValue() const
@@ -151,7 +140,7 @@
paramArray_[i] = paramVec_[i]->unblindValue();
}
- return formula_.EvalPar(dummy_,paramArray_);
+ return formula_.EvalPar(nullptr,paramArray_);
}
Double_t LauFormulaPar::genValue() const
@@ -163,7 +152,7 @@
paramArray_[i] = paramVec_[i]->genValue();
}
- return formula_.EvalPar(dummy_,paramArray_);
+ return formula_.EvalPar(nullptr,paramArray_);
}
Double_t LauFormulaPar::initValue() const
@@ -175,7 +164,7 @@
paramArray_[i] = paramVec_[i]->initValue();
}
- return formula_.EvalPar(dummy_,paramArray_);
+ return formula_.EvalPar(nullptr,paramArray_);
}
Bool_t LauFormulaPar::fixed() const
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 29, 9:38 PM (22 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6557433
Default Alt Text
D42.1759178285.diff (4 KB)
Attached To
Mode
D42: Fix LauFormulaPar to follow change in behaviour of TFormula
Attached
Detach File
Event Timeline
Log In to Comment