Jpp 21.0.0-rc.1-88-g0130508c4
the software that should make you happy
Loading...
Searching...
No Matches
JCALIBRATE::JPMTParameters_t Struct Reference

Fit parameters for single PMT. More...

#include <JFitK40.hh>

Public Member Functions

 JPMTParameters_t ()
 Default constructor.
 
void reset ()
 Reset.
 
void set (const JPMTParameters_t &parameters)
 Set parameters that are free to given values.
 
size_t getN () const
 Get number of fit parameters.
 
void disable ()
 Disable PMT.
 
void enable ()
 Enable PMT.
 

Static Public Member Functions

static const JPMTParameters_tgetInstance ()
 Get default values.
 

Public Attributes

bool status
 status
 
JParameter_t QE
 relative quantum efficiency [unit]
 
JParameter_t TTS
 transition-time spread [ns]
 
JParameter_t t0
 time offset [ns]
 
JParameter_t bg
 background [Hz/ns]
 

Static Public Attributes

static constexpr double QE_MIN = 0.0
 minimal QE
 
static constexpr double QE_MAX = 2.0
 maximal QE
 
static constexpr double TTS_NS = 2.0
 start value transition-time spread [ns]
 

Friends

std::ostream & operator<< (std::ostream &out, const JPMTParameters_t &object)
 Write PMT parameters to output stream.
 

Detailed Description

Fit parameters for single PMT.

Definition at line 475 of file JFitK40.hh.

Constructor & Destructor Documentation

◆ JPMTParameters_t()

JCALIBRATE::JPMTParameters_t::JPMTParameters_t ( )
inline

Default constructor.

Definition at line 484 of file JFitK40.hh.

485 {
486 reset();
487 }

Member Function Documentation

◆ getInstance()

static const JPMTParameters_t & JCALIBRATE::JPMTParameters_t::getInstance ( )
inlinestatic

Get default values.

Returns
parameters

Definition at line 495 of file JFitK40.hh.

496 {
497 static JPMTParameters_t parameters;
498
499 parameters.QE.range = JParameter_t::range_type(QE_MIN, QE_MAX);
500
501 parameters.status = true;
502
503 parameters.QE .set(1.0);
504 parameters.TTS.set(TTS_NS);
505 parameters.t0 .set(0.0);
506 parameters.bg .set(0.0);
507
508 return parameters;
509 }
JTOOLS::JRange< double > range_type
Type definition for range of parameter values.
Definition JFitK40.hh:132
static constexpr double QE_MIN
minimal QE
Definition JFitK40.hh:477
static constexpr double TTS_NS
start value transition-time spread [ns]
Definition JFitK40.hh:479
JPMTParameters_t()
Default constructor.
Definition JFitK40.hh:484
static constexpr double QE_MAX
maximal QE
Definition JFitK40.hh:478

◆ reset()

void JCALIBRATE::JPMTParameters_t::reset ( )
inline

Reset.

Definition at line 515 of file JFitK40.hh.

516 {
517 status = true;
518
519 QE .set(0.0);
520 TTS.set(0.0);
521 t0 .set(0.0);
522 bg .set(0.0);
523 }
void set()
Set current value.
Definition JFitK40.hh:278
JParameter_t t0
time offset [ns]
Definition JFitK40.hh:605
JParameter_t TTS
transition-time spread [ns]
Definition JFitK40.hh:604
JParameter_t bg
background [Hz/ns]
Definition JFitK40.hh:606
JParameter_t QE
relative quantum efficiency [unit]
Definition JFitK40.hh:603

◆ set()

void JCALIBRATE::JPMTParameters_t::set ( const JPMTParameters_t & parameters)
inline

Set parameters that are free to given values.

Parameters
parametersparameters

Definition at line 531 of file JFitK40.hh.

532 {
533 if (QE .isFree()) { QE .set(parameters.QE); }
534 if (TTS.isFree()) { TTS.set(parameters.TTS); }
535 if (t0 .isFree()) { t0 .set(parameters.t0); }
536 if (bg .isFree()) { bg .set(parameters.bg); }
537 }
bool isFree() const
Check if parameter is free.
Definition JFitK40.hh:247

◆ getN()

size_t JCALIBRATE::JPMTParameters_t::getN ( ) const
inline

Get number of fit parameters.

Returns
number of parameters

Definition at line 545 of file JFitK40.hh.

546 {
547 return ((QE. isFree() ? 1 : 0) +
548 (TTS.isFree() ? 1 : 0) +
549 (t0 .isFree() ? 1 : 0) +
550 (bg .isFree() ? 1 : 0));
551 }

◆ disable()

void JCALIBRATE::JPMTParameters_t::disable ( )
inline

Disable PMT.

Definition at line 557 of file JFitK40.hh.

558 {
559 status = false;
560
561 QE .fix(0.0);
562 TTS.fix(TTS_NS);
563 t0 .fix(0.0);
564 bg .fix(0.0);
565 }
void fix()
Fix current value.
Definition JFitK40.hh:287

◆ enable()

void JCALIBRATE::JPMTParameters_t::enable ( )
inline

Enable PMT.

Definition at line 571 of file JFitK40.hh.

572 {
573 status = true;
574
575 QE .set();
576 TTS.set();
577 t0 .set();
578 bg .set();
579 }

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JPMTParameters_t & object )
friend

Write PMT parameters to output stream.

Parameters
outoutput stream
objectPMT parameters
Returns
output stream

Definition at line 589 of file JFitK40.hh.

590 {
591 using namespace std;
592
593 out << "QE " << FIXED(7,3) << object.QE << endl;
594 out << "TTS " << FIXED(7,3) << object.TTS << endl;
595 out << "t0 " << FIXED(7,3) << object.t0 << endl;
596 out << "bg " << FIXED(7,3) << object.bg << endl;
597
598 return out;
599 }
Auxiliary data structure for floating point format specification.
Definition JManip.hh:448

Member Data Documentation

◆ QE_MIN

double JCALIBRATE::JPMTParameters_t::QE_MIN = 0.0
staticconstexpr

minimal QE

Definition at line 477 of file JFitK40.hh.

◆ QE_MAX

double JCALIBRATE::JPMTParameters_t::QE_MAX = 2.0
staticconstexpr

maximal QE

Definition at line 478 of file JFitK40.hh.

◆ TTS_NS

double JCALIBRATE::JPMTParameters_t::TTS_NS = 2.0
staticconstexpr

start value transition-time spread [ns]

Definition at line 479 of file JFitK40.hh.

◆ status

bool JCALIBRATE::JPMTParameters_t::status

status

Definition at line 602 of file JFitK40.hh.

◆ QE

JParameter_t JCALIBRATE::JPMTParameters_t::QE

relative quantum efficiency [unit]

Definition at line 603 of file JFitK40.hh.

◆ TTS

JParameter_t JCALIBRATE::JPMTParameters_t::TTS

transition-time spread [ns]

Definition at line 604 of file JFitK40.hh.

◆ t0

JParameter_t JCALIBRATE::JPMTParameters_t::t0

time offset [ns]

Definition at line 605 of file JFitK40.hh.

◆ bg

JParameter_t JCALIBRATE::JPMTParameters_t::bg

background [Hz/ns]

Definition at line 606 of file JFitK40.hh.


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