Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
JCALIBRATE::JFitK40 Struct Reference

Parametrisation of two-fold coincidence rate due to K40 and other radioactive decays. More...

#include <JFitK40.hh>

Inheritance diagram for JCALIBRATE::JFitK40:
JCALIBRATE::JFitK40Parameters JDETECTOR::JModule JTOOLS::JCombinatorics JLANG::JObjectID JDETECTOR::JModuleLocation JGEOMETRY3D::JPosition3D std::vector< JPMT > JLANG::JComparable< JObjectID, int > JLANG::JComparable< JFirst_t, JSecond_t > JGEOMETRY3D::JVector3D JMATH::JMath< JVector3D >

Public Types

typedef JCombinatorics::pair_type pair_type
 Data structure for a pair of addresses. More...
 

Public Member Functions

 JFitK40 (const JModule &module, const Double_t xmin, const Double_t xmax, const Double_t ymin, const Double_t ymax, const bool option)
 Constructor. More...
 
Double_t getSigmaK40 () const
 Get intrinsic K40 arrival time spread. More...
 
void setSigmaK40 (const Double_t sigma)
 Set intrinsic K40 arrival time spread. More...
 
bool is_disabled (int pmt) const
 Test PMT status. More...
 
bool is_average_t0 (int pmt) const
 Test PMT status. More...
 
Double_t getT0 (const int pmt) const
 Get time offset of given PMT. More...
 
void enablePMT (const int pmt)
 Enable PMT. More...
 
void disablePMT (const int pmt)
 Disable PMT. More...
 
double getDot (const pair_type &pair) const
 Get cosine of space angle between PMT axes. More...
 
Double_t getSigma (const pair_type &pair) const
 Get time resolution of given PMT pair. More...
 
Double_t getT0 (const pair_type &pair) const
 Get time offset of given PMT pair. More...
 
Double_t getValue (const Double_t ct) const
 Get K40 coincidence rate as a function of cosine angle between PMT axes. More...
 
Double_t getValue (const pair_type &pair) const
 Get K40 coincidence rate. More...
 
Double_t getValue (const pair_type &pair, const Double_t dt_ns) const
 Get K40 coincidence rate. More...
 
TFitResultPtr operator() (TH2 &h2, const std::string &option)
 Fit histogram. More...
 
const Double_t * getModelParameters () const
 Get model parameters. More...
 
Double_t * getModelParameters ()
 Get model parameters. More...
 
void setModelParameters (const Double_t *data)
 Set model parameters. More...
 
Double_t getModelParameter (Int_t i) const
 Get model parameter. More...
 
JFitParameter_t getModelParameter (Double_t JFitK40Parameters::*p) const
 Get model parameter. More...
 
JFitParameter_t getModelParameter (Int_t pmt, Double_t JPMTParameters_t::*p) const
 Get model parameter. More...
 
Double_t getQE (const int pmt) const
 Get QE of given PMT. More...
 
void setQE (const int pmt, const Double_t QE)
 Set QE of given PMT. More...
 
Double_t getTTS (const int pmt) const
 Get time resolution of given PMT. More...
 
void setTTS (const int pmt, const Double_t TTS)
 Set time resolution of given PMT. More...
 
void setT0 (const int pmt, const Double_t t0)
 Set time offset of given PMT. More...
 
const JPMTgetPMT (const int index) const
 Get PMT. More...
 
JPMTgetPMT (const int index)
 Get PMT. More...
 
void compile ()
 Compile position of module from the positions of the PMTs. More...
 
void rotate (const JRotation3D &R)
 Rotate module. More...
 
JPosition3Drotate (const JRotation3X &R)
 Rotate around X-axis. More...
 
JPosition3Drotate (const JRotation3Y &R)
 Rotate around Y-axis. More...
 
JPosition3Drotate (const JRotation3Z &R)
 Rotate around Z-axis. More...
 
JPosition3Drotate (const JQuaternion3D &Q)
 Rotate. More...
 
void rotate_back (const JRotation3D &R)
 Rotate back module. More...
 
JPosition3Drotate_back (const JRotation3X &R)
 Rotate back around X-axis. More...
 
JPosition3Drotate_back (const JRotation3Y &R)
 Rotate back around Y-axis. More...
 
JPosition3Drotate_back (const JRotation3Z &R)
 Rotate back around Z-axis. More...
 
void transform (const JRotation3D &R, const JVector3D &pos)
 Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&, const JVector3D&)). More...
 
void transform (const JTransformation3D &T)
 Transformation of geometry. More...
 
JVector3Dtransform (const JMatrix3D &T)
 Transform. More...
 
JModuleset (const JVector3D &pos)
 Set position. More...
 
JModuleset (const double t0)
 Set time offset. More...
 
JModuleadd (const JVector3D &pos)
 Add position. More...
 
JModuleadd (const double t0)
 Add time offset. More...
 
JModulesub (const JVector3D &pos)
 Subtract position. More...
 
JModulesub (const double t0)
 Subtract time offset. More...
 
JModuleoperator+= (const JVector3D &pos)
 Add position. More...
 
JModuleoperator-= (const JVector3D &pos)
 Subtract position. More...
 
int getID () const
 Get identifier. More...
 
void setID (const int id)
 Set identifier. More...
 
bool less (const JObjectID &object) const
 Less than method. More...
 
bool less (const int id) const
 Less than method. More...
 
bool less (const JModuleLocation &location) const
 Less than method. More...
 
bool more (const int id) const
 More than method. More...
 
const JModuleLocationgetLocation () const
 Get location. More...
 
JModuleLocationgetLocation ()
 Get location. More...
 
void setLocation (const JModuleLocation &location)
 Set location. More...
 
std::string toString () const
 Convert module location to string. More...
 
std::string toString (const std::string &fmt, const std::string target="%") const
 Convert module loation to string. More...
 
int getString () const
 Get string number. More...
 
int getFloor () const
 Get floor number. More...
 
const JPosition3DgetPosition () const
 Get position. More...
 
JPosition3DgetPosition ()
 Get position. More...
 
void setPosition (const JVector3D &pos)
 Set position. More...
 
 operator JAngle3D () const
 Type conversion operator. More...
 
 operator JVersor3D () const
 Type conversion operator. More...
 
void transform_back (const JRotation3D &R, const JVector3D &pos)
 Transform back position. More...
 
double getDot (const JAngle3D &angle) const
 Get dot product. More...
 
double getDot (const JVersor3D &dir) const
 Get dot product. More...
 
double getDot (const JVersor3Z &dir) const
 Get dot product. More...
 
double getDot (const JVector3D &vector) const
 Get dot product. More...
 
 operator JVector2D () const
 Type conversion operator. More...
 
double getX () const
 Get x position. More...
 
double getY () const
 Get y position. More...
 
double getZ () const
 Get z position. More...
 
JVector3Dnegate ()
 Negate vector. More...
 
JVector3Dmul (const double factor)
 Scale vector. More...
 
JVector3Dmul (const JNullType &object)
 Multiply with object. More...
 
JVector3Ddiv (const double factor)
 Scale vector. More...
 
bool equals (const JVector3D &vector) const
 Check equality. More...
 
double getLengthSquared () const
 Get length squared. More...
 
double getLength () const
 Get length. More...
 
double getDistanceSquared (const JVector3D &pos) const
 Get squared of distance to point. More...
 
double getDistance (const JVector3D &pos) const
 Get distance to point. More...
 
JVector3Dcross (const JVector3D &first, const JVector3D &second)
 Get cross product. More...
 
void configure (const int numberOfIndices)
 Configure. More...
 
unsigned int getNumberOfIndices () const
 Get number of indices. More...
 
unsigned int getNumberOfPairs () const
 Get number of pairs. More...
 
