61 struct JHashEvaluator_t {
90 JLimit_t& numberOfEvents = inputFile.getLimit();
100 JParser<> zap(
"Auxiliary program to verify processing of Monte Carlo events.");
102 zap[
'f'] =
make_field(inputFile,
"input file (output of detector simulation)");
113 catch(
const exception &error) {
140 FATAL(
"Invalid PMT parameters " << pmtParameters <<
endl);
143 if (pmtParameters.
getQE() != 1.0) {
145 NOTICE(
"Correct background rates with global efficiency " << pmtParameters.
getQE() <<
endl);
149 NOTICE(
"Back ground rates: " << rates_Hz <<
endl);
177 while (inputFile.hasNext()) {
179 STATUS(
"event: " <<
setw(10) << inputFile.getCounter() <<
'\r');
181 Evt*
event = inputFile.next();
183 if (!event->mc_hits.empty()) {
209 if (fabs(t2 - t0) > parameters.TMaxLocal_ns) {
218 npe[pmt][2].put(
getNPE(*
hit) * P * data.QE);
233 DEBUG(
setw(8) << i->first.getModuleID() <<
"[" <<
setw(2) << i->first.getPMTAddress() <<
"] " <<
FIXED(8,0) << i->second.getTotal() <<
endl);
236 NOTICE(
"Number of PMTs with t0 detector A - B > " <<
FIXED(4,1) << parameters.TMaxLocal_ns <<
" [ns]: " <<
setw(6) <<
slip.size() <<
endl);
239 DEBUG(
setw(8) << i->first.getModuleID() <<
"[" <<
setw(2) << i->first.getPMTAddress() <<
"] " <<
FIXED(8,0) << i->second.getTotal() <<
endl);
243 NOTICE(
"Number of true photo-electrons, passed threshold and survived QE." <<
endl);
249 DEBUG(
setw(8) << p->first.getModuleID() <<
"[" <<
setw(2) << p->first.getPMTAddress() <<
"]");
251 for (
size_t i = 0; i != p->second.size(); ++i) {
252 DEBUG(
' ' <<
FIXED(8,0) << p->second[i].getTotal());
256 for (
size_t i = 0; i != p->second.size(); ++i) {
257 total[i].put(p->second[i].getTotal());
263 for (
size_t i = 0; i != total.size(); ++i) {
269 NOTICE(
"Time range of hits [ns]: " <<
QT.getXmin() <<
" - " <<
QT.getXmax() <<
endl);
KM3NeT DAQ constants, bit handling, etc.
Data structure for detector geometry and calibration.
General purpose class for hash map of unique elements.
General purpose messaging.
#define DEBUG(A)
Message macros.
Direct access to module in detector data structure.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Direct access to PMT in detector data structure.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
ROOT TTree parameter settings of various packages.
int main(int argc, char **argv)
Router for direct addressing of module data in detector data structure.
const JPMT & getPMT(const JPMTIdentifier &id) const
Get PMT parameters.
bool hasModule(const JObjectID &id) const
Has module.
int getPMTAddress() const
Get PMT address (= TDC).
Auxiliary class for map of PMT parameters.
const JPMTParameters & getPMTParameters(const JPMTIdentifier &id) const
Get PMT parameters.
double getQE(const JPMTIdentifier &id) const
Get QE of given PMT.
bool is_valid() const
Check validity of PMT parameters.
Data structure for PMT parameters.
Router for direct addressing of PMT data in detector data structure.
int getID() const
Get identifier.
static void Throw(const bool option)
Enable/disable throw option.
Template definition of a multi-dimensional oscillation probability interpolation table.
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.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
double getSurvivalProbability(const JPMTParameters ¶meters)
Get model dependent probability that a one photo-electron hit survives the simulation of the PMT assu...
double getMaximalDistance(const JDetector &detector, const bool option=false)
Get maximal distance between modules in detector.
double putTime(const T &t1, const JCalibration &cal)
Get de-calibrated time.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
const char * getTime()
Get current local time conform ISO-8601 standard.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Auxiliary data structure for floating point format specification.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Auxiliary data structure to unify weights of acoustics data according to the number of pings per emit...
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for K40 rates.
void correct(const double QE)
Correct rates for global efficiency,.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.