1 #ifndef __JTIMESLICE__JEVENTTIMESLICE__
2 #define __JTIMESLICE__JEVENTTIMESLICE__
77 if (simbad.
hasPMT(hit->pmt_id)) {
81 if (!period.is_valid() || timeRange(
getTime(*hit))) {
99 for (JMap_t::const_iterator i = data.begin(); i != data.end(); ++i) {
103 time_range.
add(period);
108 for (JDetector::const_iterator module = simbad->begin(); module != simbad->end(); ++module) {
110 if (!module->empty()) {
114 JMap_t::iterator i = data.find(
distance(simbad->begin(),module));
117 buffer.swap(i->second);
119 buffer.
reset(module->size());
127 simbad(*module, buffer, *(this->rbegin()));
133 for (JMap_t::iterator i = data.begin(); i != data.end(); ++i) {
139 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.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [ns]).
int second
index of PMT in module data structure.
JEventTimeslice(const JDAQChronometer &chronometer, const JDetectorSimulator &simbad, const Evt &event, const JTimeRange &period=JTimeRange::DEFAULT_RANGE)
Constructor.
bool hasPMT(const JObjectID &id) const
Has PMT.
const JPMT & getPMT(const JPMTAddress &address) const
Get PMT.
Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.
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. time between earliest and latest hit) of Monte Carlo event.
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.
double putTime() const
Get Monte Carlo time minus DAQ/trigger time.
void setDAQChronometer(const JDAQChronometer &chronometer)
Set DAQ chronometer.
Address of module in detector data structure.
bool hasK40Simulator() const
Check availability of K40 simulator.
Auxiliary include file for time conversion between DAQ/trigger hit and Monte Carlo hit...
bool hasCLBSimulator() const
Check availability of CLB simulator.
bool has(const int bit) const
Test PMT status.
Address of PMT in detector data structure.
Base class class for generation of time slice data.
std::vector< Hit > mc_hits
MC: list of MC truth hits.
static const int OUT_OF_SYNC
Enable (disable) synchronous signal from this PMT if this status bit is 0.
Auxiliaries for creation of time slice data.
double getNPE(const Hit &hit)
Get true charge of hit.
KM3NeT DAQ constants, bit handling, etc.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Data frame of one optical module.
Timeslice with Monte Carlo event.
const JPMTAddress & getAddress(const JObjectID &id) const
Get address of PMT.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.