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 842 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 739 of file JFitK40.hh.
740 {
742
743 parameters.R .set(18.473257);
744 parameters.p1.set( 3.030307);
745 parameters.p2.set(-0.965429);
746 parameters.p3.set( 1.290367);
747 parameters.p4.set( 0.405618);
748 parameters.cc.set( 0.0);
749 parameters.bc.set( 0.0);
750
751 return parameters;
752 }
JK40Parameters()
Default constructor.
◆ getN()
| size_t JCALIBRATE::JK40Parameters::getN |
( |
| ) |
const |
|
inlineinherited |
Get number of fit parameters.
- Returns
- number of parameters
Definition at line 760 of file JFitK40.hh.
761 {
762 return ((
R .isFree() ? 1 : 0) +
769 }
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 778 of file JFitK40.hh.
779 {
780 if (!(this->*p).isFree()) {
782 }
783
784 int N = 0;
785
793
795 }
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 804 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 816 of file JFitK40.hh.
817 {
819
821 const double ct2 = ct * ct;
822
830
832 }
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 625 of file JFitK40.hh.
626 {
628 }
JK40Parameters_t()
Default constructor.
◆ setK40Parameters()
| void JCALIBRATE::JK40Parameters_t::setK40Parameters |
( |
const JK40Parameters_t & | parameters | ) |
|
|
inlineinherited |
Set K40 parameters.
- Parameters
-
Definition at line 636 of file JFitK40.hh.
◆ reset()
| void JCALIBRATE::JK40Parameters_t::reset |
( |
| ) |
|
|
inlineinherited |
Reset.
Definition at line 645 of file JFitK40.hh.
646 {
654 }
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 662 of file JFitK40.hh.
663 {
665
666 out << "JFitK40.hh" << endl;
667 out <<
"parameters.R .set(" <<
FIXED(9,6) << this->
R () <<
");" << endl;
668 out <<
"parameters.p1.set(" <<
FIXED(9,6) << this->
p1() <<
");" << endl;
669 out <<
"parameters.p2.set(" <<
FIXED(9,6) << this->
p2() <<
");" << endl;
670 out <<
"parameters.p3.set(" <<
FIXED(9,6) << this->
p3() <<
");" << endl;
671 out <<
"parameters.p4.set(" <<
FIXED(9,6) << this->
p4() <<
");" << endl;
672 out <<
"cc " <<
FIXED(9,6) << this->
cc() << endl;
673 out <<
"bc " <<
FIXED(9,6) << this->
bc() << endl;
674 out << endl;
675
676 out << "JK40DefaultSimulator.hh" << endl;
677 out <<
"static constexpr double p1 = " <<
FIXED(9,6) << this->
p1() <<
";" << endl;
678 out <<
"static constexpr double p2 = " <<
FIXED(9,6) << this->
p2() <<
";" << endl;
679 out <<
"static constexpr double p3 = " <<
FIXED(9,6) << this->
p3() <<
";" << endl;
680 out <<
"static constexpr double p4 = " <<
FIXED(9,6) << this->
p4() <<
";" << endl;
681 out << endl;
682 }
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 855 of file JFitK40.hh.
856 {
858
859 out << static_cast<const JK40Parameters&>(object);
860
861 for (int i = 0; i != NUMBER_OF_PMTS; ++i) {
862 out <<
"PMT[" <<
FILL(2,
'0') << i <<
FILL() <<
"]." <<
object.parameters[i].status << endl <<
object.parameters[i];
863 }
864
865 return out;
866 }
Auxiliary data structure for sequence of same character.
◆ parameters
◆ gradient
maximal coincidence rate [Hz]
Definition at line 708 of file JFitK40.hh.
◆ p1
1st order angle dependence coincidence rate
Definition at line 709 of file JFitK40.hh.
◆ p2
2nd order angle dependence coincidence rate
Definition at line 710 of file JFitK40.hh.
◆ p3
3rd order angle dependence coincidence rate
Definition at line 711 of file JFitK40.hh.
◆ p4
4th order angle dependence coincidence rate
Definition at line 712 of file JFitK40.hh.
◆ cc
fraction of signal correlated background
Definition at line 713 of file JFitK40.hh.
◆ bc
The documentation for this struct was generated from the following file: