66   using namespace KM3NETDAQ;
 
   69   typedef JParallelFileScanner_t::multi_pointer_type               multi_pointer_type;
 
   72   JParallelFileScanner_t  inputFile;
 
   79   size_t         numberOfPrefits;
 
   86     JParser<> zap(
"Program to perform fit of muon path to data.");
 
   91     zap[
'n'] = 
make_field(numberOfEvents)      = JLimit::max();
 
   93     zap[
'R'] = 
make_field(roadWidth_m)         = numeric_limits<double>::max();
 
  102   catch(
const exception& error) {
 
  103     FATAL(error.what() << endl);
 
  129   JRegressor_t::T_ns.setRange(-50.0, +50.0);    
 
  130   JRegressor_t::Vmax_npe           =   10.0;    
 
  131   JRegressor_t::MAXIMUM_ITERATIONS = 10000;
 
  133   JRegressor_t fit(pdfFile, TTS_ns);
 
  135   for (
int i = 0; i != JRegressor_t::NUMBER_OF_PDFS; ++i) {
 
  136     fit.npe[i].transform(JRegressor_t::JNPE_t::transformer_type::getDefaultTransformer());     
 
  141   fit.parameters.resize(4);
 
  144   fit.parameters[1] = JLine3Z::pY();
 
  145   fit.parameters[2] = JLine3Z::pDX();
 
  146   fit.parameters[3] = JLine3Z::pDY();
 
  148   if (fit.getRmax() < roadWidth_m) {
 
  150     roadWidth_m = fit.getRmax();
 
  152     WARNING(
"Set road width to [m] " << roadWidth_m << endl);
 
  155   const double Rmax_m  = 100.0;     
 
  156   const double Tmax_ns =  10.0;     
 
  163   while (inputFile.hasNext()) {
 
  165     STATUS(
"event: " << setw(10) << inputFile.getCounter() << 
'\r'); 
DEBUG(endl);
 
  167     multi_pointer_type ps  = inputFile.next();
 
  180     buildL0(*tev, router, 
true, back_inserter(dataL0));
 
  183     for (JEvt::const_iterator track = cp.begin(); track != cp.end(); ++track) {
 
  195       for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
 
  203           top.insert(hit.getPMTIdentifier());
 
  205           const double t1 = hit.getT() - tz.getT(hit);
 
  207           if (tz.getDistance(hit) <= Rmax_m && t1 >= -Tmax_ns && t1 <= +Tmax_ns) {
 
  216       for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  222         if (tz.getDistance(pos) <= roadWidth_m  &&  
Z(pos.getZ() - tz.getDistance(pos) / 
getTanThetaC())) {
 
  224           for (
unsigned int i = 0; i != module->size(); ++i) {
 
  228             JPMT pmt(module->getPMT(i));
 
  232             buffer.push_back(
JPMTW0(pmt, R_Hz, top.count(
id)));
 
  238       const int NDF = buffer.size() - fit.parameters.size();
 
  244         if (track->getE() > 0.1)
 
  245           fit.E_GeV   = track->getE();
 
  249         const double chi2 = fit(
JLine3Z(tz), buffer.begin(), buffer.end());
 
  257         out.rbegin()->setW(track->getW());
 
Utility class to parse command line options. 
 
static const int JMUONPATH
 
double getQuality(const double chi2, const int NDF)
Get quality of fit. 
 
Template specialisation of L0 builder for JHitL0 data type. 
 
Auxiliary class for handling PMT geometry, rate and response. 
 
Router for direct addressing of module data in detector data structure. 
 
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. 
 
Data structure for fit of straight line in positive z-direction. 
 
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results. 
 
Auxiliary class for defining the range of iterations of objects. 
 
JAxis3D & rotate(const JRotation3D &R)
Rotate axis. 
 
JDirection3D getDirection(const Vec &dir)
Get direction. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
Data structure for PMT geometry, calibration and status. 
 
JPosition3D getPosition(const Vec &pos)
Get position. 
 
then usage $script[distance] fi case set_variable R
 
Auxiliary class for a hit with background rate value. 
 
void load(const std::string &file_name, JDetector &detector)
Load detector from input file. 
 
JFit getFit(const int id, const JMODEL::JString &string)
Get fit parameters of string. 
 
Regressor function object for JLine3Z fit using JGandalf minimiser. 
 
then if[[!-f $DETECTOR]] then JDetector sh $DETECTOR fi cat $WORKDIR trigger_parameters txt<< EOFtrigger3DMuon.enabled=1;trigger3DMuon.numberOfHits=5;trigger3DMuon.gridAngle_deg=1;ctMin=0.0;TMaxLocal_ns=15.0;EOF set_variable TRIGGEREFFICIENCY_TRIGGERED_EVENTS_ONLY INPUT_FILES=() for((i=1;$i<=$NUMBER_OF_RUNS;++i));do JSirene.sh $DETECTOR $JPP_DATA/genhen.km3net_wpd_V2_0.evt.gz $WORKDIR/sirene_ ${i}.root JTriggerEfficiency.sh $DETECTOR $DETECTOR $WORKDIR/sirene_ ${i}.root $WORKDIR/trigger_efficiency_ ${i}.root $WORKDIR/trigger_parameters.txt $JPP_DATA/PMT_parameters.txt INPUT_FILES+=($WORKDIR/trigger_efficiency_ ${i}.root) done for ANGLE_DEG in $ANGLES_DEG[*];do set_variable SIGMA_NS 3.0 set_variable OUTLIERS 3 set_variable OUTPUT_FILE $WORKDIR/matrix\[${ANGLE_DEG}\deg\].root $JPP_DIR/examples/JReconstruction-f"$INPUT_FILES[*]"-o $OUTPUT_FILE-S ${SIGMA_NS}-A ${ANGLE_DEG}-O ${OUTLIERS}-d ${DEBUG}--!fiif[[$OPTION=="plot"]];then if((0));then for H1 in h0 h1;do JPlot1D-f"$WORKDIR/matrix["${^ANGLES_DEG}" deg].root:${H1}"-y"1 2e3"-Y-L TR-T""-\^"number of events [a.u.]"-> o chi2
 
Data structure for fit of straight line paralel to z-axis. 
 
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity. 
 
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
 
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
 
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
JPosition3D & rotate(const JRotation3D &R)
Rotate. 
 
#define DEBUG(A)
Message macros.