Go to the documentation of this file.
39 int main(
int argc,
char **argv)
46 JLimit_t& numberOfEvents = inputFile.getLimit();
55 JParser<> zap(
"Auxiliary program to add noise to Monte Carlo event.");
59 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
61 zap[
'T'] =
make_field(period) = JTimeRange::DEFAULT_RANGE;
70 catch(
const exception &error) {
71 FATAL(error.what() << endl);
75 gRandom->SetSeed(seed);
89 if (period == JTimeRange::DEFAULT_RANGE) {
118 JTimeRange time_range(JTimeRange::DEFAULT_RANGE);
126 iter_swap(i, --__end);
136 event->mc_hits.erase(__end, event->mc_hits.end());
139 time_range.
add(period);
148 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
150 buffer.
reset(module->size());
154 for (
unsigned int pmt = 0; pmt != buffer.size(); ++pmt) {
156 const JModuleData::value_type& frame = buffer[pmt];
158 for (JModuleData::value_type::const_iterator hit = frame.begin(); hit != frame.end(); ++hit) {
160 event->mc_hits.push_back(
JHit_t(event->mc_hits.size() + 1,
161 module->getPMT(pmt).getID(),
Default implementation of the simulation of K40 background.
Auxiliary class to set-up Hit.
Auxiliary class for defining the range of iterations of objects.
Data structure for PMT data corresponding to a detector module.
Empty structure for specification of parser element that is initialised (i.e.
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for K40 rates.
double getMaximalTime(const JDetector &detector)
Get maximal time between modules in detector following causality.
counter_type getCounter() const
Get counter.
virtual const pointer_type & next()
Get next element.
Template specialisation of JMultipleFileScanner for Monte Carlo header.
double getTime(const Hit &hit)
Get true time of hit.
virtual void generateHits(const JModule &module, const JTimeRange &period, JModuleData &output) const
Generate hits.
virtual bool hasNext()
Check availability of next element.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose class for object reading from a list of file names.
#define DEBUG(A)
Message macros.
void reset(size_t size)
Reset buffers.
int main(int argc, char **argv)
bool is_noise(const Hit &hit)
Verify hit origin.