int getIndex (const int first, const int second) const
 Get index of pair of indices. More...
 
const pair_typegetPair (const int index) const
 Get pair of indices for given index. More...
 
template<class JComparator_t >
void sort (JComparator_t comparator)
 Sort address pairs. More...
 

Static Public Member Functions

static Double_t getRate (const Double_t *x, const Double_t *data)
 Get K40 coincidence rate as a function of the fit parameters. More...
 
static Int_t getNumberOfModelParameters ()
 Get number of model parameters. More...
 
static int getSign (const int first, const int second)
 Sign of pair of indices. More...
 
static int getSign (const pair_type &pair)
 Sign of pair of indices. More...
 

Public Attributes

Double_t Rate_Hz
 maximal coincidence rate [Hz] More...
 
Double_t p1
 angle dependence coincidence rate More...
 
Double_t p2
 angle dependence coincidence rate More...
 
Double_t p3
 angle dependence coincidence rate More...
 
Double_t p4
 angle dependence coincidence rate More...
 
Double_t bg
 remaining constant background More...
 
Double_t cc
 fraction of signal correlated background More...
 
JPMTParameters_t parameters [NUMBER_OF_PMTS]
 

Protected Attributes

int __id
 
int string
 
int floor
 
double __x
 
double __y
 
double __z
 
std::vector< pair_typezbuf1D
 
std::vector< std::vector< int > > zbuf2D
 

Private Member Functions

 JFitK40 ()
 Default constructor. More...
 

Static Private Member Functions

static JFitK40getInstance ()
 Get unique instance of fit object. More...
 

Private Attributes

Double_t sigmaK40_ns
 intrinsic K40 arrival time spread [ns] More...
 
int index_of_average_t0
 index of t0 used for average time offset More...
 
bool disable [NUMBER_OF_PMTS]
 disable PMT from fit More...
 

Detailed Description

Parametrisation of two-fold coincidence rate due to K40 and other radioactive decays.

Note that for use in ROOT fit operations, the member method JFitK40::getRate is static.

Definition at line 273 of file JFitK40.hh.

Member Typedef Documentation

Data structure for a pair of addresses.

Definition at line 282 of file JFitK40.hh.

Constructor & Destructor Documentation

JCALIBRATE::JFitK40::JFitK40 ( const JModule module,
const Double_t  xmin,
const Double_t  xmax,
const Double_t  ymin,
const Double_t  ymax,
const bool  option 
)
inline

Constructor.

Parameters
moduledetector module
xminminimal x
xmaxmaximal x
yminminimal y
ymaxmaximal y
optiontrue = fix average t0; false = free average t0

Definition at line 295 of file JFitK40.hh.

300  :
301 
302  TF2("fitk40",
304  xmin, xmax, ymin, ymax,
306 
307  sigmaK40_ns(0.54)
308  {
309  static_cast<JModule&>(*this) = module;
310 
311  this->configure(module.size());
312 
313  this->sort(JPairwiseComparator(module));
314 
315  index_of_average_t0 = (option ? 0 : -1);
316 
317  for (int i = 0; i != NUMBER_OF_PMTS; ++i) {
318  disable[i] = false;
319  }
320  }
void configure(const int numberOfIndices)
Configure.
Double_t sigmaK40_ns
intrinsic K40 arrival time spread [ns]
Definition: JFitK40.hh:647
bool disable[NUMBER_OF_PMTS]
disable PMT from fit
Definition: JFitK40.hh:649
void sort(JComparator_t comparator)
Sort address pairs.
JModule()
Default constructor.
Definition: JModule.hh:57
static Double_t getRate(const Double_t *x, const Double_t *data)
Get K40 coincidence rate as a function of the fit parameters.
Definition: JFitK40.hh:620
Auxiliary class to sort pairs of PMT addresses within optical module.
int index_of_average_t0
index of t0 used for average time offset
Definition: JFitK40.hh:648
static Int_t getNumberOfModelParameters()
Get number of model parameters.
Definition: JFitK40.hh:98
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
JCALIBRATE::JFitK40::JFitK40 ( )
inlineprivate

Default constructor.

Definition at line 654 of file JFitK40.hh.

655  {}

Member Function Documentation

Double_t JCALIBRATE::JFitK40::getSigmaK40 ( ) const
inline

Get intrinsic K40 arrival time spread.

Returns
sigma [ns]

Definition at line 328 of file JFitK40.hh.

329  {
330  return this->sigmaK40_ns;
331  }
Double_t sigmaK40_ns
intrinsic K40 arrival time spread [ns]
Definition: JFitK40.hh:647
void JCALIBRATE::JFitK40::setSigmaK40 ( const Double_t  sigma)
inline

Set intrinsic K40 arrival time spread.

Parameters
sigmasigma [ns]

Definition at line 339 of file JFitK40.hh.

340  {
341  this->sigmaK40_ns = sigma;
342  }
Double_t sigmaK40_ns
intrinsic K40 arrival time spread [ns]
Definition: JFitK40.hh:647
bool JCALIBRATE::JFitK40::is_disabled ( int  pmt) const
inline

Test PMT status.

Parameters
pmtpmt address
Returns
true if given pmt is disabled; else false

Definition at line 351 of file JFitK40.hh.

352  {
353  return disable[pmt];
354  }
bool disable[NUMBER_OF_PMTS]
disable PMT from fit
Definition: JFitK40.hh:649
bool JCALIBRATE::JFitK40::is_average_t0 ( int  pmt) const
inline

Test PMT status.

Parameters
pmtpmt address
Returns
true if given pmt is used for average t0; else false

Definition at line 363 of file JFitK40.hh.

364  {
365  return pmt == index_of_average_t0;
366  }
int index_of_average_t0
index of t0 used for average time offset
Definition: JFitK40.hh:648
Double_t JCALIBRATE::JFitK40::getT0 ( const int  pmt) const
inline

Get time offset of given PMT.

Note that if the average time offset is constraint, the time offset of each PMT is corrected by the average time offset of all PMTs.

Parameters
pmtpmt address
Returns
time offset [ns]

Definition at line 378 of file JFitK40.hh.

379  {
380  if (index_of_average_t0 == -1) {
381 
382  return JFitK40Parameters::getT0(pmt);
383 
384  } else {
385 
386  if (disable[pmt]) {
387 
388  return parameters[pmt].t0;
389 
390  } else {
391 
392  Int_t n0 = 0; // number of non-fixed t0's
393  Double_t t0 = 0.0; // average of non-fixed t0's
394 
395  for (int i = 0; i != NUMBER_OF_PMTS; ++i) {
396  if (!disable[i] && i != index_of_average_t0) {
397  n0 += 1;
398  t0 += parameters[i].t0;
399  }
400  }
401 
402  t0 /= (n0 + 1);
403 
404  if (pmt != index_of_average_t0)
405  return parameters[pmt].t0 - t0;
406  else
407  return -t0;
408  }
409  }
410  }
Double_t t0
time offset [ns]
Definition: JFitK40.hh:54
bool disable[NUMBER_OF_PMTS]
disable PMT from fit
Definition: JFitK40.hh:649
Double_t getT0(const int pmt) const
Get time offset of given PMT.
Definition: JFitK40.hh:236
int index_of_average_t0
index of t0 used for average time offset
Definition: JFitK40.hh:648
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
void JCALIBRATE::JFitK40::enablePMT ( const int  pmt)
inline

Enable PMT.

Parameters
pmtpmt address

Definition at line 418 of file JFitK40.hh.

419  {
420  disable[pmt] = false;
421  }
bool disable[NUMBER_OF_PMTS]
disable PMT from fit
Definition: JFitK40.hh:649
void JCALIBRATE::JFitK40::disablePMT ( const int  pmt)
inline

Disable PMT.

Note that if the average time offset is constraint to zero, the corresponding index may change.

Parameters
pmtpmt address

Definition at line 432 of file JFitK40.hh.

433  {
434  disable[pmt] = true;
435 
436  if (index_of_average_t0 == pmt) {
437 
440  break;
441  }
442  }
443 
445  THROW(JIndexOutOfRange, "JFitK40::disable PMT: No free index for average t0.");
446  }
447  }
448  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:633
bool disable[NUMBER_OF_PMTS]
disable PMT from fit
Definition: JFitK40.hh:649
int index_of_average_t0
index of t0 used for average time offset
Definition: JFitK40.hh:648
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
double JCALIBRATE::JFitK40::getDot ( const pair_type pair) const
inline

