Jpp 21.0.0-rc.1
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 472 of file JFitK40.hh.

Constructor & Destructor Documentation

◆ JPMTParameters_t()

JCALIBRATE::JPMTParameters_t::JPMTParameters_t ( )
inline

Default constructor.

Definition at line 481 of file JFitK40.hh.

482 {
483 reset();
484 }

Member Function Documentation

◆ getInstance()

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

Get default values.

Returns
parameters

Definition at line 492 of file JFitK40.hh.

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

◆ reset()

void JCALIBRATE::JPMTParameters_t::reset ( )
inline

Reset.

Definition at line 512 of file JFitK40.hh.

513 {
514 status = true;
515
516 QE .set(0.0);
517 TTS.set(0.0);
518 t0 .set(0.0);
519 bg .set(0.0);
520 }
void set()
Set current value.
Definition JFitK40.hh:275
JParameter_t t0
time offset [ns]
Definition JFitK40.hh:602
JParameter_t TTS
transition-time spread [ns]
Definition JFitK40.hh:601
JParameter_t bg
background [Hz/ns]
Definition JFitK40.hh:603
JParameter_t QE
relative quantum efficiency [unit]
Definition JFitK40.hh:600

◆ set()

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

Set parameters that are free to given values.

Parameters
parametersparameters

Definition at line 528 of file JFitK40.hh.

529 {
530 if (QE .isFree()) { QE .set(parameters.QE); }
531 if (TTS.isFree()) { TTS.set(parameters.TTS); }
532 if (t0 .isFree()) { t0 .set(parameters.t0); }
533 if (bg .isFree()) { bg .set(parameters.bg); }
534 }
bool isFree() const
Check if parameter is free.
Definition JFitK40.hh:244

◆ getN()

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

Get number of fit parameters.

Returns
number of parameters

Definition at line 542 of file JFitK40.hh.

543 {
544 return ((QE. isFree() ? 1 : 0) +
545 (TTS.isFree() ? 1 : 0) +
546 (t0 .isFree() ? 1 : 0) +
547 (bg .isFree() ? 1 : 0));
548 }

◆ disable()

void JCALIBRATE::JPMTParameters_t::disable ( )
inline

Disable PMT.

Definition at line 554 of file JFitK40.hh.

555 {
556 status = false;
557
558 QE .fix(0.0);
559 TTS.fix(TTS_NS);
560 t0 .fix(0.0);
561 bg .fix(0.0);
562 }
void fix()
Fix current value.
Definition JFitK40.hh:284

◆ enable()

void JCALIBRATE::JPMTParameters_t::enable ( )
inline

Enable PMT.

Definition at line 568 of file JFitK40.hh.

569 {
570 status = true;
571
572 QE .set();
573 TTS.set();
574 t0 .set();
575 bg .set();
576 }

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 586 of file JFitK40.hh.

587 {
588 using namespace std;
589
590 out << "QE " << FIXED(7,3) << object.QE << endl;
591 out << "TTS " << FIXED(7,3) << object.TTS << endl;
592 out << "t0 " << FIXED(7,3) << object.t0 << endl;
593 out << "bg " << FIXED(7,3) << object.bg << endl;
594
595 return out;
596 }
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 474 of file JFitK40.hh.

◆ QE_MAX

double JCALIBRATE::JPMTParameters_t::QE_MAX = 2.0
staticconstexpr

maximal QE

Definition at line 475 of file JFitK40.hh.

◆ TTS_NS

double JCALIBRATE::JPMTParameters_t::TTS_NS = 2.0
staticconstexpr

start value transition-time spread [ns]

Definition at line 476 of file JFitK40.hh.

◆ status

bool JCALIBRATE::JPMTParameters_t::status

status

Definition at line 599 of file JFitK40.hh.

◆ QE

JParameter_t JCALIBRATE::JPMTParameters_t::QE

relative quantum efficiency [unit]

Definition at line 600 of file JFitK40.hh.

◆ TTS

JParameter_t JCALIBRATE::JPMTParameters_t::TTS

transition-time spread [ns]

Definition at line 601 of file JFitK40.hh.

◆ t0

JParameter_t JCALIBRATE::JPMTParameters_t::t0

time offset [ns]

Definition at line 602 of file JFitK40.hh.

◆ bg

JParameter_t JCALIBRATE::JPMTParameters_t::bg

background [Hz/ns]

Definition at line 603 of file JFitK40.hh.


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