184{
187
188
189
190
191
193 JLimit_t& numberOfEvents = inputFile.getLimit();
198
199 try {
200
201 JParser<> zap(
"Example program to verify Monte Carlo data.");
202
209
211 }
212 catch(const exception &error) {
214 }
215
216
217
218
219
220
222
224
225 try {
227 }
230 }
231 }
232
234
236
237
238
239
240
241
243
244 NOTICE(
"Apply detector offset " << offset <<
endl);
245
247
248
249
250
251
252
254
255 NOTICE(
"JDomino: Instrumented volume dimensions (x, y, r, zmin, zmax): " <<
inst_vol <<
endl);
256
257
258
259
260
261
263
264 double xmin = 2.0;
265 double xmax = 8.0;
266
267
268
275 }
276 const int nx = (
int) ((xmax - xmin) / 0.1);
277
278 const Double_t T[] = { -50.0, -20.0, -10.0, -5.0, -2.0, 0.0, +2.0, +5.0, +10.0, +15.0, +20.0, +30.0, +40.0, +50.0,
279 +75.0, +100.0, +150.0, +200.0, +250.0, +300.0, +400.0, +500.0, 1000.0 };
280
281
282
283
284
285 TH1D hits(
"hits",
NULL, 100, 0.0, 8.0);
286 TH1D trks(
"trks",
NULL, 10001, -5000.5, 5000.5);
288
289 TProfile hits_per_E_in (
"hits_per_E_in",
"average number of hits per E_{#nu} inside instrumented volume",
nx, xmin, xmax);
290 TProfile hits_per_E_out(
"hits_per_E_out",
"average number of hits per E_{#nu} outside instrumented volume",
nx, xmin, xmax);
291
293
295
297
298
299
300
301
302
305
308
311
314
317
323
324
325
326
327
328
331
334
337
341
342
343
344
345
346
347 while (inputFile.hasNext()) {
348
350
351 const Evt*
event = inputFile.next();
352
353 double NPE = 0.0;
354
357 }
358
360
362 trks.Fill(
track->type);
363 }
364
366
369 }
370
372
375
376
377
378
379
380
382
383 const int type =
hit->type;
386
388
391
393
395 event->mc_trks.end(),
397
398 if (
track == event->mc_trks.end()) {
400 continue;
401 }
402
403 if (
count_if(event->mc_trks.begin(),
404 event->mc_trks.end(),
406 ERROR(
"Hit " << *
hit <<
" has ambiguous origin." <<
endl);
407 continue;
408 }
409
410 job.Fill((
double)
track->type, npe);
411
412 if (router.hasPMT(
hit->pmt_id)) {
413
414 const JPMT& pmt = router.getPMT(
hit->pmt_id);
415
417
419
420 const double E = muon.
getE();
421 const double x =
log10(E);
423 const double t0 = muon.
getT (pmt);
425
429
431
432 const double E = neutrino.
getE();
433 const double x =
log10(E);
434 const double D =
vertex.getDistance(pmt);
435 const double t0 =
vertex.getT(pmt);
438
444 }
445 }
446 }
447 }
448
449
450
451
452
453
454 for (map_type::const_iterator i =
npe_pmt.begin(); i !=
npe_pmt.end(); ++i) {
456 }
457
458 for (map_type::const_iterator i =
npe_type.begin(); i !=
npe_type.end(); ++i) {
460 }
461
462
463
464
465
466
468
470
472
473 const double E = muon.
getE();
474 const double x =
log10(E);
475
477
479
481
482 if (R <
muRxU.GetXaxis()->GetXmax()) {
483 for (JModule::const_iterator pmt =
module->begin(); pmt !=
module->end(); ++pmt) {
485 }
486 }
487
488 if (R <
muRxT.GetXaxis()->GetXmax()) {
491 }
492 }
493 }
494 }
495 }
496
497
498
499
500
501
503
504 const double E = neutrino.
getE();
505 const double x =
log10(E);
506
509 else
511
513
516
520
521 if (D <
nuDxU.GetXaxis()->GetXmax()) {
522 for (JModule::const_iterator pmt =
module->begin(); pmt !=
module->end(); ++pmt) {
524 }
525 }
526
527 if (D <
nuDxT.GetXaxis()->GetXmax()) {
530 }
531 }
532 }
533 }
534 }
535
537
538
539
540
541
542
545
546 if (inputFile.getCounter() != 0) {
547
549
551 p->Scale(W);
552 }
553
555 i->second->Scale(W);
556 }
557
563
567 }
568
569
570
571
572
573
575
577
580
581 out.Write();
582 out.Close();
583}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
bool is_valid(T JHead::*pd) const
Check validity of given data member in JHead.
Router for direct addressing of PMT data in detector data structure.
Data structure for PMT geometry, calibration and status.
double getDistance(const JVector3D &pos) const
Get distance.
double getE() const
Get energy.
const JPosition3D & getPosition() const
Get position.
double getDot(const JAxis3D &axis) const
Get cosine angle of impact of Cherenkov light on PMT.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Template definition of a multi-dimensional oscillation probability interpolation table.
JTrack3E getTrack(const Trk &track)
Get track.
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.
double getNPE(const Hit &hit)
Get true charge of hit.
Vec getOffset(const JHead &header)
Get offset.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
size_t getSize(T(&array)[N])
Get size of c-array.
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.
std::map< int, range_type > map_type
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
JRange_t E
Energy range [GeV].
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
The Vec class is a straightforward 3-d vector, which also works in pyroot.