Constructor.
This constructor converts the Monte Carlo event to a DAQ timeslice. In this, both the PMT and CLB simulations are applied. If the simulator is available and the given time window is valid, the K40 background is generated and added to the timeslice data. N.B. The given time window extends the time range of hits in the event, if any.
59 using namespace JDETECTOR;
60 using namespace JAANET;
69 const JTimeConverter converter(
event, chronometer);
79 if (simbad.
hasPMT(hit->pmt_id)) {
83 if (!period.is_valid() || timeRange(
getTime(*hit))) {
98 for (JMap_t::const_iterator i = data.begin(); i != data.end(); ++i) {
102 time_range.add(period);
107 for (JDetector::const_iterator module = simbad->begin(); module != simbad->end(); ++module) {
112 JMap_t::iterator i = data.find(distance(simbad->begin(),module));
115 buffer.swap(i->second);
117 buffer.
reset(module->size());
124 this->push_back(JDAQSuperFrame(JDAQSuperFrameHeader(chronometer, module->getID())));
126 simbad(*module, buffer, *(this->rbegin()));
131 for (JMap_t::iterator i = data.begin(); i != data.end(); ++i) {
135 this->push_back(JDAQSuperFrame(JDAQSuperFrameHeader(chronometer, module.
getID())));
137 simbad(module, i->second, *(this->rbegin()));
void reset(size_t size)
Reset buffers.
Data structure for PMT analogue signal.
Data structure for a composite optical module.
Data structure for PMT data corresponding to a detector module.
int second
index of PMT in module data structure.
JDAQTimeslice()
Default constructor.
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
bool hasPMT(const JObjectID &id) const
Has PMT.
double getTime(const Hit &hit)
Get true time of hit.
const JModule & getModule(const JModuleAddress &address) const
Get module.
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e.
virtual void generateHits(const JModule &module, const JTimeRange &period, JModuleData &output) const
Generate hits.
int first
index of module in detector data structure
bool hasPMTSimulator() const
Check availability of PMT simulator.
int getID() const
Get identifier.
void setDAQChronometer(const JDAQChronometer &chronometer)
Set DAQ chronometer.
Address of module in detector data structure.
bool hasK40Simulator() const
Check availability of K40 simulator.
bool hasCLBSimulator() const
Check availability of CLB simulator.
Address of PMT in detector data structure.
Auxiliary class to convert DAQ/trigger hit time to/from Monte Carlo hit time.
double getNPE(const Hit &hit)
Get true charge of hit.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
const JPMTAddress & getAddress(const JObjectID &id) const
Get address of PMT.