125   using namespace KM3NETDAQ;
 
  129   typedef JParallelFileScanner_t::multi_pointer_type               multi_pointer_type;
 
  134   JParallelFileScanner_t   inputFile;
 
  138   JCalibration_t           calibrationFile;
 
  147     JParser<> zap(
"Program to perform PDF fit of muon trajectory to data.");
 
  154     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
  162   catch(
const exception& error) {
 
  163     FATAL(error.what() << endl);
 
  182   unique_ptr<JDynamics> dynamics;
 
  188     dynamics->load(calibrationFile);
 
  190   catch(
const exception& error) {
 
  191     if (!calibrationFile.empty()) {
 
  214   JRegressor_t fit(pdfFile);
 
  225   while (inputFile.hasNext()) {
 
  227     STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  229     multi_pointer_type ps  = inputFile.next();
 
  234     summary.update(*tev);
 
  237       dynamics->update(*tev);
 
  258     buildL0(*tev, router, 
true, back_inserter(dataL0));
 
  261     for (JFIT::JEvt::iterator track = cp.begin(); track != cp.end(); ++track) {
 
  269       for (buffer_type::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
 
  276           top[hit.getModuleID()].insert(hit.getPMTAddress());
 
  282         double getZ()
 const { 
return z; }
 
  283         double getP()
 const { 
return p; }
 
  291       for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  293         if (summary.hasSummaryFrame(module->getID())) {
 
  303             const double z = pos.getZ()  -  pos.getX() / 
getTanThetaC();
 
  304             const double p = 
getProbability(*module, frame, rates_Hz.getMultiplesRates(), JRegressor_t::T_ns.getLength(), top[module->getID()]);
 
  306             data.push_back({ z, p });
 
  315       double npe_total = 0.0;     
 
  324         if (track_start != data. end()) { Zmin = track_start->getZ(); }
 
  325         if (track_end   != data.rend()) { Zmax = track_end  ->getZ(); }
 
  329         for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  337             const double z = pos.getZ()  -  pos.getX() / 
getTanThetaC();
 
  339             if (z >= Zmin && z <= Zmax) {
 
  341               for (
size_t i = 0; i != module->size(); ++i) {
 
  349                   JPMT pmt = module->getPMT(i);
 
  353                   const double ya = fit.getNPE(pmt, 0.0).getYA();
 
  357                   if (pmt.
getZ() <= 0.0) {
 
  373       out.rbegin()->setW(track->getW());
 
  383       for (JFIT::JEvt::iterator i = out.begin(); i != out.end(); ++i) {
 
  393     copy(in->begin(), in->end(), back_inserter(out));
 
static const int JMUONSTART
 
Auxiliary class to set-up Hit. 
 
Utility class to parse command line options. 
 
static const int JSTART_NPE_MIP_TOTAL
number of photo-electrons along the whole track from JStart.cc 
 
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member. 
 
double position
coverage of detector by available position calibration [0,1] 
 
static JDetectorMechanics getMechanics
Function object to get string mechanics. 
 
Regressor function object for fit of muon energy. 
 
Router for direct addressing of module data in detector data structure. 
 
*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
 
General purpose class for parallel reading of objects from a single file or multiple files...
 
Template specialisation of class JModel to match hit with muon trajectory along z-axis. 
 
Auxiliary class to test history. 
 
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
 
const JK40Rates & getK40Rates()
Get K40 rates. 
 
JFit & add(const int type)
Add event to history. 
 
void transform(const JRotation3D &R, const JVector3D &pos)
Transform position. 
 
void transform(const JAxis3D &axis)
Transform axis to reference frame of given axis. 
 
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results. 
 
static const int JSTART_NPE_MIP
number of photo-electrons up to the barycentre from JStart.cc 
 
Data structure for track fit results with history and optional associated values. ...
 
double orientation
coverage of detector by available orientation calibration [0,1] 
 
Auxiliary class for defining the range of iterations of objects. 
 
Data structure for fit parameters. 
 
JDirection3D getDirection(const Vec &dir)
Get direction. 
 
Auxiliary class for recursive type list generation. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
Auxiliary class for start or end point evaluation. 
 
Data storage class for rate measurements of all PMTs in one module. 
 
Auxiliary class to test history. 
 
Data structure for PMT geometry, calibration and status. 
 
static const int PMT_DISABLE
KM3NeT Data Definitions v2.1.0-12-g9520e6e https://git.km3net.de/common/km3net-dataformat. 
 
JPosition3D getPosition(const Vec &pos)
Get position. 
 
File router for fast addressing of summary data. 
 
void load(const std::string &file_name)
Load mechanical model parameters from file. 
 
then usage $script[distance] fi case set_variable R
 
Data structure for coverage of dynamic calibrations. 
 
double getP(const double expval, bool hit)
Get Poisson probability to observe a hit or not for given expectation value for the number of hits...
 
static const int JPP_COVERAGE_ORIENTATION
coverage of dynamic orientation calibration from any Jpp application 
 
Dynamic detector calibration. 
 
bool getPMTStatus(const JStatus &status)
Test status of PMT. 
 
const double getSpeedOfLight()
Get speed of light. 
 
static const int JSTART_LENGTH_METRES
distance between first and last hits in metres from JStart.cc 
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file. 
 
Data structure for set of track fit results. 
 
General purpose class for object reading from a list of file names. 
 
Data structure for L0 hit. 
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
double getProbability(const size_t N, const size_t M, const JK40Rates &R_Hz, const double T_ns)
Get probability due to random background. 
 
Data structure for fit of straight line paralel to z-axis. 
 
void copy(const Head &from, JHead &to)
Copy header from from to to. 
 
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity. 
 
Object reading from a list of files. 
 
Data structure for position in three dimensions. 
 
const JLimit & getLimit() const 
Get limit. 
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ. 
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
 
JPosition3D & rotate(const JRotation3D &R)
Rotate. 
 
void select(const JSelector_t &selector)
Select fits. 
 
double getZ() const 
Get z position. 
 
Auxiliary class for K40 rates. 
 
then usage $script< detector file >< tripodfile >< stage > input file nInput files correspond to the output of JAcousticsEventBuilder[.sh] nFirst stage eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY eval JPrintDetector a $DETECTOR O CAN source JAcoustics sh $DETECTOR_ID typeset A CONFIGURATION for key in Tmax_s
 
static const int JPP_COVERAGE_POSITION
coverage of dynamic position calibration from any Jpp application