40 int main(
int argc, 
char **argv)
 
   56     JParser<> zap(
"Auxiliary program to generate noise in Monte Carlo event.");
 
   60     zap[
'n'] = 
make_field(numberOfEvents)  = JLimit::max();
 
   62     zap[
'T'] = 
make_field(period)          = JTimeRange::DEFAULT_RANGE;
 
   69   catch(
const exception &error) {
 
   70     FATAL(error.what() << endl);
 
   74   gRandom->SetSeed(seed);
 
   89   if (period == JTimeRange::DEFAULT_RANGE) {
 
  108   if (!inputFile.empty()) {
 
  114     while (inputFile.hasNext()) {
 
  116       STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  118       Evt* 
event = inputFile.next();
 
  120       JTimeRange time_range(JTimeRange::DEFAULT_RANGE);
 
  128           iter_swap(i, --__end);
 
  138       event->mc_hits.erase(__end, event->mc_hits.end());
 
  141         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(),
 
  171       outputFile.put(*event);
 
  175     for (
counter_type counter = 0; counter != numberOfEvents; ++counter) {
 
  177       STATUS(
"event: " << setw(10) << counter << 
'\r'); 
DEBUG(endl);
 
  183       for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  185         buffer.
reset(module->size());
 
  189         for (
unsigned int pmt = 0; pmt != buffer.size(); ++pmt) {
 
  191           const JModuleData::value_type& frame = buffer[pmt];
 
  193           for (JModuleData::value_type::const_iterator hit = frame.begin(); hit != frame.end(); ++hit) {
 
  196                                            module->getPMT(pmt).getID(),
 
Utility class to parse command line options. 
 
void reset(size_t size)
Reset buffers. 
 
int main(int argc, char *argv[])
 
ROOT TTree parameter settings of various packages. 
 
Default implementation of the simulation of K40 background. 
 
Data structure for PMT data corresponding to a detector module. 
 
Recording of objects on file according a format that follows from the file name extension. 
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Long64_t counter_type
Type definition for counter. 
 
double getTime(const Hit &hit)
Get true time of hit. 
 
Data structure for detector geometry and calibration. 
 
bool is_noise(const Hit &hit)
Verify hit origin. 
 
Auxiliary class for defining the range of iterations of objects. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
virtual void generateHits(const JModule &module, const JTimeRange &period, JModuleData &output) const 
Generate hits. 
 
double getMaximalTime(const double R_Hz)
Get maximal time for given rate. 
 
General purpose messaging. 
 
Template specialisation of JMultipleFileScanner for Monte Carlo header. 
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file. 
 
General purpose class for object reading from a list of file names. 
 
Utility class to parse command line options. 
 
std::vector< Hit > mc_hits
MC: list of MC truth hits. 
 
Auxiliary class to set-up Hit. 
 
const JLimit & getLimit() const 
Get limit. 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
Auxiliary class for K40 rates. 
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event. 
 
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]). 
 
#define DEBUG(A)
Message macros.