Get cosine of space angle between PMT axes.

Parameters
pairpair of addresses
Returns
cosine

Definition at line 457 of file JFitK40.hh.

458  {
459  return JMATH::getDot(this->getPMT(pair.first),
460  this->getPMT(pair.second));
461  }
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.
const JPMT & getPMT(const int index) const
Get PMT.
Definition: JModule.hh:141
Double_t JCALIBRATE::JFitK40::getSigma ( const pair_type pair) const
inline

Get time resolution of given PMT pair.

Parameters
pairpair of addresses
Returns
sigma [ns]

Definition at line 470 of file JFitK40.hh.

471  {
472  return TMath::Sqrt(getTTS(pair.first) * getTTS(pair.first) +
473  getTTS(pair.second) * getTTS(pair.second) +
474  getSigmaK40() * getSigmaK40());
475  }
Double_t getSigmaK40() const
Get intrinsic K40 arrival time spread.
Definition: JFitK40.hh:328
Double_t getTTS(const int pmt) const
Get time resolution of given PMT.
Definition: JFitK40.hh:210
Double_t JCALIBRATE::JFitK40::getT0 ( const pair_type pair) const
inline

Get time offset of given PMT pair.

Parameters
pairpair of addresses
Returns
time offset [ns]

Definition at line 484 of file JFitK40.hh.

485  {
486  if (index_of_average_t0 == -1) {
487 
488  return parameters[pair.first].t0 - parameters[pair.second].t0;
489 
490  } else {
491 
492  if (pair.first == index_of_average_t0) {
493 
494  return -parameters[pair.second].t0;
495 
496  } else if (pair.second == index_of_average_t0) {
497 
498  return parameters[pair.first].t0;
499 
500  } else {
501 
502  return parameters[pair.first].t0 - parameters[pair.second].t0;
503  }
504  }
505  }
Double_t t0
time offset [ns]
Definition: JFitK40.hh:54
int index_of_average_t0
index of t0 used for average time offset
Definition: JFitK40.hh:648
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
Double_t JCALIBRATE::JFitK40::getValue ( const Double_t  ct) const
inline

Get K40 coincidence rate as a function of cosine angle between PMT axes.

Parameters
ctcosine angle between PMT axes
Returns
rate [Hz]

Definition at line 514 of file JFitK40.hh.

515  {
516  return Rate_Hz * TMath::Exp(-(p1+p2+p3+p4)) * TMath::Exp(ct*(p1+ct*(p2+ct*(p3+ct*p4))));
517  }
Double_t p3
angle dependence coincidence rate
Definition: JFitK40.hh:259
Double_t p4
angle dependence coincidence rate
Definition: JFitK40.hh:260
Double_t Rate_Hz
maximal coincidence rate [Hz]
Definition: JFitK40.hh:256
Double_t p1
angle dependence coincidence rate
Definition: JFitK40.hh:257
Double_t p2
angle dependence coincidence rate
Definition: JFitK40.hh:258
Double_t JCALIBRATE::JFitK40::getValue ( const pair_type pair) const
inline

Get K40 coincidence rate.

Parameters
pairpair of addresses
Returns
rate [Hz]

Definition at line 526 of file JFitK40.hh.

527  {
528  const Double_t ct = getDot(pair);
529 
530  return (getValue(ct) *
531  getQE(pair.first) *
532  getQE(pair.second));
533  }
Double_t getQE(const int pmt) const
Get QE of given PMT.
Definition: JFitK40.hh:186
double getDot(const pair_type &pair) const
Get cosine of space angle between PMT axes.
Definition: JFitK40.hh:457
Double_t getValue(const Double_t ct) const
Get K40 coincidence rate as a function of cosine angle between PMT axes.
Definition: JFitK40.hh:514
Double_t JCALIBRATE::JFitK40::getValue ( const pair_type pair,
const Double_t  dt_ns 
) const
inline

Get K40 coincidence rate.

Parameters
pairpair of addresses
dt_nstime difference [ns]
Returns
rate [Hz/ns]

Definition at line 543 of file JFitK40.hh.

544  {
545  const Double_t t0 = getT0 (pair);
546  const Double_t sigma = getSigma(pair);
547 
548  return getValue(pair) * TMath::Gaus(dt_ns, t0, sigma, kTRUE);
549  }
Double_t getT0(const int pmt) const
Get time offset of given PMT.
Definition: JFitK40.hh:378
Double_t getSigma(const pair_type &pair) const
Get time resolution of given PMT pair.
Definition: JFitK40.hh:470
Double_t getValue(const Double_t ct) const
Get K40 coincidence rate as a function of cosine angle between PMT axes.
Definition: JFitK40.hh:514
TFitResultPtr JCALIBRATE::JFitK40::operator() ( TH2 &  h2,
const std::string &  option 
)
inline

Fit histogram.

Note that the PMT parameters which are part of the model are reset before the fit according the status of each PMT and the obtained fit parameters are copied back to the model parameters after the fit.

Parameters
h2ROOT 2D-histogram
optionfit option

Definition at line 561 of file JFitK40.hh.

562  {
563  for (int pmt = 0; pmt != NUMBER_OF_PMTS; ++pmt) {
564 
565  parameters[pmt] = JPMTParameters_t();
566 
567  if (disable[pmt]) {
568 
569  parameters[pmt].QE = 0.0;
570 
574 
575  } else {
576 
577  // Note that setting limits to a parameter will also release it
578 
579  if (!isParameterFixed(*this, this->getModelParameter(pmt, &JPMTParameters_t::QE))) {
581  }
582  if (!isParameterFixed(*this, this->getModelParameter(pmt, &JPMTParameters_t::TTS))) {
584  }
585  if (!isParameterFixed(*this, this->getModelParameter(pmt, &JPMTParameters_t::t0))) {
586  setParLimits(*this, this->getModelParameter(pmt, &JPMTParameters_t::t0), h2.GetYaxis()->GetXmin(), h2.GetYaxis()->GetXmax());
587  }
588  }
589  }
590 
591  if (index_of_average_t0 != -1) {
592 
593  this->setT0(index_of_average_t0, 0.0);
594 
596  }
597 
598  this->SetParameters(this->getModelParameters());
599 
600  getInstance() = *this;
601 
602  const TFitResultPtr result = h2.Fit(this, option.c_str());
603 
604  this->setModelParameters(this->GetParameters());
605 
606  return result;
607  }
Double_t TTS
transition-time spread [ns]
Definition: JFitK40.hh:53
void setT0(const int pmt, const Double_t t0)
Set time offset of given PMT.
Definition: JFitK40.hh:248
Double_t t0
time offset [ns]
Definition: JFitK40.hh:54
Double_t QE
quantum efficiency [unit]
Definition: JFitK40.hh:52
bool disable[NUMBER_OF_PMTS]
disable PMT from fit
Definition: JFitK40.hh:649
static const double FITK40_QE_MAX
Maximal quantum efficiency [unit].
Definition: JFitK40.hh:33
bool isParameterFixed(TF1 &f1, const Int_t index)
Check if fit parameter is fixed.
const Double_t * getModelParameters() const
Get model parameters.
Definition: JFitK40.hh:109
void setModelParameters(const Double_t *data)
Set model parameters.
Definition: JFitK40.hh:131
Double_t getModelParameter(Int_t i) const
Get model parameter.
Definition: JFitK40.hh:145
int index_of_average_t0
index of t0 used for average time offset
Definition: JFitK40.hh:648
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
static JFitK40 & getInstance()
Get unique instance of fit object.
Definition: JFitK40.hh:663
bool setParLimits(TF1 &f1, const Int_t index, Double_t xmin, Double_t xmax)
Set fit parameter limits.
Fit parameters for single PMT.
Definition: JFitK40.hh:41
static const double FITK40_QE_MIN
Minimal quantum efficiency [unit].
Definition: JFitK40.hh:32
static const double FITK40_TTS_MIN_NS
Minimal transition-time spread [ns].
Definition: JFitK40.hh:34
bool fixParameter(TF1 &f1, const JFitParameter_t &parameter)
Fix fit parameter.
static const double FITK40_TTS_MAX_NS
Maximal transition-time spread [ns].
Definition: JFitK40.hh:35
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
static Double_t JCALIBRATE::JFitK40::getRate ( const Double_t *  x,
const Double_t *  data 
)
inlinestatic

