213{
217
219 JLimit_t& numberOfEvents = inputFile.getLimit();
222 double Tmax_ns;
223 double roadWidth_m;
224 double ctMin;
226 char cluster;
229
230 try {
231
232 JParser<> zap(
"Example program to test performance of various hit filters.");
233
242 zap[
'c'] =
make_field(cluster) =
'A',
'B',
'C',
'D',
'E',
'F';
245
247 }
248 catch(const exception &error) {
250 }
251
252
254
255
257
258 try {
260 }
263 }
264
267
269
271
272
274
277
279
281
283
284 for ( ;
x < 30.0;
x += 1.0)
285 X.push_back(x);
286
287 for ( ;
x < 50.0;
x += 2.0)
288 X.push_back(x);
289
290 for ( ;
x < 100.0;
x += 5.0)
291 X.push_back(x);
292
293 for ( ;
x < 200.0;
x += 10.0)
294 X.push_back(x);
295
298
299 } else {
300
303 }
304
313
314
317
318 JMap_t zmap;
323 const JHorizon
horizon(0.2, 2);
324
326
327
328 while (inputFile.hasNext()) {
329
331
333
335 const Evt*
event = ps;
336
338
340 const double E = neutrino.
E;
341
342
344
345 {
347
349
350
351
355 }
356 }
357 }
358
359 if (muon != event->mc_trks.end()) {
360
362 double t0 = muon->t;
363
365
367
369
370
371
372 zmap.clear();
373
375
378 zmap[
pmtRouter.getParentModuleID(i->pmt_id)].push_back(*i);
379 }
380 }
381
382
383
384
385 for (JMap_t::iterator i = zmap.begin(); i != zmap.end(); ) {
386
387 i->second.compile(Tmax_ns, 2);
388
389 if (i->second.empty())
390 zmap.erase(i++);
391 else
392 ++i;
393 }
394
395 const int L1mc = zmap.size();
396
397
398
399
402
404
405 for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
406
407 zbuf.clear();
408
409 buildL2(*i, moduleRouter.getModule(i->getModuleID()),
back_inserter(zbuf));
410
411 if (!zbuf.empty()) {
412
414
415 dataL1.push_back(*zbuf.begin());
416 }
417 }
418
419
420
421
422 JDataL1_t::iterator __end = dataL1.begin();
423
424 switch (cluster) {
425
426 case 'A':
427
429 break;
430
431 case 'B':
433 break;
434
435 case 'C':
437 break;
438
439 case 'D':
441 break;
442
443 case 'E':
444
445 for (JDataL1_t::iterator i = dataL1.begin(); i != dataL1.end(); ++i)
446 i->rotate(R);
447
449
450 for (JDataL1_t::iterator i = dataL1.begin(); i != dataL1.end(); ++i)
451 i->rotate_back(R);
452
453 break;
454
455 case 'F':
456
458
459 for (JDataL1_t::iterator i = dataL1.begin(); i != dataL1.end(); ++i)
460 i->rotate(R);
461
464
465 for (JDataL1_t::iterator i = dataL1.begin(); i != dataL1.end(); ++i)
466 i->rotate_back(R);
467
468 break;
469
470 default:
471 __end = dataL1.end();
472 break;
473 }
474
475
476
477
478 JDataL1_t::iterator
__q = __end;
479
482
484
486
488
489 if (zmap[
hit->getModuleID()].has(
JTimeRange(t1 - 0.5*Tmax_ns, t1 + 0.5*Tmax_ns))) {
490
492
494
495 } else {
496
498 }
499 }
500
501
502 if (
L1mc != 0 && !
L1.empty()) {
503
505
508 else
510
513
514
515
516
517 for (JDataL1_t::iterator
hit = dataL1.begin();
hit != __end; ++
hit) {
518 hit->transform(R, pos);
519 }
520
521
522 for (JDataL1_t::iterator
hit = dataL1.begin();
hit != __end; ++
hit) {
523
525
526 double dot = +1.0;
527
528 for (JHitL1::const_iterator i =
hit->begin(); i !=
hit->end(); ++i) {
529 if (i->getDot(
gui) < dot)
530 dot = i->getDot(
gui);
531 }
532
533 const double w = (
hit->rbegin()->getT() -
hit->begin()->getT());
534
540 } else {
545 }
546 }
547 }
548 }
549 }
550 }
552
553 out.Write();
554 out.Close();
555}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Router for direct addressing of module data in detector data structure.
Router for direct addressing of PMT data in detector data structure.
Data structure for position in three dimensions.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Data structure for normalised vector in three dimensions.
Template definition of a multi-dimensional oscillation probability interpolation table.
Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.
JDirection3D getDirection(const Vec &dir)
Get direction.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
JPosition3D getPosition(const Vec &pos)
Get position.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
bool is_noise(const Hit &hit)
Verify hit origin.
Vec getOffset(const JHead &header)
Get offset.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
double getCosThetaC()
Get average cosine of Cherenkov angle of water corresponding to group velocity.
const double getInverseSpeedOfLight()
Get inverse speed of light.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
double getSinThetaC()
Get average sine of Cherenkov angle of water corresponding to group velocity.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
JHitIterator_t clusterize(JHitIterator_t __begin, JHitIterator_t __end, const JMatch_t &match, const int Nmin=1)
Partition data according given binary match operator.
JHitIterator_t clusterizeWeight(JHitIterator_t __begin, JHitIterator_t __end, const JMatch_t &match)
Partition data according given binary match operator.
JMatchHelper< JHit_t > make_match(bool(*match)(const JHit_t &, const JHit_t &))
Auxiliary method to make JMatch object based on pointer to match function.
KM3NeT DAQ data structures and auxiliaries.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
General purpose class for multiple pointers.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Data structure for L2 parameters.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
double E
Energy [GeV] (either MC truth or reconstructed)
The Vec class is a straightforward 3-d vector, which also works in pyroot.