Jpp  18.0.1-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
JAAnet/JEvD.cc File Reference

Program to display hit probabilities. More...

#include <string>
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include "TROOT.h"
#include "TApplication.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "TH2D.h"
#include "TArrow.h"
#include "TLatex.h"
#include "TMarker.h"
#include "km3net-dataformat/offline/Head.hh"
#include "km3net-dataformat/offline/Evt.hh"
#include "km3net-dataformat/online/JDAQ.hh"
#include "km3net-dataformat/online/JDAQHeader.hh"
#include "km3net-dataformat/tools/time_converter.hh"
#include "JROOT/JStyle.hh"
#include "JROOT/JCanvas.hh"
#include "JROOT/JRootToolkit.hh"
#include "JDAQ/JDAQSummarysliceIO.hh"
#include "JTrigger/JHitL0.hh"
#include "JSupport/JSupport.hh"
#include "JSupport/JSingleFileScanner.hh"
#include "JSupport/JSummaryFileRouter.hh"
#include "JSupport/JMonteCarloFileSupportkit.hh"
#include "JAAnet/JAAnetToolkit.hh"
#include "JPhysics/JPDF_t.hh"
#include "JFit/JLine1Z.hh"
#include "JFit/JModel.hh"
#include "JReconstruction/JHitW0.hh"
#include "JReconstruction/JMuonGandalfParameters_t.hh"
#include "JLang/JPredicate.hh"
#include "JLang/JComparator.hh"
#include "JMath/JMathToolkit.hh"
#include "JSystem/JKeypress.hh"
#include "JSystem/JProcess.hh"
#include "Jeep/JFunctionAdaptor.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Program to display hit probabilities.

Author
mdejong

Definition in file JAAnet/JEvD.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 240 of file JAAnet/JEvD.cc.