Get K40 coincidence rate as a function of the fit parameters.

To speed up the calculation, it is assumed that the parameter values do not change unless also the x[0] value changes (i.e. the index of the PMT pair).

Parameters
xpointer to data
datapointer to parameter values
Returns
rate [Hz/ns]

Definition at line 620 of file JFitK40.hh.

621  {
622  static int id = -1;
623  static Double_t t0;
624  static Double_t sigma;
625  static Double_t rate;
626 
627  const int ix = (int) x[0];
628  const Double_t dt_ns = x[1];
629 
630  if (ix != id) {
631 
633 
634  const pair_type& pair = getInstance().getPair(ix);
635 
636  t0 = getInstance().getT0 (pair);
637  sigma = getInstance().getSigma(pair);
638  rate = getInstance().getValue(pair);
639  id = ix;
640  }
641 
642  return getInstance().bg + rate * (getInstance().cc + TMath::Gaus(dt_ns, t0, sigma, kTRUE));
643  }
Double_t bg
remaining constant background
Definition: JFitK40.hh:261
const pair_type & getPair(const int index) const
Get pair of indices for given index.
Double_t getT0(const int pmt) const
Get time offset of given PMT.
Definition: JFitK40.hh:378
void setModelParameters(const Double_t *data)
Set model parameters.
Definition: JFitK40.hh:131
static JFitK40 & getInstance()
Get unique instance of fit object.
Definition: JFitK40.hh:663
Double_t getSigma(const pair_type &pair) const
Get time resolution of given PMT pair.
Definition: JFitK40.hh:470
Double_t getValue(const Double_t ct) const
Get K40 coincidence rate as a function of cosine angle between PMT axes.
Definition: JFitK40.hh:514
Double_t cc
fraction of signal correlated background
Definition: JFitK40.hh:262
static JFitK40& JCALIBRATE::JFitK40::getInstance ( )
inlinestaticprivate

Get unique instance of fit object.

Returns
reference to fit object.

Definition at line 663 of file JFitK40.hh.

664  {
665  static JFitK40 object;
666 
667  return object;
668  }
Parametrisation of two-fold coincidence rate due to K40 and other radioactive decays.
Definition: JFitK40.hh:273
static Int_t JCALIBRATE::JFitK40Parameters::getNumberOfModelParameters ( )
inlinestaticinherited

Get number of model parameters.

Returns
number of parameters

Definition at line 98 of file JFitK40.hh.

99  {
100  return sizeof(JFitK40Parameters) / sizeof(Double_t);
101  }
JFitK40Parameters()
Default constructor.
Definition: JFitK40.hh:69
const Double_t* JCALIBRATE::JFitK40Parameters::getModelParameters ( ) const
inlineinherited

Get model parameters.

Returns
pointer to parameters

Definition at line 109 of file JFitK40.hh.

110  {
111  return &Rate_Hz;
112  }
Double_t Rate_Hz
maximal coincidence rate [Hz]
Definition: JFitK40.hh:256
Double_t* JCALIBRATE::JFitK40Parameters::getModelParameters ( )
inlineinherited

Get model parameters.

Returns
pointer to parameters

Definition at line 120 of file JFitK40.hh.

121  {
122  return &Rate_Hz;
123  }
Double_t Rate_Hz
maximal coincidence rate [Hz]
Definition: JFitK40.hh:256
void JCALIBRATE::JFitK40Parameters::setModelParameters ( const Double_t *  data)
inlineinherited

Set model parameters.

Parameters
datapointer to parameters

Definition at line 131 of file JFitK40.hh.

132  {
133  for (Int_t i = 0; i != getNumberOfModelParameters(); ++i) {
134  getModelParameters()[i] = data[i];
135  }
136  }
const Double_t * getModelParameters() const
Get model parameters.
Definition: JFitK40.hh:109
static Int_t getNumberOfModelParameters()
Get number of model parameters.
Definition: JFitK40.hh:98
Double_t JCALIBRATE::JFitK40Parameters::getModelParameter ( Int_t  i) const
inlineinherited

Get model parameter.

Parameters
iparameter index
Returns
parameter value

Definition at line 145 of file JFitK40.hh.

146  {
147  return getModelParameters()[i];
148  }
const Double_t * getModelParameters() const
Get model parameters.
Definition: JFitK40.hh:109
JFitParameter_t JCALIBRATE::JFitK40Parameters::getModelParameter ( Double_t JFitK40Parameters::*  p) const
inlineinherited

Get model parameter.

Parameters
ppointer to data member
Returns
parameter index and value

Definition at line 157 of file JFitK40.hh.

158  {
159  const Int_t i = &(this->*p) - getModelParameters();
160 
161  return JFitParameter_t(i, getModelParameter(i));
162  }
const Double_t * getModelParameters() const
Get model parameters.
Definition: JFitK40.hh:109
Double_t getModelParameter(Int_t i) const
Get model parameter.
Definition: JFitK40.hh:145
JFitParameter_t JCALIBRATE::JFitK40Parameters::getModelParameter ( Int_t  pmt,
Double_t JPMTParameters_t::*  p 
) const
inlineinherited

Get model parameter.

Parameters
pmtPMT number
ppointer to data member of PMT parameters
Returns
parameter index and value

Definition at line 172 of file JFitK40.hh.

173  {
174  const Int_t i = &(parameters[pmt].*p) - getModelParameters();
175 
176  return JFitParameter_t(i, getModelParameter(i));
177  }
const Double_t * getModelParameters() const
Get model parameters.
Definition: JFitK40.hh:109
Double_t getModelParameter(Int_t i) const
Get model parameter.
Definition: JFitK40.hh:145
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
Double_t JCALIBRATE::JFitK40Parameters::getQE ( const int  pmt) const
inlineinherited

Get QE of given PMT.

Parameters
pmtpmt address
Returns
QE

Definition at line 186 of file JFitK40.hh.

187  {
188  return parameters[pmt].QE;
189  }
Double_t QE
quantum efficiency [unit]
Definition: JFitK40.hh:52
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
void JCALIBRATE::JFitK40Parameters::setQE ( const int  pmt,
const Double_t  QE 
)
inlineinherited

Set QE of given PMT.

Parameters
pmtpmt address
QEQE

Definition at line 198 of file JFitK40.hh.

