Jpp  18.2.1-ARCA-DF-PATCH
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 JDAQModuleIdentifier,
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
JK40Hit(const JDAQModuleIdentifier &id, const JK40 &k40, const size_t n)
Constructor.
Definition: JK40Hit.hh:46
size_t getN() const
Get number of hits.
Definition: JK40Hit.hh:60
JK40Hit()
Default constructor.
Definition: JK40Hit.hh:32
Auxiliary class for handling light yields due to K40 decays.
Definition: JK40.hh:25
const int n
Definition: JPolint.hh:786
double getP(const bool hit) const
Get probability for observing a hit or not.
Definition: JK40.hh:72
Auxiliary class for simultaneously handling light yields and response of module.
Definition: JK40Hit.hh:23
double getP() const
Get probability.
Definition: JK40Hit.hh:71
size_t __n
Definition: JK40Hit.hh:77