laura is hosted by Hepforge, IPPP Durham
Laura++  v2r1p1
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 
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 std::vector<LauParameter*> LauParameter::getPars()
323 {
324  std::vector<LauParameter*> list;
325  list.push_back(this);
326  return list;
327 }
328 
329 void LauParameter::value(Double_t newValue)
330 {
331  this->checkRange(newValue,this->minValue(),this->maxValue());
332  if (!this->clone()) {
333  this->updateClones(kTRUE);
334  }
335 }
336 
337 void LauParameter::error(Double_t newError)
338 {
339  error_ = TMath::Abs(newError);
340  if (!this->clone()) {
341  this->updateClones();
342  }
343 }
344 
345 void LauParameter::negError(Double_t newNegError)
346 {
347  negError_ = TMath::Abs(newNegError);
348  if (!this->clone()) {
349  this->updateClones();
350  }
351 }
352 
353 void LauParameter::posError(Double_t newPosError)
354 {
355  posError_ = TMath::Abs(newPosError);
356  if (!this->clone()) {
357  this->updateClones();
358  }
359 }
360 
361 void LauParameter::errors(Double_t newError, Double_t newNegError, Double_t newPosError)
362 {
363  error_ = TMath::Abs(newError);
364  negError_ = TMath::Abs(newNegError);
365  posError_ = TMath::Abs(newPosError);
366  if (!this->clone()) {
367  this->updateClones();
368  }
369 }
370 
371 void LauParameter::valueAndErrors(Double_t newValue, Double_t newError, Double_t newNegError, Double_t newPosError)
372 {
373  this->checkRange(newValue,this->minValue(),this->maxValue());
374  error_ = TMath::Abs(newError);
375  negError_ = TMath::Abs(newNegError);
376  posError_ = TMath::Abs(newPosError);
377  if (!this->clone()) {
378  this->updateClones();
379  }
380 }
381 
382 void LauParameter::globalCorrelationCoeff(Double_t newGCCValue)
383 {
384  gcc_ = newGCCValue;
385 }
386 
387 void LauParameter::genValue(Double_t newGenValue)
388 {
389  genValue_ = newGenValue;
390  if (!this->clone()) {
391  this->updateClones();
392  }
393 }
394 
395 void LauParameter::initValue(Double_t newInitValue)
396 {
397  initValue_ = newInitValue;
398  if (!this->clone()) {
399  this->updateClones();
400  }
401 }
402 
403 void LauParameter::minValue(Double_t newMinValue)
404 {
405  this->checkRange(this->value(),newMinValue,this->maxValue());
406  if (!this->clone()) {
407  this->updateClones();
408  }
409 }
410 
411 void LauParameter::maxValue(Double_t newMaxValue)
412 {
413  this->checkRange(this->value(),this->minValue(),newMaxValue);
414  if (!this->clone()) {
415  this->updateClones();
416  }
417 }
418 
419 void LauParameter::range(Double_t newMinValue, Double_t newMaxValue)
420 {
421  this->checkRange(this->value(),newMinValue,newMaxValue);
422  if (!this->clone()) {
423  this->updateClones();
424  }
425 }
426 
427 void LauParameter::valueAndRange(Double_t newValue, Double_t newMinValue, Double_t newMaxValue)
428 {
429  this->checkRange(newValue,newMinValue,newMaxValue);
430  if (!this->clone()) {
431  this->updateClones();
432  }
433 }
434 
435 void LauParameter::name(const TString& newName)
436 {
437  // no need to update clones here
438  // clones are allowed to have different names
439  name_ = newName;
440 }
441 
442 void LauParameter::fixed(Bool_t parFixed)
443 {
444  fixed_ = parFixed;
445  if (!this->clone()) {
446  this->updateClones();
447  }
448 }
449 
450 void LauParameter::firstStage(Bool_t firstStagePar)
451 {
452  firstStage_ = firstStagePar;
453  if (!this->clone()) {
454  this->updateClones();
455  }
456 }
457 
458 void LauParameter::secondStage(Bool_t secondStagePar)
459 {
460  secondStage_ = secondStagePar;
461  if (!this->clone()) {
462  this->updateClones();
463  }
464 }
465 
466 void LauParameter::addGaussianConstraint(Double_t newGaussMean, Double_t newGaussWidth)
467 {
468  gaussConstraint_ = kTRUE;
469  constraintMean_ = newGaussMean;
470  constraintWidth_ = newGaussWidth;
471  if (!this->clone()) {
472  this->updateClones();
473  }
474 }
475 
477 {
478  gaussConstraint_ = kFALSE;
479  if (!this->clone()) {
480  this->updateClones();
481  }
482 }
483 
485 {
486  this->checkRange(val,this->minValue(),this->maxValue());
487  if (!this->clone()) {
488  this->updateClones(kTRUE);
489  }
490  return *this;
491 }
492 
494 {
495  this->checkRange(this->value()+val,this->minValue(),this->maxValue());
496  if (!this->clone()) {
497  this->updateClones(kTRUE);
498  }
499  return *this;
500 }
501 
503 {
504  this->checkRange(this->value()-val,this->minValue(),this->maxValue());
505  if (!this->clone()) {
506  this->updateClones(kTRUE);
507  }
508  return *this;
509 }
510 
512 {
513  this->checkRange(this->value()*val,this->minValue(),this->maxValue());
514  if (!this->clone()) {
515  this->updateClones(kTRUE);
516  }
517  return *this;
518 }
519 
521 {
522  this->checkRange(this->value()/val,this->minValue(),this->maxValue());
523  if (!this->clone()) {
524  this->updateClones(kTRUE);
525  }
526  return *this;
527 }
528 
530 {
531  // calculate the bias
532  bias_ = value_ - genValue_;
533 
534  // if we have errors calculated then calculate
535  // the pull using the best error available
536  if ((bias_ > 0.0) && (negError_ > 1e-10)) {
537  pull_ = bias_ / negError_;
538  } else if ((bias_ < 0.0) && (posError_ > 1e-10)) {
539  pull_ = bias_ / posError_;
540  } else if (error_ > 1e-10) {
541  pull_ = bias_ / error_;
542  } else {
543  pull_ = 0.0;
544  }
545 }
546 
547 void LauParameter::checkRange(Double_t val, Double_t minVal, Double_t maxVal)
548 {
549  // first check that min is less than max (or they are the same - this is allowed)
550  if (minVal > maxVal) {
551  cerr<<"ERROR in LauParameter::checkRange : minValue: "<<minVal<<" greater than maxValue: "<<maxVal<<endl;
552  if (minValue_ > maxValue_) {
554  cerr<<" : Setting both to "<<maxValue_<<"."<<endl;
555  } else {
556  cerr<<" : Not changing anything."<<endl;
557  }
558  return;
559  }
560 
561  minValue_ = minVal;
562  maxValue_ = maxVal;
563 
564  // now check that the value is still within the range
565  if ((val < minVal) || (val > maxVal)) {
566  if (name_ != "") {
567  cerr<<"ERROR in LauParameter::checkRange : value: "<<val<<" not in allowed range ["<<minVal<<" , "<<maxVal<<"] for parameter \""<<name_<<"\"."<<endl;
568  } else {
569  cerr<<"ERROR in LauParameter::checkRange : value: "<<val<<" not in allowed range ["<<minVal<<" , "<<maxVal<<"]."<<endl;
570  }
571  if (val < minVal) {
572  cerr<<" : Setting value to minValue: "<<minVal<<endl;
573  val = minVal;
574  } else {
575  cerr<<" : Setting value to maxValue: "<<maxVal<<endl;
576  val = maxVal;
577  }
578  }
579  value_ = val;
580 }
581 
583 {
584  // if we're a clone we mustn't be cloned ourselves
585  // but instead return another clone of our parent
586  // (this is so that the parent knows of all its clones)
587  if (this->clone()) {
588  LauParameter* clonePar = parent_->createClone(constFactor);
589  clonePar->name(this->name());
590  return clonePar;
591  }
592 
593  // clone ourselves using the copy-constructor
594  LauParameter* clonePar = new LauParameter(*this);
595  (*clonePar) *= constFactor;
596  clonePar->wipeClones();
597  clonePar->clone(this);
598  clones_.insert( std::make_pair( clonePar, constFactor ) );
599  return clonePar;
600 }
601 
602 LauParameter* LauParameter::createClone(const TString& newName, Double_t constFactor)
603 {
604  // self message to create the clone
605  LauParameter* clonePar = this->createClone(constFactor);
606  // set the new name
607  clonePar->name(newName);
608  // and return
609  return clonePar;
610 }
611 
612 void LauParameter::updateClones(Bool_t justValue)
613 {
614  if (justValue) {
615  for (map<LauParameter*,Double_t>::iterator iter = clones_.begin(); iter != clones_.end(); ++iter) {
616  LauParameter* clonePar = iter->first;
617  Double_t constFactor = iter->second;
618  clonePar->value(constFactor*this->value());
619  }
620  } else {
621  for (map<LauParameter*,Double_t>::iterator iter = clones_.begin(); iter != clones_.end(); ++iter) {
622  LauParameter* clonePar = iter->first;
623  Double_t constFactor = iter->second;
624  clonePar->valueAndRange(constFactor*this->value(),constFactor*this->minValue(),constFactor*this->maxValue());
625  clonePar->errors(constFactor*this->error(),constFactor*this->negError(),constFactor*this->posError());
626  clonePar->genValue(constFactor*this->genValue());
627  clonePar->initValue(constFactor*this->initValue());
628  clonePar->fixed(this->fixed());
629  clonePar->firstStage(this->firstStage());
630  clonePar->secondStage(this->secondStage());
631  if ( this->gaussConstraint() ) {
632  clonePar->addGaussianConstraint( this->constraintMean(), this->constraintWidth() );
633  } else {
634  clonePar->removeGaussianConstraint();
635  }
636  }
637  }
638 }
639 
641 {
642  this->randomiseValue(this->minValue(), this->maxValue());
643 }
644 
645 void LauParameter::randomiseValue(Double_t minVal, Double_t maxVal)
646 {
647  // if we're fixed then do nothing
648  if (this->fixed()) {
649  return;
650  }
651  // check supplied values are sensible
652  if (maxVal < minVal) {
653  cerr<<"ERROR in LauParameter::randomiseValue : Supplied maximum value smaller than minimum value."<<endl;
654  return;
655  }
656  if (maxVal > this->maxValue()) {
657  maxVal = this->maxValue();
658  }
659  if (minVal < this->minValue()) {
660  minVal = this->minValue();
661  }
662 
663  Double_t randNo = LauRandom::zeroSeedRandom()->Rndm();
664  Double_t val = randNo*(maxVal - minVal) + minVal;
665  this->initValue(val);
666 }
667 
668 // various mathematical operators (non-member functions)
669 Double_t operator + (const LauParameter& lhs, Double_t rhs)
670 {
671  return (lhs.value() + rhs);
672 }
673 Double_t operator + (Double_t lhs, const LauParameter& rhs)
674 {
675  return (lhs + rhs.value());
676 }
677 Double_t operator + (const LauParameter& lhs, const LauParameter& rhs)
678 {
679  return (lhs.value() + rhs.value());
680 }
681 Double_t operator - (const LauParameter& lhs, Double_t rhs)
682 {
683  return (lhs.value() - rhs);
684 }
685 Double_t operator - (Double_t lhs, const LauParameter& rhs)
686 {
687  return (lhs - rhs.value());
688 }
689 Double_t operator - (const LauParameter& lhs, const LauParameter& rhs)
690 {
691  return (lhs.value() - rhs.value());
692 }
693 Double_t operator * (const LauParameter& lhs, Double_t rhs)
694 {
695  return (lhs.value() * rhs);
696 }
697 Double_t operator * (Double_t lhs, const LauParameter& rhs)
698 {
699  return (lhs * rhs.value());
700 }
701 Double_t operator * (const LauParameter& lhs, const LauParameter& rhs)
702 {
703  return (lhs.value() * rhs.value());
704 }
705 Double_t operator / (const LauParameter& lhs, Double_t rhs)
706 {
707  return (lhs.value() / rhs);
708 }
709 Double_t operator / (Double_t lhs, const LauParameter& rhs)
710 {
711  return (lhs / rhs.value());
712 }
713 Double_t operator / (const LauParameter& lhs, const LauParameter& rhs)
714 {
715  return (lhs.value() / rhs.value());
716 }
717 Double_t operator += (Double_t& lhs, const LauParameter& rhs)
718 {
719  lhs += rhs.value();
720  return lhs;
721 }
722 Double_t operator -= (Double_t& lhs, const LauParameter& rhs)
723 {
724  lhs -= rhs.value();
725  return lhs;
726 }
727 Double_t operator *= (Double_t& lhs, const LauParameter& rhs)
728 {
729  lhs *= rhs.value();
730  return lhs;
731 }
732 Double_t operator /= (Double_t& lhs, const LauParameter& rhs)
733 {
734  lhs /= rhs.value();
735  return lhs;
736 }
737 
738 // ostream operator
739 ostream& operator << (ostream& stream, const LauParameter& par)
740 {
741  stream << par.value();
742  return stream;
743 }
744 
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.
ClassImp(LauAbsCoeffSet)
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...
std::vector< LauParameter * > getPars()
Get the LauParameter itself.
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:33
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.