199  {
200  parameters[pmt].QE = QE;
201  }
Double_t QE
quantum efficiency [unit]
Definition: JFitK40.hh:52
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
Double_t JCALIBRATE::JFitK40Parameters::getTTS ( const int  pmt) const
inlineinherited

Get time resolution of given PMT.

Parameters
pmtpmt address
Returns
TTS [ns]

Definition at line 210 of file JFitK40.hh.

211  {
212  return parameters[pmt].TTS;
213  }
Double_t TTS
transition-time spread [ns]
Definition: JFitK40.hh:53
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
void JCALIBRATE::JFitK40Parameters::setTTS ( const int  pmt,
const Double_t  TTS 
)
inlineinherited

Set time resolution of given PMT.

Parameters
pmtpmt address
TTSTTS [ns]

Definition at line 222 of file JFitK40.hh.

223  {
224  parameters[pmt].TTS = TTS;
225  }
Double_t TTS
transition-time spread [ns]
Definition: JFitK40.hh:53
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
void JCALIBRATE::JFitK40Parameters::setT0 ( const int  pmt,
const Double_t  t0 
)
inlineinherited

Set time offset of given PMT.

Parameters
pmtpmt address
t0time offset [ns]

Definition at line 248 of file JFitK40.hh.

249  {
250  parameters[pmt].t0 = t0;
251  }
Double_t t0
time offset [ns]
Definition: JFitK40.hh:54
JPMTParameters_t parameters[NUMBER_OF_PMTS]
Definition: JFitK40.hh:264
const JPMT& JDETECTOR::JModule::getPMT ( const int  index) const
inlineinherited

Get PMT.

Parameters
indexreadout channel (TDC)
Returns
PMT at given index

Definition at line 141 of file JModule.hh.

142  {
143  return at(index);
144  }
JPMT& JDETECTOR::JModule::getPMT ( const int  index)
inlineinherited

Get PMT.

Parameters
indexreadout channel (TDC)
Returns
PMT at given index

Definition at line 153 of file JModule.hh.

154  {
155  return at(index);
156  }
void JDETECTOR::JModule::compile ( )
inlineinherited

Compile position of module from the positions of the PMTs.

Definition at line 162 of file JModule.hh.

163  {
164  if (!empty()) {
165 
166  JPosition3D pos;
167 
168  for (iterator i = begin(); i != end(); ++i) {
169  pos.add(i->getPosition());
170  }
171 
172  static_cast<JPosition3D&>(*this) = pos.div(size());
173  }
174  }
JPosition3D()
Default constructor.
Definition: JPosition3D.hh:47
void JDETECTOR::JModule::rotate ( const JRotation3D R)
inlineinherited

Rotate module.

Parameters
Rrotation matrix

Definition at line 182 of file JModule.hh.

183  {
184  static_cast<JPosition3D&>(*this).rotate(R);
185 
186  for (iterator i = this->begin(); i != this->end(); ++i) {
187  i->rotate(R);
188  }
189  }
JPosition3D()
Default constructor.
Definition: JPosition3D.hh:47
JPosition3D& JGEOMETRY3D::JPosition3D::rotate ( const JRotation3X R)
inlineinherited

Rotate around X-axis.

Parameters
Rrotation matrix
Returns
this position

Definition at line 213 of file JPosition3D.hh.

214  {
215  R.rotate(__y, __z);
216 
217  return *this;
218  }
void rotate(double &__x, double &__y) const
Rotate.
Definition: JRotation2D.hh:96
JPosition3D& JGEOMETRY3D::JPosition3D::rotate ( const JRotation3Y R)
inlineinherited

Rotate around Y-axis.

Parameters
Rrotation matrix
Returns
this position

Definition at line 241 of file JPosition3D.hh.

242  {
243  R.rotate(__x, __z);
244 
245  return *this;
246  }
void rotate(double &__x, double &__y) const
Rotate.
Definition: JRotation2D.hh:96
JPosition3D& JGEOMETRY3D::JPosition3D::rotate ( const JRotation3Z R)
inlineinherited

Rotate around Z-axis.

Parameters
Rrotation matrix
Returns
this position

Definition at line 269 of file JPosition3D.hh.

270  {
271  R.rotate(__x, __y);
272 
273  return *this;
274  }
void rotate(double &__x, double &__y) const
Rotate.
Definition: JRotation2D.hh:96
JPosition3D& JGEOMETRY3D::JPosition3D::rotate ( const JQuaternion3D Q)
inlineinherited

Rotate.

Parameters
Qquaternion
Returns
this position

Definition at line 297 of file JPosition3D.hh.

298  {
299  JQuaternion3D b(Q);
300  JQuaternion3D a;
301 
302  a.mul(getPosition(), b.conjugate());
303 
304  setPosition(b.mul(Q,a));
305 
306  return *this;
307  }
JQuaternion3D & mul(const double factor)
Scale quaternion.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
Data structure for quaternion in three dimensions.
void setPosition(const JVector3D &pos)
Set position.
Definition: JPosition3D.hh:151
void JDETECTOR::JModule::rotate_back ( const JRotation3D R)
inlineinherited

Rotate back module.

Parameters
Rrotation matrix

Definition at line 197 of file JModule.hh.

198  {
199  static_cast<JPosition3D&>(*this).rotate_back(R);
200 
201  for (iterator i = this->begin(); i != this->end(); ++i) {
202  i->rotate_back(R);
203  }
204  }
JPosition3D()
Default constructor.
Definition: JPosition3D.hh:47
JPosition3D& JGEOMETRY3D::JPosition3D::rotate_back ( const JRotation3X R)
inlineinherited

Rotate back around X-axis.

Parameters
Rrotation matrix
Returns
this position

Definition at line 227 of file JPosition3D.hh.

228  {
229  R.rotate_back(__y, __z);
230 
231  return *this;
232  }
void rotate_back(double &__x, double &__y) const
Rotate back.
Definition: JRotation2D.hh:112
JPosition3D& JGEOMETRY3D::JPosition3D::rotate_back ( const JRotation3Y R)
inlineinherited

Rotate back around Y-axis.

Parameters
Rrotation matrix
Returns
this position

Definition at line 255 of file JPosition3D.hh.

256  {
257  R.rotate_back(__x, __z);
258 
259  return *this;
260  }
void rotate_back(double &__x, double &__y) const
Rotate back.
Definition: JRotation2D.hh:112
JPosition3D& JGEOMETRY3D::JPosition3D::rotate_back ( const JRotation3Z R)
inlineinherited

Rotate back around Z-axis.

Parameters
Rrotation matrix
Returns
this position

Definition at line 283 of file JPosition3D.hh.

284  {
285  R.rotate_back(__x, __y);
286 
287  return *this;
288  }
void rotate_back(double &__x, double &__y) const
Rotate back.
Definition: JRotation2D.hh:112
void JDETECTOR::JModule::transform ( const JRotation3D R,
const JVector3D pos 
)
inlineinherited

Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&, const JVector3D&)).

Parameters
Rrotation matrix
posposition of origin (after rotation)

Definition at line 213 of file JModule.hh.

215  {
216  static_cast<JPosition3D&>(*this).transform(R, pos);
217 
218  for (iterator i = this->begin(); i != this->end(); ++i) {
219  i->transform(R, pos);
220  }
221  }
JPosition3D()
Default constructor.
Definition: JPosition3D.hh:47
void JDETECTOR::JModule::transform ( const JTransformation3D T)
inlineinherited

Transformation of geometry.

Parameters
Ttransformation

Definition at line 229 of file JModule.hh.

230  {
231  static_cast<JPosition3D&>(*this).transform(T.getRotation(), T.getPosition());
232 
233  for (iterator i = this->begin(); i != this->end(); ++i) {
234  i->transform(T);
235  }
236  }
JPosition3D()
Default constructor.
Definition: JPosition3D.hh:47
JVector3D& JGEOMETRY3D::JVector3D::transform ( const JMatrix3D T)
inlineinherited

