laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
A maximum likelihood fitting package for performing Dalitz-plot analysis.
LauParameter.cc
Go to the documentation of this file.
1 
2 /*
3 Copyright 2006 University of Warwick
4 
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8 
9  http://www.apache.org/licenses/LICENSE-2.0
10 
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 */
17 
18 /*
19 Laura++ package authors:
20 John Back
21 Paul Harrison
22 Thomas Latham
23 */
24 
29 #include <iostream>
30 #include <map>
31 using std::cout;
32 using std::cerr;
33 using std::endl;
34 using std::map;
35 
36 #include "TRandom.h"
37 
38 #include "LauParameter.hh"
39 #include "LauRandom.hh"
40 
42 
43 
45  name_(""),
46  value_(0.0),
47  error_(0.0),
48  negError_(0.0),
49  posError_(0.0),
50  genValue_(0.0),
51  initValue_(0.0),
52  minValue_(0.0),
53  maxValue_(0.0),
54  fixed_(kTRUE),
55  secondStage_(kFALSE),
56  gaussConstraint_(kFALSE),
57  constraintMean_(0.0),
58  constraintWidth_(0.0),
59  gcc_(0.0),
60  bias_(0.0),
61  pull_(0.0),
62  clone_(kFALSE),
63  parent_(0),
64  blinder_(0)
65 {
66 }
67 
68 LauParameter::LauParameter(const TString& parName) :
69  name_(parName),
70  value_(0.0),
71  error_(0.0),
72  negError_(0.0),
73  posError_(0.0),
74  genValue_(0.0),
75  initValue_(0.0),
76  minValue_(0.0),
77  maxValue_(0.0),
78  fixed_(kTRUE),
79  secondStage_(kFALSE),
80  gaussConstraint_(kFALSE),
81  constraintMean_(0.0),
82  constraintWidth_(0.0),
83  gcc_(0.0),
84  bias_(0.0),
85  pull_(0.0),
86  clone_(kFALSE),
87  parent_(0),
88  blinder_(0)
89 {
90 }
91 
92 LauParameter::LauParameter(Double_t parValue) :
93  name_(""),
94  value_(parValue),
95  error_(0.0),
96  negError_(0.0),
97  posError_(0.0),
98  genValue_(parValue),
99  initValue_(parValue),
100  minValue_(parValue-1e-6),
101  maxValue_(parValue+1e-6),
102  fixed_(kTRUE),
103  secondStage_(kFALSE),
104  gaussConstraint_(kFALSE),
105  constraintMean_(0.0),
106  constraintWidth_(0.0),
107  gcc_(0.0),
108  bias_(0.0),
109  pull_(0.0),
110  clone_(kFALSE),
111  parent_(0),
112  blinder_(0)
113 {
114 }
115 
116 LauParameter::LauParameter(const TString& parName, Double_t parValue) :
117  name_(parName),
118  value_(parValue),
119  error_(0.0),
120  negError_(0.0),
121  posError_(0.0),
122  genValue_(parValue),
123  initValue_(parValue),
124  minValue_(parValue-1e-6),
125  maxValue_(parValue+1e-6),
126  fixed_(kTRUE),
127  secondStage_(kFALSE),
128  gaussConstraint_(kFALSE),
129  constraintMean_(0.0),
130  constraintWidth_(0.0),
131  gcc_(0.0),
132  bias_(0.0),
133  pull_(0.0),
134  clone_(kFALSE),
135  parent_(0),
136  blinder_(0)
137 {
138 }
139 
140 LauParameter::LauParameter(Double_t parValue, Double_t min, Double_t max) :
141  name_(""),
142  value_(parValue),
143  error_(0.0),
144  negError_(0.0),
145  posError_(0.0),
146  genValue_(parValue),
147  initValue_(parValue),
148  minValue_(min),
149  maxValue_(max),
150  fixed_(kTRUE),
151  secondStage_(kFALSE),
152  gaussConstraint_(kFALSE),
153  constraintMean_(0.0),
154  constraintWidth_(0.0),
155  gcc_(0.0),
156  bias_(0.0),
157  pull_(0.0),
158  clone_(kFALSE),
159  parent_(0),
160  blinder_(0)
161 {
162  this->checkRange();
163 }
164 
165 LauParameter::LauParameter(Double_t parValue, Double_t parError, Double_t min, Double_t max) :
166  name_(""),
167  value_(parValue),
168  error_(parError),
169  negError_(0.0),
170  posError_(0.0),
171  genValue_(parValue),
172  initValue_(parValue),
173  minValue_(min),
174  maxValue_(max),
175  fixed_(kTRUE),
176  secondStage_(kFALSE),
177  gaussConstraint_(kFALSE),
178  constraintMean_(0.0),
179  constraintWidth_(0.0),
180  gcc_(0.0),
181  bias_(0.0),
182  pull_(0.0),
183  clone_(kFALSE),
184  parent_(0),
185  blinder_(0)
186 {
187  this->checkRange();
188 }
189 
190 LauParameter::LauParameter(Double_t parValue, Double_t min, Double_t max, Bool_t parFixed) :
191  name_(""),
192  value_(parValue),
193  error_(0.0),
194  negError_(0.0),
195  posError_(0.0),
196  genValue_(parValue),
197  initValue_(parValue),
198  minValue_(min),
199  maxValue_(max),
200  fixed_(parFixed),
201  secondStage_(kFALSE),
202  gaussConstraint_(kFALSE),
203  constraintMean_(0.0),
204  constraintWidth_(0.0),
205  gcc_(0.0),
206  bias_(0.0),
207  pull_(0.0),
208  clone_(kFALSE),
209  parent_(0),
210  blinder_(0)
211 {
212  this->checkRange();
213 }
214 
215 LauParameter::LauParameter(const TString& parName, Double_t parValue, Double_t min, Double_t max) :
216  name_(parName),
217  value_(parValue),
218  error_(0.0),
219  negError_(0.0),
220  posError_(0.0),
221  genValue_(parValue),
222  initValue_(parValue),
223  minValue_(min),
224  maxValue_(max),
225  fixed_(kTRUE),
226  secondStage_(kFALSE),
227  gaussConstraint_(kFALSE),
228  constraintMean_(0.0),
229  constraintWidth_(0.0),
230  gcc_(0.0),
231  bias_(0.0),
232  pull_(0.0),
233  clone_(kFALSE),
234  parent_(0),
235  blinder_(0)
236 {
237  this->checkRange();
238 }
239 
240 LauParameter::LauParameter(const TString& parName, Double_t parValue, Double_t min, Double_t max, Bool_t parFixed) :
241  name_(parName),
242  value_(parValue),
243  error_(0.0),
244  negError_(0.0),
245  posError_(0.0),
246  genValue_(parValue),
247  initValue_(parValue),
248  minValue_(min),
249  maxValue_(max),
250  fixed_(parFixed),
251  secondStage_(kFALSE),
252  gaussConstraint_(kFALSE),
253  constraintMean_(0.0),
254  constraintWidth_(0.0),
255  gcc_(0.0),
256  bias_(0.0),
257  pull_(0.0),
258  clone_(kFALSE),
259  parent_(0),
260  blinder_(0)
261 {
262  this->checkRange();
263 }
264 
265 LauParameter::LauParameter(const TString& parName, Double_t parValue, Double_t parError, Double_t min, Double_t max) :
266  name_(parName),
267  value_(parValue),
268  error_(parError),
269  negError_(0.0),
270  posError_(0.0),
271  genValue_(parValue),
272  initValue_(parValue),
273  minValue_(min),
274  maxValue_(max),
275  fixed_(kTRUE),
276  secondStage_(kFALSE),
277  gaussConstraint_(kFALSE),
278  constraintMean_(0.0),
279  constraintWidth_(0.0),
280  gcc_(0.0),
281  bias_(0.0),
282  pull_(0.0),
283  clone_(kFALSE),
284  parent_(0),
285  blinder_(0)
286 {
287  this->checkRange();
288 }
289 
290 LauParameter::LauParameter(const LauParameter& rhs) : TObject(rhs), LauAbsRValue(rhs),
291  name_(rhs.name_),
292  value_(rhs.value_),
293  error_(rhs.error_),
294  negError_(rhs.negError_),
295  posError_(rhs.posError_),
296  genValue_(rhs.genValue_),
297  initValue_(rhs.initValue_),
298  minValue_(rhs.minValue_),
299  maxValue_(rhs.maxValue_),
300  fixed_(rhs.fixed_),
305  gcc_(rhs.gcc_),
306  bias_(rhs.bias_),
307  pull_(rhs.pull_),
308  clone_(rhs.clone_),
309  parent_(rhs.parent_),
310  clones_(rhs.clones_),
311  blinder_((rhs.blinder_==0) ? 0 : new LauBlind(*(rhs.blinder_)))
312 {
313 }
314 
316 {
317  if (&rhs != this) {
318  TObject::operator=(rhs);
320  name_ = rhs.name_;
321  value_ = rhs.value_;
322  error_ = rhs.error_;
323  negError_ = rhs.negError_;
324  posError_ = rhs.posError_;
325  genValue_ = rhs.genValue_;
326  initValue_ = rhs.initValue_;
327  minValue_ = rhs.minValue_;
328  maxValue_ = rhs.maxValue_;
329  fixed_ = rhs.fixed_;
334  gcc_ = rhs.gcc_;
335  bias_ = rhs.bias_;
336  pull_ = rhs.pull_;
337  clone_ = rhs.clone_;
338  parent_ = rhs.parent_;
339  clones_ = rhs.clones_;
340  delete blinder_;
341  blinder_ = (rhs.blinder_==0) ? 0 : new LauBlind(*(rhs.blinder_));
342  }
343  return *this;
344 }
345 
347 {
348  delete blinder_;
349 }
350 
351 std::vector<LauParameter*> LauParameter::getPars()
352 {
353  std::vector<LauParameter*> list;
354  list.push_back(this);
355  return list;
356 }
357 
358 void LauParameter::value(Double_t newValue)
359 {
360  if (this->clone()) {
361  parent_->value(newValue);
362  } else {
363  this->checkRange(newValue,this->minValue(),this->maxValue());
364  this->updateClones(kTRUE);
365  }
366 }
367 
368 void LauParameter::error(Double_t newError)
369 {
370  if (this->clone()) {
371  parent_->error(newError);
372  } else {
373  error_ = TMath::Abs(newError);
374  this->updateClones(kFALSE);
375  }
376 }
377 
378 void LauParameter::negError(Double_t newNegError)
379 {
380  if (this->clone()) {
381  parent_->negError(newNegError);
382  } else {
383  negError_ = TMath::Abs(newNegError);
384  this->updateClones(kFALSE);
385  }
386 }
387 
388 void LauParameter::posError(Double_t newPosError)
389 {
390  if (this->clone()) {
391  parent_->posError(newPosError);
392  } else {
393  posError_ = TMath::Abs(newPosError);
394  this->updateClones(kFALSE);
395  }
396 }
397 
398 void LauParameter::errors(Double_t newError, Double_t newNegError, Double_t newPosError)
399 {
400  if (this->clone()) {
401  parent_->errors(newError,newNegError,newPosError);
402  } else {
403  error_ = TMath::Abs(newError);
404  negError_ = TMath::Abs(newNegError);
405  posError_ = TMath::Abs(newPosError);
406  this->updateClones(kFALSE);
407  }
408 }
409 
410 void LauParameter::valueAndErrors(Double_t newValue, Double_t newError, Double_t newNegError, Double_t newPosError)
411 {
412  if (this->clone()) {
413  parent_->valueAndErrors(newValue,newError,newNegError,newPosError);
414  } else {
415  this->checkRange(newValue,this->minValue(),this->maxValue());
416  error_ = TMath::Abs(newError);
417  negError_ = TMath::Abs(newNegError);
418  posError_ = TMath::Abs(newPosError);
419  this->updateClones(kFALSE);
420  }
421 }
422 
423 void LauParameter::globalCorrelationCoeff(Double_t newGCCValue)
424 {
425  if (this->clone()) {
426  parent_->globalCorrelationCoeff(newGCCValue);
427  } else {
428  gcc_ = newGCCValue;
429  this->updateClones(kFALSE);
430  }
431 }
432 
433 void LauParameter::genValue(Double_t newGenValue)
434 {
435  if (this->clone()) {
436  parent_->genValue(newGenValue);
437  } else {
438  genValue_ = newGenValue;
439  this->updateClones(kFALSE);
440  }
441 }
442 
443 void LauParameter::initValue(Double_t newInitValue)
444 {
445  if (this->clone()) {
446  parent_->initValue(newInitValue);
447  } else {
448  initValue_ = newInitValue;
449  this->updateClones(kFALSE);
450  }
451 }
452 
453 void LauParameter::minValue(Double_t newMinValue)
454 {
455  if (this->clone()) {
456  parent_->minValue(newMinValue);
457  } else {
458  this->checkRange(this->value(),newMinValue,this->maxValue());
459  this->updateClones(kFALSE);
460  }
461 }
462 
463 void LauParameter::maxValue(Double_t newMaxValue)
464 {
465  if (this->clone()) {
466  parent_->maxValue(newMaxValue);
467  } else {
468  this->checkRange(this->value(),this->minValue(),newMaxValue);
469  this->updateClones(kFALSE);
470  }
471 }
472 
473 void LauParameter::range(Double_t newMinValue, Double_t newMaxValue)
474 {
475  if (this->clone()) {
476  parent_->range(newMinValue,newMaxValue);
477  } else {
478  this->checkRange(this->value(),newMinValue,newMaxValue);
479  this->updateClones(kFALSE);
480  }
481 }
482 
483 void LauParameter::valueAndRange(Double_t newValue, Double_t newMinValue, Double_t newMaxValue)
484 {
485  if (this->clone()) {
486  parent_->valueAndRange(newValue,newMinValue,newMaxValue);
487  } else {
488  this->checkRange(newValue,newMinValue,newMaxValue);
489  this->updateClones(kFALSE);
490  }
491 }
492 
493 void LauParameter::name(const TString& newName)
494 {
495  // no need to update clones here
496  // clones are allowed to have different names
497  name_ = newName;
498 }
499 
500 void LauParameter::fixed(Bool_t parFixed)
501 {
502  if (this->clone()) {
503  parent_->fixed(parFixed);
504  } else {
505  fixed_ = parFixed;
506  this->updateClones(kFALSE);
507  }
508 }
509 
510 void LauParameter::secondStage(Bool_t secondStagePar)
511 {
512  if (this->clone()) {
513  parent_->secondStage(secondStagePar);
514  } else {
515  secondStage_ = secondStagePar;
516  this->updateClones(kFALSE);
517  }
518 }
519 
520 void LauParameter::addGaussianConstraint(Double_t newGaussMean, Double_t newGaussWidth)
521 {
522  if (this->clone()) {
523  parent_->addGaussianConstraint(newGaussMean,newGaussWidth);
524  } else {
525  gaussConstraint_ = kTRUE;
526  constraintMean_ = newGaussMean;
527  constraintWidth_ = newGaussWidth;
528  this->updateClones(kFALSE);
529  }
530 }
531 
533 {
534  if (this->clone()) {
536  } else {
537  gaussConstraint_ = kFALSE;
538  this->updateClones(kFALSE);
539  }
540 }
541 
542 void LauParameter::blindParameter(const TString& blindingString, const Double_t width)
543 {
544  if (this->clone()) {
545  parent_->blindParameter(blindingString,width);
546  return;
547  }
548 
549  if ( blinder_ != 0 ) {
550  std::cerr << "WARNING in LauParameter::blindParameter : blinding has already been set up for this parameter" << std::endl;
551  return;
552  }
553 
554  blinder_ = new LauBlind(blindingString,width);
555 
556  for (map<LauParameter*,Double_t>::iterator iter = clones_.begin(); iter != clones_.end(); ++iter) {
557  LauParameter* clonePar = iter->first;
558  if ( clonePar->blinder_ != 0 ) {
559  std::cerr << "WARNING in LauParameter::blindParameter : blinding has already been set up for a clone of this parameter - it will be replaced!" << std::endl;
560  delete clonePar->blinder_;
561  clonePar->blinder_ = 0;
562  }
563  clonePar->blinder_ = new LauBlind(*blinder_);
564  }
565 }
566 
568 {
569  if (this->clone()) {
570  parent_->updatePull();
571  return;
572  }
573 
574  // calculate the bias
575  bias_ = value_ - genValue_;
576 
577  // if we have errors calculated then calculate
578  // the pull using the best error available
579  if ((bias_ > 0.0) && (negError_ > 1e-10)) {
580  pull_ = bias_ / negError_;
581  } else if ((bias_ < 0.0) && (posError_ > 1e-10)) {
582  pull_ = bias_ / posError_;
583  } else if (error_ > 1e-10) {
584  pull_ = bias_ / error_;
585  } else {
586  pull_ = 0.0;
587  }
588 
589  this->updateClones(kFALSE);
590 }
591 
592 void LauParameter::checkRange(Double_t val, Double_t minVal, Double_t maxVal)
593 {
594  // first check that min is less than max (or they are the same - this is allowed)
595  if (minVal > maxVal) {
596  cerr<<"ERROR in LauParameter::checkRange : minValue: "<<minVal<<" greater than maxValue: "<<maxVal<<endl;
597  if (minValue_ > maxValue_) {
599  cerr<<" : Setting both to "<<maxValue_<<"."<<endl;
600  } else {
601  cerr<<" : Not changing anything."<<endl;
602  }
603  return;
604  }
605 
606  minValue_ = minVal;
607  maxValue_ = maxVal;
608 
609  // now check that the value is still within the range
610  if ((val < minVal) || (val > maxVal)) {
611  if (name_ != "") {
612  cerr<<"ERROR in LauParameter::checkRange : value: "<<val<<" not in allowed range ["<<minVal<<" , "<<maxVal<<"] for parameter \""<<name_<<"\"."<<endl;
613  } else {
614  cerr<<"ERROR in LauParameter::checkRange : value: "<<val<<" not in allowed range ["<<minVal<<" , "<<maxVal<<"]."<<endl;
615  }
616  if (val < minVal) {
617  cerr<<" : Setting value to minValue: "<<minVal<<endl;
618  val = minVal;
619  } else {
620  cerr<<" : Setting value to maxValue: "<<maxVal<<endl;
621  val = maxVal;
622  }
623  }
624  value_ = val;
625 }
626 
628 {
629  // if we're a clone we mustn't be cloned ourselves
630  // but instead return another clone of our parent
631  // (this is so that the parent knows of all its clones)
632  if (this->clone()) {
633  LauParameter* clonePar = parent_->createClone(constFactor);
634  clonePar->name(this->name());
635  return clonePar;
636  }
637 
638  // clone ourselves using the copy-constructor
639  LauParameter* clonePar = new LauParameter(*this);
640  Double_t newValue = clonePar->value() * constFactor;
641  clonePar->value( newValue );
642  clonePar->wipeClones();
643  clonePar->clone(this);
644  clones_.insert( std::make_pair( clonePar, constFactor ) );
645  return clonePar;
646 }
647 
648 LauParameter* LauParameter::createClone(const TString& newName, Double_t constFactor)
649 {
650  // self message to create the clone
651  LauParameter* clonePar = this->createClone(constFactor);
652  // set the new name
653  clonePar->name(newName);
654  // and return
655  return clonePar;
656 }
657 
658 void LauParameter::updateClones(Bool_t justValue)
659 {
660  // if we don't have any clones then there's nothing to do
661  if ( clones_.empty() ) {
662  return;
663  }
664 
665  // we have to set the values directly rather than using member functions because otherwise we'd get into an infinite loop
666  if (justValue) {
667  for (map<LauParameter*,Double_t>::iterator iter = clones_.begin(); iter != clones_.end(); ++iter) {
668  LauParameter* clonePar = iter->first;
669  Double_t constFactor = iter->second;
670  clonePar->value_ = constFactor*this->value();
671  }
672  } else {
673  for (map<LauParameter*,Double_t>::iterator iter = clones_.begin(); iter != clones_.end(); ++iter) {
674  LauParameter* clonePar = iter->first;
675  Double_t constFactor = iter->second;
676  clonePar->value_ = constFactor*this->value();
677  clonePar->error_ = constFactor*this->error();
678  clonePar->negError_ = constFactor*this->negError();
679  clonePar->posError_ = constFactor*this->posError();
680  clonePar->genValue_ = constFactor*this->genValue();
681  clonePar->initValue_ = constFactor*this->initValue();
682  clonePar->minValue_ = constFactor*this->minValue();
683  clonePar->maxValue_ = constFactor*this->maxValue();
684  clonePar->fixed_ = this->fixed();
685  clonePar->secondStage_ = this->secondStage();
686  clonePar->gaussConstraint_ = this->gaussConstraint();
687  clonePar->constraintMean_ = this->constraintMean();
688  clonePar->constraintWidth_ = this->constraintWidth();
689  clonePar->gcc_ = this->globalCorrelationCoeff();
690  clonePar->bias_ = this->bias();
691  clonePar->pull_ = this->pull();
692  }
693  }
694 }
695 
697 {
698  this->randomiseValue(this->minValue(), this->maxValue());
699 }
700 
701 void LauParameter::randomiseValue(Double_t minVal, Double_t maxVal)
702 {
703  // if we're fixed then do nothing
704  if (this->fixed()) {
705  return;
706  }
707 
708  // check supplied values are sensible
709  if (maxVal < minVal) {
710  cerr<<"ERROR in LauParameter::randomiseValue : Supplied maximum value smaller than minimum value."<<endl;
711  return;
712  }
713  if (maxVal > this->maxValue()) {
714  maxVal = this->maxValue();
715  }
716  if (minVal < this->minValue()) {
717  minVal = this->minValue();
718  }
719 
720  // use the zero-seed random number generator to get values that are
721  // uniformly distributed over the given range
722  Double_t randNo = LauRandom::zeroSeedRandom()->Rndm();
723  Double_t val = randNo*(maxVal - minVal) + minVal;
724  this->initValue(val);
725 }
726 
727 // ostream operator
728 std::ostream& operator << (std::ostream& stream, const LauParameter& par)
729 {
730  stream << par.value();
731  return stream;
732 }
733 
Double_t range() const
The range allowed for the parameter.
Double_t genValue_
Toy generation value.
LauAbsRValue & operator=(const LauAbsRValue &)
Copy assignment operator.
Definition: LauAbsRValue.hh:56
Bool_t fixed() const
Check whether the parameter is fixed or floated.
std::map< LauParameter *, Double_t > clones_
The clones of this parameter.
Double_t constraintMean_
Mean value of the Gaussian constraint.
TRandom * zeroSeedRandom()
Access the singleton random number generator with seed set from machine clock time (within +-1 sec)...
Definition: LauRandom.cc:44
Double_t maxValue() const
The maximum value allowed for the parameter.
ClassImp(LauAbsCoeffSet)
LauParameter()
Default constructor.
Definition: LauParameter.cc:44
const TString & name() const
The parameter name.
Double_t constraintWidth() const
The width of the Gaussian constraint.
Double_t bias() const
The bias in the parameter.
LauParameter * parent_
The parent parameter.
virtual ~LauParameter()
Bool_t gaussConstraint_
Choice to use Gaussian constraint.
Double_t negError() const
The lower error on the parameter.
Double_t minValue() const
The minimum value allowed for the parameter.
Double_t maxValue_
Maximum value for the parameter.
void valueAndRange(Double_t newValue, Double_t newMinValue, Double_t newMaxValue)
Set the value and range for the parameter.
void updateClones(Bool_t justValue)
Method to update clone values.
Double_t bias_
Parameter bias.
Double_t posError() const
The upper error on the parameter.
Double_t error_
The error on the parameter.
Bool_t clone() const
Check whether is a clone or not.
void checkRange()
Method to check whether value provided is whithin the range and that the minimum and maximum limits m...
Double_t pull() const
The pull value for the parameter.
std::ostream & operator<<(std::ostream &os, const LauComplex &z)
Definition: LauComplex.cc:57
Double_t minValue_
Minimum value for the parameter.
File containing declaration of LauParameter class.
Double_t pull_
Parameter pull.
Double_t constraintMean() const
The mean of the Gaussian constraint.
Double_t negError_
The lower error on the parameter.
Bool_t gaussConstraint() const
Check whether a Gaussian constraints is applied.
Double_t gcc_
Global correlation coefficient.
Bool_t secondStage() const
Check whether the parameter should be floated only in the second stage of a two stage fit...
std::vector< LauParameter * > getPars()
Get the LauParameter itself.
Double_t error() const
The error on the parameter.
Class for defining the fit parameter objects.
Definition: LauParameter.hh:49
void randomiseValue()
Randomise the value of the parameter (if it is floating).
void valueAndErrors(Double_t newValue, Double_t newError, Double_t newNegError=0.0, Double_t newPosError=0.0)
Set the value and errors on the parameter.
Double_t posError_
The upper error on the parameter.
File containing LauRandom namespace.
TString name_
The parameter name.
Double_t initValue() const
The initial value of the parameter.
void blindParameter(const TString &blindingString, const Double_t width)
Blind the parameter.
Bool_t secondStage_
Flag whether it is floated only in the second stage of the fit.
Double_t value_
The parameter value.
Bool_t clone_
Flag whether the parameter is a clone.
void updatePull()
Call to update the bias and pull values.
LauParameter * createClone(Double_t constFactor=1.0)
Method to create a clone from the parent parameter using the copy constructor.
void addGaussianConstraint(Double_t newGaussMean, Double_t newGaussWidth)
Add a Gaussian constraint (or modify an existing one)
Bool_t fixed_
Fix/float option for parameter.
Double_t value() const
The value of the parameter.
void wipeClones()
Method to clear the clone parameters.
LauBlind * blinder_
The blinding engine.
Class for blinding and unblinding a number based on a blinding string.
Definition: LauBlind.hh:42
Double_t globalCorrelationCoeff() const
The parameter global correlation coefficient.
Double_t constraintWidth_
Width of the Gaussian constraint.
Pure abstract base class for defining a parameter containing an R value.
Definition: LauAbsRValue.hh:43
Double_t genValue() const
The value generated for the parameter.
void removeGaussianConstraint()
Remove the Gaussian constraint.
void errors(Double_t newError, Double_t newNegError, Double_t newPosError)
Set the error values on the parameter.
Double_t initValue_
Initial fit value.
LauParameter & operator=(const LauParameter &rhs)
Copy assignment operator.