Jpp
JK40Hit.hh
Go to the documentation of this file.
1 #ifndef __JFIT__JK40HIT__
2 #define __JFIT__JK40HIT__
3 
5 #include "JFit/JK40.hh"
6 
7 
8 /**
9  * \author mdejong
10  */
11 
12 namespace JFIT {}
13 namespace JPP { using namespace JFIT; }
14 
15 namespace JFIT {
16 
18 
19 
20  /**
21  * Auxiliary class for simultaneously handling light yields and response of module.
22  */
23  struct JK40Hit :
24  public JModuleIdentifier,
25  public JK40
26  {
27  using JK40::getP;
28 
29  /**
30  * Default constructor.
31  */
32  JK40Hit() :
34  JK40(),
35  __n (0)
36  {}
37 
38 
39  /**
40  * Constructor.
41  *
42  * \param id module identifier
43  * \param k40 k40
44  * \param n number of hits
45  */
47  const JK40& k40,
48  const size_t n) :
50  JK40(k40),
51  __n (n)
52  {}
53 
54 
55  /**
56  * Get number of hits.
57  *
58  * \return number of hits
59  */
60  inline size_t getN() const
61  {
62  return __n;
63  }
64 
65 
66  /**
67  * Get probability.
68  *
69  * \return probability
70  */
71  double getP() const
72  {
73  return this->getP(this->getN());
74  }
75 
76  protected:
77  size_t __n;
78  };
79 }
80 
81 #endif
JFIT::JK40Hit::JK40Hit
JK40Hit()
Default constructor.
Definition: JK40Hit.hh:32
JFIT::JK40Hit
Auxiliary class for simultaneously handling light yields and response of module.
Definition: JK40Hit.hh:23
JFIT
Auxiliary classes and methods for linear and iterative data regression.
Definition: JEnergy.hh:15
JFIT::JK40::getP
double getP(size_t M) const
Get probability to observe a hit with given multiplicity.
Definition: JK40.hh:129
JDETECTOR::JModuleIdentifier
JLANG::JObjectID JModuleIdentifier
Definition: JModuleIdentifier.hh:16
JFIT::JK40Hit::getN
size_t getN() const
Get number of hits.
Definition: JK40Hit.hh:60
JTOOLS::n
const int n
Definition: JPolint.hh:628
JModuleIdentifier.hh
JK40.hh
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JFIT::JK40
Auxiliary class for converting various rates to expectation values of the number of hits within a giv...
Definition: JK40.hh:30
JFIT::JK40Hit::getP
double getP() const
Get probability.
Definition: JK40Hit.hh:71
JLANG::JObjectID
Auxiliary class for object identification.
Definition: JObjectID.hh:27
JFIT::JK40Hit::JK40Hit
JK40Hit(const JModuleIdentifier &id, const JK40 &k40, const size_t n)
Constructor.
Definition: JK40Hit.hh:46
JFIT::JK40Hit::__n
size_t __n
Definition: JK40Hit.hh:77