Transform.

Parameters
Tmatrix
Returns
this vector

Definition at line 204 of file JVector3D.hh.

205  {
206  T.transform(__x, __y, __z);
207 
208  return *this;
209  }
JModule& JDETECTOR::JModule::set ( const JVector3D pos)
inlineinherited

Set position.

Parameters
posposition
Returns
this module

Definition at line 245 of file JModule.hh.

246  {
247  return add(pos - static_cast<JPosition3D&>(*this));
248  }
JModule & add(const JVector3D &pos)
Add position.
Definition: JModule.hh:257
JModule& JDETECTOR::JModule::set ( const double  t0)
inlineinherited

Set time offset.

Parameters
t0time offset [ns]
Returns
this module

Definition at line 293 of file JModule.hh.

294  {
295  for (iterator i = begin(); i != end(); ++i) {
296  i->setT0(t0);
297  }
298 
299  return *this;
300  }
JModule& JDETECTOR::JModule::add ( const JVector3D pos)
inlineinherited

Add position.

Parameters
posposition
Returns
this module

Definition at line 257 of file JModule.hh.

258  {
259  for (iterator i = begin(); i != end(); ++i) {
260  i->add(pos);
261  }
262 
263  JVector3D::add(pos);
264 
265  return *this;
266  }
JVector3D & add(const JVector3D &vector)
Add vector.
Definition: JVector3D.hh:140
JModule& JDETECTOR::JModule::add ( const double  t0)
inlineinherited

Add time offset.

Parameters
t0time offset [ns]
Returns
this module

Definition at line 309 of file JModule.hh.

310  {
311  for (iterator i = begin(); i != end(); ++i) {
312  i->addT0(t0);
313  }
314 
315  return *this;
316  }
JModule& JDETECTOR::JModule::sub ( const JVector3D pos)
inlineinherited

Subtract position.

Parameters
posposition
Returns
this module

Definition at line 275 of file JModule.hh.

276  {
277  for (iterator i = begin(); i != end(); ++i) {
278  i->sub(pos);
279  }
280 
281  JVector3D::sub(pos);
282 
283  return *this;
284  }
JVector3D & sub(const JVector3D &vector)
Subtract vector.
Definition: JVector3D.hh:156
JModule& JDETECTOR::JModule::sub ( const double  t0)
inlineinherited

Subtract time offset.

Parameters
t0time offset [ns]
Returns
this module

Definition at line 325 of file JModule.hh.

326  {
327  for (iterator i = begin(); i != end(); ++i) {
328  i->subT0(t0);
329  }
330 
331  return *this;
332  }
JModule& JDETECTOR::JModule::operator+= ( const JVector3D pos)
inlineinherited

Add position.

Parameters
posposition
Returns
this module

Definition at line 341 of file JModule.hh.

342  {
343  return this->add(pos);
344  }
JModule & add(const JVector3D &pos)
Add position.
Definition: JModule.hh:257
JModule& JDETECTOR::JModule::operator-= ( const JVector3D pos)
inlineinherited

Subtract position.

Parameters
posposition
Returns
this module

Definition at line 353 of file JModule.hh.

354  {
355  return this->sub(pos);
356  }
JModule & sub(const JVector3D &pos)
Subtract position.
Definition: JModule.hh:275
int JLANG::JObjectID::getID ( ) const
inlineinherited

Get identifier.

Returns
identifier

Definition at line 54 of file JObjectID.hh.

55  {
56  return __id;
57  }
void JLANG::JObjectID::setID ( const int  id)
inlineinherited

Set identifier.

Parameters
ididentifier

Definition at line 65 of file JObjectID.hh.

66  {
67  this->__id = id;
68  }
bool JLANG::JObjectID::less ( const JObjectID object) const
inlineinherited

Less than method.

Parameters
objectobject identifier
Returns
true if this identifier less than given identifier; else false

Definition at line 77 of file JObjectID.hh.

78  {
79  return this->getID() < object.getID();
80  }
int getID() const
Get identifier.
Definition: JObjectID.hh:54
bool JLANG::JObjectID::less ( const int  id) const
inlineinherited

Less than method.

Parameters
ididentifier
Returns
true if this identifier less than given identifier; else false

Definition at line 89 of file JObjectID.hh.

90  {
91  return this->getID() < id;
92  }
int getID() const
Get identifier.
Definition: JObjectID.hh:54
bool JDETECTOR::JModuleLocation::less ( const JModuleLocation location) const
inlineinherited

Less than method.

Parameters
locationmodule location
Returns
true if first location before second location; else false

Definition at line 156 of file JModuleLocation.hh.

157  {
158  if (this->getString() == location.getString())
159  return this->getFloor() < location.getFloor();
160  else
161  return this->getString() < location.getString();
162  }
int getFloor() const
Get floor number.
int getString() const
Get string number.
bool JLANG::JObjectID::more ( const int  id) const
inlineinherited

More than method.

Parameters
ididentifier
Returns
true if this identifier greater than given identifier; else false

Definition at line 101 of file JObjectID.hh.

102  {
103  return this->getID() > id;
104  }
int getID() const
Get identifier.
Definition: JObjectID.hh:54
const JModuleLocation& JDETECTOR::JModuleLocation::getLocation ( ) const
inlineinherited

Get location.

Returns
location

Definition at line 68 of file JModuleLocation.hh.

69  {
70  return static_cast<const JModuleLocation&>(*this);
71  }
Logical location of module.
JModuleLocation& JDETECTOR::JModuleLocation::getLocation ( )
inlineinherited

Get location.

Returns
location

Definition at line 79 of file JModuleLocation.hh.

80  {
81  return static_cast<JModuleLocation&>(*this);
82  }
Logical location of module.
void JDETECTOR::JModuleLocation::setLocation ( const JModuleLocation location)
inlineinherited

Set location.

Parameters
locationlocation

Definition at line 90 of file JModuleLocation.hh.

91  {
92  static_cast<JModuleLocation&>(*this) = location;
93  }
Logical location of module.
std::string JDETECTOR::JModuleLocation::toString ( ) const
inlineinherited

Convert module location to string.

Returns
string

Definition at line 101 of file JModuleLocation.hh.

102  {
103  return toString("% %");
104  }
std::string toString() const
Convert module location to string.
std::string JDETECTOR::JModuleLocation::toString ( const std::string &  fmt,
const std::string  target = "%" 
) const
inlineinherited

Convert module loation to string.

The targets target in the format string fmt are consecutively replaced by floor and string.

Parameters
fmtformat
targettarget
Returns
string

Definition at line 117 of file JModuleLocation.hh.

118  {
119  JLANG::JString buffer(fmt);
120 
121  buffer.replace(target, string, 1);
122  buffer.replace(target, floor, 1);
123 
124  return buffer;
125  }
Wrapper class around STL string class.
Definition: JString.hh:28
int JDETECTOR::JModuleLocation::getString ( ) const
inlineinherited

Get string number.

Returns
string number

Definition at line 133 of file JModuleLocation.hh.

134  {
135  return string;
136  }
int JDETECTOR::JModuleLocation::getFloor ( ) const
inlineinherited

Get floor number.

Returns
floor number

Definition at line 144 of file JModuleLocation.hh.

145  {
146  return floor;
147  }
const JPosition3D& JGEOMETRY3D::JPosition3D::getPosition ( ) const
inlineinherited

Get position.

Returns
position

Definition at line 129 of file JPosition3D.hh.

130  {
131  return static_cast<const JPosition3D&>(*this);
132  }
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JPosition3D& JGEOMETRY3D::JPosition3D::getPosition ( )
inlineinherited