241 {
242  using namespace std;
243  using namespace JPP;
244  using namespace KM3NETDAQ;
245 
246  JSingleFileScanner<Evt> inputFile;
247  JLimit_t& numberOfEvents = inputFile.getLimit();
248  string pdfFile;
249  string outputFile;
251  int application;
252  JEventSelector event_selector;
253  JCanvas canvas;
254  bool batch;
255  double arrowSize;
256  string arrowType;
257  double arrowScale;
258  int debug;
259 
260 
261  try {
262 
263  parameters.numberOfPrefits = 1;
264 
265  JParser<> zap("Program to display hit probabilities.");
266 
267  zap['w'] = make_field(canvas, "size of canvas <nx>x<ny> [pixels]") = JCanvas(1200, 600);
268  zap['f'] = make_field(inputFile, "input file (output of JXXXMuonReconstruction.sh)");
269  zap['n'] = make_field(numberOfEvents) = JLimit::max();
270  zap['P'] = make_field(pdfFile);
271  zap['o'] = make_field(outputFile, "graphics output file name") = MAKE_STRING("display_" << WILDCARD << ".gif");
274  zap['L'] = make_field(event_selector) = JPARSER::initialised();
275  zap['S'] = make_field(arrowSize) = 0.003;
276  zap['T'] = make_field(arrowType) = "|->";
277  zap['F'] = make_field(arrowScale) = 250.0;
278  zap['B'] = make_field(batch, "batch processing");
279  zap['d'] = make_field(debug) = 1;
280 
281  zap(argc, argv);
282  }
283  catch(const exception& error) {
284  FATAL(error.what() << endl);
285  }
286 
287  if (batch && outputFile == "") {
288  FATAL("Missing output file name " << outputFile << " in batch mode." << endl);
289  }
290 
291  if (!batch && outputFile == "") {
292  outputFile = MAKE_STRING(WILDCARD << ".gif");
293  }
294 
295  if (outputFile.find(WILDCARD) == string::npos) {
296  FATAL("Output file name " << outputFile << " has no wild card '" << WILDCARD << "'" << endl);
297  }
298 
299 
300  JSummaryFileRouter summary(inputFile, parameters.R_Hz);
301 
302  const JMuonPDF_t pdf(pdfFile, parameters.TTS_ns);
303 
304  const JTimeRange T_ns(parameters.TMin_ns, parameters.TMax_ns);
305 
306  typedef vector<JHitL0> JDataL0_t;
307  typedef vector<JHitW0> JDataW0_t;
308 
309 
310  // ROOT
311 
312  gROOT->SetBatch(batch);
313 
314  TApplication* tp = new TApplication("user", NULL, NULL);
315  TCanvas* cv = new TCanvas("display", "", canvas.x, canvas.y);
316 
317  JSinglePointer<TStyle> gStyle(new JStyle("gplot", cv->GetWw(), cv->GetWh()));
318 
319  gROOT->SetStyle("gplot");
320  gROOT->ForceStyle();
321 
322  const size_t NUMBER_OF_PADS = 3;
323 
324  cv->SetFillStyle(4000);
325  cv->SetFillColor(kWhite);
326  cv->Divide(NUMBER_OF_PADS, 1);
327 
328  const double Dmax = 1000.0;
329  const double Rmin = 0.0;
330  const double Rmax = min(parameters.roadWidth_m, 0.4 * Dmax);
331  const double Tmin = min(parameters.TMin_ns, -10.0);
332  const double Tmax = max(parameters.TMax_ns, +100.0);
333  const double Amin = 0.002 * (Tmax - Tmin); // minimal arrow length [ns]
334  const double Amax = 0.8 * (Tmax - Tmin); // maximal arrow length [ns]
335  const double ymin = min(-Amax, Tmin - 0.3 * Amax);
336  const double ymax = max(+Amax, Tmax + 0.5 * Amax);
337 
338  const string Xlabel[NUMBER_OF_PADS] = { "R [m]", "#phi [rad]", "z [m]" };
339  const double Xmin [NUMBER_OF_PADS] = { Rmin, -PI, -0.5 * Dmax };
340  const double Xmax [NUMBER_OF_PADS] = { Rmax, +PI, +0.5 * Dmax };
341 
342  double Xs[NUMBER_OF_PADS];
343 
344  for (size_t i = 0; i != NUMBER_OF_PADS; ++i) {
345  Xs[i] = 0.003 * (Xmax[i] - Xmin[i]) * (0.5 * NUMBER_OF_PMTS); // x-offset arrow as function of PMT number
346  }
347 
348  TH2D H2[NUMBER_OF_PADS];
349  TGraph G2[NUMBER_OF_PADS];
350 
351  for (size_t i = 0; i != NUMBER_OF_PADS; ++i) {
352 
353  H2[i] = TH2D(MAKE_CSTRING("h" << i), NULL, 100, Xmin[i] - Xs[i], Xmax[i] + Xs[i], 100, ymin, ymax);
354 
355  H2[i].GetXaxis()->SetTitle(Xlabel[i].c_str());
356  H2[i].GetYaxis()->SetTitle("#Deltat [ns]");
357 
358  H2[i].GetXaxis()->CenterTitle(true);
359  H2[i].GetYaxis()->CenterTitle(true);
360 
361  H2[i].SetStats(kFALSE);
362 
363  G2[i].Set(2);
364 
365  G2[i].SetPoint(0, H2[i].GetXaxis()->GetXmin(), 0.0);
366  G2[i].SetPoint(1, H2[i].GetXaxis()->GetXmax(), 0.0);
367 
368  cv->cd(i+1);
369 
370  H2[i].Draw("AXIS");
371  G2[i].Draw("SAME");
372  }
373 
374 
375  while (inputFile.hasNext()) {
376 
377  cout << "\revent: " << setw(8) << inputFile.getCounter() << flush;
378 
379  Evt* evt = inputFile.next();
380 
381  if (has_reconstructed_track<JPP_RECONSTRUCTION_TYPE>(*evt, rec_stages_range(application))) {
382 
383  Trk fit = get_best_reconstructed_track<JPP_RECONSTRUCTION_TYPE>(*evt, rec_stages_range(application));
384 
385  if (!event_selector(fit, *evt)) {
386  continue;
387  }
388 
389 
390  JDataL0_t dataL0;
391 
392  for (const Hit& hit : evt->hits) {
393  dataL0.push_back(JHitL0(JDAQPMTIdentifier(hit.dom_id, hit.channel_id),
394  JAxis3D(getPosition(hit.pos), getDirection(hit.dir)),
395  JHit(hit.t, hit.tot)));
396  }
397 
398  summary.update(JDAQChronometer(evt->det_id,
399  evt->run_id,
400  evt->frame_index,
401  JDAQUTCExtended(evt->t.GetSec(), evt->t.GetNanoSec() / 16)));
402 
403  const time_converter converter = time_converter(*evt);
404 
405  Trk muon; // Monte Carlo true muon
406 
407  if (has_muon(*evt)) {
408 
409  for (const auto& trk : evt->mc_trks) {
410  if (is_muon(trk)) {
411  if (trk.E > muon.E) {
412 
413  muon = trk;
414  muon.t += converter.putTime();
415 
416  setW(muon, JSTART_LENGTH_METRES, fabs(muon.len));
417  }
418  }
419  }
420  }
421 
422 
423  bool next_event = false; // goto next event
424  bool monte_carlo = false; // show Monte Carlo true muon
425 
426  while (!next_event) {
427 
428  Trk trk;
429 
430  if (!monte_carlo)
431  trk = fit;
432  else
433  trk = muon;
434 
435  JRotation3D R (getDirection(trk));
436  JLine1Z tz(getPosition (trk).rotate(R), trk.t);
437  JRange<double> Z_m;
438  /*
439  if (hasW(trk, JSTART_LENGTH_METRES)) {
440  Z_m = JRange<double>(0.0, getW(fit,JSTART_LENGTH_METRES)) + JRange<double>(parameters.ZMin_m, parameters.ZMax_m);
441  }
442  */
443  const JModel<JLine1Z> match(tz, parameters.roadWidth_m, T_ns, Z_m);
444 
445  // hit selection based on fit result
446 
447  JDataW0_t data;
448 
449  for (JDataL0_t::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
450 
451  JHitW0 hit(*i, summary.getRate(i->getPMTIdentifier()));
452 
453  hit.rotate(R);
454 
455  if (match(hit)) {
456  data.push_back(hit);
457  }
458  }
459 
460  // select first hit in PMT
461 
462  sort(data.begin(), data.end(), JHitW0::compare);
463 
464  JDataW0_t::iterator __end = unique(data.begin(), data.end(), equal_to<JDAQPMTIdentifier>());
465 
466  double E_GeV = parameters.E_GeV;
467  /*
468  if (trk.E > 0.1) {
469  E_GeV = trk.E;
470  }
471  */
472 
473  // move fit to geometrical center of hits
474 
475  JRange<double> zs(make_array(data.begin(), __end, &JHitW0::getZ));
476 
477  const double z0 = tz.getZ();
478  const double z1 = 0.5 * (zs.getLowerLimit() + zs.getUpperLimit());
479 
480  tz.setZ(z1, getSpeedOfLight());
481 
482 
483  // graphics
484 
485  TLatex latex [NUMBER_OF_PADS];
486  vector<TArrow> arrow [NUMBER_OF_PADS];
487  vector<TMarker> marker[NUMBER_OF_PADS];
488 
489  for (int i = 0; i != NUMBER_OF_PADS; ++i) {
490 
491  latex[i].SetTextAlign(12);
492  latex[i].SetTextFont(42);
493  latex[i].SetTextSize(0.06);
494 
495  latex[i].SetX(H2[i].GetXaxis()->GetXmin() + 0.05 * (H2[i].GetXaxis()->GetXmax() - H2[i].GetXaxis()->GetXmin()));
496  latex[i].SetY(H2[i].GetYaxis()->GetXmax() - 0.05 * (H2[i].GetYaxis()->GetXmax() - H2[i].GetYaxis()->GetXmin()));
497  }
498 
499  if (hasW(trk, JSTART_LENGTH_METRES) && getW(trk, JSTART_LENGTH_METRES) > 0.0) {
500 
501  marker[2].push_back(TMarker(z0 - tz.getZ(), 0.0, kFullCircle));
502  marker[2].push_back(TMarker(z0 - tz.getZ() + getW(trk, JSTART_LENGTH_METRES), 0.0, kFullCircle));
503 
504  static_cast<TAttMarker&>(marker[2][0]) = TAttMarker(kRed, kFullCircle, 0.7);
505  static_cast<TAttMarker&>(marker[2][1]) = TAttMarker(kRed, kFullCircle, 0.7);
506  }
507 
508  double chi2 = 0;
509 
510  for (JDataW0_t::const_iterator hit = data.begin(); hit != __end; ++hit) {
511 
512  const double x = hit->getX() - tz.getX();
513  const double y = hit->getY() - tz.getY();
514  const double z = hit->getZ() - tz.getZ();
515  const double R = sqrt(x*x + y*y);
516 
517  const double t1 = tz.getT() + (z + R * getTanThetaC()) * getInverseSpeedOfLight();
518 
519  JDirection3D dir(hit->getDX(), hit->getDY(), hit->getDZ()); // PMT orientation
520 
521  dir.rotate(JRotation3Z(-atan2(y,x))); // rotate PMT axis to x-z plane
522 
523  const double theta = dir.getTheta();
524  const double phi = fabs(dir.getPhi()); // rotational symmetry of Cherenkov cone
525 
526  //const double E = gWater.getE(E_GeV, z); // correct for energy loss
527  const double E = E_GeV;
528  const double dt = T_ns.constrain(hit->getT() - t1);
529 
530  JMuonPDF_t::result_type H1 = pdf.calculate(E, R, theta, phi, dt);
531  JMuonPDF_t::result_type H0(hit->getR() * 1e-9, 0.0, T_ns);
532 
533  if (H1.V >= parameters.VMax_npe) {
534  H1 *= parameters.VMax_npe / H1.V;
535  }
536 
537  H1 += H0; // signal + background
538 
539  chi2 += H1.getChi2() - H0.getChi2();
540 
541  const double derivative = H1.getDerivativeOfChi2() - H0.getDerivativeOfChi2();
542 
543  double size = derivative * arrowScale; // size of arrow
544 
545  if (fabs(size) < Amin) {
546  size = (size > 0.0 ? +Amin : -Amin);
547  } else if (fabs(size) > Amax) {
548  size = (size > 0.0 ? +Amax : -Amax);
549  }
550 
551  const double X[NUMBER_OF_PADS] = { R, atan2(y,x), z - R/getTanThetaC() };
552 
553  const double xs = (double) (NUMBER_OF_PMTS - 2 * hit->getPMTAddress()) / (double) NUMBER_OF_PMTS;
554 
555  for (size_t i = 0; i != NUMBER_OF_PADS; ++i) {
556  arrow[i].push_back(TArrow(X[i] + xs*Xs[i], dt, X[i] + xs*Xs[i], dt + size, arrowSize, arrowType.c_str()));
557  }
558  }
559 
560  latex[0].SetTitle(MAKE_CSTRING("" << FILL(6,'0') << evt->run_id << FILL() <<
561  ":" << evt->frame_index <<
562  " " << evt->trigger_counter));
563 
564  if (!monte_carlo)
565  latex[1].SetTitle(MAKE_CSTRING("Q = " << FIXED(4,0) << -chi2 << " " <<
566  "E = " << SCIENTIFIC(7,1) << trk.E << " [GeV]"));
567 
568  else
569  latex[1].SetTitle(MAKE_CSTRING("Q = " << FIXED(4,0) << -chi2));
570 
571  if (is_muon(muon)) {
572 
573  if (!monte_carlo)
574  latex[2].SetTitle(MAKE_CSTRING("#Delta#alpha = " << FIXED(6,2) << getAngle(getDirection(muon), getDirection(trk)) << " [deg]" <<
575  " z = " << FIXED(6,3) << trk.dir.z));
576  else
577  latex[2].SetTitle("Monte Carlo");
578  }
579 
580 
581  // draw
582 
583  for (int i = 0; i != NUMBER_OF_PADS; ++i) {
584 
585  cv->cd(i+1);
586 
587  latex[i].Draw();
588 
589  for (auto& a1 : arrow[i]) {
590  a1.Draw();
591  }
592 
593  for (auto& m1 : marker[i]) {
594  m1.Draw();
595  }
596  }
597 
598  cv->Update();
599 
600 
601  // action
602 
603  if (batch) {
604 
605  cv->SaveAs(replace(outputFile, WILDCARD, MAKE_STRING(inputFile.getCounter())).c_str());
606 
607  next_event = true;
608 
609  } else {
610 
611  for (int c = 0; c == 0; ) {
612 
613  if (!batch) {
614 
615  static bool first = true;
616 
617  if (first) {
618  cout << endl << "Type '?' for possible options." << endl;
619  }
620 
621  first = false;
622  }
623 
624  cout << "\n> " << flush;
625 
626  switch((c = JKeypress(true).get())) {
627 
628  case '?':
629  cout << endl;
630  cout << "possible options: " << endl;
631  cout << 'q' << " -> " << "exit application" << endl;
632  cout << 'u' << " -> " << "update canvas" << endl;
633  cout << 's' << " -> " << "save graphics to file" << endl;
634  cout << 'M' << " -> " << "Monte Carlo true muon information" << endl;
635  cout << 'F' << " -> " << "fit information" << endl;
636  if (event_selector.is_valid()) {
637  cout << 'L' << " -> " << "reload event selector" << endl;
638  }
639  cout << 'r' << " -> " << "rewind input file" << endl;
640  cout << 'R' << " -> " << "switch to ROOT mode (quit ROOT to continue)" << endl;
641  cout << 'p' << " -> " << "print event information" << endl;
642  cout << ' ' << " -> " << "next event (as well as any other key)" << endl;
643  c = 0;
644  break;
645 
646  case 'q':
647  cout << endl;
648  return 0;
649 
650  case 'u':
651  cv->Update();
652  c = 0;
653  break;
654 
655  case 's':
656  cv->SaveAs(replace(outputFile, WILDCARD, MAKE_STRING(inputFile.getCounter())).c_str());
657  c = 0;
658  break;
659 
660  case 'M':
661  if (is_muon(muon))
662  monte_carlo = true;
663  else
664  ERROR(endl << "No Monte Carlo muon available." << endl);
665  break;
666 
667  case 'F':
668  monte_carlo = false;
669  break;
670 
671  case 'r':
672  inputFile.rewind();
673  next_event = true;
674  break;
675 
676  case 'L':
677  if (event_selector.is_valid()) {
678  execute(MAKE_STRING("make -f " << getPath(argv[0]) << "/JMakeEventSelector libs"), 3);
679  event_selector.reload();
680  }
681  break;
682 
683  case 'R':
684  tp->Run(kTRUE);
685  c = 0;
686  break;
687 
688  case 'p':
689  cout << endl;
690  evt->print(cout);
691  if (debug >= debug_t) {
692  for (const auto& trk : evt->mc_trks) {
693  cout << "MC "; trk.print(cout); cout << endl;
694  }
695  for (const auto& trk : evt->trks) {
696  cout << "fit "; trk.print(cout); cout << endl;
697  }
698  for (const auto& hit : evt->hits) {
699  cout << "hit "; hit.print(cout); cout << endl;
700  }
701  }
702  c = 0;
703  break;
704 
705  default:
706  next_event = true;
707  break;
708  }
709  }
710  }
711  }
712  }
713  }
714  cout << endl;
715 }
static const int JMUONSTART
Utility class to parse command line options.
Definition: JParser.hh:1514
double getAngle(const JQuaternion3D &first, const JQuaternion3D &second)
Get space angle between quanternions.
debug
Definition: JMessage.hh:29
Vec pos
hit position
Definition: Hit.hh:25
TString replace(const TString &target, const TRegexp &regexp, const T &replacement)
Replace regular expression in input by given replacement.
Definition: JPrintResult.cc:63
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:33
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
Definition: JMuonPostfit.sh:40
double t
track time [ns] (when the particle is at pos )
Definition: Trk.hh:19
double z
Definition: Vec.hh:14
std::string getPath(const std::string &file_name)
Get path, i.e. part before last JEEP::PATHNAME_SEPARATOR if any.
Definition: JeepToolkit.hh:148
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
Rotation matrix.
Definition: JRotation3D.hh:111
Vec dir
track direction
Definition: Trk.hh:18
*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
Definition: diff-Tuna.sh:38
#define MAKE_CSTRING(A)
Make C-string.
Definition: JPrint.hh:136
Template specialisation of class JModel to match hit with muon trajectory along z-axis.
Definition: JFit/JModel.hh:34
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Definition: JParser.hh:83
Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.
Auxiliary data structure for floating point format specification.
Definition: JManip.hh:446
string outputFile
Data structure for UTC time.
double E
Energy [GeV] (either MC truth or reconstructed)
Definition: Trk.hh:20
Range of reconstruction stages.
Acoustics hit.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:127
void print(std::ostream &out=std::cout) const
Print hit.
Definition: Hit.hh:60
Axis object.
Definition: JAxis3D.hh:38
Rotation around Z-axis.
Definition: JRotation3D.hh:85
The template JSinglePointer class can be used to hold a pointer to an object.
double getW(const Trk &track, const size_t index, const double value)
Get track information.
Auxiliary class for defining the range of iterations of objects.
Definition: JLimit.hh:41
static const int JMUONPREFIT
JDirection3D getDirection(const Vec &dir)
Get direction.
JFunction1D_t::result_type result_type
Definition: JPDF_t.hh:145
JDirection3D & rotate(const JRotation3D &R)
Rotate.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition: JParser.hh:1989
Enable unbuffered terminal input.
Definition: JKeypress.hh:32
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
Definition: JVectorize.hh:54
static const int JMUONGANDALF
double getTheta() const
Get theta angle.
Definition: JVersor3D.hh:128
JPosition3D getPosition(const Vec &pos)
Get position.
#define ERROR(A)
Definition: JMessage.hh:66
double len
length, if applicable [m]
Definition: Trk.hh:22
double putTime() const
Get Monte Carlo time minus DAQ/trigger time.
static const double PI
Mathematical constants.
File router for fast addressing of summary data.
Vec dir
hit direction; i.e. direction of the PMT
Definition: Hit.hh:26
Auxiliary data structure for sequence of same character.
Definition: JManip.hh:328
Auxiliary data structure for muon PDF.
Definition: JPDF_t.hh:135
#define FATAL(A)
Definition: JMessage.hh:67
$WORKDIR ev_configure_dqsimulator txt echo process $DQ_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DQ_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
Auxiliary class for a hit with background rate value.
Definition: JHitW0.hh:21
Definition: Hit.hh:8
const double getSpeedOfLight()
Get speed of light.
static const int JSTART_LENGTH_METRES
distance between first and last hits in metres from JStart.cc
bool has_muon(const Evt &evt)
Test whether given event has a muon.
static const int JMUONSIMPLEX
double t
hit time (from tdc+calibration or MC truth)
Definition: Hit.hh:23
Data structure for L0 hit.
Definition: JHitL0.hh:27
const double getInverseSpeedOfLight()
Get inverse speed of light.
int dom_id
module identifier from the data (unique in the detector).
Definition: Hit.hh:14
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
Definition: JMatrixNZ.sh:106
Data structure for fit of straight line paralel to z-axis.
Definition: JLine1Z.hh:27
unsigned int tot
tot value as stored in raw data (int for pyroot)
Definition: Hit.hh:17
no fit printf nominal n $STRING awk v X
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
unsigned int channel_id
PMT channel id {0,1, .., 30} local to moduke.
Definition: Hit.hh:15
Object reading from a list of files.
const JLimit & getLimit() const
Get limit.
Definition: JLimit.hh:84
void print(std::ostream &out=std::cout) const
Print track.
Definition: Trk.hh:183
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Definition: Trk.hh:14
Auxiliary data structure for floating point format specification.
Definition: JManip.hh:484
Wrapper class around ROOT TStyle.
Definition: JStyle.hh:20
static const int JMUONENERGY
int debug
debug level
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Definition: Evt.hh:20
Data structure for size of TCanvas.
Definition: JCanvas.hh:26