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

Auxiliary data structure to customize quantum efficiency. More...

#include <JPDFSupportkit.hh>

Inheritance diagram for JPHYSICS::JQE:
JPHYSICS::JQE_t std::map< std::string, JQE_t::pF >

Public Types

typedef double(*) pF(const double)
 

Public Member Functions

 JQE ()
 Default constructor.
 

Static Public Member Functions

static double getQE (const double lambda)
 Get quantum efficiency.
 
static double & get_factor ()
 Get reference to multiplication factor.
 
static pFget_function ()
 Get reference to global functon.
 

Friends

std::istream & operator>> (std::istream &in, JQE &scattering)
 Read quantum efficiency from input stream.
 
std::ostream & operator<< (std::ostream &out, const JQE &scattering)
 Write quantum efficiency to output stream.
 

Detailed Description

Auxiliary data structure to customize quantum efficiency.

Definition at line 379 of file JPDFSupportkit.hh.

Member Typedef Documentation

◆ pF

double(*) JPHYSICS::JQE_t::pF(const double)
inherited

Definition at line 372 of file JPDFSupportkit.hh.

Constructor & Destructor Documentation

◆ JQE()

JPHYSICS::JQE::JQE ( )
inline

Default constructor.

Definition at line 386 of file JPDFSupportkit.hh.

387 {
388 (*this)["default"] = NAMESPACE::getQE;
389 }
double getQE(const double lambda)

Member Function Documentation

◆ getQE()

static double JPHYSICS::JQE::getQE ( const double lambda)
inlinestatic

Get quantum efficiency.

Parameters
lambdawavelength of light [nm]
Returns
quantum efficiency [m]

Definition at line 442 of file JPDFSupportkit.hh.

443 {
444 return get_factor() * (*get_function())(lambda);
445 }
static double & get_factor()
Get reference to multiplication factor.
static pF & get_function()
Get reference to global functon.

◆ get_factor()

static double & JPHYSICS::JQE::get_factor ( )
inlinestatic

Get reference to multiplication factor.

Returns
factor

Definition at line 453 of file JPDFSupportkit.hh.

454 {
455 static double factor = 1.0;
456
457 return factor;
458 }

◆ get_function()

static pF & JPHYSICS::JQE::get_function ( )
inlinestatic

Get reference to global functon.

Returns
function

Definition at line 466 of file JPDFSupportkit.hh.

467 {
468 static pF f1 = NAMESPACE::getQE;
469
470 return f1;
471 }
double(*) pF(const double)

Friends And Related Symbol Documentation

◆ operator>>

std::istream & operator>> ( std::istream & in,
JQE & scattering )
friend

Read quantum efficiency from input stream.

Parameters
ininput stream
scatteringquantum efficiency
Returns
input stream

Definition at line 399 of file JPDFSupportkit.hh.

400 {
401 using namespace std;
402
403 for (string option; in >> option >> JQE::get_factor(); ) {
404
405 JQE::const_iterator p = scattering.find(option);
406
407 if (p != scattering.end())
408 JQE::get_function() = p->second;
409 else
410 in.setstate(ios_base::badbit);
411 }
412
413 return in;
414 }

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JQE & scattering )
friend

Write quantum efficiency to output stream.

Parameters
outoutput stream
scatteringquantum efficiency
Returns
output stream

Definition at line 424 of file JPDFSupportkit.hh.

425 {
426 for (const_iterator i = scattering.begin(); i != scattering.end(); ++i) {
427 if (i->second == JQE::get_function()) {
428 out << i->first << ' ';
429 }
430 }
431
432 return out << JQE::get_factor();
433 }

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