LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
PropagationTimeModel.h
Go to the documentation of this file.
1 #ifndef PROPAGATIONTIMEMODEL_H
2 #define PROPAGATIONTIMEMODEL_H
3 
4 // PropagationTimeModel
5 // - parameterized fast optical simulation of photon propagation times
6 // - contains functions to calculate the propagation times of direct and
7 // reflected photons incident each photo-detector, along with the necessary
8 // ultility functions
9 // - full description of model: Eur. Phys. J. C 81, 349 (2021)
10 
11 // Nov 2021 by P. Green
12 
13 // LArSoft libraries
17 
18 // fhicl
19 #include "fhiclcpp/ParameterSet.h"
20 
21 #include "CLHEP/Random/RandFlat.h"
22 #include "CLHEP/Random/RandGeneral.h"
23 
24 namespace CLHEP {
25  class HepRandomEngine;
26 }
27 
28 // ROOT headers
29 #include "TF1.h"
30 #include "TH1D.h"
31 
32 #include <array>
33 #include <vector>
34 
35 namespace phot {
36 
38 
39  public:
40  // constructor
41  PropagationTimeModel(const fhicl::ParameterSet& VUVTimingParams,
42  const fhicl::ParameterSet& VISTimingParams,
43  CLHEP::HepRandomEngine& scintTimeEngine,
44  const bool doReflectedLight = false,
45  const bool GeoPropTimeOnly = false);
46 
47  // propagation time
48  void propagationTime(std::vector<double>& arrivalTimes,
49  const geo::Point_t& x0,
50  const size_t OpChannel,
51  const bool Reflected = false);
52 
53  private:
54  void generateVUVParams(const fhicl::ParameterSet& VUVTimingParams,
55  CLHEP::HepRandomEngine& scintTimeEngine);
56 
57  // direct / VUV light
58  void getVUVTimes(std::vector<double>& arrivalTimes,
59  const double distance_in_cm,
60  const size_t angle_bin);
61 
62  void getVUVTimesGeo(std::vector<double>& arrivalTimes, const double distance_in_cm) const;
63 
64  // reflected / visible light
65  void getVISTimes(std::vector<double>& arrivalTimes,
66  const geo::Point_t& scintPoint,
67  const geo::Point_t& opDetPoint);
68 
69  geo::Point_t cathodeCentre() const;
70  std::vector<geo::Point_t> opDetCenters() const;
71  std::vector<int> opDetOrientations() const;
72 
73  // utility functions
74  static double finter_d(const double* x, const double* par);
75 
76  static double model_close(const double* x, const double* par);
77 
78  static double model_far(const double* x, const double* par);
79 
80  // configuration
81  const bool fGeoPropTimeOnly;
82 
83  // random numbers
84  CLHEP::RandFlat fUniformGen;
85 
86  // geometry properties
88  const double fplane_depth;
90 
91  // photodetector geometry properties
92  const std::vector<geo::Point_t> fOpDetCenter;
93  const std::vector<int> fOpDetOrientation;
94 
95  // For VUV propagation time parametrization
96  double fstep_size, fvuv_vgroup_mean, fvuv_vgroup_max, fmin_d, finflexion_point_distance,
97  fangle_bin_timing_vuv;
98  // vector containing generated VUV timing parameterisations
99  std::vector<std::vector<CLHEP::RandGeneral>> fVUVTimingGen;
100  // vector containing min and max range VUV timing parameterisations are
101  // sampled to
102  std::vector<std::vector<double>> fVUV_max;
103  std::vector<std::vector<double>> fVUV_min;
104 
105  // For VIS propagation time parameterisation
106  double fvis_vmean, fangle_bin_timing_vis;
107  std::vector<double> fdistances_refl;
108  std::vector<double> fradial_distances_refl;
109  std::vector<std::vector<std::vector<double>>> fcut_off_pars;
110  std::vector<std::vector<std::vector<double>>> ftau_pars;
111  };
112 
113 } // namespace phot
114 
115 #endif
Float_t x
Definition: compare.C:6
const std::vector< geo::Point_t > fOpDetCenter
const std::vector< int > fOpDetOrientation
std::vector< std::vector< std::vector< double > > > fcut_off_pars
geo::GeometryCore const & fGeom
double finter_d(double *x, double *par)
double model_far(double *x, double *par)
double model_close(double *x, double *par)
std::vector< std::vector< CLHEP::RandGeneral > > fVUVTimingGen
Definitions of geometry vector data types.
const geo::Point_t fcathode_centre
std::vector< std::vector< double > > fVUV_min
std::vector< double > fradial_distances_refl
std::vector< std::vector< std::vector< double > > > ftau_pars
Description of geometry of one entire detector.
Definition: GeometryCore.h:119
Provides a base class aware of world box coordinates.
std::vector< double > fdistances_refl
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:180
General LArSoft Utilities.
std::vector< std::vector< double > > fVUV_max