49 int main(
int argc, 
char **argv)
 
   53   using namespace KM3NETDAQ;
 
   74     JParser<> zap(
"Auxiliary program to determine PMT parameters from OMGsim data.");
 
   76     zap[
'f'] = 
make_field(inputFile,      
"input file.");
 
   78     zap[
'n'] = 
make_field(numberOfEvents)                                                = JLimit::max();
 
   79     zap[
'a'] = 
make_field(detectorFile,   
"detector file.");
 
   80     zap[
'T'] = 
make_field(TMax_ns,        
"time window [ns].")                           = 20.0;
 
   88   catch(
const exception &error) {
 
   89     FATAL(error.what() << endl);
 
   93   gRandom->SetSeed(seed);
 
  106     FATAL(
"Wrong number of modules " << 
detector.size() << endl);
 
  116   const Int_t    nx   = combinatorics.getNumberOfPairs();
 
  117   const Double_t 
xmin = -0.5;
 
  118   const Double_t 
xmax = nx - 0.5;
 
  120   const Double_t ymin = -floor(TMax_ns) + 0.125;
 
  121   const Double_t ymax = +floor(TMax_ns) - 0.125;
 
  122   const Int_t    ny   = (Int_t) ((ymax - ymin) / 0.25);
 
  131   for (
size_t i = 0; 
i != module.size(); ++
i) {
 
  132     router.put(module[
i].getID(), 
i);
 
  135   double numberOfPrimaries = 0.0;
 
  141     STATUS(
"Extracting header data... " << flush);
 
  145     const JHead buffer(header);
 
  154   } 
catch(
const exception& error) {
 
  155     FATAL(error.what() << endl);
 
  158   if (numberOfPrimaries == 0.0) {
 
  159     FATAL(
"Number of primaries " << numberOfPrimaries << endl); 
 
  180   while (inputFile.hasNext()) {
 
  182     if (inputFile.getCounter()%10000== 0) {
 
  183       STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  186     const Evt* evt = inputFile.next();
 
  192       for (
const auto& hit : evt->
mc_hits) {
 
  194         if (router.has(hit.pmt_id)) {
 
  196           const int pmt = router.get(hit.pmt_id);
 
  205           for (
const auto& hit : output) {
 
  206             buffer.push_back({pmt, hit.t_ns});
 
  214           h2s.Fill((
double) combinatorics.getIndex(p->pmt,q->pmt), 
 
  215                    JCombinatorics::getSign(p->pmt,q->pmt) * (q->t1 - p->t1));
 
  223   const double W = 
R / numberOfPrimaries;
 
Utility class to parse command line options. 
 
bool is_valid(T JHead::*pd) const 
Check validity of given data member in JHead. 
 
Data structure for PMT analogue signal. 
 
int main(int argc, char *argv[])
 
ROOT TTree parameter settings of various packages. 
 
Data structure for a composite optical module. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
Utility class to parse parameter values. 
 
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
 
#define MAKE_CSTRING(A)
Make C-string. 
 
JCalibration getCalibration(const JCalibration &first, const JCalibration &second)
Get calibration to go from first to second calibration. 
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
Data structure for detector geometry and calibration. 
 
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header. 
 
Auxiliary class for defining the range of iterations of objects. 
 
I/O formatting auxiliaries. 
 
Auxiliary class to sort pairs of PMT addresses within optical module. 
 
double numberOfPrimaries
Number of primaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
bool putObject(TDirectory &dir, const TObject &object)
Write object to ROOT directory. 
 
General purpose messaging. 
 
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
 
Scanning of objects from multiple files according a format that follows from the extension of each fi...
 
PMT analogue signal processor. 
 
then JCookie sh JDataQuality D $DETECTOR_ID R
 
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. 
 
Template data structure for PMT I/O. 
 
PMT analogue signal processor. 
 
const JLimit & getLimit() const 
Get limit. 
 
Data structure for PMT parameters. 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
KM3NeT DAQ constants, bit handling, etc. 
 
The Evt class respresent a Monte Carlo (MC) event as well as an offline event. 
 
static const char *const _2S
Name extension for 2D counts. 
 
#define DEBUG(A)
Message macros.