Get position.

Returns
position

Definition at line 140 of file JPosition3D.hh.

141  {
142  return static_cast<JPosition3D&>(*this);
143  }
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
void JGEOMETRY3D::JPosition3D::setPosition ( const JVector3D pos)
inlineinherited

Set position.

Parameters
posposition

Definition at line 151 of file JPosition3D.hh.

152  {
153  static_cast<JVector3D&>(*this) = pos;
154  }
Data structure for vector in three dimensions.
Definition: JVector3D.hh:32
JGEOMETRY3D::JPosition3D::operator JAngle3D ( ) const
inlineinherited

Type conversion operator.

Returns
angle

Definition at line 162 of file JPosition3D.hh.

163  {
164  return JAngle3D(getX(), getY(), getZ());
165  }
Data structure for angles in three dimensions.
Definition: JAngle3D.hh:30
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
JGEOMETRY3D::JPosition3D::operator JVersor3D ( ) const
inlineinherited

Type conversion operator.

Returns
direction

Definition at line 173 of file JPosition3D.hh.

174  {
175  return JVersor3D(getX(), getY(), getZ());
176  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
Data structure for normalised vector in three dimensions.
Definition: JVersor3D.hh:23
double getZ() const
Get z position.
Definition: JVector3D.hh:113
void JGEOMETRY3D::JPosition3D::transform_back ( const JRotation3D R,
const JVector3D pos 
)
inlineinherited

Transform back position.

The final position is obtained as follows:

  1. offset position with position pos;
  2. rotation of postion according matrix R;
Parameters
Rrotation matrix
posposition of origin (before rotation)

Definition at line 349 of file JPosition3D.hh.

351  {
352  // offset with respect to origin
353 
354  add(pos);
355 
356  // rotate back geometry to system with particle direction along z-axis
357 
358  rotate_back(R);
359  }
JPosition3D & rotate_back(const JRotation3D &R)
Rotate back.
Definition: JPosition3D.hh:199
JVector3D & add(const JVector3D &vector)
Add vector.
Definition: JVector3D.hh:140
double JGEOMETRY3D::JPosition3D::getDot ( const JAngle3D angle) const
inlineinherited

Get dot product.

Parameters
angleangle
Returns
dot product

Definition at line 368 of file JPosition3D.hh.

369  {
370  return
371  getX() * angle.getDX() +
372  getY() * angle.getDY() +
373  getZ() * angle.getDZ();
374  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double getDX() const
Get x direction.
Definition: JAngle3D.hh:105
double getDZ() const
Get z direction.
Definition: JAngle3D.hh:127
double getDY() const
Get y direction.
Definition: JAngle3D.hh:116
double JGEOMETRY3D::JPosition3D::getDot ( const JVersor3D dir) const
inlineinherited

Get dot product.

Parameters
dirdirection
Returns
dot product

Definition at line 383 of file JPosition3D.hh.

384  {
385  return
386  getX() * dir.getDX() +
387  getY() * dir.getDY() +
388  getZ() * dir.getDZ();
389  }
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
double JGEOMETRY3D::JPosition3D::getDot ( const JVersor3Z dir) const
inlineinherited

Get dot product.

Parameters
dirdirection
Returns
dot product

Definition at line 398 of file JPosition3D.hh.

399  {
400  return
401  getX() * dir.getDX() +
402  getY() * dir.getDY() +
403  getZ() * dir.getDZ();
404  }
double getDY() const
Get y direction.
Definition: JVersor3Z.hh:155
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getDX() const
Get x direction.
Definition: JVersor3Z.hh:144
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getDZ() const
Get z direction.
Definition: JVersor3Z.hh:166
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double JGEOMETRY3D::JVector3D::getDot ( const JVector3D vector) const
inlineinherited

Get dot product.

Parameters
vectorvector
Returns
dot product

Definition at line 278 of file JVector3D.hh.

279  {
280  return
281  getX() * vector.getX() +
282  getY() * vector.getY() +
283  getZ() * vector.getZ();
284  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
JGEOMETRY3D::JVector3D::operator JVector2D ( ) const
inlineinherited

Type conversion operator.

Returns
JVector2D

Definition at line 81 of file JVector3D.hh.

82  {
83  return JVector2D(this->getX(), this->getY());
84  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double JGEOMETRY3D::JVector3D::getX ( ) const
inlineinherited

Get x position.

Returns
x position

Definition at line 92 of file JVector3D.hh.

93  {
94  return __x;
95  }
double JGEOMETRY3D::JVector3D::getY ( ) const
inlineinherited

Get y position.

Returns
y position

Definition at line 102 of file JVector3D.hh.

103  {
104  return __y;
105  }
double JGEOMETRY3D::JVector3D::getZ ( ) const
inlineinherited

Get z position.

Returns
z position

Definition at line 113 of file JVector3D.hh.

114  {
115  return __z;
116  }
JVector3D& JGEOMETRY3D::JVector3D::negate ( )
inlineinherited

Negate vector.

Returns
this vector

Definition at line 124 of file JVector3D.hh.

125  {
126  __x = -__x;
127  __y = -__y;
128  __z = -__z;
129 
130  return *this;
131  }
JVector3D& JGEOMETRY3D::JVector3D::mul ( const double  factor)
inlineinherited

Scale vector.

Parameters
factormultiplication factor
Returns
this vector

Definition at line 172 of file JVector3D.hh.

173  {
174  __x *= factor;
175  __y *= factor;
176  __z *= factor;
177 
178  return *this;
179  }
JVector3D & JMATH::JMath< JVector3D , JNullType >::mul ( const JNullType object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 273 of file JMath.hh.

274  {
275  return static_cast<JFirst_t&>(*this) = JCalculator<JFirst_t>::calculator.mul(static_cast<const JFirst_t&>(*this), object);
276  }
Auxiliary class for product evaluation of objects.
Definition: JCalculator.hh:18
JVector3D& JGEOMETRY3D::JVector3D::div ( const double  factor)
inlineinherited

Scale vector.

Parameters
factordivision factor
Returns
this vector

Definition at line 188 of file JVector3D.hh.

189  {
190  __x /= factor;
191  __y /= factor;
192  __z /= factor;
193 
194  return *this;
195  }
bool JGEOMETRY3D::JVector3D::equals ( const JVector3D vector) const
inlineinherited

Check equality.

Parameters
vectorvector
Returns
true if vectors are equal; else false

Definition at line 218 of file JVector3D.hh.

219  {
220  return (getX() == vector.getX() &&
221  getY() == vector.getY() &&
222  getZ() == vector.getZ());
223  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double JGEOMETRY3D::JVector3D::getLengthSquared ( ) const
inlineinherited

Get length squared.

Returns
square of length

Definition at line 231 of file JVector3D.hh.

232  {
233  return getX()*getX() + getY()*getY() + getZ()*getZ();
234  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double JGEOMETRY3D::JVector3D::getLength ( ) const
inlineinherited

Get length.

Returns
length

Definition at line 242 of file JVector3D.hh.

243  {
244  return sqrt(getLengthSquared());
245  }
double getLengthSquared() const
Get length squared.
Definition: JVector3D.hh:231
double JGEOMETRY3D::JVector3D::getDistanceSquared ( const JVector3D pos) const
inlineinherited

Get squared of distance to point.

Parameters
posposition
Returns
square of distance

Definition at line 254 of file JVector3D.hh.

255  {
256  return JVector3D(pos).sub(*this).getLengthSquared();
257  }
JVector3D()
Default constructor.
Definition: JVector3D.hh:39
double JGEOMETRY3D::JVector3D::getDistance ( const JVector3D pos) const
inlineinherited

Get distance to point.

Parameters
posposition
Returns
distance

Definition at line 266 of file JVector3D.hh.

267  {
268  return sqrt(getDistanceSquared(pos));
269  }
double getDistanceSquared(const JVector3D &pos) const
Get squared of distance to point.
Definition: JVector3D.hh:254
JVector3D& JGEOMETRY3D::JVector3D::cross ( const JVector3D first,
const JVector3D second 
)
inlineinherited

Get cross product.

Note that this vector should not overlap with the first or second vector,

Parameters
firstfirst vector
secondsecond vector
Returns
this vector

Definition at line 295 of file JVector3D.hh.

297  {
298  __x = first .getY() * second.getZ() - second.getY() * first .getZ();
299  __y = second.getX() * first .getZ() - first .getX() * second.getZ();
300  __z = first .getX() * second.getY() - second.getX() * first .getY();
301 
302  return *this;
303  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
void JTOOLS::JCombinatorics::configure ( const int  numberOfIndices)
inlineinherited

Configure.

Parameters
numberOfIndicesnumber of indices

Definition at line 54 of file JCombinatorics.hh.

55  {
56  zbuf1D.clear();
57 
58  zbuf2D.resize(numberOfIndices);
59 
60  for (int i = 0; i != numberOfIndices; ++i) {
61  zbuf2D[i].resize(numberOfIndices);
62  }
63 
64  for (int i = 0; i != numberOfIndices; ++i) {
65 
66  zbuf2D[i][i] = -1;
67 
68  for (int j = i; ++j != numberOfIndices; ) {
69 
70  zbuf2D[i][j] = zbuf1D.size();
71  zbuf2D[j][i] = zbuf1D.size();
72 
73  zbuf1D.push_back(pair_type(i,j));
74  }
75  }
76  }
std::vector< std::vector< int > > zbuf2D
std::pair< int, int > pair_type
Data structure for a pair of indices.
std::vector< pair_type > zbuf1D
unsigned int JTOOLS::JCombinatorics::getNumberOfIndices ( ) const
inlineinherited

Get number of indices.

Returns
number of indices

Definition at line 84 of file JCombinatorics.hh.

85  {
86  return zbuf2D.size();
87  }
std::vector< std::vector< int > > zbuf2D
unsigned int JTOOLS::JCombinatorics::getNumberOfPairs ( ) const
inlineinherited

Get number of pairs.

Returns
number of pairs

Definition at line 95 of file JCombinatorics.hh.

96  {
97  return zbuf1D.size();
98  }
std::vector< pair_type > zbuf1D
int JTOOLS::JCombinatorics::getIndex ( const int  first,
const int  second 
) const
inlineinherited

Get index of pair of indices.

Parameters
firstfirst address
secondsecond address
Returns
index (-1 if first and second address are equal)

Definition at line 108 of file JCombinatorics.hh.

109  {
110  return zbuf2D[first][second];
111  }
std::vector< std::vector< int > > zbuf2D
const pair_type& JTOOLS::JCombinatorics::getPair ( const int  index) const
inlineinherited

Get pair of indices for given index.

Parameters
indexindex
Returns
pair of indices

Definition at line 120 of file JCombinatorics.hh.

121  {
122  return zbuf1D[index];
123  }
std::vector< pair_type > zbuf1D
template<class JComparator_t >
void JTOOLS::JCombinatorics::sort ( JComparator_t  comparator)
inlineinherited

Sort address pairs.

Parameters
comparatorcomparator for pairs

Definition at line 132 of file JCombinatorics.hh.

133  {
134  std::stable_sort(zbuf1D.begin(), zbuf1D.end(), comparator);
135 
136  for (int i = 0; i != (int) zbuf1D.size(); ++i) {
137 
138  const pair_type pair = zbuf1D[i];
139 
140  zbuf2D[pair.first][pair.second] = i;
141  zbuf2D[pair.second][pair.first] = i;
142  }
143 
144  for (int i = 0; i != (int) zbuf2D.size(); ++i) {
145  zbuf2D[i][i] = -1;
146  }
147  }
std::vector< std::vector< int > > zbuf2D
std::pair< int, int > pair_type
Data structure for a pair of indices.
std::vector< pair_type > zbuf1D
static int JTOOLS::JCombinatorics::getSign ( const int  first,
const int  second 
)
inlinestaticinherited

Sign of pair of indices.

Parameters
firstfirst address
secondsecond address
Returns
+1 if second >= first; else -1

Definition at line 157 of file JCombinatorics.hh.

158  {
159  return (second >= first ? +1 : -1);
160  }
static int JTOOLS::JCombinatorics::getSign ( const pair_type pair)
inlinestaticinherited

Sign of pair of indices.

Parameters
pairpair of indices
Returns
+1 if second >= first; else -1

Definition at line 169 of file JCombinatorics.hh.

170  {
171  return getSign(pair.first, pair.second);
172  }
static int getSign(const int first, const int second)
Sign of pair of indices.

Member Data Documentation

Double_t JCALIBRATE::JFitK40::sigmaK40_ns
private

intrinsic K40 arrival time spread [ns]

Definition at line 647 of file JFitK40.hh.

int JCALIBRATE::JFitK40::index_of_average_t0
private

index of t0 used for average time offset

Definition at line 648 of file JFitK40.hh.

bool JCALIBRATE::JFitK40::disable[NUMBER_OF_PMTS]
private

disable PMT from fit

Definition at line 649 of file JFitK40.hh.

Double_t JCALIBRATE::JFitK40Parameters::Rate_Hz
inherited

maximal coincidence rate [Hz]

Definition at line 256 of file JFitK40.hh.

Double_t JCALIBRATE::JFitK40Parameters::p1
inherited

angle dependence coincidence rate

Definition at line 257 of file JFitK40.hh.

Double_t JCALIBRATE::JFitK40Parameters::p2
inherited

angle dependence coincidence rate

Definition at line 258 of file JFitK40.hh.

Double_t JCALIBRATE::JFitK40Parameters::p3
inherited

angle dependence coincidence rate

Definition at line 259 of file JFitK40.hh.

Double_t JCALIBRATE::JFitK40Parameters::p4
inherited

angle dependence coincidence rate

Definition at line 260 of file JFitK40.hh.

Double_t JCALIBRATE::JFitK40Parameters::bg
inherited

remaining constant background

Definition at line 261 of file JFitK40.hh.

Double_t JCALIBRATE::JFitK40Parameters::cc
inherited

fraction of signal correlated background

Definition at line 262 of file JFitK40.hh.

JPMTParameters_t JCALIBRATE::JFitK40Parameters::parameters[NUMBER_OF_PMTS]
inherited

Definition at line 264 of file JFitK40.hh.

int JLANG::JObjectID::__id
protectedinherited

Definition at line 159 of file JObjectID.hh.

int JDETECTOR::JModuleLocation::string
protectedinherited

Definition at line 233 of file JModuleLocation.hh.

int JDETECTOR::JModuleLocation::floor
protectedinherited

Definition at line 234 of file JModuleLocation.hh.

double JGEOMETRY3D::JVector3D::__x
protectedinherited

Definition at line 306 of file JVector3D.hh.

double JGEOMETRY3D::JVector3D::__y
protectedinherited

Definition at line 307 of file JVector3D.hh.

double JGEOMETRY3D::JVector3D::__z
protectedinherited

Definition at line 308 of file JVector3D.hh.

std::vector<pair_type> JTOOLS::JCombinatorics::zbuf1D
protectedinherited

Definition at line 176 of file JCombinatorics.hh.

std::vector<std::vector<int> > JTOOLS::JCombinatorics::zbuf2D
protectedinherited

Definition at line 177 of file JCombinatorics.hh.


The documentation for this struct was generated from the following file: