Jpp 20.0.0-27-g39925593c-D
the software that should make you happy
Loading...
Searching...
No Matches
JPMTRunByRunSimulator.hh
Go to the documentation of this file.
1#ifndef __JTRIGGER__JPMTRUNBYRUNSIMULATOR__
2#define __JTRIGGER__JPMTRUNBYRUNSIMULATOR__
3
5
12
13
14/**
15 * \author mdejong
16 */
17
18namespace JTRIGGER {}
19namespace JPP { using namespace JTRIGGER; }
20
21namespace JTRIGGER {
22
27
28
29 /**
30 * PMT simulation based on run-by-run information.
31 *
32 * This class overwrites the method JPMTDefaultSimulator::getPMTStatus.
33 * The actual PMT status is obtained from summary data.
34 */
37 {
38 public:
39 /**
40 * Constructor.
41 *
42 * \param router summary router
43 * \param parameters PMT parameters
44 * \param detector detector
45 */
52
53
54 /**
55 * Get PMT status.
56 *
57 * \param id PMT identifier
58 * \param window time range
59 * \param status PMT status
60 * \return status
61 */
62 virtual bool getPMTStatus(const JPMTIdentifier& id, const JTimeRange& window, const JStatus& status) const override
63 {
67
68 if (summary_router.hasSummaryFrame(id.getModuleID())) {
69
70 const JDAQSummaryFrame& frame = summary_router.getSummaryFrame(id.getModuleID());
71
72 const int pmt = id.getPMTAddress();
73
74 return (getPMTStatus(status) &&
75 getDAQStatus(frame, status) &&
76 window.getUpperLimit() <= getMaximalTime(getRate(frame,pmt)));
77 }
78
79 return false;
80 }
81
82
83 protected:
85 };
86}
87
88#endif
Data structure for detector geometry and calibration.
Detector data structure.
Definition JDetector.hh:96
Auxiliary class for map of PMT parameters.
Template definition of a multi-dimensional oscillation probability interpolation table.
JTOOLS::JHashCollection::router_type router
PMT simulation based on run-by-run information.
virtual bool getPMTStatus(const JPMTIdentifier &id, const JTimeRange &window, const JStatus &status) const override
Get PMT status.
JPMTRunByRunSimulator(const JSummaryRouter &router, const JPMTParametersMap &parameters, const JDetector &detector)
Constructor.
Router for fast addressing of summary data in JDAQSummaryslice data structure as a function of the op...
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.
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
double getRate(const JDAQSummaryFrame &frame, const int pmt, const double factor=1.0)
Get corrected rate of PMT.
bool getPMTStatus(const JStatus &status)
Test status of PMT.
double getMaximalTime(const double R_Hz)
Get maximal time for given rate.
Detector file.
Definition JHead.hh:227
Auxiliary class for handling status.
Definition JStatus.hh:31