Jpp
 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:
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 JModuleIdentifier &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...
 
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
 
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 34 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  {}
JLANG::JObjectID JModuleIdentifier
JK40()
Default constructor.
Definition: JK40.hh:40
size_t __n
Definition: JK40Hit.hh:77
JFIT::JK40Hit::JK40Hit ( const JModuleIdentifier &  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  {}
JLANG::JObjectID JModuleIdentifier
JK40()
Default constructor.
Definition: JK40.hh:40
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
double JFIT::JK40::getY0 ( ) const
inlineinherited

Get expectation value for number of single hits.

Returns
expectation value

Definition at line 101 of file JK40.hh.

102  {
103  return __y0;
104  }
double __y0
expectation value of number of single hits
Definition: JK40.hh:142
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 113 of file JK40.hh.

114  {
115  if (M >= 2 && M - 2 < __y1.size())
116  return __y1[M-2];
117  else
118  return 0.0;
119  }
JL1_t __y1
expectation values of number of multiple hits
Definition: JK40.hh:143
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 129 of file JK40.hh.

130  {
131  double expval = 0.0;
132 
133  if (M < 2)
134  expval = getY0();
135  else
136  expval = getY1(M);
137 
138  return JFIT::getP(expval, M != 0);
139  }
double getY0() const
Get expectation value for number of single hits.
Definition: JK40.hh:101
double getY1(const size_t M) const
Get expectation value for number of multiple hits.
Definition: JK40.hh:113
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:37

Member Data Documentation

size_t JFIT::JK40Hit::__n
protected

Definition at line 77 of file JK40Hit.hh.

double JFIT::JK40::__y0
protectedinherited

expectation value of number of single hits

Definition at line 142 of file JK40.hh.

JL1_t JFIT::JK40::__y1
protectedinherited

expectation values of number of multiple hits

Definition at line 143 of file JK40.hh.


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