Jpp  pmt_effective_area_update
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
JFIT::JK40Hit Struct Reference

Auxiliary class for simultaneously handling light yields and response of module. More...

#include <JK40Hit.hh>

Inheritance diagram for JFIT::JK40Hit:
KM3NETDAQ::JDAQModuleIdentifier JFIT::JK40

Public Types

typedef std::vector< double > JL1_t
 Type definition of expectation values of number of multiple hits. More...
 

Public Member Functions

 JK40Hit ()
 Default constructor. More...
 
 JK40Hit (const JDAQModuleIdentifier &id, const JK40 &k40, const size_t n)
 Constructor. More...
 
size_t getN () const
 Get number of hits. More...
 
double getP () const
 Get probability. More...
 
const JDAQModuleIdentifiergetModuleIdentifier () const
 Get Module identifier. More...
 
void setModuleIdentifier (const JDAQModuleIdentifier &module)
 Set Module identifier. More...
 
int getModuleID () const
 Get module identifier. More...
 
 ClassDefNV (JDAQModuleIdentifier, 1)
 
double getY0 () const
 Get expectation value for number of single hits. More...
 
double getY1 (const size_t M) const
 Get expectation value for number of multiple hits. More...
 
double getP (size_t M) const
 Get probability to observe a hit with given multiplicity. More...
 

Protected Attributes

size_t __n
 
int id
 
double __y0
 expectation value of number of single hits More...
 
JL1_t __y1
 expectation values of number of multiple hits More...
 

Detailed Description

Auxiliary class for simultaneously handling light yields and response of module.

Definition at line 23 of file JK40Hit.hh.

Member Typedef Documentation

typedef std::vector<double> JFIT::JK40::JL1_t
inherited

Type definition of expectation values of number of multiple hits.

Definition at line 33 of file JK40.hh.

Constructor & Destructor Documentation

JFIT::JK40Hit::JK40Hit ( )
inline

Default constructor.

Definition at line 32 of file JK40Hit.hh.

32  :
34  JK40(),
35  __n (0)
36  {}
JDAQModuleIdentifier()
Default constructor.
JK40()
Default constructor.
Definition: JK40.hh:39
size_t __n
Definition: JK40Hit.hh:77
JFIT::JK40Hit::JK40Hit ( const JDAQModuleIdentifier id,
const JK40 k40,
const size_t  n 
)
inline

Constructor.

Parameters
idmodule identifier
k40k40
nnumber of hits

Definition at line 46 of file JK40Hit.hh.

48  :
50  JK40(k40),
51  __n (n)
52  {}
JDAQModuleIdentifier()
Default constructor.
JK40()
Default constructor.
Definition: JK40.hh:39
alias put_queue eval echo n
Definition: qlib.csh:19
size_t __n
Definition: JK40Hit.hh:77

Member Function Documentation

size_t JFIT::JK40Hit::getN ( ) const
inline

Get number of hits.

Returns
number of hits

Definition at line 60 of file JK40Hit.hh.

61  {
62  return __n;
63  }
size_t __n
Definition: JK40Hit.hh:77
double JFIT::JK40Hit::getP ( ) const
inline

Get probability.

Returns
probability

Definition at line 71 of file JK40Hit.hh.

72  {
73  return this->getP(this->getN());
74  }
size_t getN() const
Get number of hits.
Definition: JK40Hit.hh:60
double getP() const
Get probability.
Definition: JK40Hit.hh:71
const JDAQModuleIdentifier& KM3NETDAQ::JDAQModuleIdentifier::getModuleIdentifier ( ) const
inlineinherited

Get Module identifier.

Returns
Module identifier

Definition at line 50 of file JDAQModuleIdentifier.hh.

51  {
52  return *this;
53  }
void KM3NETDAQ::JDAQModuleIdentifier::setModuleIdentifier ( const JDAQModuleIdentifier module)
inlineinherited

Set Module identifier.

Parameters
moduleModule identifier

Definition at line 61 of file JDAQModuleIdentifier.hh.

62  {
63  *this = module;
64  }
int KM3NETDAQ::JDAQModuleIdentifier::getModuleID ( ) const
inlineinherited

Get module identifier.

Returns
module identifier

Definition at line 72 of file JDAQModuleIdentifier.hh.

73  {
74  return id;
75  }
KM3NETDAQ::JDAQModuleIdentifier::ClassDefNV ( JDAQModuleIdentifier  ,
 
)
inherited
double JFIT::JK40::getY0 ( ) const
inlineinherited

Get expectation value for number of single hits.

Returns
expectation value

Definition at line 100 of file JK40.hh.

101  {
102  return __y0;
103  }
double __y0
expectation value of number of single hits
Definition: JK40.hh:141
double JFIT::JK40::getY1 ( const size_t  M) const
inlineinherited

Get expectation value for number of multiple hits.

Parameters
Mmultiplicity (M >= 2)
Returns
expectation value

Definition at line 112 of file JK40.hh.

113  {
114  if (M >= 2 && M - 2 < __y1.size())
115  return __y1[M-2];
116  else
117  return 0.0;
118  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
JL1_t __y1
expectation values of number of multiple hits
Definition: JK40.hh:142
double JFIT::JK40::getP ( size_t  M) const
inlineinherited

Get probability to observe a hit with given multiplicity.

Note that if M = 0, the probability corresponds to observing no hits.

Parameters
Mmultiplicity (M >= 0)
Returns
probability

Definition at line 128 of file JK40.hh.

129  {
130  double expval = 0.0;
131 
132  if (M < 2)
133  expval = getY0();
134  else
135  expval = getY1(M);
136 
137  return JFIT::getP(expval, M != 0);
138  }
do $JPP JMEstimator M
Definition: JMEstimator.sh:37
double getY0() const
Get expectation value for number of single hits.
Definition: JK40.hh:100
double getY1(const size_t M) const
Get expectation value for number of multiple hits.
Definition: JK40.hh:112
double getP(const double expval, bool hit)
Get Poisson probability to observe a hit or not for given expectation value for the number of hits...
Definition: JFitToolkit.hh:34

Member Data Documentation

size_t JFIT::JK40Hit::__n
protected

Definition at line 77 of file JK40Hit.hh.

int KM3NETDAQ::JDAQModuleIdentifier::id
protectedinherited

Definition at line 112 of file JDAQModuleIdentifier.hh.

double JFIT::JK40::__y0
protectedinherited

expectation value of number of single hits

Definition at line 141 of file JK40.hh.

JL1_t JFIT::JK40::__y1
protectedinherited

expectation values of number of multiple hits

Definition at line 142 of file JK40.hh.


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