Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JHead.hh
Go to the documentation of this file.
1 #ifndef __JAANET__JHEAD__
2 #define __JAANET__JHEAD__
3 
4 #include <string>
5 #include <vector>
6 #include <cmath>
7 #include <ctype.h>
8 #include <sstream>
9 
10 #include "TObject.h"
11 
14 
15 #include "JLang/JException.hh"
17 #include "JLang/JLangToolkit.hh"
18 
19 #include "JROOT/JRootClass.hh"
20 
21 
22 /**
23  * \author mdejong
24  */
25 
26 namespace JAANET {}
27 namespace JPP { using namespace JAANET; }
28 
29 namespace JAANET {
30 
31  using JLANG::JException;
33 
34 
35  static const char AANET_TAG_SEPARATOR = '_'; //!< Separator for AAnet tag extension for multiple tags ("_<counter>").
36 
37  class JHead; // forward declaration for copy methods
38 
39 
40  /**
41  * Copy header from <tt>from</tt> to <tt>to</tt>.
42  *
43  * \param from header
44  * \param to header
45  */
46  extern void copy(const JHead& from, Head& to);
47 
48 
49  /**
50  * Copy header from <tt>from</tt> to <tt>to</tt>.
51  *
52  * \param from header
53  * \param to header
54  */
55  extern void copy(const Head& from, JHead& to);
56 
57 
58  /**
59  * Get tag without aanet extension "_<counter>" for identical tags.
60  *
61  * \param tag tag
62  * \return tag
63  */
64  inline std::string getTag(const std::string& tag)
65  {
66  using namespace std;
67 
68  const string::size_type pos = tag.find(AANET_TAG_SEPARATOR);
69 
70  if (pos != string::npos) {
71 
72  for (string::size_type i = pos + 1; i != tag.size(); ++i) {
73  if (!isdigit(tag[i])) {
74  return tag;
75  }
76  }
77 
78  return tag.substr(0, pos);
79  }
80 
81  return tag;
82  }
83 
84 
85  /**
86  * Get tag with aanet extension "_<counter>" for identical tags.
87  *
88  * \param tag tag
89  * \param counter counter
90  * \return tag
91  */
92  inline std::string getTag(const std::string& tag, const int counter)
93  {
94  std::ostringstream os;
95 
96  os << tag << AANET_TAG_SEPARATOR << counter;
97 
98  return os.str();
99  }
100 
101 
102  /**
103  * Start of run record.
104  */
105  struct start_run {
106  /**
107  * Default constructor.
108  */
110  run_id(0)
111  {}
112 
113  int run_id; ///< MC run number
114 
116  };
117 
118 
119  /**
120  * General purpose string class.
121  */
122  struct String {
123  /**
124  * Default constructor.
125  */
126  String() :
127  buffer()
128  {}
129 
130  /**
131  * Test match.
132  *
133  * \param object string
134  * \return true if matches; else false
135  */
136  inline bool match(const String& object) const
137  {
138  return !(*this).less(object) && !(object).less(*this);
139  }
140 
141  /**
142  * Comparison.
143  *
144  * \param object string
145  * \return true if this string less than given string; else false
146  */
147  inline bool less(const String& object) const
148  {
149  using namespace std;
150 
151  istringstream i0(this ->buffer);
152  istringstream i1(object.buffer);
153 
154  vector<string> v0;
155  vector<string> v1;
156 
157  copy(istream_iterator<string>(i0), istream_iterator<string>(), back_inserter(v0));
158  copy(istream_iterator<string>(i1), istream_iterator<string>(), back_inserter(v1));
159 
160  return v0 < v1;
161  }
162 
163  /**
164  * Read string from input stream.
165  *
166  * \param in input stream
167  * \param object string
168  * \return input stream
169  */
170  friend inline std::istream& operator>>(std::istream& in, String& object)
171  {
172  return std::getline(in, object.buffer);
173  }
174 
175  /**
176  * Write string to output stream.
177  *
178  * \param out output stream
179  * \param object string
180  * \return output stream
181  */
182  friend inline std::ostream& operator<<(std::ostream& out, const String& object)
183  {
184  return out << object.buffer;
185  }
186 
187  std::string buffer; ///< General purpose name
188 
189  ClassDefNV(String,1);
190  };
191 
192 
193  /**
194  * Detector file.
195  */
196  struct detector
197  {
198  /**
199  * Default constructor.
200  */
202  {}
203 
204  /**
205  * Test match.
206  *
207  * \param object detector
208  * \return true if matches; else false
209  */
210  inline bool match(const detector& object) const
211  {
212  return this->program == object.program && this->filename == object.filename;
213  }
214 
215  /**
216  * Read detector from input stream.
217  *
218  * \param in input stream
219  * \param object detector
220  * \return input stream
221  */
222  friend inline std::istream& operator>>(std::istream& in, detector& object)
223  {
224  using namespace JPP;
225 
226  in >> object.program >> object.filename;
227 
228  if (!in || is_integer(object.filename)) { // legacy
229  object.filename = object.program;
230  object.program = "?";
231  }
232 
233  return in;
234  }
235 
236  /**
237  * Write detector to output stream.
238  *
239  * \param out output stream
240  * \param object detector
241  * \return output stream
242  */
243  friend inline std::ostream& operator<<(std::ostream& out, const detector& object)
244  {
245  return out << object.program << ' ' << object.filename;
246  }
247 
248  std::string program;
249  std::string filename;
250 
251  ClassDefNV(detector,1);
252  };
253 
254 
255  /**
256  * Muon descriptor file.
257  */
258  struct muon_desc_file :
259  public String
260  {
262  };
263 
264 
265  /**
266  * Target.
267  */
268  struct target :
269  public String
270  {
271  ClassDefNV(target,1);
272  };
273 
274 
275  /**
276  * Neutrino cross section file.
277  */
278  struct XSecFile :
279  public String
280  {
281  ClassDefNV(XSecFile,1);
282  };
283 
284 
285  /**
286  * Drawing.
287  */
288  struct drawing :
289  public String
290  {
291  ClassDefNV(drawing,1);
292  };
293 
294 
295  /**
296  * General purpose class of phase space generation.
297  */
298  struct cut {
299  /**
300  * Default constructor.
301  */
302  cut() :
303  Emin(0),
304  Emax(0),
305  cosTmin(0),
306  cosTmax(0)
307  {}
308 
309  /**
310  * Comparison.
311  *
312  * \param object cut
313  * \return true if this cut less than given cut; else false
314  */
315  inline bool less(const cut& object) const
316  {
317  if (Emin == object.Emin) {
318 
319  if (Emax == object.Emax) {
320 
321  if (cosTmin == object.cosTmin)
322  return cosTmax < object.cosTmax;
323  else
324  return cosTmin < object.cosTmin;
325 
326  } else {
327 
328  return Emax < object.Emax;
329  }
330 
331  } else {
332 
333  return Emin < object.Emin;
334  }
335  }
336 
337  /**
338  * Test match.
339  *
340  * \param object cut
341  * \return true if matches; else false
342  */
343  inline bool match(const cut& object) const
344  {
345  return (Emin == object.Emin &&
346  Emax == object.Emax &&
347  cosTmin == object.cosTmin &&
348  cosTmax == object.cosTmax);
349  }
350 
351  double Emin; ///< Minimal energy [GeV]
352  double Emax; ///< Maximal energy [GeV]
353  double cosTmin; ///< Minimal cosine zenith angle
354  double cosTmax; ///< Maximal cosine zenith angle
355 
356  ClassDefNV(cut,1);
357  };
358 
359 
360  /**
361  * Phase space of primary particle.
362  */
363  struct cut_primary :
364  public cut
365  {
367  };
368 
369 
370  /**
371  * Phase space of atmospheric muon generation.
372  */
373  struct cut_seamuon :
374  public cut
375  {
377  };
378 
379 
380  /**
381  * Phase space of incoming particle
382  */
383  struct cut_in :
384  public cut
385  {
386  ClassDefNV(cut_in,1);
387  };
388 
389 
390  /**
391  * Phase space of incident neutrino.
392  */
393  struct cut_nu :
394  public cut
395  {
396  ClassDefNV(cut_nu,1);
397  };
398 
399 
400  /**
401  * Description of Monte Carlo event generation applications.
402  */
403  struct generator {
404  /**
405  * Default constructor.
406  */
408  program(),
409  version(),
410  date(),
411  time()
412  {}
413 
414  /**
415  * Comparison.
416  *
417  * \param object generator
418  * \return true if this primary particle is less than given primary particle; else false
419  */
420  inline bool less(const generator& object) const
421  {
422  return program < object.program;
423  }
424 
425  /**
426  * Test match.
427  *
428  * Note that only the name of program is matched.
429  *
430  * \param object generator
431  * \return true if matches; else false
432  */
433  inline bool match(const generator& object) const
434  {
435  return program == object.program;
436  }
437 
438  std::string program; ///< program name
439  std::string version; ///< program version
440  std::string date; ///< processing date
441  std::string time; ///< processing time
442 
444  };
445 
446 
447  /**
448  * Physics information.
449  */
450  struct physics :
451  public String
452  {
453  ClassDefNV(physics,1);
454  };
455 
456 
457  /**
458  * Generator for simulation.
459  */
460  struct simul :
461  public generator
462  {
463  ClassDefNV(simul,1);
464  };
465 
466 
467  /**
468  * Neutrino energy spectrum.
469  */
470  struct spectrum {
471  /**
472  * Default constructor.
473  */
474  spectrum() :
475  alpha(0)
476  {}
477 
478  /**
479  * Comparison.
480  *
481  * \param object spectrum
482  * \return true if this spectrum less than given spectrum; else false
483  */
484  inline bool less(const spectrum& object) const
485  {
486  return alpha < object.alpha;
487  }
488 
489  /**
490  * Test match.
491  *
492  * \param object spectrum
493  * \return true if matches; else false
494  */
495  inline bool match(const spectrum& object) const
496  {
497  return (alpha == object.alpha);
498  }
499 
500  double alpha; ///< Energy spectrum: \f$ \Phi \propto E^{-\alpha} \f$
501 
502  ClassDefNV(spectrum,1);
503  };
504 
505 
506  /**
507  * The cylinder used for photon tracking.
508  */
509  struct can {
510  /**
511  * Default constructor.
512  */
513  can() :
514  zmin(0),
515  zmax(0),
516  r(0)
517  {}
518 
519  /**
520  * Test match.
521  *
522  * \param object can
523  * \return true if matches; else false
524  */
525  inline bool match(const can& object) const
526  {
527  return (zmin == object.zmin &&
528  zmax == object.zmax &&
529  r == object.r);
530  }
531 
532  double zmin; ///< Bottom [m]
533  double zmax; ///< Top [m]
534  double r; ///< Radius [m]
535 
536  ClassDefNV(can,1);
537  };
538 
539 
540  /**
541  * The fixed cylinder used for photon tracking.
542  */
543  struct fixedcan {
544  /**
545  * Default constructor.
546  */
548  xcenter(0),
549  ycenter(0),
550  zmin(0),
551  zmax(0),
552  radius(0)
553  {}
554 
555  /**
556  * Test match.
557  *
558  * \param object can
559  * \return true if matches; else false
560  */
561  inline bool match(const fixedcan& object) const
562  {
563  return (xcenter == object.xcenter &&
564  xcenter == object.ycenter &&
565  zmin == object.zmin &&
566  zmax == object.zmax &&
567  radius == object.radius);
568  }
569 
570  double xcenter; ///< x-center [m]
571  double ycenter; ///< y-center [m]
572  double zmin; ///< Bottom [m]
573  double zmax; ///< Top [m]
574  double radius; ///< Radius [m]
575 
576  ClassDefNV(fixedcan,1);
577  };
578 
579 
580  /**
581  * Neutrino vertex volume.
582  */
583  struct genvol {
584  /**
585  * Default constructor.
586  */
587  genvol() :
588  zmin(0),
589  zmax(0),
590  r(0),
591  volume(0),
592  numberOfEvents(0)
593  {}
594 
595  /**
596  * Comparison.
597  *
598  * \param object genvol
599  * \return true if this genvol less than given genvol; else false
600  */
601  inline bool less(const genvol& object) const
602  {
603  return volume < object.volume;
604  }
605 
606  /**
607  * Test match.
608  *
609  * \param object generation volume
610  * \return true if matches; else false
611  */
612  inline bool match(const genvol& object) const
613  {
614  return (zmin == object.zmin &&
615  zmax == object.zmax &&
616  r == object.r);
617  }
618 
619  /**
620  * Addition.
621  *
622  * \param object generation volume
623  * \return this generation volume
624  */
625  inline genvol& add(const genvol& object)
626  {
627  numberOfEvents += object.numberOfEvents;
628 
629  return *this;
630  }
631 
632  /**
633  * Scale.
634  *
635  * \param factor 1D scale factor
636  * \param z z position
637  * \return this genvol
638  */
639  inline genvol& mul(const double factor,
640  const double z = 0.0)
641  {
642  zmin = (zmin - z) * factor + z;
643  zmax = (zmax - z) * factor + z;
644  r *= factor;
645  volume *= factor * factor * factor;
646 
647  return *this;
648  }
649 
650  double zmin; ///< Bottom [m]
651  double zmax; ///< Top [m]
652  double r; ///< Radius [m]
653  double volume; ///< Volume [m^3]
654  double numberOfEvents; ///< Number of events
655 
656  ClassDefNV(genvol,1);
657  };
658 
659 
660  /**
661  * Coordinate origin.
662  */
663  struct coord_origin :
664  public Vec
665  {
666  /**
667  * Default constructor.
668  */
670  Vec()
671  {}
672 
673  /**
674  * Constructor.
675  *
676  * \param x x position
677  * \param y y position
678  * \param z z position
679  */
680  coord_origin(const double x,
681  const double y,
682  const double z) :
683  Vec(x,y,z)
684  {}
685 
686  /**
687  * Test match.
688  *
689  * \param object coordinate origin
690  * \return true if matches; else false
691  */
692  inline bool match(const coord_origin& object) const
693  {
694  return (x == object.x &&
695  y == object.y &&
696  z == object.z);
697  }
698 
700  };
701 
702 
703  /**
704  * Phase space for incident neutrino.
705  */
706  struct genhencut {
707  /**
708  * Default constructor.
709  */
711  gDir(0),
712  Emin(0)
713  {}
714 
715  double gDir; ///< Angle
716  double Emin; ///< Minimal energy [GeV]
717 
719  };
720 
721 
722  /**
723  * Normlisation of CORSIKA events.
724  */
725  struct norma {
726  /**
727  * Default constructor.
728  */
729  norma() :
730  primaryFlux(0),
731  numberOfPrimaries(0)
732  {}
733 
734  /**
735  * Test match.
736  *
737  * \param object normalisation
738  * \return true if matches; else false
739  */
740  inline bool match(const norma& object) const
741  {
742  return (primaryFlux == object.primaryFlux);
743  }
744 
745  /**
746  * Addition.
747  *
748  * \param object normalisation
749  * \return this normalisation
750  */
751  inline norma& add(const norma& object)
752  {
753  numberOfPrimaries += object.numberOfPrimaries;
754 
755  return *this;
756  }
757 
758  double primaryFlux; ///< Primary flux
759  double numberOfPrimaries; ///< Number of primaries
760 
761  ClassDefNV(norma,1);
762  };
763 
764 
765  /**
766  * Normalisation of MUPAGE events.
767  */
768  struct livetime {
769  /**
770  * Default constructor.
771  */
773  numberOfSeconds(0),
774  errorOfSeconds(0)
775  {}
776 
777  /**
778  * Comparison.
779  *
780  * \param object livetime
781  * \return true if this livetime is less than given livetime; else false
782  */
783  inline bool less(const livetime& object) const
784  {
785  return numberOfSeconds < object.numberOfSeconds;
786  }
787 
788  /**
789  * Test match.
790  *
791  * \param object live time
792  * \return true if matches; else false
793  */
794  inline bool match(const livetime& object) const
795  {
796  return ((numberOfSeconds == 0.0 && object.numberOfSeconds == 0.0) ||
797  (numberOfSeconds > 0.0 && object.numberOfSeconds > 0.0));
798  }
799 
800  /**
801  * Addition.
802  *
803  * \param object live time
804  * \return this live time
805  */
806  inline livetime& add(const livetime& object)
807  {
808  numberOfSeconds += object.numberOfSeconds;
809  errorOfSeconds = sqrt(errorOfSeconds * errorOfSeconds +
810  object.errorOfSeconds * object.errorOfSeconds);
811 
812  return *this;
813  }
814 
815  /**
816  * Scale.
817  *
818  * \param factor 1D scale factor
819  * \return this livetime
820  */
821  inline livetime& mul(const double factor)
822  {
823  numberOfSeconds /= (factor * factor);
824  errorOfSeconds /= (factor * factor);
825 
826  return *this;
827  }
828 
829  double numberOfSeconds; ///< Live time [s]
830  double errorOfSeconds; ///< Uncertainty on live time [s]
831 
832  ClassDefNV(livetime,1);
833  };
834 
835 
836  /**
837  * Neutrino flux.
838  */
839  struct flux {
840  public:
841  /**
842  * Default constructor.
843  */
844  flux() :
845  type(0),
846  key(),
847  file_1(),
848  file_2()
849  {}
850 
851  int type; ///< Type
852  std::string key; ///< Key
853  std::string file_1; ///< File name
854  std::string file_2; ///< File name
855 
856  ClassDefNV(flux,1);
857  };
858 
859 
860  /**
861  * The bottom of the sea.
862  */
863  struct seabottom {
864  /**
865  * Default constructor.
866  */
868  z(0)
869  {}
870 
871  /**
872  * Test match.
873  *
874  * \param object sea bottom
875  * \return true if matches; else false
876  */
877  inline bool match(const seabottom& object) const
878  {
879  return (z == object.z);
880  }
881 
882  double z; ///< Sea bottom [m]
883 
885  };
886 
887 
888  /**
889  * Depth.
890  */
891  struct depth {
892  /**
893  * Default constructor.
894  */
895  depth() :
896  z(0)
897  {}
898 
899  /**
900  * Test match.
901  *
902  * \param object sea bottom
903  * \return true if matches; else false
904  */
905  inline bool match(const depth& object) const
906  {
907  return (z == object.z);
908  }
909 
910  double z; ///< Sea bottom [m]
911 
912  ClassDefNV(depth,1);
913  };
914 
915 
916  /**
917  * Livetime of DAQ data.
918  */
919  struct DAQ {
920  public:
921  /**
922  * Default constructor.
923  */
924  DAQ() :
925  livetime_s(0.0)
926  {}
927 
928  /**
929  * Comparison.
930  *
931  * \param object DAQ
932  * \return true if this DAQ is less than given DAQ; else false
933  */
934  inline bool less(const DAQ& object) const
935  {
936  return livetime_s < object.livetime_s;
937  }
938 
939  /**
940  * Test match.
941  *
942  * \param object DAQ
943  * \return true if matches; else false
944  */
945  inline bool match(const DAQ& object) const
946  {
947  return ((livetime_s == 0.0 && object.livetime_s == 0.0) ||
948  (livetime_s > 0.0 && object.livetime_s > 0.0));
949  }
950 
951  /**
952  * Addition.
953  *
954  * \param object DAQ
955  * \return this DAQ
956  */
957  inline DAQ& add(const DAQ& object)
958  {
959  livetime_s += object.livetime_s;
960 
961  return *this;
962  }
963 
964  double livetime_s; ///< Live time [s]
965 
966  ClassDefNV(DAQ,1);
967  };
968 
969 
970  /**
971  * Time duration of event generation.
972  */
973  struct tgen {
974  /**
975  * Default constructor.
976  */
977  tgen() :
978  numberOfSeconds(0)
979  {}
980 
981  /**
982  * Test match.
983  *
984  * \param object time duration
985  * \return true if matches; else false
986  */
987  inline bool match(const tgen& object) const
988  {
989  return this->numberOfSeconds == object.numberOfSeconds;
990  }
991 
992  double numberOfSeconds; ///< Time in seconds
993 
994  ClassDefNV(tgen,1);
995  };
996 
997 
998  /**
999  * UTC time interval for event generation.
1000  */
1001  struct time_interval {
1002  /**
1003  * Default constructor.
1004  */
1006  t1(0),
1007  t2(0)
1008  {}
1009 
1010  /**
1011  * Test match.
1012  *
1013  * \param object time interval
1014  * \return true if matches; else false
1015  */
1016  inline bool match(const time_interval& object) const
1017  {
1018  return (this->t1 == object.t1 && this->t2 == object.t2);
1019  }
1020 
1021  double t1; ///< Start time in seconds
1022  double t2; ///< Stop time in seconds
1023 
1025  };
1026 
1027 
1028  /**
1029  * Primary particle.
1030  */
1031  struct primary {
1032  /**
1033  * Default constructor.
1034  */
1035  primary() :
1036  type(0)
1037  {}
1038 
1039  /**
1040  * Comparison.
1041  *
1042  * \param object primary particle
1043  * \return true if this primary particle is less than given primary particle; else false
1044  */
1045  inline bool less(const primary& object) const
1046  {
1047  return type < object.type;
1048  }
1049 
1050  /**
1051  * Test match.
1052  *
1053  * \param object primary particle
1054  * \return true if matches; else false
1055  */
1056  inline bool match(const primary& object) const
1057  {
1058  return (type == object.type);
1059  }
1060 
1061  int type; ///< Particle type
1062 
1063  ClassDefNV(primary,1);
1064  };
1065 
1066 
1067  /**
1068  * End of event record.
1069  */
1070  struct end_event {
1071  /**
1072  * Default constructor.
1073  */
1075  {}
1076 
1077  ClassDefNV(end_event,1);
1078  };
1079 
1080 
1081  /**
1082  * Monte Carlo run header.
1083  *
1084  * This class extends the Head class so that the data from specific tags
1085  * can be promoted to concrete data types.
1086  *
1087  * Note that for the copy of new JHead data (e.g.\ data not obtained via a previous JAANET::copy) to become effective,
1088  * the key words in the corresponding map of the Head class should be set. \n
1089  * To this end, member method JHead::push can be used.
1090  */
1091  struct JHead :
1092  public Head
1093  {
1094  /**
1095  * Default constructor.
1096  */
1098  {}
1099 
1100 
1101  /**
1102  * Copy constructor.
1103  *
1104  * \param header header
1105  */
1106  JHead(const Head& header)
1107  {
1108  copy(header, *this);
1109  }
1110 
1111 
1112  /**
1113  * Virtual destructor.
1114  */
1115  virtual ~JHead()
1116  {}
1117 
1118 
1119  /**
1120  * Get header.
1121  *
1122  * \return header
1123  */
1124  const JHead& getHeader() const
1125  {
1126  return static_cast<const JHead&>(*this);
1127  }
1128 
1129 
1130  /**
1131  * Get header.
1132  *
1133  * \return header
1134  */
1136  {
1137  return static_cast<JHead&>(*this);
1138  }
1139 
1140 
1141  /**
1142  * Set header.
1143  *
1144  * \param header header
1145  */
1146  void setHeader(const JHead& header)
1147  {
1148  static_cast<JHead&>(*this) = header;
1149  }
1150 
1151 
1152  /**
1153  * Check validity of given data member in JHead.
1154  *
1155  * The validity is defined by the presence of the name of the data member in the underlying map.
1156  *
1157  * \param pd pointer to data member
1158  * \return true if valid; else false
1159  */
1160  template<class T>
1161  inline bool is_valid(T JHead::*pd) const
1162  {
1163  return (this->pull(pd) != this->end());
1164  }
1165 
1166 
1167  /**
1168  * Check validity of given data member in JHead.
1169  *
1170  * The validity is defined by difference between actual and default value.
1171  *
1172  * \param object object
1173  * \return true if valid; else false
1174  */
1175  template<class T>
1176  static bool is_valid(const T& object)
1177  {
1178  static const T value;
1179 
1180  return (object.less(value) || value.less(object));
1181  }
1182 
1183 
1184  /**
1185  * Pull given data member from Head.
1186  *
1187  * \param pd pointer to data member
1188  * \return iterator of Head
1189  */
1190  template<class T>
1191  inline const_iterator pull(T JHead::*pd) const
1192  {
1193  return this->find(JROOT::getDataMember(pd)->GetName());
1194  }
1195 
1196 
1197  /**
1198  * Pull given data member from Head.
1199  *
1200  * \param pd pointer to data member
1201  * \return iterator of Head
1202  */
1203  template<class T>
1204  inline iterator pull(T JHead::*pd)
1205  {
1206  return this->find(JROOT::getDataMember(pd)->GetName());
1207  }
1208 
1209 
1210  /**
1211  * Push given data member to Head.
1212  *
1213  * \param pd pointer to data member
1214  */
1215  template<class T>
1216  inline void push(T JHead::*pd)
1217  {
1218  (*this)[JROOT::getDataMember(pd)->GetName()] = "";
1219  }
1220 
1221 
1222  /**
1223  * Remove given data member from Head.
1224  *
1225  * \param pd pointer to data member
1226  */
1227  template<class T>
1228  inline void erase(T JHead::*pd)
1229  {
1230  iterator p = this->pull(pd);
1231 
1232  if (p != this->end()) {
1233 
1234  this->*pd = T();
1235 
1236  static_cast<Head*>(this)->erase(p);
1237  }
1238  }
1239 
1240 
1241  /**
1242  * Test match of headers.
1243  *
1244  * \param header second header
1245  * \return true if matches; else false
1246  */
1247  inline bool match(const JHead& header) const
1248  {
1249  return (match(*this, header, &JHead::cut_primary) &&
1250  match(*this, header, &JHead::cut_seamuon) &&
1251  match(*this, header, &JHead::cut_in) &&
1252  match(*this, header, &JHead::cut_nu) &&
1253  match(*this, header, &JHead::detector) &&
1254  match(*this, header, &JHead::physics) &&
1255  match(*this, header, &JHead::simul) &&
1256  match(*this, header, &JHead::spectrum) &&
1257  match(*this, header, &JHead::can) &&
1258  match(*this, header, &JHead::fixedcan) &&
1259  match(*this, header, &JHead::genvol) &&
1260  match(*this, header, &JHead::coord_origin) &&
1261  match(*this, header, &JHead::norma) &&
1262  match(*this, header, &JHead::livetime) &&
1263  match(*this, header, &JHead::seabottom) &&
1264  match(*this, header, &JHead::depth) &&
1265  match(*this, header, &JHead::tgen) &&
1266  match(*this, header, &JHead::time_interval) &&
1267  match(*this, header, &JHead::primary) &&
1268  match(*this, header, &JHead::DAQ));
1269  }
1270 
1271 
1272  /**
1273  * Comparison of headers.
1274  *
1275  * \param header header
1276  * \return true if this header less than given header; else false
1277  */
1278  inline bool less(const JHead& header) const
1279  {
1280 #define RETURN_IF_DIFFERENT(A, B) \
1281  if (less(A,B)) { return true; } \
1282  if (less(B,A)) { return false; }
1283 
1284  // compare physics
1285 
1286  RETURN_IF_DIFFERENT(this->physics, header.physics);
1287 
1288  // compare simulation
1289 
1290  RETURN_IF_DIFFERENT(this->simul, header.simul);
1291 
1292  // compare generation data
1293 
1294  RETURN_IF_DIFFERENT(this->primary, header.primary);
1295  RETURN_IF_DIFFERENT(this->spectrum, header.spectrum);
1298  RETURN_IF_DIFFERENT(this->cut_in, header.cut_in);
1299  RETURN_IF_DIFFERENT(this->cut_nu, header.cut_nu);
1300  RETURN_IF_DIFFERENT(this->genvol, header.genvol);
1301 
1302  // compare compatibility
1303 
1304  if (is_valid(this->livetime) == is_valid(header.livetime) &&
1305  is_valid(this->DAQ) == is_valid(header.DAQ)) {
1306  return false;
1307  }
1308 
1309  THROW(JException, "JHead::less() headers do not compare.");
1310 
1311 #undef RETURN_IF_DIFFERENT
1312  }
1313 
1314 
1315  /**
1316  * Addition of headers.
1317  *
1318  * \param header header
1319  * \return this header
1320  */
1321  inline JHead& add(const JHead& header)
1322  {
1323  if (match(header)) {
1324 
1325  genvol .add(header.genvol);
1326  norma .add(header.norma);
1327  livetime.add(header.livetime);
1328  DAQ .add(header.DAQ);
1329 
1330  } else {
1331 
1332  THROW(JException, "JHead::add() headers do not match.");
1333  }
1334 
1335  return *this;
1336  }
1337 
1338 
1339  /**
1340  * Equal operator.
1341  *
1342  * Note that this operator uses the JHead::match method.
1343  *
1344  * \param first first header
1345  * \param second second header
1346  * \return true if two headers are equal; else false
1347  */
1348  friend inline bool operator==(const JHead& first,
1349  const JHead& second)
1350  {
1351  return first.match(second);
1352  }
1353 
1354 
1355  /**
1356  * Less than operator.
1357  *
1358  * \param first first header
1359  * \param second second header
1360  * \return true if first header is less than second header; else false
1361  */
1362  friend inline bool operator<(const JHead& first,
1363  const JHead& second)
1364  {
1365  return first.less(second);
1366  }
1367 
1368 
1369  JAANET::start_run start_run; // first data member
1395  JAANET::end_event end_event; // last data member
1396 
1397 
1398  /**
1399  * Get equation parameters corresponding to Monte Carlo ASCII format, i.e:
1400  * <pre>
1401  * <key>: <value> [<value>]*
1402  * <key>: <value> [<value>]*
1403  * </pre>
1404  *
1405  * \return equation parameters
1406  */
1408  {
1409  static JLANG::JEquationParameters parameters(":", "\n", "", "");
1410 
1411  return parameters;
1412  }
1413 
1414 
1415  /**
1416  * Set equation parameters.
1417  *
1418  * \param equation equation parameters
1419  */
1420  static inline void setEquationParameters(const JLANG::JEquationParameters& equation)
1421  {
1422  getEquationParameters() = equation;
1423  }
1424 
1425 
1426  /**
1427  * Read header from input.
1428  *
1429  * \param in input stream
1430  * \return input stream
1431  */
1432  std::istream& read(std::istream& in);
1433 
1434 
1435  /**
1436  * Write header to output.
1437  *
1438  * \param out output stream
1439  * \return output stream
1440  */
1441  std::ostream& write(std::ostream& out) const;
1442 
1443 
1444  /**
1445  * Print header to output.
1446  *
1447  * \param out output stream
1448  * \return output stream
1449  */
1450  std::ostream& print(std::ostream& out) const;
1451 
1452 
1453  ClassDef(JHead,3);
1454 
1455  private:
1456  /**
1457  * Comparison.
1458  *
1459  * \param first first object
1460  * \param second second object
1461  * \return true if first less than second; else false
1462  */
1463  template<class T>
1464  static inline bool less(const T& first,
1465  const T& second)
1466  {
1467  return first.less(second);
1468  }
1469 
1470 
1471  /**
1472  * Test match.
1473  *
1474  * \param first first object
1475  * \param second second object
1476  * \return true if matches; else false
1477  */
1478  template<class T>
1479  static inline bool match(const T& first,
1480  const T& second)
1481  {
1482  return first.match(second);
1483  }
1484 
1485 
1486  /**
1487  * Comparison of containers.
1488  * It is assumed that the containers are ordered in the same way.
1489  *
1490  * \param first first object
1491  * \param second second object
1492  * \return true if first is less than second; else false
1493  */
1494  template<class T>
1495  static inline bool less(const std::vector<T>& first,
1496  const std::vector<T>& second)
1497  {
1498  if (first.size() == second.size()) {
1499 
1500  for (size_t i = 0; i != first.size(); ++i) {
1501  if (less(first[i], second[i])) {
1502  return true;
1503  }
1504  }
1505 
1506  return false;
1507 
1508  } else {
1509 
1510  return first.size() < second.size();
1511  }
1512  }
1513 
1514 
1515  /**
1516  * Test is containers match.
1517  * It is assumed that the containers are ordered in the same way.
1518  *
1519  * \param first first object
1520  * \param second second object
1521  * \return true if matches; else false
1522  */
1523  template<class T>
1524  static inline bool match(const std::vector<T>& first,
1525  const std::vector<T>& second)
1526  {
1527  for (size_t i = 0; i != first.size() && i != second.size(); ++i) {
1528  if (!match(first[i], second[i])) {
1529  return false;
1530  }
1531  }
1532 
1533  return first.size() == second.size();
1534  }
1535 
1536 
1537  /**
1538  * Test match of given data member of headers.
1539  *
1540  * \param first first header
1541  * \param second second header
1542  * \param pd pointer to data member
1543  * \return true if matches; else false
1544  */
1545  template<class T>
1546  static inline bool match(const JHead& first,
1547  const JHead& second,
1548  T JHead::*pd)
1549  {
1550  return match(first.*pd, second.*pd);
1551  }
1552  };
1553 
1554 
1555  /**
1556  * Equal operator.
1557  *
1558  * Note that this operator uses the JHead::match method.
1559  *
1560  * \param first first header
1561  * \param second second header
1562  * \return true if two headers are equal; else false
1563  */
1564  inline bool operator==(const Head& first,
1565  const Head& second)
1566  {
1567  return JHead(first).match(JHead(second));
1568  }
1569 
1570 
1571  /**
1572  * Less than operator.
1573  *
1574  * \param first first header
1575  * \param second second header
1576  * \return true if first header is less than second header; else false
1577  */
1578  inline bool operator<(const Head& first,
1579  const Head& second)
1580  {
1581  return JHead(first).less(JHead(second));
1582  }
1583 }
1584 
1585 
1586 /**
1587  * Read header from input.
1588  *
1589  * \param in input stream
1590  * \param header header
1591  * \return input stream
1592  */
1593 inline std::istream& operator>>(std::istream& in, JAANET::JHead& header)
1594 {
1595  return header.read(in);
1596 }
1597 
1598 
1599 /**
1600  * Write header to output.
1601  *
1602  * \param out output stream
1603  * \param header header
1604  * \return output stream
1605  */
1606 inline std::ostream& operator<<(std::ostream& out, const JAANET::JHead& header)
1607 {
1608  return header.write(out);
1609 }
1610 #endif
norma & add(const norma &object)
Addition.
Definition: JHead.hh:751
bool match(const cut &object) const
Test match.
Definition: JHead.hh:343
bool match(const detector &object) const
Test match.
Definition: JHead.hh:210
double zmin
Bottom [m].
Definition: JHead.hh:532
JAANET::depth depth
Definition: JHead.hh:1390
JAANET::genhencut genhencut
Definition: JHead.hh:1386
General exception.
Definition: JException.hh:23
Phase space of incident neutrino.
Definition: JHead.hh:393
Drawing.
Definition: JHead.hh:288
static bool is_valid(const T &object)
Check validity of given data member in JHead.
Definition: JHead.hh:1176
livetime & mul(const double factor)
Scale.
Definition: JHead.hh:821
JAANET::genvol genvol
Definition: JHead.hh:1384
Neutrino vertex volume.
Definition: JHead.hh:583
Exceptions.
bool less(const String &object) const
Comparison.
Definition: JHead.hh:147
double r
Radius [m].
Definition: JHead.hh:652
JAANET::norma norma
Definition: JHead.hh:1387
Target.
Definition: JHead.hh:268
genvol & mul(const double factor, const double z=0.0)
Scale.
Definition: JHead.hh:639
double volume
Volume [m^3].
Definition: JHead.hh:653
Livetime of DAQ data.
Definition: JHead.hh:919
double t1
Start time in seconds.
Definition: JHead.hh:1021
bool match(const tgen &object) const
Test match.
Definition: JHead.hh:987
seabottom()
Default constructor.
Definition: JHead.hh:867
livetime & add(const livetime &object)
Addition.
Definition: JHead.hh:806
friend bool operator<(const JHead &first, const JHead &second)
Less than operator.
Definition: JHead.hh:1362
Depth.
Definition: JHead.hh:891
bool less(const DAQ &object) const
Comparison.
Definition: JHead.hh:934
void setHeader(const JHead &header)
Set header.
Definition: JHead.hh:1146
friend std::istream & operator>>(std::istream &in, String &object)
Read string from input stream.
Definition: JHead.hh:170
#define RETURN_IF_DIFFERENT(A, B)
const JHead & getHeader() const
Get header.
Definition: JHead.hh:1124
Phase space of incoming particle.
Definition: JHead.hh:383
Generator for simulation.
Definition: JHead.hh:460
bool operator<(const Head &first, const Head &second)
Less than operator.
Definition: JHead.hh:1578
double alpha
Energy spectrum: .
Definition: JHead.hh:500
const TDataMember * getDataMember(const JRootClass &parent, const JRootClass &member)
Get ROOT data member for given parent and member class.
Definition: JRootClass.hh:636
Phase space for incident neutrino.
Definition: JHead.hh:706
JAANET::drawing drawing
Definition: JHead.hh:1371
double numberOfEvents
Number of events.
Definition: JHead.hh:654
bool less(const generator &object) const
Comparison.
Definition: JHead.hh:420
static bool less(const T &first, const T &second)
Comparison.
Definition: JHead.hh:1464
friend std::istream & operator>>(std::istream &in, detector &object)
Read detector from input stream.
Definition: JHead.hh:222
bool read(Vec &v, std::istream &is)
Read a Vec(tor) from a stream.
Definition: io_ascii.hh:141
std::string program
program name
Definition: JHead.hh:438
depth()
Default constructor.
Definition: JHead.hh:895
Neutrino cross section file.
Definition: JHead.hh:278
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
double t2
Stop time in seconds.
Definition: JHead.hh:1022
livetime()
Default constructor.
Definition: JHead.hh:772
double zmax
Top [m].
Definition: JHead.hh:573
Normlisation of CORSIKA events.
Definition: JHead.hh:725
JAANET::cut_primary cut_primary
Definition: JHead.hh:1377
double errorOfSeconds
Uncertainty on live time [s].
Definition: JHead.hh:830
*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
std::vector< JAANET::physics > physics
Definition: JHead.hh:1375
Simple data structure to support I/O of equations (see class JLANG::JEquation).
bool match(const generator &object) const
Test match.
Definition: JHead.hh:433
double Emax
Maximal energy [GeV].
Definition: JHead.hh:352
static void setEquationParameters(const JLANG::JEquationParameters &equation)
Set equation parameters.
Definition: JHead.hh:1420
bool match(const time_interval &object) const
Test match.
Definition: JHead.hh:1016
bool match(const JHead &header) const
Test match of headers.
Definition: JHead.hh:1247
data_type r[M+1]
Definition: JPolint.hh:742
std::vector< JAANET::simul > simul
Definition: JHead.hh:1376
double livetime_s
Live time [s].
Definition: JHead.hh:964
JHead & add(const JHead &header)
Addition of headers.
Definition: JHead.hh:1321
genhencut()
Default constructor.
Definition: JHead.hh:710
General purpose class of phase space generation.
Definition: JHead.hh:298
bool match(const spectrum &object) const
Test match.
Definition: JHead.hh:495
DAQ & add(const DAQ &object)
Addition.
Definition: JHead.hh:957
bool match(const can &object) const
Test match.
Definition: JHead.hh:525
Coordinate origin.
Definition: JHead.hh:663
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Physics information.
Definition: JHead.hh:450
Description of Monte Carlo event generation applications.
Definition: JHead.hh:403
double ycenter
y-center [m]
Definition: JHead.hh:571
genvol & add(const genvol &object)
Addition.
Definition: JHead.hh:625
ClassDefNV(start_run, 1)
Start of run record.
Definition: JHead.hh:105
spectrum()
Default constructor.
Definition: JHead.hh:474
JAANET::end_event end_event
Definition: JHead.hh:1395
bool less(const JHead &header) const
Comparison of headers.
Definition: JHead.hh:1278
double zmax
Top [m].
Definition: JHead.hh:651
JAANET::fixedcan fixedcan
Definition: JHead.hh:1383
JAANET::can can
Definition: JHead.hh:1382
std::string buffer
General purpose name.
Definition: JHead.hh:187
double xcenter
x-center [m]
Definition: JHead.hh:570
bool operator==(Packet const &p, ID const &id)
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Definition: Vec.hh:12
void push(T JHead::*pd)
Push given data member to Head.
Definition: JHead.hh:1216
int type
Particle type.
Definition: JHead.hh:1061
bool match(const fixedcan &object) const
Test match.
Definition: JHead.hh:561
Detector file.
Definition: JHead.hh:196
JNET::JTag getTag(JLANG::JType< KM3NETDAQ::JDAQTimeslice >)
Definition: JDAQTags.hh:82
JAANET::cut_seamuon cut_seamuon
Definition: JHead.hh:1378
generator()
Default constructor.
Definition: JHead.hh:407
double numberOfPrimaries
Number of primaries.
Definition: JHead.hh:759
JAANET::livetime livetime
Definition: JHead.hh:1388
static JLANG::JEquationParameters & getEquationParameters()
Get equation parameters corresponding to Monte Carlo ASCII format, i.e:
Definition: JHead.hh:1407
JHead()
Default constructor.
Definition: JHead.hh:1097
flux()
Default constructor.
Definition: JHead.hh:844
std::istream & read(std::istream &in)
Read header from input.
Definition: JHead.cc:30
bool less(const primary &object) const
Comparison.
Definition: JHead.hh:1045
void erase(T JHead::*pd)
Remove given data member from Head.
Definition: JHead.hh:1228
JAANET::seabottom seabottom
Definition: JHead.hh:1389
cut()
Default constructor.
Definition: JHead.hh:302
Neutrino flux.
Definition: JHead.hh:839
do set_variable OUTPUT_DIRECTORY $WORKDIR T
friend std::ostream & operator<<(std::ostream &out, const String &object)
Write string to output stream.
Definition: JHead.hh:182
JAANET::start_run start_run
Definition: JHead.hh:1369
bool match(const depth &object) const
Test match.
Definition: JHead.hh:905
bool is_valid(const json &js)
Check validity of JSon data.
ClassDefNV(String, 1)
friend bool operator==(const JHead &first, const JHead &second)
Equal operator.
Definition: JHead.hh:1348
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
Definition: JString.hh:478
std::string version
program version
Definition: JHead.hh:439
Time duration of event generation.
Definition: JHead.hh:973
JAANET::spectrum spectrum
Definition: JHead.hh:1381
std::string file_2
File name.
Definition: JHead.hh:854
bool match(const norma &object) const
Test match.
Definition: JHead.hh:740
time_interval()
Default constructor.
Definition: JHead.hh:1005
std::string key
Key.
Definition: JHead.hh:852
int type
Type.
Definition: JHead.hh:851
DAQ()
Default constructor.
Definition: JHead.hh:924
bool is_integer(const std::string &buffer)
Check if string is an integer.
Definition: JLangToolkit.hh:58
JAANET::primary primary
Definition: JHead.hh:1394
double z
Sea bottom [m].
Definition: JHead.hh:910
double zmin
Bottom [m].
Definition: JHead.hh:572
print
Definition: JConvertDusj.sh:44
bool match(const livetime &object) const
Test match.
Definition: JHead.hh:794
double zmin
Bottom [m].
Definition: JHead.hh:650
Monte Carlo run header.
Definition: JHead.hh:1091
genvol()
Default constructor.
Definition: JHead.hh:587
bool less(const spectrum &object) const
Comparison.
Definition: JHead.hh:484
int run_id
MC run number.
Definition: JHead.hh:113
double Emin
Minimal energy [GeV].
Definition: JHead.hh:716
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Definition: Head.hh:67
can()
Default constructor.
Definition: JHead.hh:513
std::string filename
Definition: JHead.hh:249
JAANET::time_interval time_interval
Definition: JHead.hh:1393
static bool match(const std::vector< T > &first, const std::vector< T > &second)
Test is containers match.
Definition: JHead.hh:1524
JAANET::muon_desc_file muon_desc_file
Definition: JHead.hh:1373
#define ClassDef(name, version)
Definition: JRoot.hh:32
norma()
Default constructor.
Definition: JHead.hh:729
virtual ~JHead()
Virtual destructor.
Definition: JHead.hh:1115
std::string program
Definition: JHead.hh:248
bool match(const coord_origin &object) const
Test match.
Definition: JHead.hh:692
double r
Radius [m].
Definition: JHead.hh:534
coord_origin(const double x, const double y, const double z)
Constructor.
Definition: JHead.hh:680
bool match(const genvol &object) const
Test match.
Definition: JHead.hh:612
std::vector< JAANET::detector > detector
Definition: JHead.hh:1372
Normalisation of MUPAGE events.
Definition: JHead.hh:768
static bool match(const JHead &first, const JHead &second, T JHead::*pd)
Test match of given data member of headers.
Definition: JHead.hh:1546
bool less(const genvol &object) const
Comparison.
Definition: JHead.hh:601
bool match(const seabottom &object) const
Test match.
Definition: JHead.hh:877
detector()
Default constructor.
Definition: JHead.hh:201
iterator pull(T JHead::*pd)
Pull given data member from Head.
Definition: JHead.hh:1204
std::string date
processing date
Definition: JHead.hh:440
bool write(const Vec &v, std::ostream &os)
Write a Vec(tor) to a stream.
Definition: io_ascii.hh:154
primary()
Default constructor.
Definition: JHead.hh:1035
JAANET::tgen tgen
Definition: JHead.hh:1392
JAANET::cut_in cut_in
Definition: JHead.hh:1379
JHead & getHeader()
Get header.
Definition: JHead.hh:1135
static bool less(const std::vector< T > &first, const std::vector< T > &second)
Comparison of containers.
Definition: JHead.hh:1495
bool less(const cut &object) const
Comparison.
Definition: JHead.hh:315
General purpose string class.
Definition: JHead.hh:122
start_run()
Default constructor.
Definition: JHead.hh:109
double gDir
Angle.
Definition: JHead.hh:715
double primaryFlux
Primary flux.
Definition: JHead.hh:758
double radius
Radius [m].
Definition: JHead.hh:574
double cosTmax
Maximal cosine zenith angle.
Definition: JHead.hh:354
bool match(const DAQ &object) const
Test match.
Definition: JHead.hh:945
JAANET::target target
Definition: JHead.hh:1374
void copy(const Head &from, JHead &to)
Copy header from from to to.
Definition: JHead.cc:139
Primary particle.
Definition: JHead.hh:1031
Muon descriptor file.
Definition: JHead.hh:258
fixedcan()
Default constructor.
Definition: JHead.hh:547
The fixed cylinder used for photon tracking.
Definition: JHead.hh:543
static bool match(const T &first, const T &second)
Test match.
Definition: JHead.hh:1479
double z
Sea bottom [m].
Definition: JHead.hh:882
JAANET::cut_nu cut_nu
Definition: JHead.hh:1380
bool less(const livetime &object) const
Comparison.
Definition: JHead.hh:783
UTC time interval for event generation.
Definition: JHead.hh:1001
end_event()
Default constructor.
Definition: JHead.hh:1074
Phase space of atmospheric muon generation.
Definition: JHead.hh:373
double numberOfSeconds
Time in seconds.
Definition: JHead.hh:992
std::string time
processing time
Definition: JHead.hh:441
tgen()
Default constructor.
Definition: JHead.hh:977
End of event record.
Definition: JHead.hh:1070
Phase space of primary particle.
Definition: JHead.hh:363
JAANET::coord_origin coord_origin
Definition: JHead.hh:1385
static const char AANET_TAG_SEPARATOR
Separator for AAnet tag extension for multiple tags (&quot;_&lt;counter&gt;&quot;).
Definition: JHead.hh:35
bool is_valid(T JHead::*pd) const
Check validity of given data member in JHead.
Definition: JHead.hh:1161
JAANET::XSecFile XSecFile
Definition: JHead.hh:1370
JAANET::DAQ DAQ
Definition: JHead.hh:1391
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 source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:36
double Emin
Minimal energy [GeV].
Definition: JHead.hh:351
double numberOfSeconds
Live time [s].
Definition: JHead.hh:829
bool match(const primary &object) const
Test match.
Definition: JHead.hh:1056
double cosTmin
Minimal cosine zenith angle.
Definition: JHead.hh:353
Vec coord_origin() const
Get coordinate origin.
Definition: Head.hh:393
JHead(const Head &header)
Copy constructor.
Definition: JHead.hh:1106
version
Definition: JCalibratePMT.sh:7
friend std::ostream & operator<<(std::ostream &out, const detector &object)
Write detector to output stream.
Definition: JHead.hh:243
bool match(const String &object) const
Test match.
Definition: JHead.hh:136
Neutrino energy spectrum.
Definition: JHead.hh:470
The bottom of the sea.
Definition: JHead.hh:863
std::ostream & write(std::ostream &out) const
Write header to output.
Definition: JHead.cc:68
String()
Default constructor.
Definition: JHead.hh:126
double zmax
Top [m].
Definition: JHead.hh:533
const_iterator pull(T JHead::*pd) const
Pull given data member from Head.
Definition: JHead.hh:1191
The cylinder used for photon tracking.
Definition: JHead.hh:509
std::string file_1
File name.
Definition: JHead.hh:853
coord_origin()
Default constructor.
Definition: JHead.hh:669