1 #ifndef SEMIANALYTICALMODEL_H
2 #define SEMIANALYTICALMODEL_H
17 #include "fhiclcpp/ParameterSet.h"
21 #include "boost/math/policies/policy.hpp"
28 typedef boost::math::policies::policy<boost::math::policies::promote_double<false>>
noLDoublePromote;
36 SemiAnalyticalModel(fhicl::ParameterSet VUVHits, fhicl::ParameterSet VISHits,
bool doReflectedLight =
false,
bool includeAnodeReflections =
false);
45 bool AnodeMode =
false)
const;
73 const double cathode_visibility,
geo::Point_t const& hotspot,
74 bool AnodeMode =
false)
const;
84 double Disk_SolidAngle(
const double d,
const double h,
const double b)
const;
93 double interpolate(
const std::vector<double>& xData,
94 const std::vector<double>& yData,
99 double interpolate2(
const std::vector<double>& xDistances,
100 const std::vector<double>& rDistances,
104 const size_t k)
const;
108 template <
typename TReal>
109 inline constexpr
static bool
110 isApproximatelyEqual(TReal
a, TReal b, TReal
tolerance = std::numeric_limits<TReal>::epsilon())
112 TReal diff = std::fabs(a - b);
114 if (diff < std::fmax(std::fabs(a), std::fabs(b)) *
tolerance)
return true;
121 template <
typename TReal>
122 inline constexpr
static bool
123 isApproximatelyZero(TReal a, TReal
tolerance = std::numeric_limits<TReal>::epsilon())
125 if (std::fabs(a) <=
tolerance)
return true;
131 template <
typename TReal>
132 inline constexpr
static bool
133 isDefinitelyLessThan(TReal a, TReal b, TReal
tolerance = std::numeric_limits<TReal>::epsilon())
137 if (diff < std::fmax(std::fabs(a), std::fabs(b)) *
tolerance)
return true;
141 template <
typename TReal>
142 inline constexpr
static bool
143 isDefinitelyGreaterThan(TReal a, TReal b, TReal
tolerance = std::numeric_limits<TReal>::epsilon())
147 if (diff > std::fmax(std::fabs(a), std::fabs(b)) *
tolerance)
return true;
std::vector< double > fvis_distances_r_dome
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
std::vector< double > fvis_distances_r_flat_lateral
double Gaisser_Hillas(const double x, const double *par) const
void detectedDirectVisibilities(std::vector< double > &DetectedVisibilities, geo::Point_t const &ScintPoint) const
std::vector< std::vector< double > > fborder_corr_dome
process_name opflash particleana ie x
double interpolate2(const std::vector< double > &xDistances, const std::vector< double > &rDistances, const std::vector< std::vector< std::vector< double >>> ¶meters, const double x, const double r, const size_t k) const
std::vector< std::vector< std::vector< double > > > fvispars_flat_lateral
double VUVVisibility(geo::Point_t const &ScintPoint, OpticalDetector const &opDet) const
double Omega_Dome_Model(const double distance, const double theta) const
const TVector3 fcathode_centre
std::vector< std::vector< double > > fGHvuvpars_flat
std::vector< std::vector< double > > fGHvuvpars_dome
geo::GeometryCore const & fGeom
std::vector< double > fvis_distances_r_flat
std::vector< double > fOpDetHeight
const TVector3 fanode_centre
std::vector< std::vector< double > > fborder_corr_flat_lateral
const fhicl::ParameterSet fVUVHitsParams
std::vector< std::vector< std::vector< double > > > fvispars_flat
double fast_acos(double x) const
bool fApplyFieldCageTransparency
double fFieldCageTransparencyCathode
void detectedReflectedVisibilities(std::vector< double > &ReflDetectedVisibilities, geo::Point_t const &ScintPoint, bool AnodeMode=false) const
const bool fDoReflectedLight
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
double Rectangle_SolidAngle(const double a, const double b, const double d) const
const fhicl::ParameterSet fVISHitsParams
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
std::vector< double > fvis_distances_x_flat
Definitions of geometry vector data types.
boost::math::policies::policy< boost::math::policies::promote_double< false > > noLDoublePromote
const larg4::ISTPC fISTPC
double interpolate(const std::vector< double > &xData, const std::vector< double > &yData, double x, bool extrapolate, size_t i=0) const
std::vector< double > fvis_distances_x_flat_lateral
std::vector< geo::Point_t > fOpDetCenter
std::vector< double > fOpDetLength
Description of geometry of one entire detector.
const int fvuv_absorption_length
std::vector< double > fborder_corr_angulo_flat_lateral
std::vector< std::vector< double > > fborder_corr_flat
std::vector< std::vector< double > > fGHvuvpars_flat_lateral
double fAnodeReflectivity
int VUVAbsorptionLength() const
std::vector< int > fOpDetType
std::vector< double > fborder_corr_angulo_dome
bool isOpDetInSameTPC(geo::Point_t const &ScintPoint, geo::Point_t const &OpDetPoint) const
std::vector< double > fvis_distances_x_dome
const std::vector< geo::BoxBoundedGeo > fActiveVolumes
double Disk_SolidAngle(const double d, const double h, const double b) const
double fanode_plane_depth
SemiAnalyticalModel(fhicl::ParameterSet VUVHits, fhicl::ParameterSet VISHits, bool doReflectedLight=false, bool includeAnodeReflections=false)
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
std::vector< double > fborder_corr_angulo_flat
std::vector< int > fOpDetOrientation
double fFieldCageTransparencyLateral
std::vector< std::vector< std::vector< double > > > fvispars_dome
double VISVisibility(geo::Point_t const &ScintPoint, OpticalDetector const &opDet, const double cathode_visibility, geo::Point_t const &hotspot, bool AnodeMode=false) const
const bool fIncludeAnodeReflections