Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JK40RunByRunSimulator.hh
Go to the documentation of this file.
1#ifndef __JTRIGGER__JK40RUNBYRUNSIMULATOR__
2#define __JTRIGGER__JK40RUNBYRUNSIMULATOR__
3
5
10
11
12/**
13 * \author mdejong
14 */
15
16namespace JTRIGGER {}
17namespace JPP { using namespace JTRIGGER; }
18
19namespace JTRIGGER {
20
25
26
27 /**
28 * K40 simulation based on run-by-run information.
29 *
30 * This class overwrites the method JK40DefaultSimulator::getSinglesRate.
31 * The actual singles rate is obtained from summary data.
32 */
35 {
36 public:
37 /**
38 * Constructor.
39 *
40 * \param router summary router
41 * \param rates K40 rates [Hz]
42 */
44 const JK40Rates& rates) :
46 summary_router(router)
47 {}
48
49
50 /**
51 * Get singles rate as a function of PMT.
52 *
53 * \param pmt PMT identifier
54 * \return rate [Hz]
55 */
56 virtual double getSinglesRate(const JPMTIdentifier& pmt) const override
57 {
59
61
62 return getRate(frame, pmt.getPMTAddress());
63 }
64
65 return 0.0;
66 }
67
68
69 protected:
71 };
72}
73
74#endif
Default implementation of the simulation of K40 background.
int getModuleID() const
Get module identifier.
int getPMTAddress() const
Get PMT address (= TDC).
K40 simulation based on run-by-run information.
virtual double getSinglesRate(const JPMTIdentifier &pmt) const override
Get singles rate as a function of PMT.
JK40RunByRunSimulator(const JSummaryRouter &router, const JK40Rates &rates)
Constructor.
Router for fast addressing of summary data in JDAQSummaryslice data structure as a function of the op...
bool hasSummaryFrame(const JDAQModuleIdentifier &module) const
Has summary frame.
const JDAQSummaryFrame & getSummaryFrame(const JDAQModuleIdentifier &module) const
Get summary frame.
Data storage class for rate measurements of all PMTs in one module.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for triggering.
double getRate(const JDAQSummaryFrame &frame, const int pmt, const double factor=1.0)
Get corrected rate of PMT.
Auxiliary class for K40 rates.
Definition JK40Rates.hh:41