219{
222
223 string fileDescriptor;
225 JFileRecorder <JTYPELIST<JAAnetTypes_t, JMetaTypes_t, JRootTypes_t>::typelist>
outputFile;
226 JLimit_t& numberOfEvents = inputFile.getLimit();
227 string detectorFile;
229 bool writeEMShowers;
230 size_t numberOfHits;
231 double factor;
233
234 try {
235
237
247
250
251 JParser<> zap(
"Main program to simulate detector response to muons and showers.");
252
254 zap[
'F'] =
make_field(fileDescriptor,
"file name descriptor for CDF tables");
259 zap[
's'] =
make_field(writeEMShowers,
"store generated EM showers in event");
260 zap[
'N'] =
make_field(numberOfHits,
"minimum number of hits to output event") = 1;
261 zap[
'U'] =
make_field(factor,
"scaling factor applied to light yields") = 1.0;
264
265 zap(argc, argv);
266 }
267 catch(const exception &error) {
268 FATAL(error.what() << endl);
269 }
270
271
272 seed.set(gRandom);
273
274
275 const JMeta meta(argc, argv);
276
277 const double Zbed = 0.0;
278
281
282 if (fileDescriptor != "") {
283 CDF.push_back(JCDF_t(fileDescriptor, DIRECT_LIGHT_FROM_MUON));
284 CDF.push_back(JCDF_t(fileDescriptor, SCATTERED_LIGHT_FROM_MUON));
285 CDF.push_back(JCDF_t(fileDescriptor, DIRECT_LIGHT_FROM_DELTARAYS));
286 CDF.push_back(JCDF_t(fileDescriptor, SCATTERED_LIGHT_FROM_DELTARAYS));
287
288 CDG.push_back(JCDG_t(fileDescriptor, DIRECT_LIGHT_FROM_EMSHOWER));
289 CDG.push_back(JCDG_t(fileDescriptor, SCATTERED_LIGHT_FROM_EMSHOWER));
290 }
291
292 double maximal_road_width = 0.0;
293 double maximal_distance = 0.0;
294
295 for (size_t i = 0; i != CDF.size(); ++i) {
296
297 DEBUG(
"Range CDF["<< CDF[i].type <<
"] " << CDF[i].function.intensity.getXmax() <<
" m" << endl);
298
299 maximal_road_width = max(maximal_road_width, CDF[i].function.intensity.getXmax());
300 }
301
302 for (size_t i = 0; i != CDG.size(); ++i) {
303
304 DEBUG(
"Range CDG["<< CDG[i].type <<
"] " << CDG[i].function.intensity.getXmax() <<
" m" << endl);
305
307 maximal_road_width = max(maximal_road_width, CDG[i].function.intensity.getXmax());
308 }
309
310 maximal_distance = max(maximal_distance, CDG[i].function.intensity.getXmax());
311 }
312
313 NOTICE(
"Maximal road width [m] " << maximal_road_width << endl);
314 NOTICE(
"Maximal distance [m] " << maximal_distance << endl);
315
316
317 if (detectorFile == "" || inputFile.empty()) {
318 STATUS(
"Nothing to be done." << endl);
319 return 0;
320 }
321
323
324 try {
325
326 STATUS(
"Load detector... " << flush);
327
329
331 }
334 }
335
336
337
338 for (JDetector::iterator module =
detector.begin(); module !=
detector.end(); ) {
339 if (!module->empty())
340 ++module;
341 else
342 module = detector.erase(module);
343 }
344
347
348 if (true) {
349
350 STATUS(
"Setting up radiation tables... " << flush);
351
356#ifdef RADIATION
357 const JRadiation calcium (JSeaWater::Ca.Z, JSeaWater::Ca.A, 40, 0.01, 0.1, 0.1);
358 const JRadiation magnesium(JSeaWater::Mg.Z, JSeaWater::Mg.A, 40, 0.01, 0.1, 0.1);
359 const JRadiation potassium(JSeaWater::K .Z, JSeaWater::K .A, 40, 0.01, 0.1, 0.1);
360 const JRadiation sulphur (JSeaWater::S .Z, JSeaWater::S .A, 40, 0.01, 0.1, 0.1);
361#endif
362
363 shared_ptr<JRadiation> Hydrogen (make_shared<JRadiationFunction>(hydrogen, 300, 0.2, 1.0e11));
364 shared_ptr<JRadiation> Oxygen (make_shared<JRadiationFunction>(oxygen, 300, 0.2, 1.0e11));
365 shared_ptr<JRadiation> Chlorine (make_shared<JRadiationFunction>(chlorine, 300, 0.2, 1.0e11));
366 shared_ptr<JRadiation> Sodium (make_shared<JRadiationFunction>(sodium, 300, 0.2, 1.0e11));
367#ifdef RADIATION
368 shared_ptr<JRadiation> Calcium (make_shared<JRadiationFunction>(calcium, 300, 0.2, 1.0e11));
369 shared_ptr<JRadiation> Magnesium(make_shared<JRadiationFunction>(magnesium,300, 0.2, 1.0e11));
370 shared_ptr<JRadiation> Potassium(make_shared<JRadiationFunction>(potassium,300, 0.2, 1.0e11));
371 shared_ptr<JRadiation> Sulphur (make_shared<JRadiationFunction>(sulphur, 300, 0.2, 1.0e11));
372#endif
373
378#ifdef RADIATION
383#endif
384
389#ifdef RADIATION
394#endif
395
400#ifdef RADIATION
405#endif
406
408
409 radiation.push_back(make_shared<JDeltaRaysSource>(200,
DENSITY_SEA_WATER, parameters.Tmin_GeV));
410
415#ifdef RADIATION
416 ionization.push_back(make_shared<JACoeffSource>(Calcium,
DENSITY_SEA_WATER * JSeaWater::Ca()));
417 ionization.push_back(make_shared<JACoeffSource>(Magnesium,
DENSITY_SEA_WATER * JSeaWater::Mg()));
418 ionization.push_back(make_shared<JACoeffSource>(Potassium,
DENSITY_SEA_WATER * JSeaWater::K()));
419 ionization.push_back(make_shared<JACoeffSource>(Sulphur,
DENSITY_SEA_WATER * JSeaWater::S()));
420#endif
421
423 }
424
425
427
428 cylinder.addMargin(maximal_distance);
429
430 if (cylinder.getZmin() < Zbed) {
431 cylinder.setZmin(Zbed);
432 }
433
434 NOTICE(
"Light generation volume: " << cylinder << endl);
435
436
439
440 try {
441
442 header = inputFile.getHeader();
443
444 JHead buffer(header);
445
447
450 buffer.simul.rbegin()->date =
getDate();
451 buffer.simul.rbegin()->time =
getTime();
452
454
456
458 buffer.detector.rbegin()->filename = detectorFile;
459
461
462 offset +=
Vec(cylinder.getX(), cylinder.getY(), 0.0);
464
466
467 buffer.fixedcan.xcenter += offset.x;
468 buffer.fixedcan.ycenter += offset.y;
469 buffer.fixedcan.zmin += offset.z;
470 buffer.fixedcan.zmax += offset.z;
471
472 } else {
473
474 buffer.fixedcan.xcenter = cylinder.getX();
475 buffer.fixedcan.ycenter = cylinder.getY();
476
478
479 buffer.fixedcan.radius = buffer.can.r;
480 buffer.fixedcan.zmin = buffer.can.zmin + offset.z;
481 buffer.fixedcan.zmax = buffer.can.zmax + offset.z;
482 } else {
483
484 buffer.fixedcan.radius = cylinder.getRadius();
485 buffer.fixedcan.zmin = cylinder.getZmin();
486 buffer.fixedcan.zmax = cylinder.getZmax();
487 }
488 }
489
491
493
495
497 }
498
499 copy(buffer, header);
500 }
503 }
504
505 NOTICE(
"Offset applied to true tracks is: " << offset << endl);
506
507 TH1D job("job", NULL, 400, 0.5, 400.5);
508 TProfile cpu("cpu", NULL, 16, 0.0, 8.0);
509 TProfile2D rms("rms", NULL, 16, 0.0, 8.0, 251, -0.5, 250.5);
510 TProfile2D rad("rad", NULL, 16, 0.0, 8.0, 251, -0.5, 250.5);
511
512
514
517 }
518
522
523 const double epsilon = 1.0e-6;
525
527
529
530 STATUS(
"event: " << setw(10) << in.getCounter() <<
'\r');
DEBUG(endl);
531
532 job.Fill(1.0);
533
534 Evt* evt = in.next();
535
537 track->pos += offset;
538 }
539
541
542 event.mc_hits.clear();
543
545
548
549 for (vector<Trk>::const_iterator track = evt->
mc_trks.begin(); track != evt->
mc_trks.end(); ++track) {
550
551 if (!track->is_finalstate()) {
552 continue;
553 }
554
556
557
558
559
560
561 job.Fill(2.0);
562
564
566
567 double Zmin = intersection.first;
568 double Zmax = intersection.second;
569
570 if (Zmax - Zmin <= parameters.Dmin_m) {
571 continue;
572 }
573
574 JVertex vertex(0.0, track->t, track->E);
575
576 if (track->pos.z < Zbed) {
577
578 if (track->dir.z > 0.0)
579 vertex.step(
gRock, (Zbed - track->pos.z) / track->dir.z);
580 else
581 continue;
582 }
583
584 if (vertex.getZ() < Zmin) {
585 vertex.step(gWater, Zmin - vertex.getZ());
586 }
587
588 if (vertex.getRange() <= parameters.Dmin_m) {
589 continue;
590 }
591
592 job.Fill(3.0);
593
595
596 if (subdetector.empty()) {
597 continue;
598 }
599
600 job.Fill(4.0);
601
602 JTrack muon(vertex);
603
604 while (vertex.getE() >= parameters.Emin_GeV && vertex.getZ() < Zmax) {
605
606 const int N = radiation.size();
607
608 double li[N];
610
611 for (int i = 0; i != N; ++i) {
612 ls += li[i] = radiation[i]->getInverseInteractionLength(vertex.getE());
613 }
614
615 double As = 0.0;
616
617 for (size_t i = 0; i != ionization.size(); ++i) {
618 As += ionization[i]->getA(vertex.getE());
619 }
620
621 double step = gRandom->Exp(1.0) /
ls;
622 double range = vertex.getRange(As);
623
624 if (vertex.getE() < parameters.Emax_GeV) {
625 if (parameters.Dmax_m < range) {
626 range = parameters.Dmax_m;
627 }
628 }
629
630 double ts =
getThetaMCS(vertex.getE(), min(step,range));
631 double T2 = ts*ts;
632
633 rms.Fill(log10(vertex.getE()), (Double_t) 0, ts*ts);
634
635 vertex.getDirection() += getRandomDirection(T2/3.0);
636
637 vertex.step(As, min(step,range));
638
639 double Es = 0.0;
640
641 if (step < range) {
642
643 if (vertex.getE() >= parameters.Emin_GeV) {
644
645 double y = gRandom->Uniform(
ls);
646
647 for (int i = 0; i != N; ++i) {
648
650
651 if (y < 0.0) {
652
653 Es = radiation[i]->getEnergyOfShower(vertex.getE());
654 ts = radiation[i]->getThetaRMS(vertex.getE(), Es);
655
656 T2 += ts*ts;
657
658 rms.Fill(log10(vertex.getE()), (Double_t) radiation[i]->getID(), ts*ts);
659 rad.Fill(log10(vertex.getE()), (Double_t) radiation[i]->getID(), Es);
660
661 break;
662 }
663 }
664 }
665 }
666
667 vertex.applyEloss(getRandomDirection(T2), Es);
668
669 muon.push_back(vertex);
670 }
671
672
673
674 if (vertex.getZ() < Zmax && vertex.getRange() > 0.0) {
675
676 vertex.step(vertex.getRange());
677
678 muon.push_back(vertex);
679 }
680
681
682
684 event.mc_trks.end(),
685 make_predicate(&
Trk::id, track->id));
686
687 if (trk != event.mc_trks.end()) {
688 trk->len = (muon.rbegin()->getZ() < Zmax ? +1 : -1) * (muon.rbegin()->getZ() - muon.begin()->getZ());
690 }
691
692 for (JDetector::const_iterator module = subdetector.begin(); module != subdetector.end(); ++module) {
693
694 const double z0 = muon.begin()->getZ();
695 const double t0 = muon.begin()->getT();
696 const double Z = module->getZ() - module->getX() / getTanThetaC();
697
698 if (Z >= muon.begin()->getZ() && Z <= muon.rbegin()->getZ()) {
699
700 const JVector2D pos = muon.getPosition(Z);
701 const double R = hypot(module->getX() - pos.
getX(),
702 module->getY() - pos.
getY());
703
704 for (size_t i = 0; i != CDF.size(); ++i) {
705
706 if (R < CDF[i].integral.getXmax()) {
707
708 try {
709
710 double W = 1.0;
711
715 }
716
717 const double NPE = CDF[i].integral.getNPE(R) * module->size() * factor * W;
718 const size_t N = getPoisson(NPE);
719
720 if (N != 0) {
721
723
724 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
725
726 const double R = hypot(pmt->getX() - pos.
getX(),
727 pmt->getY() - pos.
getY());
728 const double theta = pi.constrain(pmt->getTheta());
729 const double phi = pi.constrain(fabs(pmt->getPhi()));
730
731 npe.push_back(CDF[i].function.getNPE(R, theta, phi) * factor * W);
732 }
733
735
736 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
737
738 const double R = hypot(pmt->getX() - pos.
getX(),
739 pmt->getY() - pos.
getY());
740 const double Z = pmt->getZ() - z0;
741 const double theta = pi.constrain(pmt->getTheta());
742 const double phi = pi.constrain(fabs(pmt->getPhi()));
743
744 size_t n0 = min(ns[
distance(module->begin(),pmt)], parameters.Nmax_PMT);
745
746 job.Fill((double) (100 + CDF[i].type), (double) n0);
747
748 while (n0 != 0) {
749
750 const double t1 = CDF[i].function.getTime(R, theta, phi, gRandom->Rndm());
752
753 mc_hits.push_back(
JHit_t(mc_hits.size() + 1,
754 pmt->getID(),
756 track->id,
757 t0 + (R * getTanThetaC() + Z) / C + t1,
758 n1));
759
760 n0 -= n1;
761 }
762 }
763
764 if (std::accumulate(npe.begin(), npe.end(), 0.0) > NPE) {
765 job.Fill((double) (300 + CDF[i].type));
766 }
767 }
768 }
769 catch(const exception& error) {
770 job.Fill((double) (200 + CDF[i].type));
771 }
772 }
773 }
774 }
775 }
776
777 for (JTrack::const_iterator vertex = muon.begin(); vertex != muon.end(); ++vertex) {
778
779 const double Es = vertex->getEs();
780
781 if (Es >= parameters.Ecut_GeV) {
782
783 const double z0 = vertex->getZ();
784 const double t0 = vertex->getT();
786
788
789 if (writeEMShowers) {
790 origin =
event.mc_trks.size() + 1;
791 }
792
793 int number_of_hits = 0;
794
795 JDetectorSubset_t::range_type range = subdetector.getRange(z0 - maximal_distance,
796 z0 + maximal_distance);
797
798 for (JDetector::const_iterator module = range.begin(); module != range.end(); ++module) {
799
800 const double R = hypot(module->getX() - vertex->getX(),
801 module->getY() - vertex->getY());
802 const double Z = module->getZ() - z0 - DZ;
803 const double D = sqrt(R*R + Z*Z);
804 const double cd = Z / D;
805
806 for (size_t i = 0; i != CDG.size(); ++i) {
807
808 if (D < CDG[i].integral.getXmax()) {
809
810 try {
811
812 const double NPE = CDG[i].integral.getNPE(D, cd) * Es * module->size() * factor;
813 const size_t N = getPoisson(NPE);
814
815 if (N != 0) {
816
818
819 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
820
821 const double R = hypot(pmt->getX() - vertex->getX(),
822 pmt->getY() - vertex->getY());
823 const double Z = pmt->getZ() - z0 - DZ;
824 const double D = sqrt(R*R + Z*Z);
825 const double cd = Z / D;
826 const double theta = pi.constrain(pmt->getTheta());
827 const double phi = pi.constrain(fabs(pmt->getPhi()));
828
829 npe.push_back(CDG[i].function.getNPE(D, cd, theta, phi) * Es * factor);
830 }
831
833
834 for (JModule::const_iterator pmt = module->begin(); pmt != module->end(); ++pmt) {
835
836 const double R = hypot(pmt->getX() - vertex->getX(),
837 pmt->getY() - vertex->getY());
838 const double theta = pi.constrain(pmt->getTheta());
839 const double phi = pi.constrain(fabs(pmt->getPhi()));
840
841 size_t n0 = min(ns[
distance(module->begin(),pmt)], parameters.Nmax_PMT);
842
843 job.Fill((double) (100 + CDG[i].type), (double) n0);
844
845 while (n0 != 0) {
846
848 const double Z = pmt->getZ() - z0 - dz;
849 const double D = sqrt(R*R + Z*Z);
850 const double cd = Z / D;
851
852 const double t1 = CDG[i].function.getTime(D, cd, theta, phi, gRandom->Rndm());
854
855 mc_hits.push_back(
JHit_t(mc_hits.size() + 1,
856 pmt->getID(),
858 origin,
860 n1));
861
862 n0 -= n1;
863
864 number_of_hits += n1;
865 }
866 }
867
868 if (std::accumulate(npe.begin(), npe.end(), 0.0) > NPE) {
869 job.Fill((double) (300 + CDG[i].type));
870 }
871 }
872 }
873 catch(const exception& error) {
874 job.Fill((double) (200 + CDG[i].type));
875 }
876 }
877 }
878 }
879
880 if (writeEMShowers && number_of_hits != 0) {
881
882 event.mc_trks.push_back(
JTrk_t(origin,
884 track->id,
885 track->pos + track->dir * vertex->getZ(),
886 track->dir,
887 vertex->getT(),
888 Es));
889 }
890 }
891 }
892
893 } else if (track->len > 0.0) {
894
895
896
897
898
899 job.Fill(6.0);
900
901 const double z0 = 0.0;
902 const double z1 = z0 + track->len;
903 const double t0 = track->t;
904 const double E = track->E;
905
907
909
910 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
911
913
914 const double R = pos.
getX();
916
917 if (Z < z0 ||
918 Z > z1 ||
919 R > maximal_road_width) {
920 continue;
921 }
922
923 for (size_t i = 0; i != CDF.size(); ++i) {
924
925 double W = 1.0;
926
928
931 else
932 continue;
933 }
934
935 if (R < CDF[i].integral.getXmax()) {
936
937 try {
938
939 const double NPE = CDF[i].integral.getNPE(R) * module->size() * factor * W;
940 const size_t N = getPoisson(NPE);
941
942 if (N != 0) {
943
944 buffer = *module;
945
947
949
950 for (JModule::const_iterator pmt = buffer.begin(); pmt != buffer.end(); ++pmt) {
951
952 const double R = pmt->getX();
953 const double theta = pi.constrain(pmt->getTheta());
954 const double phi = pi.constrain(fabs(pmt->getPhi()));
955
956 npe.push_back(CDF[i].function.getNPE(R, theta, phi) * factor * W);
957 }
958
960
961 for (JModule::const_iterator pmt = buffer.begin(); pmt != buffer.end(); ++pmt) {
962
963 const double R = pmt->getX();
964 const double Z = pmt->getZ() - z0;
965 const double theta = pi.constrain(pmt->getTheta());
966 const double phi = pi.constrain(fabs(pmt->getPhi()));
967
968 size_t n0 = min(ns[
distance(buffer.cbegin(),pmt)], parameters.Nmax_PMT);
969
970 job.Fill((double) (120 + CDF[i].type), (double) n0);
971
972 while (n0 != 0) {
973
974 const double t1 = CDF[i].function.getTime(R, theta, phi, gRandom->Rndm());
976
977 mc_hits.push_back(
JHit_t(mc_hits.size() + 1,
978 pmt->getID(),
980 track->id,
981 t0 + (R * getTanThetaC() + Z) / C + t1,
982 n1));
983
984 n0 -= n1;
985 }
986 }
987
988 if (std::accumulate(npe.begin(), npe.end(), 0.0) > NPE) {
989 job.Fill((double) (320 + CDF[i].type));
990 }
991 }
992 }
993 catch(const exception& error) {
994 job.Fill((double) (220 + CDF[i].type));
995 }
996 }
997 }
998 }
999
1000 if (!buffer.empty()) {
1001 job.Fill(7.0);
1002 }
1003
1005
1007
1008
1009
1010
1011
1012 job.Fill(8.0);
1013
1014 double E = track->E;
1015
1016 try {
1018 }
1019 catch(const exception& error) {
1020 ERROR(error.what() << endl);
1021 }
1022
1023 E =
pythia(track->type, E);
1024
1025 if (E >= parameters.Ecut_GeV && cylinder.getDistance(
getPosition(*track)) < parameters.Dmin_m) {
1026
1027 const double z0 = 0.0;
1028 const double t0 = track->t;
1030
1032
1034
1035 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
1036
1038
1039 const double R = pos.
getX();
1040 const double Z = pos.
getZ() - z0 - DZ;
1041 const double D = sqrt(R*R + Z*Z);
1042 const double cd = Z / D;
1043
1044 for (size_t i = 0; i != CDG.size(); ++i) {
1045
1046 if (D < CDG[i].integral.getXmax()) {
1047
1048 try {
1049
1050 const double NPE = CDG[i].integral.getNPE(D, cd) * E * module->size() * factor;
1051 const size_t N = getPoisson(NPE);
1052
1053 if (N != 0) {
1054
1055 buffer = *module;
1056
1058
1060
1061 for (JModule::const_iterator pmt = buffer.begin(); pmt != buffer.end(); ++pmt) {
1062
1063 const double R = pmt->getX();
1064 const double Z = pmt->getZ() - z0 - DZ;
1065 const double D = sqrt(R*R + Z*Z);
1066 const double cd = Z / D;
1067 const double theta = pi.constrain(pmt->getTheta());
1068 const double phi = pi.constrain(fabs(pmt->getPhi()));
1069
1070 npe.push_back(CDG[i].function.getNPE(D, cd, theta, phi) * E * factor);
1071 }
1072
1074
1075 for (JModule::const_iterator pmt = buffer.begin(); pmt != buffer.end(); ++pmt) {
1076
1077 const double theta = pi.constrain(pmt->getTheta());
1078 const double phi = pi.constrain(fabs(pmt->getPhi()));
1079
1080 size_t n0 = min(ns[
distance(buffer.cbegin(),pmt)], parameters.Nmax_PMT);
1081
1082 job.Fill((double) (140 + CDG[i].type), (double) n0);
1083
1084 while (n0 != 0) {
1085
1087 const double Z = pmt->getZ() - z0 - dz;
1088 const double D = sqrt(R*R + Z*Z);
1089 const double cd = Z / D;
1090
1091 const double t1 = CDG[i].function.getTime(D, cd, theta, phi, gRandom->Rndm());
1093
1094 mc_hits.push_back(
JHit_t(mc_hits.size() + 1,
1095 pmt->getID(),
1097 track->id,
1098 t0 + (dz + D * getIndexOfRefraction()) / C + t1,
1099 n1));
1100
1101 n0 -= n1;
1102 }
1103 }
1104
1105 if (std::accumulate(npe.begin(), npe.end(), 0.0) > NPE) {
1106 job.Fill((double) (340 + CDG[i].type));
1107 }
1108 }
1109 }
1110 catch(const exception& error) {
1111 job.Fill((double) (240 + CDG[i].type));
1112 }
1113 }
1114 }
1115 }
1116
1117 if (!buffer.empty()) {
1118 job.Fill(9.0);
1119 }
1120
1121 } else {
1122 job.Fill(21.0);
1123 }
1124 }
1125 }
1126 }
1127
1128 if (!mc_hits.empty()) {
1129
1130 mc_hits.
merge(parameters.Tmax_ns);
1131
1132 event.mc_hits.resize(mc_hits.size());
1133
1134 copy(mc_hits.begin(), mc_hits.end(), event.mc_hits.begin());
1135 }
1136
1138
1141 }
1142
1143 if (event.mc_hits.size() >= numberOfHits) {
1144
1146
1147 job.Fill(10.0);
1148 }
1149 }
1151
1157
1159
1161
1163}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
int numberOfBins
number of bins for average CDF integral of optical module
double safetyFactor
safety factor for average CDF integral of optical module
static const char *const APPLICATION_JSIRENE
detector simulation
std::vector< JAANET::simul > simul
JAANET::coord_origin coord_origin
std::vector< JAANET::detector > detector
JAANET::fixedcan fixedcan
Detector subset without binary search functionality.
Detector subset with binary search functionality.
Data structure for a composite optical module.
void transform(const JRotation3D &R, const JVector3D &pos)
Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&,...
Utility class to parse parameter values.
Auxiliary class for CPU timing and usage.
unsigned long long usec_ucpu
Data structure for vector in two dimensions.
double getY() const
Get y position.
double getX() const
Get x position.
Data structure for position in three dimensions.
double getZ() const
Get z position.
double getX() const
Get x position.
Utility class to parse command line options.
double getLength(const double E, const double P, const double eps=1.0e-5) const
Get shower length for a given integrated probability.
double getMaximum(const double E) const
Get depth of shower maximum.
Auxiliary class for the calculation of the muon radiative cross sections.
static constexpr radiation_type GNrad_t
static constexpr radiation_type Brems_t
static constexpr radiation_type EErad_t
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
JAxis3D getAxis(const Trk &track)
Get axis.
Vec getOrigin(const JHead &header)
Get origin.
double getKineticEnergy(const Trk &trk)
Get track kinetic energy.
JTransformation3D getTransformation(const Trk &track)
Get transformation.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
bool is_neutrino(const Trk &track)
Test whether given track is a neutrino.
void copy(const Head &from, JHead &to)
Copy header from from to to.
JPosition3D getPosition(const Vec &pos)
Get position.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
bool is_tau(const Trk &track)
Test whether given track is a (anti-)tau.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
const char * getGITVersion()
Get GIT version.
bool is_deltarays(const int pdf)
Test if given PDF type corresponds to Cherenkov light from delta-rays.
static const double DENSITY_SEA_WATER
Fixed environment values.
static const JGeanz geanz(1.85, 0.62, 0.54)
Function object for longitudinal EM-shower profile.
double getThetaMCS(const double E, const double x, const double X0, const double M, const double Q)
Get multiple Coulomb scattering angle.
double getIndexOfRefraction()
Get average index of refraction of water corresponding to group velocity.
static const JGeane_t gRock(2.67e-1 *0.9 *DENSITY_ROCK, 3.40e-4 *1.2 *DENSITY_ROCK)
Function object for energy loss of muon in rock.
bool is_scattered(const int pdf)
Test if given PDF type corresponds to scattered light.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
JHitType_t getHitType(const JPDFType_t pdf, const bool shower=false)
Get hit type corresponding to given PDF type.
static const JPythia pythia
Function object for relative light yield as a function of GEANT particle code.
const struct JSIRENE::number_of_photo_electrons_type getNumberOfPhotoElectrons
const char * getTime()
Get current local time conform ISO-8601 standard.
const char * getDate()
Get current local date conform ISO-8601 standard.
const char *const energy_lost_in_can
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
static const JPDB & getInstance()
Get particle data book.
Generator for simulation.
Auxiliary class for PMT parameters including threshold.
Template definition of random value generator.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
static double getEnergyLossFromMuon(const double E, const JEnergyRange T_GeV=JEnergyRange(TMIN_GEV, TMAX_GEV))
Equivalent EM-shower energy loss due to delta-rays per unit muon track length in sea water.
static double getTmin()
Get minimum delta-ray kinetic energy.
static double getEnergyLossFromTau(const double E, const JEnergyRange T_GeV=JEnergyRange(TMIN_GEV, TMAX_GEV))
Equivalent EM-shower energy loss due to delta-rays per unit tau track length in sea water.
static constexpr atom_type Cl
static constexpr atom_type H
static constexpr atom_type O
static constexpr atom_type Na
Auxiliary class to set-up Hit.
Auxiliary data structure for list of hits with hit merging capability.
void merge(const double Tmax_ns)
Merge hits on same PMT that are within given time window.
Auxiliary class to set-up Trk.
Vertex of energy loss of muon.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary data structure to list files in directory.
The Vec class is a straightforward 3-d vector, which also works in pyroot.