Fit model.
More...
#include <JFitK40.hh>
|
| std::ostream & | operator<< (std::ostream &out, const JModel_t &object) |
| | Write model parameters to output stream.
|
| |
Fit model.
Definition at line 848 of file JFitK40.hh.
◆ getInstance()
| static const JK40Parameters & JCALIBRATE::JK40Parameters::getInstance |
( |
| ) |
|
|
inlinestaticinherited |
Get default values.
Values obtained with $JPP_DIR/examples/JCalibrate/JOMGsim.sh type B (see $JPP_DIR/examples/JCalibrate/README.md). If you change these values, you may also want to change the corresponding values in JK40DefaultSimulator.hh.
- Returns
- parameters
Definition at line 745 of file JFitK40.hh.
746 {
748
749 parameters.R .set(18.473257);
750 parameters.p1.set( 3.030307);
751 parameters.p2.set(-0.965429);
752 parameters.p3.set( 1.290367);
753 parameters.p4.set( 0.405618);
754 parameters.cc.set( 0.0);
755 parameters.bc.set( 0.0);
756
757 return parameters;
758 }
JK40Parameters()
Default constructor.
◆ getN()
| size_t JCALIBRATE::JK40Parameters::getN |
( |
| ) |
const |
|
inlineinherited |
Get number of fit parameters.
- Returns
- number of parameters
Definition at line 766 of file JFitK40.hh.
767 {
768 return ((
R .isFree() ? 1 : 0) +
775 }
bool isFree() const
Check if parameter is free.
JParameter_t bc
constant background
JParameter_t R
maximal coincidence rate [Hz]
JParameter_t p1
1st order angle dependence coincidence rate
JParameter_t p2
2nd order angle dependence coincidence rate
JParameter_t p3
3rd order angle dependence coincidence rate
JParameter_t p4
4th order angle dependence coincidence rate
JParameter_t cc
fraction of signal correlated background
◆ getIndex()
| int JCALIBRATE::JK40Parameters::getIndex |
( |
JParameter_t JK40Parameters::* | p | ) |
const |
|
inlineinherited |
Get index of parameter.
- Parameters
-
- Returns
- index
Definition at line 784 of file JFitK40.hh.
785 {
786 if (!(this->*p).isFree()) {
788 }
789
790 int N = 0;
791
799
801 }
static const int INVALID_INDEX
invalid index
◆ getValue()
| double JCALIBRATE::JK40Parameters::getValue |
( |
const double | ct | ) |
const |
|
inlineinherited |
Get K40 coincidence rate as a function of cosine angle between PMT axes.
- Parameters
-
| ct | cosine angle between PMT axes |
- Returns
- rate [Hz]
Definition at line 810 of file JFitK40.hh.
◆ getGradient()
| const JK40Parameters_t & JCALIBRATE::JK40Parameters::getGradient |
( |
const double | ct | ) |
const |
|
inlineinherited |
Get gradient.
- Parameters
-
| ct | cosine angle between PMT axes |
- Returns
- gradient
Definition at line 822 of file JFitK40.hh.
823 {
825
827 const double ct2 = ct * ct;
828
836
838 }
JK40Parameters_t gradient
double getValue(const double ct) const
Get K40 coincidence rate as a function of cosine angle between PMT axes.
◆ getK40Parameters()
| const JK40Parameters_t & JCALIBRATE::JK40Parameters_t::getK40Parameters |
( |
| ) |
const |
|
inlineinherited |
Get K40 parameters.
- Returns
- K40 parameters
Definition at line 631 of file JFitK40.hh.
632 {
634 }
JK40Parameters_t()
Default constructor.
◆ setK40Parameters()
| void JCALIBRATE::JK40Parameters_t::setK40Parameters |
( |
const JK40Parameters_t & | parameters | ) |
|
|
inlineinherited |
Set K40 parameters.
- Parameters
-
Definition at line 642 of file JFitK40.hh.
◆ reset()
| void JCALIBRATE::JK40Parameters_t::reset |
( |
| ) |
|
|
inlineinherited |
Reset.
Definition at line 651 of file JFitK40.hh.
652 {
660 }
void set()
Set current value.
◆ print()
| void JCALIBRATE::JK40Parameters_t::print |
( |
std::ostream & | out | ) |
const |
|
inlineinherited |
Print model parameters to output stream conform include files.
- Parameters
-
Definition at line 668 of file JFitK40.hh.
669 {
671
672 out << "JFitK40.hh" << endl;
673 out <<
"parameters.R .set(" <<
FIXED(9,6) << this->
R () <<
");" << endl;
674 out <<
"parameters.p1.set(" <<
FIXED(9,6) << this->
p1() <<
");" << endl;
675 out <<
"parameters.p2.set(" <<
FIXED(9,6) << this->
p2() <<
");" << endl;
676 out <<
"parameters.p3.set(" <<
FIXED(9,6) << this->
p3() <<
");" << endl;
677 out <<
"parameters.p4.set(" <<
FIXED(9,6) << this->
p4() <<
");" << endl;
678 out <<
"cc " <<
FIXED(9,6) << this->
cc() << endl;
679 out <<
"bc " <<
FIXED(9,6) << this->
bc() << endl;
680 out << endl;
681
682 out << "JK40DefaultSimulator.hh" << endl;
683 out <<
"static constexpr double p1 = " <<
FIXED(9,6) << this->
p1() <<
";" << endl;
684 out <<
"static constexpr double p2 = " <<
FIXED(9,6) << this->
p2() <<
";" << endl;
685 out <<
"static constexpr double p3 = " <<
FIXED(9,6) << this->
p3() <<
";" << endl;
686 out <<
"static constexpr double p4 = " <<
FIXED(9,6) << this->
p4() <<
";" << endl;
687 out << endl;
688 }
Auxiliary data structure for floating point format specification.
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JModel_t & | object ) |
|
friend |
Write model parameters to output stream.
- Parameters
-
| out | output stream |
| object | model parameters |
- Returns
- output stream
Definition at line 861 of file JFitK40.hh.
862 {
864
865 out << static_cast<const JK40Parameters&>(object);
866
867 for (int i = 0; i != NUMBER_OF_PMTS; ++i) {
868 out <<
"PMT[" <<
FILL(2,
'0') << i <<
FILL() <<
"]." <<
object.parameters[i].status << endl <<
object.parameters[i];
869 }
870
871 return out;
872 }
Auxiliary data structure for sequence of same character.
◆ parameters
◆ gradient
maximal coincidence rate [Hz]
Definition at line 714 of file JFitK40.hh.
◆ p1
1st order angle dependence coincidence rate
Definition at line 715 of file JFitK40.hh.
◆ p2
2nd order angle dependence coincidence rate
Definition at line 716 of file JFitK40.hh.
◆ p3
3rd order angle dependence coincidence rate
Definition at line 717 of file JFitK40.hh.
◆ p4
4th order angle dependence coincidence rate
Definition at line 718 of file JFitK40.hh.
◆ cc
fraction of signal correlated background
Definition at line 719 of file JFitK40.hh.
◆ bc
The documentation for this struct was generated from the following file: