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