Jpp
JPDFTransformer.hh
Go to the documentation of this file.
1 #ifndef __JPHYSICS__JPDFTRANSFORMER__
2 #define __JPHYSICS__JPDFTRANSFORMER__
3 
4 #include <cmath>
5 
6 #include "JLang/JCC.hh"
7 #include "JIO/JSerialisable.hh"
8 #include "JTools/JConstants.hh"
10 #include "JTools/JFunction1D_t.hh"
11 #include "JTools/JGrid.hh"
12 #include "JPhysics/JPDFToolkit.hh"
13 
14 
15 /**
16  * \author mdejong
17  */
18 
19 namespace JPHYSICS {}
20 namespace JPP { using namespace JPHYSICS; }
21 
22 namespace JPHYSICS {
23 
24  using JIO::JReader;
25  using JIO::JWriter;
27 
28 
29  /**
30  * Template definition of transformer of the Probability Density Functions of the time response of a PMT.
31  */
32  template<unsigned int N, class JArgument_t>
34 
35 
36  /**
37  * Template specialisation of transformer of the 1D Probability Density Functions of the time response of a PMT.
38  *
39  * PDFs are evaluated by interpolation for:
40  * -# distance of closest approach of the muon to the PMT [m]
41  * -# arrival time [ns]
42  *
43  * The evaluation of the weights is based on:
44  * -# effective attenuation length
45  */
46  template<class JArgument_t>
47  class JPDFTransformer<1, JArgument_t> :
48  public JTOOLS::JMultiMapTransformer<1, JArgument_t>
49  {
50  public:
51 
53 
56  typedef typename JMultiMapTransformer_t::const_array_type const_array_type;
57 
58  using JMultiMapTransformer_t::getWeight;
59 
60  static double getRmin() { return 0.01; } // shortest distance of approach [m]
61 
62 
63  /**
64  * Default constructor.
65  */
67  __ln (0.0),
68  __alpha(0),
69  __kmin (0.0),
70  __kmax (0.0)
71  {}
72 
73 
74  /**
75  * Constructor.
76  *
77  * \param ln Effective attenuation length [m]
78  * \param alpha Distance dependence (power term)
79  * \param kmin Minimal kappa
80  * \param kmax Maximal kappa
81  */
82  JPDFTransformer(const double ln,
83  const int alpha,
84  const double kmin,
85  const double kmax) :
86  __ln (ln),
87  __alpha(alpha),
88  __kmin (kmin),
89  __kmax (kmax)
90  {}
91 
92 
93  /**
94  * Clone object.
95  *
96  * \return pointer to newly created JPDFTransformer
97  */
98  virtual clone_type clone() const
99  {
100  return new JPDFTransformer(*this);
101  }
102 
103 
104  /**
105  * Evaluate dt value as a function of {R}.
106  *
107  * \param buffer {R}
108  * \param xn old dt value
109  * \return new dt value
110  */
111  virtual argument_type putXn(const_array_type& buffer, const argument_type xn) const
112  {
113  using namespace JTOOLS;
114 
115  const double R = buffer[0];
116 
117  double x = xn;
118 
119  const double t0 = R * getTanThetaC() * getInverseSpeedOfLight();
120  const double t1 = R * __kmin * getInverseSpeedOfLight();
121 
122  x -= t1 - t0;
123 
124  if (__kmax > __kmin) {
125  x /= R * (__kmax - __kmin) * getInverseSpeedOfLight();
126  }
127 
128  return x;
129  }
130 
131 
132  /**
133  * Evaluate dt value as a function of {R}.
134  *
135  * \param buffer {R}
136  * \param xn old dt value
137  * \return new dt value
138  */
139  virtual argument_type getXn(const_array_type& buffer, const argument_type xn) const
140  {
141  using namespace JTOOLS;
142 
143  const double R = buffer[0];
144 
145  double x = xn;
146 
147  if (__kmax > __kmin) {
148  x *= R * (__kmax - __kmin) * getInverseSpeedOfLight();
149  }
150 
151  const double t0 = R * getTanThetaC() * getInverseSpeedOfLight();
152  const double t1 = R * __kmin * getInverseSpeedOfLight();
153 
154  x += t1 - t0;
155 
156  return x;
157  }
158 
159 
160  /**
161  * Weight function.
162  *
163  * \param buffer {R}
164  * \return weight
165  */
166  virtual double getWeight(const_array_type& buffer) const
167  {
168  using namespace JTOOLS;
169 
170  const double R = buffer[0];
171 
172  const double n = getIndexOfRefraction();
173  const double ct0 = 1.0 / n;
174  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
175 
176  const double d = sqrt(getRmin()*getRmin() + R*R) / st0;
177 
178  return exp(-d/__ln) / pow(d,__alpha);
179  }
180 
181 
182  /**
183  * Read PDF transformer from input.
184  *
185  * \param in reader
186  * \return reader
187  */
188  virtual JReader& read(JReader& in)
189  {
190  in >> __ln;
191  in >> __alpha;
192  in >> __kmin;
193  in >> __kmax;
194 
195  return in;
196  }
197 
198 
199  /**
200  * Write PDF transformer to output.
201  *
202  * \param out writer
203  * \return writer
204  */
205  virtual JWriter& write(JWriter& out) const
206  {
207  out << __ln;
208  out << __alpha;
209  out << __kmin;
210  out << __kmax;
211 
212  return out;
213  }
214 
215 
216  /**
217  * Print PDF transformer to output stream.
218  *
219  * \param out output stream
220  * \return output stream
221  */
222  std::ostream& print(std::ostream& out) const
223  {
224  using std::endl;
225 
226  out << "Effective attenuation length [m] " << __ln << endl;
227  out << "Distance dependence (power term) " << __alpha << endl;
228  out << "Minimal kappa " << __kmin << endl;
229  out << "Maximal kappa " << __kmax << endl;
230 
231  return out;
232  }
233 
234 
235  double __ln; //!< Effective attenuation length [m]
236  int __alpha; //!< Distance dependence (power term)
237  double __kmin; //!< minimal kappa
238  double __kmax; //!< maximal kappa
239  };
240 
241 
242  /**
243  * Template specialisation of transformer of the 2D Probability Density Functions of the time response of a PMT.
244  *
245  * PDFs are evaluated by interpolation for:
246  * -# distance between EM shower and PMT [m]
247  * -# cosine angle EM shower direction and EM shower - PMT position
248  * -# arrival time [ns]
249  *
250  * The evaluation of the weights is based on:
251  * -# effective attenuation length
252  * -# emission profile of the photons
253  */
254  template<class JArgument_t>
255  class JPDFTransformer<2, JArgument_t> :
256  public JTOOLS::JMultiMapTransformer<2, JArgument_t>
257  {
258  public:
259 
261 
264  typedef typename JMultiMapTransformer_t::const_array_type const_array_type;
265 
266  using JMultiMapTransformer_t::getWeight;
267 
268  static double getDmin() { return 0.01; } // shortest distance [m]
269 
270 
271  /**
272  * Default constructor.
273  */
275  __ln (0.0),
276  __alpha(0),
277  __kmin (0.0),
278  __kmax (0.0),
279  getShowerProbability()
280  {}
281 
282 
283  /**
284  * Constructor.
285  *
286  * \param ln Effective attenuation length [m]
287  * \param alpha Distance dependence (power term)
288  * \param kmin Minimal kappa
289  * \param kmax Maximal kappa
290  * \param geant Function photon emission from EM-shower
291  * \param bmin Baseline photon emission from EM-shower
292  */
293  JPDFTransformer(const double ln,
294  const int alpha,
295  const double kmin,
296  const double kmax,
297  const JGeant& geant,
298  const double bmin) :
299  __ln (ln),
300  __alpha(alpha),
301  __kmin (kmin),
302  __kmax (kmax),
303  getShowerProbability(geant)
304  {
305  getShowerProbability.add(bmin);
306  getShowerProbability.compile();
307  }
308 
309 
310  /**
311  * Clone object.
312  *
313  * \return pointer to newly created JPDFTransformer
314  */
315  virtual clone_type clone() const
316  {
317  return new JPDFTransformer(*this);
318  }
319 
320 
321  /**
322  * Evaluate dt value as a function of {D, cd}.
323  *
324  * \param buffer {D, cd}
325  * \param xn old dt value
326  * \return new dt value
327  */
328  virtual argument_type putXn(const_array_type& buffer, const argument_type xn) const
329  {
330  using namespace JTOOLS;
331 
332  const double D = buffer[0];
333  //const double cd = buffer[1];
334 
335  double x = xn;
336 
337  const double t0 = D * getIndexOfRefraction() * getInverseSpeedOfLight();
338  const double t1 = D * __kmin * getInverseSpeedOfLight();
339 
340  x -= t1 - t0;
341 
342  if (__kmax > __kmin) {
343  x /= D * (__kmax - __kmin) * getInverseSpeedOfLight();
344  }
345 
346  return x;
347  }
348 
349 
350  /**
351  * Evaluate dt value as a function of {D, cd}.
352  *
353  * \param buffer {D, cd}
354  * \param xn old dt value
355  * \return new dt value
356  */
357  virtual argument_type getXn(const_array_type& buffer, const argument_type xn) const
358  {
359  using namespace JTOOLS;
360 
361  const double D = buffer[0];
362  //const double cd = buffer[1];
363 
364  double x = xn;
365 
366  if (__kmax > __kmin) {
367  x *= D * (__kmax - __kmin) * getInverseSpeedOfLight();
368  }
369 
370  const double t0 = D * getIndexOfRefraction() * getInverseSpeedOfLight();
371  const double t1 = D * __kmin * getInverseSpeedOfLight();
372 
373  x += t1 - t0;
374 
375  return x;
376  }
377 
378 
379  /**
380  * Weight function.
381  *
382  * \param buffer {D, cd}
383  * \return weight
384  */
385  virtual double getWeight(const_array_type& buffer) const
386  {
387  using namespace JTOOLS;
388 
389  const double D = buffer[0];
390  const double cd = buffer[1];
391 
392  const double d = sqrt(getDmin()*getDmin() + D*D);
393 
394  return getShowerProbability(getIndexOfRefractionPhase(), cd) * exp(-d/__ln) / pow(d,__alpha);
395  }
396 
397 
398  /**
399  * Read PDF transformer from input.
400  *
401  * \param in reader
402  * \return reader
403  */
404  virtual JReader& read(JReader& in)
405  {
406  in >> __ln;
407  in >> __alpha;
408  in >> __kmin;
409  in >> __kmax;
410  in >> getShowerProbability;
411 
412  return in;
413  }
414 
415 
416  /**
417  * Write PDF transformer to output.
418  *
419  * \param out writer
420  * \return writer
421  */
422  virtual JWriter& write(JWriter& out) const
423  {
424  out << __ln;
425  out << __alpha;
426  out << __kmin;
427  out << __kmax;
428  out << getShowerProbability;
429 
430  return out;
431  }
432 
433 
434  /**
435  * Print PDF transformer to output stream.
436  *
437  * \param out output stream
438  * \return output stream
439  */
440  std::ostream& print(std::ostream& out) const
441  {
442  using std::endl;
443 
444  out << "Effective attenuation length [m] " << __ln << endl;
445  out << "Distance dependence (power term) " << __alpha << endl;
446  out << "Minimal kappa " << __kmin << endl;
447  out << "Maximal kappa " << __kmax << endl;
448 
449  return out;
450  }
451 
452 
453  double __ln; //!< Effective attenuation length [m]
454  int __alpha; //!< Distance dependence (power term)
455  double __kmin; //!< minimal kappa
456  double __kmax; //!< maximal kappa
458  };
459 
460 
461  /**
462  * Template specialisation of transformer of the 3D Probability Density Functions of the time response of a PMT.
463  *
464  * PDFs are evaluated by interpolation for:
465  * -# distance of closest approach of the muon to the PMT [m]
466  * -# zenith angle of the PMT
467  * -# azimuthal angle of the PMT
468  * -# arrival time [ns]
469  *
470  * The evaluation of the weights is based on:
471  * -# effective attenuation length
472  * -# emission profile of the photons
473  * -# angular acceptance of PMT
474  */
475  template<class JArgument_t>
476  class JPDFTransformer<3, JArgument_t> :
477  public JTOOLS::JMultiMapTransformer<3, JArgument_t>
478  {
479  public:
480 
483 
486  typedef typename JMultiMapTransformer_t::const_array_type const_array_type;
487 
489 
490  using JMultiMapTransformer_t::getWeight;
491 
492  static double getRmin() { return 0.01; } // shortest distance of approach [m]
493 
494 
495  /**
496  * Default constructor.
497  */
499  transformer(),
501  {}
502 
503 
504  /**
505  * Constructor.
506  *
507  * \param ln Effective attenuation length [m]
508  * \param alpha Distance dependence (power term)
509  * \param kmin Minimal kappa
510  * \param kmax Maximal kappa
511  * \param pmt Function angular acceptance of PMT
512  * \param amin Baseline angular acceptance of PMT
513  */
514  template<class T>
515  JPDFTransformer(const double ln,
516  const int alpha,
517  const double kmin,
518  const double kmax,
519  T pmt,
520  const double amin) :
521  transformer(ln, alpha, kmin, kmax),
523  {
524  getAngularAcceptance.configure(JTOOLS::make_grid(1000, -1.0, +1.0), pmt);
525  getAngularAcceptance.add(amin);
526  getAngularAcceptance.compile();
527  getAngularAcceptance.setExceptionHandler(new JFunction1D_t::JDefaultResult(0.0));
528  }
529 
530 
531  /**
532  * Clone object.
533  *
534  * \return pointer to newly created JPDFTransformer
535  */
536  virtual clone_type clone() const
537  {
538  return new JPDFTransformer(*this);
539  }
540 
541 
542  /**
543  * Evaluate dt value as a function of {R, theta, phi}.
544  *
545  * \param buffer {R, theta, phi}
546  * \param xn old dt value
547  * \return new dt value
548  */
549  virtual argument_type putXn(const_array_type& buffer, const argument_type xn) const
550  {
551  return transformer.putXn(buffer, xn);
552  }
553 
554 
555  /**
556  * Evaluate dt value as a function of {R, theta, phi}.
557  *
558  * \param buffer {R, theta, phi}
559  * \param xn old dt value
560  * \return new dt value
561  */
562  virtual argument_type getXn(const_array_type& buffer, const argument_type xn) const
563  {
564  return transformer.getXn(buffer, xn);
565  }
566 
567 
568  /**
569  * Weight function.
570  *
571  * \param buffer {R, theta, phi}
572  * \return weight
573  */
574  virtual double getWeight(const_array_type& buffer) const
575  {
576  using namespace JTOOLS;
577 
578  const double theta = buffer[1];
579  const double phi = buffer[2];
580 
581  const double n = getIndexOfRefraction();
582  const double ct0 = 1.0 / n;
583  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
584 
585  const double px = sin(theta)*cos(phi);
586  //const double py = sin(theta)*sin(phi);
587  const double pz = cos(theta);
588 
589  const double ct = st0*px + ct0*pz;
590 
591  return transformer.getWeight(buffer) * getAngularAcceptance(ct);
592  }
593 
594 
595  /**
596  * Read PDF transformer from input.
597  *
598  * \param in reader
599  * \return reader
600  */
601  virtual JReader& read(JReader& in)
602  {
603  in >> transformer;
604  in >> getAngularAcceptance;
605 
606  getAngularAcceptance.compile();
607 
608  return in;
609  }
610 
611 
612  /**
613  * Write PDF transformer to output.
614  *
615  * \param out writer
616  * \return writer
617  */
618  virtual JWriter& write(JWriter& out) const
619  {
620  out << transformer;
621  out << getAngularAcceptance;
622 
623  return out;
624  }
625 
626 
627  /**
628  * Print PDF transformer to output stream.
629  *
630  * \param out output stream
631  * \return output stream
632  */
633  std::ostream& print(std::ostream& out) const
634  {
635  return transformer.print(out);
636  }
637 
638 
641  };
642 
643 
644  /**
645  * Template specialisation of transformer of the 4D Probability Density Functions of the time response of a PMT.
646  *
647  * PDFs are evaluated by interpolation for:
648  * -# distance between EM shower and PMT [m]
649  * -# cosine angle EM shower direction and EM shower - PMT position
650  * -# zenith angle of the PMT
651  * -# azimuthal angle of the PMT
652  * -# arrival time [ns]
653  *
654  * The evaluation of the weights is based on:
655  * -# effective attenuation length
656  * -# angular acceptance of PMT
657  */
658  template<class JArgument_t>
659  class JPDFTransformer<4, JArgument_t> :
660  public JTOOLS::JMultiMapTransformer<4, JArgument_t>
661  {
662  public:
663 
666 
669  typedef typename JMultiMapTransformer_t::const_array_type const_array_type;
670 
672 
673  using JMultiMapTransformer_t::getWeight;
674 
675  static double getDmin() { return 0.01; } // shortest distance [m]
676 
677 
678  /**
679  * Default constructor.
680  */
682  transformer(),
684  {}
685 
686 
687  /**
688  * Constructor.
689  *
690  * \param ln Effective attenuation length [m]
691  * \param alpha Distance dependence (power term)
692  * \param kmin Minimal kappa
693  * \param kmax Maximal kappa
694  * \param geant Function photon emission from EM-shower
695  * \param bmin Baseline photon emission from EM-shower
696  * \param pmt Function angular acceptance of PMT
697  * \param amin Baseline angular acceptance of PMT
698  */
699  template<class T>
700  JPDFTransformer(const double ln,
701  const int alpha,
702  const double kmin,
703  const double kmax,
704  const JGeant geant,
705  const double bmin,
706  T pmt,
707  const double amin) :
708  transformer(ln, alpha, kmin, kmax, geant, bmin),
710  {
711  getAngularAcceptance.configure(JTOOLS::make_grid(1000, -1.0, +1.0), pmt);
712  getAngularAcceptance.add(amin);
713  getAngularAcceptance.compile();
714  getAngularAcceptance.setExceptionHandler(new JFunction1D_t::JDefaultResult(0.0));
715  }
716 
717 
718  /**
719  * Clone object.
720  *
721  * \return pointer to newly created JPDFTransformer
722  */
723  virtual clone_type clone() const
724  {
725  return new JPDFTransformer(*this);
726  }
727 
728 
729  /**
730  * Evaluate dt value as a function of {D, cd, theta, phi}.
731  *
732  * \param buffer {D, cd, theta, phi}
733  * \param xn old dt value
734  * \return new dt value
735  */
736  virtual argument_type putXn(const_array_type& buffer, const argument_type xn) const
737  {
738  return transformer.putXn(buffer, xn);
739  }
740 
741 
742  /**
743  * Evaluate dt value as a function of {D, cd, theta, phi}.
744  *
745  * \param buffer {D, cd, theta, phi}
746  * \param xn old dt value
747  * \return new dt value
748  */
749  virtual argument_type getXn(const_array_type& buffer, const argument_type xn) const
750  {
751  return transformer.getXn(buffer, xn);
752  }
753 
754 
755  /**
756  * Weight function.
757  *
758  * \param buffer {D, cd, theta, phi}
759  * \return weight
760  */
761  virtual double getWeight(const_array_type& buffer) const
762  {
763  const double cd = buffer[1];
764  const double theta = buffer[2];
765  const double phi = buffer[3];
766 
767  const double ct0 = cd;
768  const double st0 = sqrt((1.0 + ct0)*(1.0 - ct0));
769 
770  const double px = sin(theta)*cos(phi);
771  //const double py = sin(theta)*sin(phi);
772  const double pz = cos(theta);
773 
774  const double ct = st0*px + ct0*pz;
775 
776  return transformer.getWeight(buffer) * getAngularAcceptance(ct);
777  }
778 
779 
780  /**
781  * Read PDF transformer from input.
782  *
783  * \param in reader
784  * \return reader
785  */
786  virtual JReader& read(JReader& in)
787  {
788  in >> transformer;
789  in >> getAngularAcceptance;
790 
791  getAngularAcceptance.compile();
792 
793  return in;
794  }
795 
796 
797  /**
798  * Write PDF transformer to output.
799  *
800  * \param out writer
801  * \return writer
802  */
803  virtual JWriter& write(JWriter& out) const
804  {
805  out << transformer;
806  out << getAngularAcceptance;
807 
808  return out;
809  }
810 
811 
812  /**
813  * Print PDF transfomer to output stream.
814  *
815  * \param out output stream
816  * \return output stream
817  */
818  std::ostream& print(std::ostream& out) const
819  {
820  return transformer.print(out);
821  }
822 
823 
826  };
827 
828 
829  /**
830  * Template specialisation of transformer of the 5D Probability Density Functions of the time response of a PMT.
831  *
832  * PDFs are evaluated by interpolation for:
833  * -# energy of the track
834  * -# distance between EM shower and PMT [m]
835  * -# cosine angle EM shower direction and EM shower - PMT position
836  * -# zenith angle of the PMT
837  * -# azimuthal angle of the PMT
838  * -# arrival time [ns]
839  *
840  * The evaluation of the weights is based on:
841  * -# effective attenuation length
842  * -# angular acceptance of PMT
843  */
844  template<class JArgument_t>
845  class JPDFTransformer<5, JArgument_t> :
846  public JTOOLS::JMultiMapTransformer<5, JArgument_t>
847  {
848  public:
849 
853 
856  typedef typename JMultiMapTransformer_t::const_array_type const_array_type;
857 
859 
860  using JMultiMapTransformer_t::getWeight;
861 
862  static double getDmin() { return 0.01; } // shortest distance [m]
863 
864 
865  /**
866  * Default constructor.
867  */
869  transformer()
870  {}
871 
872 
873  /**
874  * Constructor.
875  *
876  * \param ln Effective attenuation length [m]
877  * \param alpha Distance dependence (power term)
878  * \param kmin Minimal kappa
879  * \param kmax Maximal kappa
880  * \param geant Function photon emission from EM-shower
881  * \param bmin Baseline photon emission from EM-shower
882  * \param pmt Function angular acceptance of PMT
883  * \param amin Baseline angular acceptance of PMT
884  */
885 
886  template<class T>
887  JPDFTransformer(const double ln,
888  const int alpha,
889  const double kmin,
890  const double kmax,
891  const JGeant geant,
892  const double bmin,
893  T pmt,
894  const double amin) :
895  transformer(ln, alpha, kmin, kmax, geant, bmin, pmt, amin)
896  {}
897 
898  /**
899  * Clone object.
900  *
901  * \return pointer to newly created JPDFTransformer
902  */
903  virtual clone_type clone() const
904  {
905  return new JPDFTransformer(*this);
906  }
907 
908 
909  /**
910  * Evaluate dt value as a function of {E, D, cd, theta, phi}.
911  *
912  * \param buffer {E, D, cd, theta, phi}
913  * \param xn old dt value
914  * \return new dt value
915  */
916  virtual argument_type putXn(const_array_type& buffer, const argument_type xn) const
917  {
918  return transformer.putXn(buffer.pop_front(), xn);
919  }
920 
921 
922  /**
923  * Evaluate dt value as a function of {E, D, cd, theta, phi}.
924  *
925  * \param buffer {E, D, cd, theta, phi}
926  * \param xn old dt value
927  * \return new dt value
928  */
929  virtual argument_type getXn(const_array_type& buffer, const argument_type xn) const
930  {
931  return transformer.getXn(buffer.pop_front(), xn);
932  }
933 
934 
935  /**
936  * Weight function.
937  *
938  * \param buffer {E, D, cd, theta, phi}
939  * \return weight
940  */
941  virtual double getWeight(const_array_type& buffer) const
942  {
943  const double E = buffer[0];
944  return transformer.getWeight(buffer.pop_front()) / E;
945  }
946 
947 
948  /**
949  * Read PDF transformer from input.
950  *
951  * \param in reader
952  * \return reader
953  */
954  virtual JReader& read(JReader& in)
955  {
956  in >> transformer;
957 
958  return in;
959  }
960 
961 
962  /**
963  * Write PDF transformer to output.
964  *
965  * \param out writer
966  * \return writer
967  */
968  virtual JWriter& write(JWriter& out) const
969  {
970  out << transformer;
971 
972  return out;
973  }
974 
975 
976  /**
977  * Print PDF transfomer to output stream.
978  *
979  * \param out output stream
980  * \return output stream
981  */
982  std::ostream& print(std::ostream& out) const
983  {
984  return transformer.print(out);
985  }
986 
988  };
989 }
990 
991 #endif
JPHYSICS::JPDFTransformer< 1, JArgument_t >::__ln
double __ln
Effective attenuation length [m].
Definition: JPDFTransformer.hh:235
JPHYSICS::JPDFTransformer< 5, JArgument_t >::JPDFTransformer
JPDFTransformer(const double ln, const int alpha, const double kmin, const double kmax, const JGeant geant, const double bmin, T pmt, const double amin)
Constructor.
Definition: JPDFTransformer.hh:887
JPHYSICS::JPDFTransformer< 5, JArgument_t >::const_array_type
JMultiMapTransformer_t::const_array_type const_array_type
Definition: JPDFTransformer.hh:856
JPHYSICS::JPDFTransformer< 4, JArgument_t >::JPDFTransformer
JPDFTransformer()
Default constructor.
Definition: JPDFTransformer.hh:681
JPHYSICS::JPDFTransformer< 5, JArgument_t >::JFunction1D_t
JTOOLS::JGridPolint1Function1D_t JFunction1D_t
Definition: JPDFTransformer.hh:858
JIO::JReader
Interface for binary input.
Definition: JSerialisable.hh:62
JPHYSICS::JPDFTransformer< 2, JArgument_t >::print
std::ostream & print(std::ostream &out) const
Print PDF transformer to output stream.
Definition: JPDFTransformer.hh:440
JPHYSICS::JPDFTransformer< 2, JArgument_t >::getWeight
virtual double getWeight(const_array_type &buffer) const
Weight function.
Definition: JPDFTransformer.hh:385
JPHYSICS::JPDFTransformer< 2, JArgument_t >::clone_type
JMultiMapTransformer_t::clone_type clone_type
Definition: JPDFTransformer.hh:262
JPHYSICS::JPDFTransformer< 1, JArgument_t >::JPDFTransformer
JPDFTransformer()
Default constructor.
Definition: JPDFTransformer.hh:66
JPHYSICS::JPDFTransformer< 1, JArgument_t >::JMultiMapTransformer_t
JTOOLS::JMultiMapTransformer< 1, JArgument_t > JMultiMapTransformer_t
Definition: JPDFTransformer.hh:52
JPHYSICS::JPDFTransformer< 1, JArgument_t >::JPDFTransformer
JPDFTransformer(const double ln, const int alpha, const double kmin, const double kmax)
Constructor.
Definition: JPDFTransformer.hh:82
JPHYSICS::JPDFTransformer< 2, JArgument_t >::JPDFTransformer
JPDFTransformer()
Default constructor.
Definition: JPDFTransformer.hh:274
JPHYSICS::JPDFTransformer< 3, JArgument_t >::JMultiMapTransformer_t
JTOOLS::JMultiMapTransformer< 3, JArgument_t > JMultiMapTransformer_t
Definition: JPDFTransformer.hh:482
JPHYSICS::JPDFTransformer< 4, JArgument_t >::putXn
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {D, cd, theta, phi}.
Definition: JPDFTransformer.hh:736
JPHYSICS::JPDFTransformer< 3, JArgument_t >::clone
virtual clone_type clone() const
Clone object.
Definition: JPDFTransformer.hh:536
JPHYSICS::JPDFTransformer< 3, JArgument_t >::write
virtual JWriter & write(JWriter &out) const
Write PDF transformer to output.
Definition: JPDFTransformer.hh:618
JGrid.hh
JTOOLS::JMultiMapTransformer< 1, JArgument_t >::clone_type
JClonable< multimaptransformer_type >::clone_type clone_type
Definition: JMultiMapTransformer.hh:43
JPHYSICS::JPDFTransformer< 2, JArgument_t >::const_array_type
JMultiMapTransformer_t::const_array_type const_array_type
Definition: JPDFTransformer.hh:264
JPHYSICS::JPDFTransformer< 3, JArgument_t >::getWeight
virtual double getWeight(const_array_type &buffer) const
Weight function.
Definition: JPDFTransformer.hh:574
JPHYSICS::JPDFTransformer< 4, JArgument_t >::transformer
JFunction2DTransformer_t transformer
Definition: JPDFTransformer.hh:824
JPHYSICS::JPDFTransformer< 2, JArgument_t >::write
virtual JWriter & write(JWriter &out) const
Write PDF transformer to output.
Definition: JPDFTransformer.hh:422
JPHYSICS::JPDFTransformer< 4, JArgument_t >::JPDFTransformer
JPDFTransformer(const double ln, const int alpha, const double kmin, const double kmax, const JGeant geant, const double bmin, T pmt, const double amin)
Constructor.
Definition: JPDFTransformer.hh:700
JPHYSICS::JPDFTransformer< 1, JArgument_t >::putXn
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {R}.
Definition: JPDFTransformer.hh:111
JPHYSICS::JPDFTransformer< 1, JArgument_t >
Template specialisation of transformer of the 1D Probability Density Functions of the time response o...
Definition: JPDFTransformer.hh:47
JPHYSICS::JPDFTransformer< 5, JArgument_t >::read
virtual JReader & read(JReader &in)
Read PDF transformer from input.
Definition: JPDFTransformer.hh:954
JPHYSICS::JPDFTransformer< 2, JArgument_t >::JMultiMapTransformer_t
JTOOLS::JMultiMapTransformer< 2, JArgument_t > JMultiMapTransformer_t
Definition: JPDFTransformer.hh:260
JPHYSICS::JPDFTransformer< 3, JArgument_t >::getAngularAcceptance
JFunction1D_t getAngularAcceptance
Definition: JPDFTransformer.hh:640
JPHYSICS::JPDFTransformer< 4, JArgument_t >::argument_type
JMultiMapTransformer_t::argument_type argument_type
Definition: JPDFTransformer.hh:668
JPHYSICS::JPDFTransformer< 2, JArgument_t >::argument_type
JMultiMapTransformer_t::argument_type argument_type
Definition: JPDFTransformer.hh:263
JPHYSICS::JPDFTransformer< 4, JArgument_t >::getXn
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {D, cd, theta, phi}.
Definition: JPDFTransformer.hh:749
JTOOLS::n
const int n
Definition: JPolint.hh:628
JPDFToolkit.hh
JPHYSICS::JPDFTransformer< 1, JArgument_t >::getRmin
static double getRmin()
Definition: JPDFTransformer.hh:60
JPHYSICS::JPDFTransformer< 4, JArgument_t >::getDmin
static double getDmin()
Definition: JPDFTransformer.hh:675
JPHYSICS
Auxiliary classes and methods for calculation of PDF and muon energy loss.
Definition: JAbstractMedium.hh:9
JPHYSICS::JPDFTransformer< 3, JArgument_t >::JFunction1D_t
JTOOLS::JGridPolint1Function1D_t JFunction1D_t
Definition: JPDFTransformer.hh:488
JPHYSICS::JPDFTransformer< 4, JArgument_t >::getAngularAcceptance
JFunction1D_t getAngularAcceptance
Definition: JPDFTransformer.hh:825
JPHYSICS::JPDFTransformer< 3, JArgument_t >::getXn
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {R, theta, phi}.
Definition: JPDFTransformer.hh:562
JPHYSICS::JPDFTransformer< 2, JArgument_t >::JPDFTransformer
JPDFTransformer(const double ln, const int alpha, const double kmin, const double kmax, const JGeant &geant, const double bmin)
Constructor.
Definition: JPDFTransformer.hh:293
JPHYSICS::JPDFTransformer< 4, JArgument_t >::JFunction1D_t
JTOOLS::JGridPolint1Function1D_t JFunction1D_t
Definition: JPDFTransformer.hh:671
JPHYSICS::JPDFTransformer< 4, JArgument_t >::print
std::ostream & print(std::ostream &out) const
Print PDF transfomer to output stream.
Definition: JPDFTransformer.hh:818
JPHYSICS::JPDFTransformer< 5, JArgument_t >::print
std::ostream & print(std::ostream &out) const
Print PDF transfomer to output stream.
Definition: JPDFTransformer.hh:982
JPHYSICS::JPDFTransformer< 5, JArgument_t >::argument_type
JMultiMapTransformer_t::argument_type argument_type
Definition: JPDFTransformer.hh:855
JPHYSICS::JPDFTransformer< 4, JArgument_t >::clone
virtual clone_type clone() const
Clone object.
Definition: JPDFTransformer.hh:723
JPHYSICS::JPDFTransformer< 3, JArgument_t >::getRmin
static double getRmin()
Definition: JPDFTransformer.hh:492
JPHYSICS::JPDFTransformer< 5, JArgument_t >::putXn
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {E, D, cd, theta, phi}.
Definition: JPDFTransformer.hh:916
JPHYSICS::JPDFTransformer
Template definition of transformer of the Probability Density Functions of the time response of a PMT...
Definition: JPDFTransformer.hh:33
JPHYSICS::JPDFTransformer< 3, JArgument_t >::JFunction1DTransformer_t
JPDFTransformer< 1, JArgument_t > JFunction1DTransformer_t
Definition: JPDFTransformer.hh:481
JPHYSICS::JPDFTransformer< 4, JArgument_t >::getWeight
virtual double getWeight(const_array_type &buffer) const
Weight function.
Definition: JPDFTransformer.hh:761
JPHYSICS::JPDFTransformer< 1, JArgument_t >::print
std::ostream & print(std::ostream &out) const
Print PDF transformer to output stream.
Definition: JPDFTransformer.hh:222
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JPHYSICS::JPDFTransformer< 3, JArgument_t >::argument_type
JMultiMapTransformer_t::argument_type argument_type
Definition: JPDFTransformer.hh:485
JPHYSICS::JPDFTransformer< 3, JArgument_t >::read
virtual JReader & read(JReader &in)
Read PDF transformer from input.
Definition: JPDFTransformer.hh:601
JFunction1D_t.hh
JPHYSICS::JPDFTransformer< 5, JArgument_t >::clone
virtual clone_type clone() const
Clone object.
Definition: JPDFTransformer.hh:903
JPHYSICS::JPDFTransformer< 2, JArgument_t >::putXn
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {D, cd}.
Definition: JPDFTransformer.hh:328
JPHYSICS::JPDFTransformer< 3, JArgument_t >::JPDFTransformer
JPDFTransformer(const double ln, const int alpha, const double kmin, const double kmax, T pmt, const double amin)
Constructor.
Definition: JPDFTransformer.hh:515
JPHYSICS::JPDFTransformer< 4, JArgument_t >
Template specialisation of transformer of the 4D Probability Density Functions of the time response o...
Definition: JPDFTransformer.hh:659
JPHYSICS::JPDFTransformer< 1, JArgument_t >::__kmin
double __kmin
minimal kappa
Definition: JPDFTransformer.hh:237
JSerialisable.hh
JPHYSICS::JPDFTransformer< 5, JArgument_t >::clone_type
JMultiMapTransformer_t::clone_type clone_type
Definition: JPDFTransformer.hh:854
JTOOLS::getInverseSpeedOfLight
const double getInverseSpeedOfLight()
Get inverse speed of light.
Definition: JConstants.hh:100
JPHYSICS::JPDFTransformer< 3, JArgument_t >::clone_type
JMultiMapTransformer_t::clone_type clone_type
Definition: JPDFTransformer.hh:484
JPHYSICS::JPDFTransformer< 2, JArgument_t >::getDmin
static double getDmin()
Definition: JPDFTransformer.hh:268
JPHYSICS::JPDFTransformer< 3, JArgument_t >::putXn
virtual argument_type putXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {R, theta, phi}.
Definition: JPDFTransformer.hh:549
JLANG::JClonable::clone_type
JClonable< JClonable_t >::clone_type clone_type
Definition: JClonable.hh:61
JConstants.hh
JPHYSICS::JPDFTransformer< 4, JArgument_t >::write
virtual JWriter & write(JWriter &out) const
Write PDF transformer to output.
Definition: JPDFTransformer.hh:803
JPHYSICS::JPDFTransformer< 4, JArgument_t >::read
virtual JReader & read(JReader &in)
Read PDF transformer from input.
Definition: JPDFTransformer.hh:786
JTOOLS::getIndexOfRefraction
double getIndexOfRefraction()
Get average index of refraction of water.
Definition: JConstants.hh:111
JTOOLS::JMultiMapTransformer
Interface for weight application and coordinate transformation of function.
Definition: JMultiMapTransformer.hh:35
JIO::JWriter
Interface for binary output.
Definition: JSerialisable.hh:131
JPHYSICS::JPDFTransformer< 2, JArgument_t >::__kmin
double __kmin
minimal kappa
Definition: JPDFTransformer.hh:455
JPHYSICS::JPDFTransformer< 5, JArgument_t >::JFunction2DTransformer_t
JPDFTransformer< 2, JArgument_t > JFunction2DTransformer_t
Definition: JPDFTransformer.hh:851
JMultiMapTransformer.hh
JPHYSICS::JPDFTransformer< 2, JArgument_t >::__alpha
int __alpha
Distance dependence (power term)
Definition: JPDFTransformer.hh:454
JPHYSICS::JPDFTransformer< 5, JArgument_t >::getXn
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {E, D, cd, theta, phi}.
Definition: JPDFTransformer.hh:929
JPHYSICS::JPDFTransformer< 1, JArgument_t >::getXn
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {R}.
Definition: JPDFTransformer.hh:139
JPHYSICS::JPDFTransformer< 5, JArgument_t >::write
virtual JWriter & write(JWriter &out) const
Write PDF transformer to output.
Definition: JPDFTransformer.hh:968
JPHYSICS::JPDFTransformer< 5, JArgument_t >::JPDFTransformer
JPDFTransformer()
Default constructor.
Definition: JPDFTransformer.hh:868
JPHYSICS::JPDFTransformer< 4, JArgument_t >::clone_type
JMultiMapTransformer_t::clone_type clone_type
Definition: JPDFTransformer.hh:667
JPHYSICS::JPDFTransformer< 2, JArgument_t >::__kmax
double __kmax
maximal kappa
Definition: JPDFTransformer.hh:456
JPHYSICS::JPDFTransformer< 2, JArgument_t >::getXn
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const
Evaluate dt value as a function of {D, cd}.
Definition: JPDFTransformer.hh:357
JTOOLS::getIndexOfRefractionPhase
double getIndexOfRefractionPhase()
Get average index of refraction of water.
Definition: JConstants.hh:122
JTOOLS::getTanThetaC
double getTanThetaC()
Get average tangent of Cherenkov angle of water.
Definition: JConstants.hh:133
JPHYSICS::JPDFTransformer< 1, JArgument_t >::const_array_type
JMultiMapTransformer_t::const_array_type const_array_type
Definition: JPDFTransformer.hh:56
JTOOLS::make_grid
JGrid< JAbscissa_t > make_grid(const int nx, const JAbscissa_t Xmin, const JAbscissa_t Xmax)
Helper method for JGrid.
Definition: JGrid.hh:177
JPHYSICS::JPDFTransformer< 5, JArgument_t >::getDmin
static double getDmin()
Definition: JPDFTransformer.hh:862
JPHYSICS::JPDFTransformer< 2, JArgument_t >::clone
virtual clone_type clone() const
Clone object.
Definition: JPDFTransformer.hh:315
JPHYSICS::JGeant
Function object for the probability density function of photon emission from EM-shower as a function ...
Definition: JGeant.hh:39
JPHYSICS::JPDFTransformer< 3, JArgument_t >::print
std::ostream & print(std::ostream &out) const
Print PDF transformer to output stream.
Definition: JPDFTransformer.hh:633
JPHYSICS::JPDFTransformer< 1, JArgument_t >::clone
virtual clone_type clone() const
Clone object.
Definition: JPDFTransformer.hh:98
JPHYSICS::JPDFTransformer< 4, JArgument_t >::JMultiMapTransformer_t
JTOOLS::JMultiMapTransformer< 4, JArgument_t > JMultiMapTransformer_t
Definition: JPDFTransformer.hh:665
JPHYSICS::JPDFTransformer< 1, JArgument_t >::__kmax
double __kmax
maximal kappa
Definition: JPDFTransformer.hh:238
JPHYSICS::JPDFTransformer< 2, JArgument_t >
Template specialisation of transformer of the 2D Probability Density Functions of the time response o...
Definition: JPDFTransformer.hh:255
JTOOLS::JMultiMapTransformer< 1, JArgument_t >::argument_type
JArgument_t argument_type
Definition: JMultiMapTransformer.hh:44
JPHYSICS::JPDFTransformer< 5, JArgument_t >::JMultiMapTransformer_t
JTOOLS::JMultiMapTransformer< 5, JArgument_t > JMultiMapTransformer_t
Definition: JPDFTransformer.hh:852
JPHYSICS::JPDFTransformer< 2, JArgument_t >::getShowerProbability
JGeant getShowerProbability
Definition: JPDFTransformer.hh:457
JPHYSICS::JPDFTransformer< 1, JArgument_t >::clone_type
JMultiMapTransformer_t::clone_type clone_type
Definition: JPDFTransformer.hh:54
JPHYSICS::geant
static const JGeant geant(geanx, 0.0001)
Function object for the number of photons from EM-shower as a function of emission angle.
JPHYSICS::JPDFTransformer< 1, JArgument_t >::getWeight
virtual double getWeight(const_array_type &buffer) const
Weight function.
Definition: JPDFTransformer.hh:166
JPHYSICS::JPDFTransformer< 3, JArgument_t >::const_array_type
JMultiMapTransformer_t::const_array_type const_array_type
Definition: JPDFTransformer.hh:486
JPHYSICS::JPDFTransformer< 3, JArgument_t >::transformer
JFunction1DTransformer_t transformer
Definition: JPDFTransformer.hh:639
JTOOLS::JGridPolint1Function1D_t
Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type ...
Definition: JFunction1D_t.hh:292
JPHYSICS::JPDFTransformer< 4, JArgument_t >::JFunction2DTransformer_t
JPDFTransformer< 2, JArgument_t > JFunction2DTransformer_t
Definition: JPDFTransformer.hh:664
JPHYSICS::JPDFTransformer< 1, JArgument_t >::write
virtual JWriter & write(JWriter &out) const
Write PDF transformer to output.
Definition: JPDFTransformer.hh:205
getAngularAcceptance
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
Definition: JDrawLED.cc:84
JPHYSICS::JPDFTransformer< 5, JArgument_t >::getWeight
virtual double getWeight(const_array_type &buffer) const
Weight function.
Definition: JPDFTransformer.hh:941
JTOOLS
Auxiliary classes and methods for multi-dimensional interpolations and histograms.
Definition: JAbstractCollection.hh:9
JPHYSICS::JPDFTransformer< 1, JArgument_t >::read
virtual JReader & read(JReader &in)
Read PDF transformer from input.
Definition: JPDFTransformer.hh:188
JPHYSICS::JPDFTransformer< 1, JArgument_t >::__alpha
int __alpha
Distance dependence (power term)
Definition: JPDFTransformer.hh:236
JPHYSICS::JPDFTransformer< 5, JArgument_t >::transformer
JFunction4DTransformer_t transformer
Definition: JPDFTransformer.hh:987
JPHYSICS::JPDFTransformer< 4, JArgument_t >::const_array_type
JMultiMapTransformer_t::const_array_type const_array_type
Definition: JPDFTransformer.hh:669
JPHYSICS::JPDFTransformer< 1, JArgument_t >::argument_type
JMultiMapTransformer_t::argument_type argument_type
Definition: JPDFTransformer.hh:55
JPHYSICS::JPDFTransformer< 2, JArgument_t >::read
virtual JReader & read(JReader &in)
Read PDF transformer from input.
Definition: JPDFTransformer.hh:404
JPHYSICS::JPDFTransformer< 5, JArgument_t >::JFunction4DTransformer_t
JPDFTransformer< 4, JArgument_t > JFunction4DTransformer_t
Definition: JPDFTransformer.hh:850
JPHYSICS::JPDFTransformer< 3, JArgument_t >::JPDFTransformer
JPDFTransformer()
Default constructor.
Definition: JPDFTransformer.hh:498
JPHYSICS::JPDFTransformer< 2, JArgument_t >::__ln
double __ln
Effective attenuation length [m].
Definition: JPDFTransformer.hh:453
JCC.hh