LArSoft  v10_04_05
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
18 
19 // fhicl
20 #include "fhiclcpp/fwd.h"
21 
22 #include "CLHEP/Random/RandFlat.h"
23 #include "CLHEP/Random/RandGeneral.h"
24 
25 namespace CLHEP {
26  class HepRandomEngine;
27 }
28 
29 // ROOT headers
30 #include "TF1.h"
31 #include "TH1D.h"
32 
33 #include <array>
34 #include <vector>
35 
36 namespace phot {
37 
39 
40  public:
41  // constructor
42  PropagationTimeModel(const fhicl::ParameterSet& VUVTimingParams,
43  const fhicl::ParameterSet& VISTimingParams,
44  CLHEP::HepRandomEngine& scintTimeEngine,
45  const bool doReflectedLight = false,
46  const bool GeoPropTimeOnly = false);
47 
48  // propagation time
49  void propagationTime(std::vector<double>& arrivalTimes,
50  const geo::Point_t& x0,
51  const size_t OpChannel,
52  const bool Reflected = false);
53 
54  private:
55  void generateVUVParams(const fhicl::ParameterSet& VUVTimingParams,
56  CLHEP::HepRandomEngine& scintTimeEngine);
57 
58  // direct / VUV light
59  void getVUVTimes(std::vector<double>& arrivalTimes,
60  const double distance_in_cm,
61  const size_t angle_bin);
62 
63  void getVUVTimesGeo(std::vector<double>& arrivalTimes, const double distance_in_cm) const;
64 
65  // reflected / visible light
66  void getVISTimes(std::vector<double>& arrivalTimes,
67  const geo::Point_t& scintPoint,
68  const geo::Point_t& opDetPoint);
69 
70  geo::Point_t cathodeCentre() const;
71  std::vector<geo::Point_t> opDetCenters() const;
72  std::vector<int> opDetOrientations() const;
73 
74  // configuration
75  const bool fGeoPropTimeOnly;
76 
77  // random numbers
78  CLHEP::RandFlat fUniformGen;
79 
80  // geometry properties
82  const double fplane_depth;
84 
85  // photodetector geometry properties
86  const std::vector<geo::Point_t> fOpDetCenter;
87  const std::vector<int> fOpDetOrientation;
88 
89  // For VUV propagation time parametrization
90  double fstep_size, fvuv_vgroup_mean, fvuv_vgroup_max, fmin_d, finflexion_point_distance,
91  fangle_bin_timing_vuv;
92  // vector containing generated VUV timing parameterisations
93  std::vector<std::vector<CLHEP::RandGeneral>> fVUVTimingGen;
94  // vector containing min and max range VUV timing parameterisations are
95  // sampled to
96  std::vector<std::vector<double>> fVUV_max;
97  std::vector<std::vector<double>> fVUV_min;
98 
99  // For VIS propagation time parameterisation
100  double fvis_vmean, fangle_bin_timing_vis;
101  std::vector<double> fdistances_refl;
102  std::vector<double> fradial_distances_refl;
103  std::vector<std::vector<std::vector<double>>> fcut_off_pars;
104  std::vector<std::vector<std::vector<double>>> ftau_pars;
105  };
106 
107 } // namespace phot
108 
109 #endif
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
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 the physical geometry of one entire detector.
Definition: GeometryCore.h:91
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