Go to the documentation of this file.
   58   struct JHashEvaluator_t {
 
   81 int main(
int argc, 
char **argv)
 
   87   JLimit_t&              numberOfEvents = inputFile.getLimit();
 
   97     JParser<> zap(
"Auxiliary program to verify processing of Monte Carlo events.");
 
   99     zap[
'f'] = 
make_field(inputFile,           
"input file (output of detector simulation)");
 
  100     zap[
'n'] = 
make_field(numberOfEvents)                     = JLimit::max();
 
  101     zap[
'a'] = 
make_field(detectorFileA,       
"detector used for converion from Monte Carlo truth to raw data.");
 
  102     zap[
'b'] = 
make_field(detectorFileB,       
"detector used for conversion of raw data to calibrated data.")     = 
"";
 
  110   catch(
const exception &error) {
 
  111     FATAL(error.what() << endl);
 
  116   if (detectorFileB == 
"") {
 
  117     detectorFileB = detectorFileA;
 
  125     load(detectorFileA, detectorA);
 
  126     load(detectorFileB, detectorB);
 
  132   NOTICE(
"Number of modules in detector A <" << detectorFileA << 
">: " << setw(4) << detectorA.size() << endl);
 
  133   NOTICE(
"Number of modules in detector B <" << detectorFileB << 
">: " << setw(4) << detectorB.size() << endl);
 
  135   JPMTParametersMap::Throw(
true);
 
  138     FATAL(
"Invalid PMT parameters " << pmtParameters << endl);
 
  141   if (pmtParameters.
getQE() != 1.0) {
 
  143     NOTICE(
"Correct background rates with global efficiency " << pmtParameters.
getQE() << endl);
 
  147     NOTICE(
"Back ground rates: " << rates_Hz << endl);
 
  155   DEBUG(
"Trigger:"        << endl << parameters   << endl);
 
  156   DEBUG(
"PMT parameters:" << endl << pmtParameters << endl); 
 
  167   const JPosition3D center = get<JPosition3D>(header);
 
  169   NOTICE(
"Apply detector offset from Monte Carlo run header (" << center << 
")" << endl);
 
  183     Evt* 
event = inputFile.
next();
 
  187       if (!pmtRouter.
hasPMT(hit->pmt_id)) {
 
  189         miss[hit->pmt_id].
put(hit->pure_a);
 
  198         lost[pmt].
put(hit->pure_a);
 
  203       const double t0 = hit->pure_t;
 
  204       const double t1 = 
putTime(t0, pmtRouter   .getPMT(hit->pmt_id));
 
  209         slip[pmt].
put(hit->pure_a);
 
  215       npe[pmt][0].
put(hit->pure_a);
 
  216       npe[pmt][1].
put(hit->pure_a * P);
 
  217       npe[pmt][2].
put(hit->pure_a * P * data.
QE);
 
  223   NOTICE(
"Number of PMTs absent in detector A:               " << setw(6) << miss.size() << endl);
 
  226     DEBUG(setw(5) << i->first << 
' ' << 
FIXED(8,0) << i->second.getTotal() << endl);
 
  229   NOTICE(
"Number of PMTs absent in detector B:               " << setw(6) << lost.size() << endl);
 
  232     DEBUG(setw(8) << i->first.getModuleID() << 
"[" << setw(2) << i->first.getPMTAddress() << 
"] " << 
FIXED(8,0) << i->second.getTotal() << endl);
 
  235   NOTICE(
"Number of PMTs with t0 detector A - B > " << 
FIXED(4,1) << parameters.
TMaxLocal_ns << 
" [ns]: " << setw(6) << slip.size() << endl);
 
  238     DEBUG(setw(8) << i->first.getModuleID() << 
"[" << setw(2) << i->first.getPMTAddress() << 
"] " << 
FIXED(8,0) << i->second.getTotal() << endl);
 
  242   NOTICE(
"Number of true photo-electrons, passed threshold and survived QE." << endl);
 
  248     DEBUG(setw(8) << p->first.getModuleID() << 
"[" << setw(2) << p->first.getPMTAddress() << 
"]");
 
  250     for (
size_t i = 0; i != p->second.size(); ++i) {
 
  251       DEBUG(
' ' << 
FIXED(8,0) << p->second[i].getTotal());
 
  255     for (
size_t i = 0; i != p->second.size(); ++i) {
 
  256       total[i].put(p->second[i].getTotal());
 
  260   NOTICE(setw(12) << 
"total");
 
  262   for (
size_t i = 0; i != total.size(); ++i) {
 
  
double getMaximalDistance(const JDetector &detector)
Get maximal distance between modules in detector.
 
Auxiliary class for defining the range of iterations of objects.
 
Auxiliary data structure for floating point format specification.
 
void set(const double DMax_m=0.0)
Set dependent trigger parameters.
 
double getQE(const JPMTIdentifier &id) const
Get QE of given PMT.
 
double TMaxLocal_ns
maximal time difference between L0 hits for L1
 
Data structure for all trigger parameters.
 
double getSurvivalProbability(const JPMTParameters ¶meters)
Get model dependent probability that a one photo-electron hit survives the simulation of the PMT assu...
 
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.
 
double putTime(const T &t1, const JCalibration &cal)
Get de-calibrated time.
 
bool hasPMT(const JObjectID &id) const
Has PMT.
 
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
 
Utility class to parse command line options.
 
int main(int argc, char **argv)
 
Router for direct addressing of PMT data in detector data structure.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Auxiliary class for K40 rates.
 
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
 
counter_type getCounter() const
Get counter.
 
virtual const pointer_type & next()
Get next element.
 
Data structure for position in three dimensions.
 
int getID() const
Get identifier.
 
Auxiliary class for map of PMT parameters.
 
double getTime(const Hit &hit)
Get true time of hit.
 
virtual bool hasNext()
Check availability of next element.
 
int getPMTAddress() const
Get PMT identifier (= TDC).
 
const JPMTParameters & getPMTParameters(const JPMTIdentifier &id) const
Get PMT parameters.
 
Router for direct addressing of module data in detector data structure.
 
const JPMT & getPMT(const JPMTIdentifier &id) const
Get PMT parameters.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
JPMTIdentifier getIdentifier(const JPMTAddress &address) const
Get identifier of PMT.
 
General purpose class for object reading from a list of file names.
 
#define DEBUG(A)
Message macros.
 
bool hasModule(const JObjectID &id) const
Has module.
 
void correct(const double QE)
Correct rates for global efficiency,.
 
bool is_valid() const
Check validity of PMT parameters.
 
double QE
relative quantum efficiency
 
Data structure for PMT parameters.