Constructor.
This constructor converts the Monte Carlo event to a DAQ timeslice. In this, both the PMT and CLB simulations are applied. If the K40 simulator is available and the given time window is valid, the K40 background is generated and added to the time slice data. N.B. The given time window extends the time range of hits in the event, if any.
79 if (simbad.
hasPMT(hit->pmt_id)) {
102 for (JMap_t::const_iterator i = data.begin(); i != data.end(); ++i) {
106 time_range.add(period);
111 for (JDetector::const_iterator module = simbad->begin(); module != simbad->end(); ++module) {
113 if (!module->empty()) {
117 JMap_t::iterator i = data.find(
distance(simbad->begin(),module));
120 buffer.swap(i->second);
122 buffer.
reset(module->size());
130 simbad(*module, buffer, *(this->rbegin()));
136 for (JMap_t::iterator i = data.begin(); i != data.end(); ++i) {
142 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.
int second
index of PMT in module data structure.
bool hasPMT(const JObjectID &id) const
Has PMT.
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn this
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.
bool has(const int bit) const
Test PMT status.
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.
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 (1);.
static const int MODULE_OUT_OF_SYNC
Enable (disable) synchronous signal from this module if this status bit is 0 (1);.
double getNPE(const Hit &hit)
Get true charge of hit.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Data frame of one optical module.
const JPMTAddress & getAddress(const JObjectID &id) const
Get address of PMT.