Jpp  pmt_effective_area_update_2
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 converting various rates to expectation values of the number of hits within a giv...
Definition: JK40.hh:29
double getP(size_t M) const
Get probability to observe a hit with given multiplicity.
Definition: JK40.hh:128
Auxiliary class for simultaneously handling light yields and response of module.
Definition: JK40Hit.hh:23
double getP() const
Get probability.
Definition: JK40Hit.hh:71
alias put_queue eval echo n
Definition: qlib.csh:19
size_t __n
Definition: JK40Hit.hh:77