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.
   59    {
   62 
   64 
   65 
   68 
   70        
   72 
   74 
   76 
   77        for (vector<Hit>::const_iterator hit = event.
mc_hits.begin(); hit != event.
mc_hits.end(); ++hit) {
 
   78 
   79          if (simbad.
hasPMT(hit->pmt_id)) {
 
   80 
   82 
   84 
   87 
   88                data[address.
first].resize(NUMBER_OF_PMTS);
 
   89 
   91              }
   92            }
   93          }
   94        }
   95 
   96 
   98          
   99 
  101 
  102          for (JMap_t::const_iterator i = 
data.begin(); i != 
data.end(); ++i) {
 
  104          }
  105 
  106          time_range.add(period);
  107 
  108 
  110 
  111          for (JDetector::const_iterator module = simbad->begin(); module != simbad->end(); ++module) {
  112            
  113            if (!module->empty()) {
  114 
  115              
  116 
  117              JMap_t::iterator i = 
data.find(
distance(simbad->begin(),module));
 
  118 
  120                buffer.swap(i->second);
  121              else
  122                buffer.
reset(module->size());       
 
  123 
  124              
  125 
  127 
  129            
  130              simbad(*module, buffer, *(this->rbegin()));
  131            }
  132          }
  133 
  134        } else {
  135 
  136          for (JMap_t::iterator i = 
data.begin(); i != 
data.end(); ++i) {
 
  137            
  139            
  141            
  142            simbad(module, i->second, *(this->rbegin()));
  143          }
  144        }
  145      }
  146    }
virtual void generateHits(const JModule &module, const JTimeRange &period, JModuleData &output) const override
Generate hits.
bool hasPMTSimulator() const
Check availability of PMT simulator.
bool hasK40Simulator() const
Check availability of K40 simulator.
bool hasCLBSimulator() const
Check availability of CLB simulator.
Address of module in detector data structure.
int first
index of module in detector data structure
Data structure for PMT data corresponding to a detector module.
void reset(size_t size)
Reset buffers.
Data structure for a composite optical module.
bool has(const int bit) const
Test PMT status.
Address of PMT in detector data structure.
int second
index of PMT in module data structure.
bool hasPMT(const JObjectID &id) const
Has PMT.
const JPMT & getPMT(const JPMTAddress &address) const
Get PMT.
const JModule & getModule(const JModuleAddress &address) const
Get module.
const JPMTAddress & getAddress(const JObjectID &id) const
Get address of PMT.
int getID() const
Get identifier.
void setDAQChronometer(const JDAQChronometer &chronometer)
Set DAQ chronometer.
Data frame of one optical module.
Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.
static const int MODULE_OUT_OF_SYNC
Enable (disable) synchronous signal from this module if this status bit is 0 (1);.
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e. time between earliest and latest hit) of Monte Carlo event.
double getNPE(const Hit &hit)
Get true charge of hit.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
const char * getTime()
Get current local time conform ISO-8601 standard.
static const int OUT_OF_SYNC
Enable (disable) synchronous signal from this PMT if this status bit is 0 (1);.
std::vector< Hit > mc_hits
MC: list of MC truth hits.
Data structure for PMT analogue signal.
bool has(const int bit) const
Test PMT status.