1 #ifndef __JCALIBRATE_JFITK40__
2 #define __JCALIBRATE_JFITK40__
8 #include "TFitResult.h"
22 namespace JCALIBRATE {}
23 namespace JPP {
using namespace JCALIBRATE; }
25 namespace JCALIBRATE {
319 xmin, xmax, ymin, ymax,
324 static_cast<JModule&
>(*this) = module;
475 this->getPMT(pair.second));
487 return TMath::Sqrt(
getTTS(pair.first) *
getTTS(pair.first) +
531 const Double_t ct =
getDot(pair);
548 const Double_t t0 =
getT0 (pair);
549 const Double_t sigma =
getSigma(pair);
551 return getValue(pair) * TMath::Gaus(dt_ns, t0, sigma, kTRUE);
605 const TFitResultPtr
result = h2.Fit(
this, option.c_str());
623 static Double_t
getRate(
const Double_t* x,
const Double_t* data)
627 static Double_t sigma;
628 static Double_t
rate;
630 const int ix = (int) x[0];
631 const Double_t dt_ns = x[1];
Double_t bg
remaining constant background
Double_t TTS
transition-time spread [ns]
JFitParameter_t getModelParameter(Double_t JFitK40Parameters::*p) const
Get model parameter.
Double_t getT0(const int pmt) const
Get time offset of given PMT.
Double_t getQE(const int pmt) const
Get QE of given PMT.
void setT0(const int pmt, const Double_t t0)
Set time offset of given PMT.
Data structure for a composite optical module.
Double_t t0
time offset [ns]
Parametrisation of two-fold coincidence rate due to K40 and other radioactive decays.
Double_t sigmaK40_ns
intrinsic K40 arrival time spread [ns]
Double_t getSigmaK40() const
Get intrinsic K40 arrival time spread.
Double_t QE
quantum efficiency [unit]
void disablePMT(const int pmt)
Disable PMT.
JFitK40()
Default constructor.
Double_t getValue(const pair_type &pair, const Double_t dt_ns) const
Get K40 coincidence rate.
JFitK40Parameters(const Double_t *data)
Copy constructor.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
then set_variable singlesRate set_variable doublesRate set_variable numberOfSlices echo Generating random background echo Singles rate
Double_t getTTS(const int pmt) const
Get time resolution of given PMT.
bool disable[NUMBER_OF_PMTS]
disable PMT from fit
static const double FITK40_QE_MAX
Maximal quantum efficiency [unit].
bool isParameterFixed(TF1 &f1, const Int_t index)
Check if fit parameter is fixed.
TFitResultPtr operator()(TH2 &h2, const std::string &option)
Fit histogram.
Double_t p3
angle dependence coincidence rate
JPMTParameters_t()
Default constructor.
Double_t getT0(const pair_type &pair) const
Get time offset of given PMT pair.
esac $JPP_DIR examples JDetector JTransitTime o $OUTPUT_FILE n N $NPE T $TTS_NS d $DEBUG for HISTOGRAM in tts tt2 pmt
bool is_average_t0(int pmt) const
Test PMT status.
const Double_t * getModelParameters() const
Get model parameters.
Double_t getT0(const int pmt) const
Get time offset of given PMT.
JCombinatorics::pair_type pair_type
Data structure for a pair of addresses.
static Double_t getRate(const Double_t *x, const Double_t *data)
Get K40 coincidence rate as a function of the fit parameters.
Auxiliary data structure for a parameter index and its value.
Double_t getValue(const Double_t ct) const
Get K40 coincidence rate as a function of cosine angle between PMT axes.
Auxiliary class to sort pairs of PMT addresses within optical module.
void setModelParameters(const Double_t *data)
Set model parameters.
Double_t getModelParameter(Int_t i) const
Get model parameter.
int index_of_average_t0
index of t0 used for average time offset
JPMTParameters_t parameters[NUMBER_OF_PMTS]
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.
static Int_t getNumberOfModelParameters()
Get number of model parameters.
static JFitK40 & getInstance()
Get unique instance of fit object.
Double_t getValue(const pair_type &pair) const
Get K40 coincidence rate.
double getDot(const pair_type &pair) const
Get cosine of space angle between PMT axes.
JFitParameter_t getModelParameter(Int_t pmt, Double_t JPMTParameters_t::*p) const
Get model parameter.
void setSigmaK40(const Double_t sigma)
Set intrinsic K40 arrival time spread.
Double_t p4
angle dependence coincidence rate
const JPMT & getPMT(const int index) const
Get PMT.
bool setParLimits(TF1 &f1, const Int_t index, Double_t xmin, Double_t xmax)
Set fit parameter limits.
Fit parameters for single PMT.
static const double FITK40_QE_MIN
Minimal quantum efficiency [unit].
bool is_disabled(int pmt) const
Test PMT status.
void enablePMT(const int pmt)
Enable PMT.
static const double FITK40_TTS_MIN_NS
Minimal transition-time spread [ns].
void setQE(const int pmt, const Double_t QE)
Set QE of given PMT.
Double_t Rate_Hz
maximal coincidence rate [Hz]
bool fixParameter(TF1 &f1, const JFitParameter_t ¶meter)
Fix fit parameter.
void setTTS(const int pmt, const Double_t TTS)
Set time resolution of given PMT.
JFitK40(const JModule &module, const Double_t xmin, const Double_t xmax, const Double_t ymin, const Double_t ymax, const bool option)
Constructor.
static const double FITK40_TTS_MAX_NS
Maximal transition-time spread [ns].
Double_t p1
angle dependence coincidence rate
Double_t p2
angle dependence coincidence rate
Double_t getSigma(const pair_type &pair) const
Get time resolution of given PMT pair.
Exception for accessing an index in a collection that is outside of its range.
KM3NeT DAQ constants, bit handling, etc.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Fit parameters for two-fold coincidence rate due to K40.
Double_t * getModelParameters()
Get model parameters.
Double_t cc
fraction of signal correlated background
JFitK40Parameters()
Default constructor.
Data structure for a composite optical module.