LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
phot::PhotonVisibilityService Class Reference

#include "PhotonVisibilityService.h"

Public Member Functions

 ~PhotonVisibilityService ()
 
 PhotonVisibilityService (fhicl::ParameterSet const &pset)
 
void reconfigure (fhicl::ParameterSet const &p)
 
double GetQuenchingFactor (double dQdx) const
 
template<typename Point >
bool HasVisibility (Point const &p, bool wantReflected=false) const
 
template<typename Point >
float GetVisibility (Point const &p, unsigned int OpChannel, bool wantReflected=false) const
 
template<typename Point >
MappedCounts_t GetAllVisibilities (Point const &p, bool wantReflected=false) const
 
void LoadLibrary () const
 
void StoreLibrary ()
 
void StoreLightProd (int VoxID, double N)
 
void RetrieveLightProd (int &VoxID, double &N) const
 
void SetLibraryEntry (int VoxID, OpDetID_t libOpChannel, float N, bool wantReflected=false)
 
float GetLibraryEntry (int VoxID, OpDetID_t libOpChannel, bool wantReflected=false) const
 
bool HasLibraryEntries (int VoxID, bool wantReflected=false) const
 
phot::IPhotonLibrary::Counts_t GetLibraryEntries (int VoxID, bool wantReflected=false) const
 
template<typename Point >
MappedT0s_t GetReflT0s (Point const &p) const
 
void SetLibraryReflT0Entry (int VoxID, int OpChannel, float value)
 
phot::IPhotonLibrary::Counts_t GetLibraryReflT0Entries (int VoxID) const
 
float GetLibraryReflT0Entry (int VoxID, OpDetID_t libOpChannel) const
 
template<typename Point >
MappedParams_t GetTimingPar (Point const &p) const
 
void SetLibraryTimingParEntry (int VoxID, int OpChannel, float value, size_t parnum)
 
phot::IPhotonLibrary::Params_t GetLibraryTimingParEntries (int VoxID) const
 
float GetLibraryTimingParEntry (int VoxID, OpDetID_t libOpChannel, size_t npar) const
 
template<typename Point >
MappedFunctions_t GetTimingTF1 (Point const &p) const
 
void SetLibraryTimingTF1Entry (int VoxID, int OpChannel, TF1 const &func)
 
phot::IPhotonLibrary::Functions_t GetLibraryTimingTF1Entries (int VoxID) const
 
void SetDirectLightPropFunctions (TF1 const *functions[8], double &d_break, double &d_max, double &tf1_sampling_factor) const
 
void SetReflectedCOLightPropFunctions (TF1 const *functions[5], double &t0_max, double &t0_break_point) const
 
void LoadTimingsForVUVPar (std::vector< std::vector< double >>(&v)[7], double &step_size, double &max_d, double &min_d, double &vuv_vgroup_mean, double &vuv_vgroup_max, double &inflexion_point_distance, double &angle_bin_timing_vuv) const
 
void LoadTimingsForVISPar (std::vector< double > &distances, std::vector< double > &radial_distances, std::vector< std::vector< std::vector< double >>> &cut_off, std::vector< std::vector< std::vector< double >>> &tau, double &vis_vmean, double &angle_bin_timing_vis) const
 
void LoadVUVSemiAnalyticProperties (bool &isFlatPDCorr, bool &isDomePDCorr, double &delta_angulo_vuv, double &radius) const
 
void LoadGHFlat (std::vector< std::vector< double >> &GHvuvpars_flat, std::vector< double > &border_corr_angulo_flat, std::vector< std::vector< double >> &border_corr_flat) const
 
void LoadGHDome (std::vector< std::vector< double >> &GHvuvpars_dome, std::vector< double > &border_corr_angulo_dome, std::vector< std::vector< double >> &border_corr_dome) const
 
void LoadVisSemiAnalyticProperties (double &delta_angulo_vis, double &radius) const
 
void LoadVisParsFlat (std::vector< double > &vis_distances_x_flat, std::vector< double > &vis_distances_r_flat, std::vector< std::vector< std::vector< double >>> &vispars_flat) const
 
void LoadVisParsDome (std::vector< double > &vis_distances_x_dome, std::vector< double > &vis_distances_r_dome, std::vector< std::vector< std::vector< double >>> &vispars_dome) const
 
bool IsBuildJob () const
 
bool UseParameterization () const
 
bool StoreReflected () const
 
bool StoreReflT0 () const
 
bool IncludeParPropTime () const
 
size_t ParPropTimeNpar () const
 
std::string ParPropTimeFormula () const
 
bool IncludePropTime () const
 
bool UseNhitsModel () const
 
bool ApplyVISBorderCorrection () const
 
std::string VISBorderCorrectionType () const
 
const sim::PhotonVoxelDefGetVoxelDef () const
 
size_t NOpChannels () const
 

Static Public Member Functions

template<typename Point >
static double DistanceToOpDet (Point const &p, unsigned int OpDet)
 
template<typename Point >
static double SolidAngleFactor (Point const &p, unsigned int OpDet)
 

Private Types

using LibraryIndex_t = phot::IPhotonMappingTransformations::LibraryIndex_t
 Type of optical library index. More...
 

Private Member Functions

geo::Point_t LibLocation (geo::Point_t const &p) const
 
int VoxelAt (geo::Point_t const &p) const
 
float doGetVisibilityOfOpLib (geo::Point_t const &p, LibraryIndex_t libIndex, bool wantReflected=false) const
 

Private Attributes

int fCurrentVoxel
 
double fCurrentValue
 
float fXmin
 
float fXmax
 
float fYmin
 
float fYmax
 
float fZmin
 
float fZmax
 
int fNx
 
int fNy
 
int fNz
 
bool fUseCryoBoundary
 
bool fUseAutomaticVoxels
 
std::string fSaveTPCVoxels
 
std::string fSaveOtherVoxels
 
bool fLibraryBuildJob
 
bool fDoNotLoadLibrary
 
bool fParameterization
 
bool fHybrid
 
bool fStoreReflected
 
bool fStoreReflT0
 
bool fIncludePropTime
 
bool fUseNhitsModel
 
bool fApplyVISBorderCorrection
 
std::string fVISBorderCorrectionType
 
bool fParPropTime
 
size_t fParPropTime_npar
 
std::string fParPropTime_formula
 
int fParPropTime_MaxRange
 
bool fInterpolate
 
bool fReflectOverZeroX
 
TF1 * fparslogNorm = nullptr
 
TF1 * fparslogNorm_far = nullptr
 
TF1 * fparsMPV = nullptr
 
TF1 * fparsMPV_far = nullptr
 
TF1 * fparsWidth = nullptr
 
TF1 * fparsCte = nullptr
 
TF1 * fparsCte_far = nullptr
 
TF1 * fparsSlope = nullptr
 
double fD_break
 
double fD_max
 
double fTF1_sampling_factor
 
TF1 * fparslogNorm_refl = nullptr
 
TF1 * fparsMPV_refl = nullptr
 
TF1 * fparsWidth_refl = nullptr
 
TF1 * fparsCte_refl = nullptr
 
TF1 * fparsSlope_refl = nullptr
 
double fT0_max
 
double fT0_break_point
 
std::vector< double > fDistances_landau
 
std::vector< std::vector< double > > fNorm_over_entries
 
std::vector< std::vector< double > > fMpv
 
std::vector< std::vector< double > > fWidth
 
std::vector< double > fDistances_exp
 
std::vector< std::vector< double > > fSlope
 
std::vector< std::vector< double > > fExpo_over_Landau_norm
 
double fstep_size
 
double fmax_d
 
double fmin_d
 
double fvuv_vgroup_mean
 
double fvuv_vgroup_max
 
double finflexion_point_distance
 
double fangle_bin_timing_vuv
 
std::vector< double > fDistances_refl
 
std::vector< double > fDistances_radial_refl
 
std::vector< std::vector< std::vector< double > > > fCut_off
 
std::vector< std::vector< std::vector< double > > > fTau
 
double fvis_vmean
 
double fangle_bin_timing_vis
 
bool fIsFlatPDCorr
 
bool fIsDomePDCorr
 
double fdelta_angulo_vuv
 
std::vector< std::vector< double > > fGHvuvpars_flat
 
std::vector< double > fborder_corr_angulo_flat
 
std::vector< std::vector< double > > fborder_corr_flat
 
std::vector< std::vector< double > > fGHvuvpars_dome
 
std::vector< double > fborder_corr_angulo_dome
 
std::vector< std::vector< double > > fborder_corr_dome
 
double fdelta_angulo_vis
 
std::vector< double > fvis_distances_x_flat
 
std::vector< double > fvis_distances_r_flat
 
std::vector< std::vector< std::vector< double > > > fvispars_flat
 
std::vector< double > fvis_distances_x_dome
 
std::vector< double > fvis_distances_r_dome
 
std::vector< std::vector< std::vector< double > > > fvispars_dome
 
double fradius
 
std::string fLibraryFile
 
IPhotonLibraryfTheLibrary
 
sim::PhotonVoxelDef fVoxelDef
 
std::unique_ptr< phot::IPhotonMappingTransformationsfMapping
 Mapping of detector space into library space. More...
 

Implementation functions

bool doHasVisibility (geo::Point_t const &p, bool wantReflected=false) const
 
float doGetVisibility (geo::Point_t const &p, unsigned int OpChannel, bool wantReflected=false) const
 
MappedCounts_t doGetAllVisibilities (geo::Point_t const &p, bool wantReflected=false) const
 
MappedT0s_t doGetReflT0s (geo::Point_t const &p) const
 
MappedParams_t doGetTimingPar (geo::Point_t const &p) const
 
MappedFunctions_t doGetTimingTF1 (geo::Point_t const &p) const
 
void findVoxelSuggestion (float tpcMin, float tpcMax, float cryoMin, float cryoMax, int &nVoxels, float &voxelMin, float &voxelMax, float voxelSizeGoal, std::string *logString=nullptr) const
 
float testVoxelSuggestion (float tpcMin, float tpcMax, float cryoMin, float cryoMax, int &nVoxels, float &voxelMin, float &voxelMax, float voxelSizeGoal, int jog, std::string *logString=nullptr) const
 
static double DistanceToOpDetImpl (geo::Point_t const &p, unsigned int OpDet)
 
static double SolidAngleFactorImpl (geo::Point_t const &p, unsigned int OpDet)
 

Detailed Description

Definition at line 37 of file PhotonVisibilityService.h.

Member Typedef Documentation

Constructor & Destructor Documentation

phot::PhotonVisibilityService::~PhotonVisibilityService ( )

Definition at line 51 of file PhotonVisibilityService.cc.

References fparsCte, fparsCte_far, fparsCte_refl, fparslogNorm, fparslogNorm_far, fparslogNorm_refl, fparsMPV, fparsMPV_far, fparsMPV_refl, fparsSlope, fparsSlope_refl, fparsWidth, fparsWidth_refl, and fTheLibrary.

52  {
53  delete fparslogNorm;
54  delete fparslogNorm_far;
55  delete fparsMPV;
56  delete fparsMPV_far;
57  delete fparsWidth;
58  delete fparsCte;
59  delete fparsCte_far;
60  delete fparsSlope;
61  delete fparslogNorm_refl;
62  delete fparsMPV_refl;
63  delete fparsWidth_refl;
64  delete fparsCte_refl;
65  delete fparsSlope_refl;
66  delete fTheLibrary;
67  }
phot::PhotonVisibilityService::PhotonVisibilityService ( fhicl::ParameterSet const &  pset)

Definition at line 70 of file PhotonVisibilityService.cc.

References art::errors::Configuration, fMapping, fReflectOverZeroX, fhicl::ParameterSet::get(), fhicl::ParameterSet::has_key(), fhicl::ParameterSet::put(), and reconfigure().

71  :
72 
73  fCurrentVoxel(0)
74  , fCurrentValue(0.)
75  , fXmin(0.)
76  , fXmax(0.)
77  , fYmin(0.)
78  , fYmax(0.)
79  , fZmin(0.)
80  , fZmax(0.)
81  , fNx(0)
82  , fNy(0)
83  , fNz(0)
84  , fUseCryoBoundary(false)
85  , fUseAutomaticVoxels(false)
86  , fSaveTPCVoxels()
88  , fLibraryBuildJob(false)
89  , fDoNotLoadLibrary(false)
90  , fParameterization(false)
91  , fHybrid(false)
92  , fStoreReflected(false)
93  , fStoreReflT0(false)
94  , fIncludePropTime(false)
95  , fUseNhitsModel(false)
96  , fParPropTime(false)
100  , fInterpolate(false)
101  , fReflectOverZeroX(false)
102  , fparslogNorm(nullptr)
103  , fparslogNorm_far(nullptr)
104  , fparsMPV(nullptr)
105  , fparsMPV_far(nullptr)
106  , fparsWidth(nullptr)
107  , fparsCte(nullptr)
108  , fparsCte_far(nullptr)
109  , fparsSlope(nullptr)
110  , fD_break(0.0)
111  , fD_max(0.0)
112  , fTF1_sampling_factor(0.0)
113  , fparslogNorm_refl(nullptr)
114  , fparsMPV_refl(nullptr)
115  , fparsWidth_refl(nullptr)
116  , fparsCte_refl(nullptr)
117  , fparsSlope_refl(nullptr)
118  , fT0_max(0.0)
119  , fT0_break_point(0.0)
120  , fLibraryFile()
121  , fTheLibrary(nullptr)
122  , fVoxelDef()
123  {
124  this->reconfigure(pset);
125 
126  if (pset.has_key("ReflectOverZeroX")) { // legacy parameter warning
127  if (pset.has_key("Mapping")) {
129  << "`PhotonVisbilityService` configuration specifies both `Mapping` and "
130  "`ReflectOverZeroX`."
131  " Please remove the latter (and use `PhotonMappingXMirrorTransformations` tool).";
132  }
133  else {
134  mf::LogWarning("PhotonVisbilityService")
135  << "Please update the configuration of `PhotonVisbilityService` service"
136  " replacing `ReflectOverZeroX` with tool configuration:"
137  "\n Mapping: { tool_type: \"PhotonMappingXMirrorTransformations\" }";
138  }
139  } // if
140  fhicl::ParameterSet mapDefaultSet;
141  mapDefaultSet.put("tool_type",
142  fReflectOverZeroX ? "PhotonMappingXMirrorTransformations" :
143  "PhotonMappingIdentityTransformations");
144  fMapping = art::make_tool<phot::IPhotonMappingTransformations>(
145  pset.get<fhicl::ParameterSet>("Mapping", mapDefaultSet));
146 
147  mf::LogInfo("PhotonVisibilityService") << "PhotonVisbilityService initializing" << std::endl;
148  }
std::unique_ptr< phot::IPhotonMappingTransformations > fMapping
Mapping of detector space into library space.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
void reconfigure(fhicl::ParameterSet const &p)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void put(std::string const &key)

Member Function Documentation

bool phot::PhotonVisibilityService::ApplyVISBorderCorrection ( ) const
inline
template<typename Point >
static double phot::PhotonVisibilityService::DistanceToOpDet ( Point const &  p,
unsigned int  OpDet 
)
inlinestatic

Definition at line 51 of file PhotonVisibilityService.h.

References geo::vect::toPoint().

52  {
53  return DistanceToOpDetImpl(geo::vect::toPoint(p), OpDet);
54  }
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
static double DistanceToOpDetImpl(geo::Point_t const &p, unsigned int OpDet)
double phot::PhotonVisibilityService::DistanceToOpDetImpl ( geo::Point_t const &  p,
unsigned int  OpDet 
)
staticprivate

Definition at line 513 of file PhotonVisibilityService.cc.

References geo::OpDetGeo::DistanceToPoint(), and geo::GeometryCore::OpDetGeoFromOpDet().

514  {
516  return geom->OpDetGeoFromOpDet(OpDet).DistanceToPoint(p);
517  }
OpDetGeo const & OpDetGeoFromOpDet(unsigned int OpDet) const
Returns the geo::OpDetGeo object for the given detector number.
double DistanceToPoint(geo::Point_t const &point) const
Returns the distance of the specified point from detector center [cm].
Definition: OpDetGeo.cxx:98
auto phot::PhotonVisibilityService::doGetAllVisibilities ( geo::Point_t const &  p,
bool  wantReflected = false 
) const
private

Definition at line 486 of file PhotonVisibilityService.cc.

References doGetVisibilityOfOpLib(), fInterpolate, fMapping, GetLibraryEntries(), and VoxelAt().

488  {
490 
491  // first we fill a container of visibilities in the library index space
492  // (it is directly the values of the library unless interpolation is
493  // requested)
494  if (fInterpolate) {
495  // this is a punch into multithreading face:
496  static std::vector<float> ret;
497  ret.resize(fMapping->libraryMappingSize(p));
498  for (std::size_t libIndex = 0; libIndex < ret.size(); ++libIndex) {
499  ret[libIndex] = doGetVisibilityOfOpLib(p, LibraryIndex_t(libIndex), wantReflected);
500  }
501  data = &ret.front();
502  }
503  else {
504  auto const VoxID = VoxelAt(p);
505  data = GetLibraryEntries(VoxID, wantReflected);
506  }
507  return fMapping->applyOpDetMapping(p, data);
508  }
phot::IPhotonLibrary::Counts_t GetLibraryEntries(int VoxID, bool wantReflected=false) const
std::unique_ptr< phot::IPhotonMappingTransformations > fMapping
Mapping of detector space into library space.
phot::IPhotonMappingTransformations::LibraryIndex_t LibraryIndex_t
Type of optical library index.
float doGetVisibilityOfOpLib(geo::Point_t const &p, LibraryIndex_t libIndex, bool wantReflected=false) const
int VoxelAt(geo::Point_t const &p) const
const float * Counts_t
Type for visibility count per optical channel.
auto phot::PhotonVisibilityService::doGetReflT0s ( geo::Point_t const &  p) const
private

Definition at line 650 of file PhotonVisibilityService.cc.

References fMapping, GetLibraryReflT0Entries(), and VoxelAt().

651  {
652  // both the input and the output go through mapping to apply needed symmetries.
653  int const VoxID = VoxelAt(p);
655  return fMapping->applyOpDetMapping(p, data);
656  }
phot::IPhotonLibrary::Counts_t GetLibraryReflT0Entries(int VoxID) const
std::unique_ptr< phot::IPhotonMappingTransformations > fMapping
Mapping of detector space into library space.
int VoxelAt(geo::Point_t const &p) const
const float * Counts_t
Type for visibility count per optical channel.
auto phot::PhotonVisibilityService::doGetTimingPar ( geo::Point_t const &  p) const
private

Definition at line 693 of file PhotonVisibilityService.cc.

References fMapping, GetLibraryTimingParEntries(), and VoxelAt().

694  {
695  int const VoxID = VoxelAt(p);
697  return fMapping->applyOpDetMapping(p, params);
698  }
std::unique_ptr< phot::IPhotonMappingTransformations > fMapping
Mapping of detector space into library space.
int VoxelAt(geo::Point_t const &p) const
std::vector< float > const * Params_t
phot::IPhotonLibrary::Params_t GetLibraryTimingParEntries(int VoxID) const
auto phot::PhotonVisibilityService::doGetTimingTF1 ( geo::Point_t const &  p) const
private

Definition at line 700 of file PhotonVisibilityService.cc.

References fMapping, GetLibraryTimingTF1Entries(), and VoxelAt().

701  {
702  int const VoxID = VoxelAt(p);
704  return fMapping->applyOpDetMapping(p, functions);
705  }
std::unique_ptr< phot::IPhotonMappingTransformations > fMapping
Mapping of detector space into library space.
int VoxelAt(geo::Point_t const &p) const
phot::IPhotonLibrary::Functions_t GetLibraryTimingTF1Entries(int VoxID) const
float phot::PhotonVisibilityService::doGetVisibility ( geo::Point_t const &  p,
unsigned int  OpChannel,
bool  wantReflected = false 
) const
private

Definition at line 559 of file PhotonVisibilityService.cc.

References doGetVisibilityOfOpLib(), and fMapping.

562  {
563  // here we quietly confuse op. det. channel (interface) and op. det. (library)
564  LibraryIndex_t const libIndex = fMapping->opDetToLibraryIndex(p, OpChannel);
565  return doGetVisibilityOfOpLib(p, libIndex, wantReflected);
566  }
std::unique_ptr< phot::IPhotonMappingTransformations > fMapping
Mapping of detector space into library space.
phot::IPhotonMappingTransformations::LibraryIndex_t LibraryIndex_t
Type of optical library index.
float doGetVisibilityOfOpLib(geo::Point_t const &p, LibraryIndex_t libIndex, bool wantReflected=false) const
float phot::PhotonVisibilityService::doGetVisibilityOfOpLib ( geo::Point_t const &  p,
LibraryIndex_t  libIndex,
bool  wantReflected = false 
) const
private

Definition at line 530 of file PhotonVisibilityService.cc.

References fInterpolate, GetLibraryEntry(), sim::PhotonVoxelDef::GetNeighboringVoxelIDs(), GetVoxelDef(), LibLocation(), n, and VoxelAt().

Referenced by doGetAllVisibilities(), and doGetVisibility().

533  {
534  if (!fInterpolate) { return GetLibraryEntry(VoxelAt(p), libIndex, wantReflected); }
535 
536  // In case we're outside the bounding box we'll get a empty optional list.
537  auto const neis = GetVoxelDef().GetNeighboringVoxelIDs(LibLocation(p));
538  if (!neis) return 0.0;
539 
540  // Sum up all the weighted neighbours to get interpolation behaviour
541  float vis = 0.0;
542  for (const sim::PhotonVoxelDef::NeiInfo& n : neis.value()) {
543  if (n.id < 0) continue;
544  vis += n.weight * GetLibraryEntry(n.id, libIndex, wantReflected);
545  }
546  return vis;
547  }
float GetLibraryEntry(int VoxID, OpDetID_t libOpChannel, bool wantReflected=false) const
int VoxelAt(geo::Point_t const &p) const
geo::Point_t LibLocation(geo::Point_t const &p) const
const sim::PhotonVoxelDef & GetVoxelDef() const
std::optional< std::array< NeiInfo, 8U > > GetNeighboringVoxelIDs(Point const &v) const
Returns IDs of the eight neighboring voxels around v.
Char_t n[5]
bool phot::PhotonVisibilityService::doHasVisibility ( geo::Point_t const &  p,
bool  wantReflected = false 
) const
private

Definition at line 551 of file PhotonVisibilityService.cc.

References HasLibraryEntries(), and VoxelAt().

553  {
554  return HasLibraryEntries(VoxelAt(p), wantReflected);
555  }
bool HasLibraryEntries(int VoxID, bool wantReflected=false) const
int VoxelAt(geo::Point_t const &p) const
void phot::PhotonVisibilityService::findVoxelSuggestion ( float  tpcMin,
float  tpcMax,
float  cryoMin,
float  cryoMax,
int &  nVoxels,
float &  voxelMin,
float &  voxelMax,
float  voxelSizeGoal,
std::string *  logString = nullptr 
) const
private

Definition at line 923 of file PhotonVisibilityService.cc.

References testVoxelSuggestion().

Referenced by reconfigure().

932  {
933  // Scan the "jog" parameter, which adds an integer amount of voxels within the TPC
934  int bestJog = 0;
935  float bestResult = 1000;
936  for (int jog = -10; jog <= 10; ++jog) {
937  float result = testVoxelSuggestion(
938  tpcMin, tpcMax, cryoMin, cryoMax, nVoxels, voxelMin, voxelMax, voxelSizeGoal, jog);
939  if (result < bestResult) {
940  bestResult = result;
941  bestJog = jog;
942  }
943  }
944 
945  // Print the best result (and update the outputs)
946  testVoxelSuggestion(tpcMin,
947  tpcMax,
948  cryoMin,
949  cryoMax,
950  nVoxels,
951  voxelMin,
952  voxelMax,
953  voxelSizeGoal,
954  bestJog,
955  logString);
956  }
float testVoxelSuggestion(float tpcMin, float tpcMax, float cryoMin, float cryoMax, int &nVoxels, float &voxelMin, float &voxelMax, float voxelSizeGoal, int jog, std::string *logString=nullptr) const
template<typename Point >
MappedCounts_t phot::PhotonVisibilityService::GetAllVisibilities ( Point const &  p,
bool  wantReflected = false 
) const
inline

Definition at line 74 of file PhotonVisibilityService.h.

References geo::vect::toPoint().

Referenced by cosmic::BeamFlashTrackMatchTaggerAlg::AddLightFromSegment(), opdet::FlashHypothesisCreator::CreateFlashHypothesesFromSegment(), and larg4::OpFastScintillation::RecordPhotonsProduced().

75  {
76  return doGetAllVisibilities(geo::vect::toPoint(p), wantReflected);
77  }
MappedCounts_t doGetAllVisibilities(geo::Point_t const &p, bool wantReflected=false) const
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
phot::IPhotonLibrary::Counts_t phot::PhotonVisibilityService::GetLibraryEntries ( int  VoxID,
bool  wantReflected = false 
) const

Definition at line 610 of file PhotonVisibilityService.cc.

References fTheLibrary, phot::IPhotonLibrary::GetCounts(), phot::IPhotonLibrary::GetReflCounts(), and LoadLibrary().

Referenced by doGetAllVisibilities().

613  {
614  if (fTheLibrary == 0) LoadLibrary();
615 
616  if (!wantReflected)
617  return fTheLibrary->GetCounts(VoxID);
618  else
619  return fTheLibrary->GetReflCounts(VoxID);
620  }
virtual Counts_t GetReflCounts(size_t Voxel) const =0
virtual Counts_t GetCounts(size_t Voxel) const =0
Returns a pointer to NOpChannels() visibility values, one per channel.
float phot::PhotonVisibilityService::GetLibraryEntry ( int  VoxID,
OpDetID_t  libOpChannel,
bool  wantReflected = false 
) const

Definition at line 633 of file PhotonVisibilityService.cc.

References fTheLibrary, phot::IPhotonLibrary::GetCount(), phot::IPhotonLibrary::GetReflCount(), and LoadLibrary().

Referenced by doGetVisibilityOfOpLib().

636  {
637  if (fTheLibrary == 0) LoadLibrary();
638 
639  if (!wantReflected)
640  return fTheLibrary->GetCount(VoxID, libOpChannel);
641  else
642  return fTheLibrary->GetReflCount(VoxID, libOpChannel);
643  }
virtual float GetReflCount(size_t Voxel, size_t OpChannel) const =0
virtual float GetCount(size_t Voxel, size_t OpChannel) const =0
phot::IPhotonLibrary::Counts_t phot::PhotonVisibilityService::GetLibraryReflT0Entries ( int  VoxID) const

Definition at line 660 of file PhotonVisibilityService.cc.

References fTheLibrary, phot::IPhotonLibrary::GetReflT0s(), and LoadLibrary().

Referenced by doGetReflT0s().

661  {
662  if (fTheLibrary == 0) LoadLibrary();
663 
664  return fTheLibrary->GetReflT0s(VoxID);
665  }
virtual T0s_t GetReflT0s(size_t Voxel) const =0
float phot::PhotonVisibilityService::GetLibraryReflT0Entry ( int  VoxID,
OpDetID_t  libOpChannel 
) const

Definition at line 682 of file PhotonVisibilityService.cc.

References fTheLibrary, phot::IPhotonLibrary::GetReflT0(), and LoadLibrary().

683  {
684  if (fTheLibrary == 0) LoadLibrary();
685 
686  return fTheLibrary->GetReflT0(VoxID, libOpChannel);
687  }
virtual float GetReflT0(size_t Voxel, size_t OpChannel) const =0
phot::IPhotonLibrary::Params_t phot::PhotonVisibilityService::GetLibraryTimingParEntries ( int  VoxID) const

Definition at line 709 of file PhotonVisibilityService.cc.

References fTheLibrary, phot::PhotonLibrary::GetTimingPars(), and LoadLibrary().

Referenced by doGetTimingPar().

711  {
712  PhotonLibrary* lib = dynamic_cast<PhotonLibrary*>(fTheLibrary);
713  if (fTheLibrary == 0) LoadLibrary();
714 
715  return lib->GetTimingPars(VoxID);
716  }
float phot::PhotonVisibilityService::GetLibraryTimingParEntry ( int  VoxID,
OpDetID_t  libOpChannel,
size_t  npar 
) const

Definition at line 760 of file PhotonVisibilityService.cc.

References fTheLibrary, phot::PhotonLibrary::GetTimingPar(), and LoadLibrary().

763  {
764  PhotonLibrary* lib = dynamic_cast<PhotonLibrary*>(fTheLibrary);
765  if (fTheLibrary == 0) LoadLibrary();
766 
767  return lib->GetTimingPar(VoxID, libOpChannel, npar);
768  }
phot::IPhotonLibrary::Functions_t phot::PhotonVisibilityService::GetLibraryTimingTF1Entries ( int  VoxID) const

Definition at line 720 of file PhotonVisibilityService.cc.

References fTheLibrary, phot::PhotonLibrary::GetTimingTF1s(), and LoadLibrary().

Referenced by doGetTimingTF1().

722  {
723  PhotonLibrary* lib = dynamic_cast<PhotonLibrary*>(fTheLibrary);
724  if (fTheLibrary == 0) LoadLibrary();
725 
726  return lib->GetTimingTF1s(VoxID);
727  }
double phot::PhotonVisibilityService::GetQuenchingFactor ( double  dQdx) const

Definition at line 475 of file PhotonVisibilityService.cc.

476  {
477  // for now, no quenching
478  return 1.0;
479  }
template<typename Point >
MappedT0s_t phot::PhotonVisibilityService::GetReflT0s ( Point const &  p) const
inline

Definition at line 91 of file PhotonVisibilityService.h.

References geo::vect::toPoint(), and value.

Referenced by larg4::OpFastScintillation::RecordPhotonsProduced().

92  {
94  }
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
MappedT0s_t doGetReflT0s(geo::Point_t const &p) const
template<typename Point >
MappedParams_t phot::PhotonVisibilityService::GetTimingPar ( Point const &  p) const
inline

Definition at line 100 of file PhotonVisibilityService.h.

References geo::vect::toPoint().

101  {
103  }
MappedParams_t doGetTimingPar(geo::Point_t const &p) const
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
template<typename Point >
MappedFunctions_t phot::PhotonVisibilityService::GetTimingTF1 ( Point const &  p) const
inline

Definition at line 109 of file PhotonVisibilityService.h.

References radius, geo::vect::toPoint(), and lar::dump::vector().

Referenced by larg4::OpFastScintillation::RecordPhotonsProduced().

110  {
112  }
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
MappedFunctions_t doGetTimingTF1(geo::Point_t const &p) const
template<typename Point >
float phot::PhotonVisibilityService::GetVisibility ( Point const &  p,
unsigned int  OpChannel,
bool  wantReflected = false 
) const
inline

Definition at line 68 of file PhotonVisibilityService.h.

References geo::vect::toPoint().

Referenced by phot::CreateHybridLibrary::CreateHybridLibrary().

69  {
70  return doGetVisibility(geo::vect::toPoint(p), OpChannel, wantReflected);
71  }
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
float doGetVisibility(geo::Point_t const &p, unsigned int OpChannel, bool wantReflected=false) const
const sim::PhotonVoxelDef& phot::PhotonVisibilityService::GetVoxelDef ( ) const
inline
bool phot::PhotonVisibilityService::HasLibraryEntries ( int  VoxID,
bool  wantReflected = false 
) const

Definition at line 624 of file PhotonVisibilityService.cc.

References fTheLibrary, phot::IPhotonLibrary::isVoxelValid(), and LoadLibrary().

Referenced by doHasVisibility().

626  {
627  if (!fTheLibrary) LoadLibrary();
628  return fTheLibrary->isVoxelValid(VoxID);
629  }
virtual bool isVoxelValid(size_t Voxel) const
template<typename Point >
bool phot::PhotonVisibilityService::HasVisibility ( Point const &  p,
bool  wantReflected = false 
) const
inline

Definition at line 62 of file PhotonVisibilityService.h.

References geo::vect::toPoint().

63  {
64  return doHasVisibility(geo::vect::toPoint(p), wantReflected);
65  }
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
bool doHasVisibility(geo::Point_t const &p, bool wantReflected=false) const
bool phot::PhotonVisibilityService::IncludeParPropTime ( ) const
inline
bool phot::PhotonVisibilityService::IncludePropTime ( ) const
inline
bool phot::PhotonVisibilityService::IsBuildJob ( ) const
inline
geo::Point_t phot::PhotonVisibilityService::LibLocation ( geo::Point_t const &  p) const
private

Definition at line 918 of file PhotonVisibilityService.cc.

References fMapping.

Referenced by doGetVisibilityOfOpLib().

919  {
920  return fMapping->detectorToLibrary(p);
921  }
std::unique_ptr< phot::IPhotonMappingTransformations > fMapping
Mapping of detector space into library space.
void phot::PhotonVisibilityService::LoadGHDome ( std::vector< std::vector< double >> &  GHvuvpars_dome,
std::vector< double > &  border_corr_angulo_dome,
std::vector< std::vector< double >> &  border_corr_dome 
) const

Definition at line 877 of file PhotonVisibilityService.cc.

References fborder_corr_angulo_dome, fborder_corr_dome, fGHvuvpars_dome, and fIsDomePDCorr.

Referenced by larg4::OpFastScintillation::OpFastScintillation().

880  {
881  if (!fIsDomePDCorr) return;
882  GHvuvpars_dome = fGHvuvpars_dome;
883  border_corr_angulo_dome = fborder_corr_angulo_dome;
884  border_corr_dome = fborder_corr_dome;
885  }
std::vector< std::vector< double > > fGHvuvpars_dome
std::vector< std::vector< double > > fborder_corr_dome
std::vector< double > fborder_corr_angulo_dome
void phot::PhotonVisibilityService::LoadGHFlat ( std::vector< std::vector< double >> &  GHvuvpars_flat,
std::vector< double > &  border_corr_angulo_flat,
std::vector< std::vector< double >> &  border_corr_flat 
) const

Definition at line 868 of file PhotonVisibilityService.cc.

References fborder_corr_angulo_flat, fborder_corr_flat, fGHvuvpars_flat, and fIsFlatPDCorr.

Referenced by larg4::OpFastScintillation::OpFastScintillation().

871  {
872  if (!fIsFlatPDCorr) return;
873  GHvuvpars_flat = fGHvuvpars_flat;
874  border_corr_angulo_flat = fborder_corr_angulo_flat;
875  border_corr_flat = fborder_corr_flat;
876  }
std::vector< std::vector< double > > fborder_corr_flat
std::vector< std::vector< double > > fGHvuvpars_flat
std::vector< double > fborder_corr_angulo_flat
void phot::PhotonVisibilityService::LoadLibrary ( ) const

Definition at line 151 of file PhotonVisibilityService.cc.

References e, fDoNotLoadLibrary, fHybrid, fLibraryBuildJob, fLibraryFile, fParameterization, fParPropTime_MaxRange, fParPropTime_npar, fStoreReflected, fStoreReflT0, fTheLibrary, sim::PhotonVoxelDef::GetNVoxels(), phot::PhotonLibrary::GetVoxelDef(), GetVoxelDef(), phot::PhotonLibrary::hasVoxelDef(), phot::PhotonLibrary::LoadLibraryFromFile(), geo::GeometryCore::NOpDets(), art::errors::ServiceNotFound, and phot::PhotonLibrary::SetVoxelDef().

Referenced by GetLibraryEntries(), GetLibraryEntry(), GetLibraryReflT0Entries(), GetLibraryReflT0Entry(), GetLibraryTimingParEntries(), GetLibraryTimingParEntry(), GetLibraryTimingTF1Entries(), HasLibraryEntries(), SetLibraryEntry(), SetLibraryReflT0Entry(), SetLibraryTimingParEntry(), SetLibraryTimingTF1Entry(), and StoreLibrary().

152  {
153  // Don't do anything if the library has already been loaded.
154 
155  if (fTheLibrary == 0) {
156 
157  if ((!fLibraryBuildJob) && (!fDoNotLoadLibrary)) {
158  std::string LibraryFileWithPath;
159  cet::search_path sp("FW_SEARCH_PATH");
160 
161  if (!sp.find_file(fLibraryFile, LibraryFileWithPath))
162  throw cet::exception("PhotonVisibilityService")
163  << "Unable to find photon library in " << sp.to_string() << "\n";
164 
165  if (!fParameterization) {
167 
168  mf::LogInfo("PhotonVisibilityService")
169  << "PhotonVisibilityService Loading photon library from file " << LibraryFileWithPath
170  << " for " << GetVoxelDef().GetNVoxels() << " voxels and " << geom->NOpDets()
171  << " optical detectors." << std::endl;
172 
173  if (fHybrid) {
174  fTheLibrary = new PhotonLibraryHybrid(LibraryFileWithPath, GetVoxelDef());
175  }
176  else {
177  PhotonLibrary* lib = new PhotonLibrary;
178  fTheLibrary = lib;
179 
180  size_t NVoxels = GetVoxelDef().GetNVoxels();
181  lib->LoadLibraryFromFile(LibraryFileWithPath,
182  NVoxels,
184  fStoreReflT0,
187 
188  // if the library does not have metadata, we supply some;
189  // otherwise we check that it's compatible with the configured one
190  // (and shrug if it's not); overriding configured metadata
191  // from the one in the library is currently not supported
192  if (!lib->hasVoxelDef())
193  lib->SetVoxelDef(GetVoxelDef());
194  else if (GetVoxelDef() != lib->GetVoxelDef()) {
195  // this might become a fatal error in the future if some protocol
196  // is imposed... it may also be possible to check only the size
197  // rather than the coordinates, which may allow for translations
198  // of the geometry volumes in world space.
199  mf::LogWarning("PhotonVisbilityService")
200  << "Photon library reports the geometry:\n"
201  << lib->GetVoxelDef() << "while PhotonVisbilityService is configured with:\n"
202  << GetVoxelDef();
203  } // if metadata
204  }
205  }
206  }
207  else {
209 
210  size_t NOpDets = geom->NOpDets();
211  size_t NVoxels = GetVoxelDef().GetNVoxels();
212  if (fLibraryBuildJob) {
213  mf::LogInfo("PhotonVisibilityService")
214  << " Vis service running library build job. Please ensure "
215  << " job contains LightSource, LArG4, SimPhotonCounter";
216  }
217 
218  art::TFileDirectory* pDir = nullptr;
219  try {
221  }
222  catch (art::Exception const& e) {
223  if (e.categoryCode() != art::errors::ServiceNotFound) throw;
224  if (fLibraryBuildJob) {
225  throw art::Exception(e.categoryCode(), "", e)
226  << "PhotonVisibilityService: "
227  "service `TFileService` is required when building a photon library.\n";
228  }
229  }
230 
231  PhotonLibrary* lib = new PhotonLibrary(pDir);
232  fTheLibrary = lib;
233 
234  lib->CreateEmptyLibrary(NVoxels, NOpDets, fStoreReflected, fStoreReflT0, fParPropTime_npar);
235  lib->SetVoxelDef(GetVoxelDef());
236  }
237  }
238  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
unsigned int NOpDets() const
Number of OpDets in the whole detector.
const sim::PhotonVoxelDef & GetVoxelDef() const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
unsigned int GetNVoxels() const
Returns the total number of voxels in the volume.
Float_t e
Definition: plot.C:35
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void phot::PhotonVisibilityService::LoadTimingsForVISPar ( std::vector< double > &  distances,
std::vector< double > &  radial_distances,
std::vector< std::vector< std::vector< double >>> &  cut_off,
std::vector< std::vector< std::vector< double >>> &  tau,
double &  vis_vmean,
double &  angle_bin_timing_vis 
) const

Definition at line 841 of file PhotonVisibilityService.cc.

References fangle_bin_timing_vis, fCut_off, fDistances_radial_refl, fDistances_refl, fTau, and fvis_vmean.

Referenced by larg4::OpFastScintillation::OpFastScintillation().

848  {
849  distances = fDistances_refl;
850  radial_distances = fDistances_radial_refl;
851  cut_off = fCut_off;
852  tau = fTau;
853 
854  vis_vmean = fvis_vmean;
855  angle_bin_timing_vis = fangle_bin_timing_vis;
856  }
std::vector< std::vector< std::vector< double > > > fTau
std::vector< std::vector< std::vector< double > > > fCut_off
std::vector< double > fDistances_radial_refl
void phot::PhotonVisibilityService::LoadTimingsForVUVPar ( std::vector< std::vector< double >>(&)  v[7],
double &  step_size,
double &  max_d,
double &  min_d,
double &  vuv_vgroup_mean,
double &  vuv_vgroup_max,
double &  inflexion_point_distance,
double &  angle_bin_timing_vuv 
) const

Definition at line 815 of file PhotonVisibilityService.cc.

References fangle_bin_timing_vuv, fDistances_exp, fDistances_landau, fExpo_over_Landau_norm, finflexion_point_distance, fmax_d, fmin_d, fMpv, fNorm_over_entries, fSlope, fstep_size, fvuv_vgroup_max, fvuv_vgroup_mean, fWidth, and lar::dump::vector().

Referenced by larg4::OpFastScintillation::OpFastScintillation().

823  {
824  v[0] = std::vector(1, fDistances_landau);
825  v[1] = fNorm_over_entries;
826  v[2] = fMpv;
827  v[3] = fWidth;
828  v[4] = std::vector(1, fDistances_exp);
829  v[5] = fSlope;
830  v[6] = fExpo_over_Landau_norm;
831 
832  step_size = fstep_size;
833  max_d = fmax_d;
834  min_d = fmin_d;
835  vuv_vgroup_mean = fvuv_vgroup_mean;
836  vuv_vgroup_max = fvuv_vgroup_max;
837  inflexion_point_distance = finflexion_point_distance;
838  angle_bin_timing_vuv = fangle_bin_timing_vuv;
839  }
std::vector< std::vector< double > > fWidth
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
std::vector< std::vector< double > > fExpo_over_Landau_norm
std::vector< std::vector< double > > fMpv
std::vector< std::vector< double > > fNorm_over_entries
std::vector< std::vector< double > > fSlope
void phot::PhotonVisibilityService::LoadVisParsDome ( std::vector< double > &  vis_distances_x_dome,
std::vector< double > &  vis_distances_r_dome,
std::vector< std::vector< std::vector< double >>> &  vispars_dome 
) const

Definition at line 902 of file PhotonVisibilityService.cc.

References fIsDomePDCorr, fvis_distances_r_dome, fvis_distances_x_dome, and fvispars_dome.

Referenced by larg4::OpFastScintillation::OpFastScintillation().

906  {
907  if (!fIsDomePDCorr) return;
908  vis_distances_x_dome = fvis_distances_x_dome;
909  vis_distances_r_dome = fvis_distances_r_dome;
910  vispars_dome = fvispars_dome;
911  }
std::vector< double > fvis_distances_x_dome
std::vector< double > fvis_distances_r_dome
std::vector< std::vector< std::vector< double > > > fvispars_dome
void phot::PhotonVisibilityService::LoadVisParsFlat ( std::vector< double > &  vis_distances_x_flat,
std::vector< double > &  vis_distances_r_flat,
std::vector< std::vector< std::vector< double >>> &  vispars_flat 
) const

Definition at line 892 of file PhotonVisibilityService.cc.

References fIsFlatPDCorr, fvis_distances_r_flat, fvis_distances_x_flat, and fvispars_flat.

Referenced by larg4::OpFastScintillation::OpFastScintillation().

896  {
897  if (!fIsFlatPDCorr) return;
898  vis_distances_x_flat = fvis_distances_x_flat;
899  vis_distances_r_flat = fvis_distances_r_flat;
900  vispars_flat = fvispars_flat;
901  }
std::vector< double > fvis_distances_r_flat
std::vector< double > fvis_distances_x_flat
std::vector< std::vector< std::vector< double > > > fvispars_flat
void phot::PhotonVisibilityService::LoadVisSemiAnalyticProperties ( double &  delta_angulo_vis,
double &  radius 
) const

Definition at line 886 of file PhotonVisibilityService.cc.

References fdelta_angulo_vis, and fradius.

Referenced by larg4::OpFastScintillation::OpFastScintillation().

888  {
889  delta_angulo_vis = fdelta_angulo_vis;
890  radius = fradius;
891  }
Float_t radius
Definition: plot.C:23
void phot::PhotonVisibilityService::LoadVUVSemiAnalyticProperties ( bool &  isFlatPDCorr,
bool &  isDomePDCorr,
double &  delta_angulo_vuv,
double &  radius 
) const
size_t phot::PhotonVisibilityService::NOpChannels ( ) const

Definition at line 772 of file PhotonVisibilityService.cc.

References fMapping.

Referenced by cosmic::BeamFlashTrackMatchTaggerAlg::AddLightFromSegment(), larg4::OpFastScintillation::detectedDirectHits(), larg4::OpFastScintillation::detectedReflecHits(), larg4::OpFastScintillation::OpFastScintillation(), and larg4::OpFastScintillation::RecordPhotonsProduced().

773  {
774  // the last word about the number of channels belongs to the mapping;
775  // this should be also the same answer as `geo::GeometryCore::NOpDets()`.
776  return fMapping->opDetMappingSize();
777  }
std::unique_ptr< phot::IPhotonMappingTransformations > fMapping
Mapping of detector space into library space.
std::string phot::PhotonVisibilityService::ParPropTimeFormula ( ) const
inline

Definition at line 161 of file PhotonVisibilityService.h.

size_t phot::PhotonVisibilityService::ParPropTimeNpar ( ) const
inline

Definition at line 160 of file PhotonVisibilityService.h.

void phot::PhotonVisibilityService::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 258 of file PhotonVisibilityService.cc.

References geo::TPCGeo::ActiveBoundingBox(), geo::CryostatGeo::Boundaries(), geo::CryostatGeo::BoundingBox(), geo::GeometryCore::Cryostat(), geo::BoxBoundedGeo::ExtendToInclude(), fangle_bin_timing_vis, fangle_bin_timing_vuv, fApplyVISBorderCorrection, fborder_corr_angulo_dome, fborder_corr_angulo_flat, fborder_corr_dome, fborder_corr_flat, fCut_off, fdelta_angulo_vis, fdelta_angulo_vuv, fDistances_exp, fDistances_landau, fDistances_radial_refl, fDistances_refl, fDoNotLoadLibrary, fExpo_over_Landau_norm, fGHvuvpars_dome, fGHvuvpars_flat, fHybrid, fIncludePropTime, findVoxelSuggestion(), finflexion_point_distance, fInterpolate, fIsDomePDCorr, fIsFlatPDCorr, fLibraryBuildJob, fLibraryFile, fmax_d, fmin_d, fMpv, fNorm_over_entries, fNx, fNy, fNz, fParameterization, fParPropTime, fParPropTime_formula, fParPropTime_MaxRange, fParPropTime_npar, fradius, fReflectOverZeroX, fSaveOtherVoxels, fSaveTPCVoxels, fSlope, fstep_size, fStoreReflected, fStoreReflT0, fTau, fUseAutomaticVoxels, fUseCryoBoundary, fUseNhitsModel, fvis_distances_r_dome, fvis_distances_r_flat, fvis_distances_x_dome, fvis_distances_x_flat, fvis_vmean, fVISBorderCorrectionType, fvispars_dome, fvispars_flat, fVoxelDef, fvuv_vgroup_max, fvuv_vgroup_mean, fWidth, fXmax, fXmin, fYmax, fYmin, fZmax, fZmin, fhicl::ParameterSet::get(), sim::PhotonVoxel::GetCenter(), sim::PhotonVoxelDef::GetNVoxels(), sim::PhotonVoxelDef::GetPhotonVoxel(), geo::GeometryCore::Iterate(), util::to_string(), and geo::CryostatGeo::TPC().

Referenced by PhotonVisibilityService().

259  {
260 
262 
263  // Library details
264  fLibraryBuildJob = p.get<bool>("LibraryBuildJob", false);
265  fParameterization = p.get<bool>("DUNE10ktParameterization", false);
266  fHybrid = p.get<bool>("HybridLibrary", false);
267  fLibraryFile = p.get<std::string>("LibraryFile", "");
268  fDoNotLoadLibrary = p.get<bool>("DoNotLoadLibrary");
269  fStoreReflected = p.get<bool>("StoreReflected", false);
270  fStoreReflT0 = p.get<bool>("StoreReflT0", false);
271  // Parametrizations (time and Nhits)
272  fIncludePropTime = p.get<bool>("IncludePropTime", false);
273  fUseNhitsModel = p.get<bool>("UseNhitsModel", false);
274  fApplyVISBorderCorrection = p.get<bool>("ApplyVISBorderCorrection", false);
275  fVISBorderCorrectionType = p.get<std::string>("VIS_BORDER_correction_type", "");
276 
277  // Voxel parameters
278  fUseCryoBoundary = p.get<bool>("UseCryoBoundary", false);
279  fInterpolate = p.get<bool>("Interpolate", false);
280  fReflectOverZeroX = p.get<bool>("ReflectOverZeroX", false);
281  fUseAutomaticVoxels = p.get<bool>("UseAutomaticVoxels", false);
282  fSaveTPCVoxels = p.get<std::string>("TPCVoxelListFile", "");
283  fSaveOtherVoxels = p.get<std::string>("OtherVoxelListFile", "");
284 
285  fParPropTime = p.get<bool>("ParametrisedTimePropagation", false);
286  fParPropTime_npar = p.get<size_t>("ParametrisedTimePropagationNParameters", 0);
287  fParPropTime_formula = p.get<std::string>("ParametrisedTimePropagationFittedFormula", "");
288  fParPropTime_MaxRange = p.get<int>("ParametrisedTimePropagationMaxRange", 200);
289 
290  if (!fParPropTime) { fParPropTime_npar = 0; }
291 
292  if (!fUseNhitsModel) {
293 
294  if (fUseCryoBoundary) {
295  auto const CryoBounds = geom->Cryostat().Boundaries();
296  fXmin = CryoBounds.MinX();
297  fXmax = CryoBounds.MaxX();
298  fYmin = CryoBounds.MinY();
299  fYmax = CryoBounds.MaxY();
300  fZmin = CryoBounds.MinZ();
301  fZmax = CryoBounds.MaxZ();
302  }
303  else {
304  fXmin = p.get<double>("XMin");
305  fXmax = p.get<double>("XMax");
306  fYmin = p.get<double>("YMin");
307  fYmax = p.get<double>("YMax");
308  fZmin = p.get<double>("ZMin");
309  fZmax = p.get<double>("ZMax");
310  }
311 
312  fNx = p.get<int>("NX");
313  fNy = p.get<int>("NY");
314  fNz = p.get<int>("NZ");
315 
316  // Find the TPC volume, following example from
317  // https://github.com/LArSoft/larsim/blob/05378155a2a07551fa5757d0449ffb30476d5cf9/larsim/LegacyLArG4/OpFastScintillation.cxx#L2149-L2165
318  geo::BoxBoundedGeo cryoVolume{geom->Cryostat().BoundingBox()};
319  geo::BoxBoundedGeo tpcVolume{geom->Cryostat().TPC(0).ActiveBoundingBox()};
320  for (geo::CryostatGeo const& cryo : geom->Iterate<geo::CryostatGeo>()) {
321 
322  cryoVolume.ExtendToInclude(cryo.BoundingBox());
323  for (geo::TPCGeo const& TPC : cryo.IterateTPCs()) {
324  tpcVolume.ExtendToInclude(TPC.ActiveBoundingBox());
325  }
326  }
327 
328  // Try to make ~10cm voxels: fit TPC exactly, then fit cryostat approximately
329  if (fUseAutomaticVoxels) {
330 
331  std::string logString = "Automatic voxelisation x-dimension\n";
332  float voxelSizeGoal = 10.0; // 10cm standard choice
333  findVoxelSuggestion(tpcVolume.MinX(),
334  tpcVolume.MaxX(),
335  cryoVolume.MinX(),
336  cryoVolume.MaxX(),
337  fNx,
338  fXmin,
339  fXmax,
340  voxelSizeGoal,
341  &logString);
342  logString += "Automatic voxelisation y-dimension\n";
343  findVoxelSuggestion(tpcVolume.MinY(),
344  tpcVolume.MaxY(),
345  cryoVolume.MinY(),
346  cryoVolume.MaxY(),
347  fNy,
348  fYmin,
349  fYmax,
350  voxelSizeGoal,
351  &logString);
352  logString += "Automatic voxelisation z-dimension\n";
353  findVoxelSuggestion(tpcVolume.MinZ(),
354  tpcVolume.MaxZ(),
355  cryoVolume.MinZ(),
356  cryoVolume.MaxZ(),
357  fNz,
358  fZmin,
359  fZmax,
360  voxelSizeGoal,
361  &logString);
362  mf::LogInfo("PhotonVisibilityService") << logString;
363  }
364 
365  fVoxelDef = sim::PhotonVoxelDef(fXmin, fXmax, fNx, fYmin, fYmax, fNy, fZmin, fZmax, fNz);
366 
367  // Output lists of voxels within the TPC and outside it
368  if (fSaveTPCVoxels != "" || fSaveOtherVoxels != "") {
369 
370  unsigned int const totalVoxels = fVoxelDef.GetNVoxels();
371  std::vector<unsigned int> tpcVoxels, otherVoxels;
372  tpcVoxels.reserve(totalVoxels);
373  otherVoxels.reserve(totalVoxels);
374  for (unsigned int voxelID = 0; voxelID < totalVoxels; ++voxelID) {
375 
376  auto const voxelCenter = fVoxelDef.GetPhotonVoxel(voxelID).GetCenter();
377  if (tpcVolume.ContainsPosition(voxelCenter)) { tpcVoxels.push_back(voxelID); }
378  else {
379  otherVoxels.push_back(voxelID);
380  }
381  }
382  std::string logString = "Voxels within TPC: " + std::to_string(tpcVoxels.size());
383  if (fSaveTPCVoxels != "") logString += " saved to file\n\t" + fSaveTPCVoxels;
384  logString += "\nVoxels outside TPC: " + std::to_string(otherVoxels.size());
385  if (fSaveOtherVoxels != "") logString += " saved to file\n\t" + fSaveOtherVoxels;
386  mf::LogInfo("PhotonVisibilityService") << logString << std::endl;
387 
388  if (fSaveTPCVoxels != "") {
389  std::ofstream outputFile = std::ofstream(fSaveTPCVoxels);
390  for (auto voxel : tpcVoxels)
391  outputFile << voxel << "\n";
392  }
393  if (fSaveOtherVoxels != "") {
394  std::ofstream outputFile = std::ofstream(fSaveOtherVoxels);
395  for (auto voxel : otherVoxels)
396  outputFile << voxel << "\n";
397  }
398  }
399  }
400 
401  if (fIncludePropTime) {
402 
403  // load VUV arrival time distribution parametrization (no detector dependent at first order)
404  std::cout << "Loading the VUV time parametrization" << std::endl;
405  fDistances_landau = p.get<std::vector<double>>("Distances_landau");
406  fNorm_over_entries = p.get<std::vector<std::vector<double>>>("Norm_over_entries");
407  fMpv = p.get<std::vector<std::vector<double>>>("Mpv");
408  fWidth = p.get<std::vector<std::vector<double>>>("Width");
409  fDistances_exp = p.get<std::vector<double>>("Distances_exp");
410  fSlope = p.get<std::vector<std::vector<double>>>("Slope");
411  fExpo_over_Landau_norm = p.get<std::vector<std::vector<double>>>("Expo_over_Landau_norm");
412  fstep_size = p.get<double>("step_size");
413  fmax_d = p.get<double>("max_d");
414  fmin_d = p.get<double>("min_d");
415  fvuv_vgroup_mean = p.get<double>("vuv_vgroup_mean");
416  fvuv_vgroup_max = p.get<double>("vuv_vgroup_max");
417  finflexion_point_distance = p.get<double>("inflexion_point_distance");
418  fangle_bin_timing_vuv = p.get<double>("angle_bin_timing_vuv");
419 
420  if (fStoreReflected) {
421 
422  // load VIS arrival time distribution paramterisation
423  std::cout << "Loading the VIS time paramterisation" << std::endl;
424  fDistances_refl = p.get<std::vector<double>>("Distances_refl");
425  fDistances_radial_refl = p.get<std::vector<double>>("Distances_radial_refl");
426  fCut_off = p.get<std::vector<std::vector<std::vector<double>>>>("Cut_off");
427  fTau = p.get<std::vector<std::vector<std::vector<double>>>>("Tau");
428  fvis_vmean = p.get<double>("vis_vmean");
429  fangle_bin_timing_vis = p.get<double>("angle_bin_timing_vis");
430  }
431  }
432 
433  if (fUseNhitsModel) {
434  std::cout << "Loading semi-analytic mode models" << std::endl;
435  // VUV
436  fIsFlatPDCorr = p.get<bool>("FlatPDCorr", false);
437  fIsDomePDCorr = p.get<bool>("DomePDCorr", false);
438  fdelta_angulo_vuv = p.get<double>("delta_angulo_vuv");
439  if (fIsFlatPDCorr) {
440  fGHvuvpars_flat = p.get<std::vector<std::vector<double>>>("GH_PARS_flat");
441  fborder_corr_angulo_flat = p.get<std::vector<double>>("GH_border_angulo_flat");
442  fborder_corr_flat = p.get<std::vector<std::vector<double>>>("GH_border_flat");
443  }
444  if (fIsDomePDCorr) {
445  fGHvuvpars_dome = p.get<std::vector<std::vector<double>>>("GH_PARS_dome");
446  fborder_corr_angulo_dome = p.get<std::vector<double>>("GH_border_angulo_dome");
447  fborder_corr_dome = p.get<std::vector<std::vector<double>>>("GH_border_dome");
448  }
449 
450  if (fStoreReflected) {
451  fdelta_angulo_vis = p.get<double>("delta_angulo_vis");
452  if (fIsFlatPDCorr) {
453  fvis_distances_x_flat = p.get<std::vector<double>>("VIS_distances_x_flat");
454  fvis_distances_r_flat = p.get<std::vector<double>>("VIS_distances_r_flat");
455  fvispars_flat =
456  p.get<std::vector<std::vector<std::vector<double>>>>("VIS_correction_flat");
457  }
458  if (fIsDomePDCorr) {
459  fvis_distances_x_dome = p.get<std::vector<double>>("VIS_distances_x_dome");
460  fvis_distances_r_dome = p.get<std::vector<double>>("VIS_distances_r_dome");
461  fvispars_dome =
462  p.get<std::vector<std::vector<std::vector<double>>>>("VIS_correction_dome");
463  }
464  }
465  // optical detector information
466  fradius = p.get<double>("PMT_radius", 10.16);
467  }
468 
469  return;
470  }
std::vector< std::vector< std::vector< double > > > fTau
details::range_type< T > Iterate() const
Initializes the specified ID with the ID of the first cryostat.
Definition: GeometryCore.h:541
std::vector< std::vector< double > > fborder_corr_flat
std::vector< double > fvis_distances_r_flat
std::vector< double > fvis_distances_x_dome
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::vector< std::vector< double > > fWidth
std::vector< double > fvis_distances_r_dome
Representation of a region of space diced into voxels.
Definition: PhotonVoxels.h:58
Geometry information for a single TPC.
Definition: TPCGeo.h:36
geo::BoxBoundedGeo const & ActiveBoundingBox() const
Returns the box of the active volume of this TPC.
Definition: TPCGeo.h:263
std::vector< double > fvis_distances_x_flat
std::vector< std::vector< std::vector< double > > > fCut_off
Geometry information for a single cryostat.
Definition: CryostatGeo.h:43
geo::BoxBoundedGeo const & BoundingBox() const
Returns the bounding box of this cryostat.
Definition: CryostatGeo.h:124
CryostatGeo const & Cryostat(CryostatID const &cryoid=cryostat_zero) const
Returns the specified cryostat.
void findVoxelSuggestion(float tpcMin, float tpcMax, float cryoMin, float cryoMax, int &nVoxels, float &voxelMin, float &voxelMax, float voxelSizeGoal, std::string *logString=nullptr) const
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
std::vector< double > fDistances_radial_refl
std::vector< std::vector< double > > fGHvuvpars_flat
std::vector< std::vector< double > > fGHvuvpars_dome
std::vector< std::vector< double > > fExpo_over_Landau_norm
std::vector< std::vector< double > > fMpv
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
Definition: BoxBoundedGeo.h:33
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc&#39;th TPC in the cryostat.
Definition: CryostatGeo.cxx:84
Point GetCenter() const
Returns the center of the voxel (type Point).
Definition: PhotonVoxels.h:186
std::vector< std::vector< double > > fborder_corr_dome
std::vector< double > fborder_corr_angulo_flat
void ExtendToInclude(Coord_t x, Coord_t y, Coord_t z)
Extends the current box to also include the specified point.
unsigned int GetNVoxels() const
Returns the total number of voxels in the volume.
std::vector< std::vector< std::vector< double > > > fvispars_dome
std::vector< std::vector< double > > fNorm_over_entries
geo::BoxBoundedGeo const & Boundaries() const
Returns boundaries of the cryostat (in centimetres).
Definition: CryostatGeo.h:114
std::vector< std::vector< double > > fSlope
std::vector< double > fborder_corr_angulo_dome
std::vector< std::vector< std::vector< double > > > fvispars_flat
PhotonVoxel GetPhotonVoxel(int ID) const
void phot::PhotonVisibilityService::RetrieveLightProd ( int &  VoxID,
double &  N 
) const
void phot::PhotonVisibilityService::SetDirectLightPropFunctions ( TF1 const *  functions[8],
double &  d_break,
double &  d_max,
double &  tf1_sampling_factor 
) const

Definition at line 780 of file PhotonVisibilityService.cc.

References fD_break, fD_max, fparsCte, fparsCte_far, fparslogNorm, fparslogNorm_far, fparsMPV, fparsMPV_far, fparsSlope, fparsWidth, and fTF1_sampling_factor.

784  {
785  functions[0] = fparslogNorm;
786  functions[1] = fparsMPV;
787  functions[2] = fparsWidth;
788  functions[3] = fparsCte;
789  functions[4] = fparsSlope;
790  functions[5] = fparslogNorm_far;
791  functions[6] = fparsMPV_far;
792  functions[7] = fparsCte_far;
793 
794  d_break = fD_break;
795  d_max = fD_max;
796  tf1_sampling_factor = fTF1_sampling_factor;
797  }
void phot::PhotonVisibilityService::SetLibraryEntry ( int  VoxID,
OpDetID_t  libOpChannel,
float  N,
bool  wantReflected = false 
)

Definition at line 588 of file PhotonVisibilityService.cc.

References fTheLibrary, LoadLibrary(), MF_LOG_DEBUG, phot::PhotonLibrary::SetCount(), and phot::PhotonLibrary::SetReflCount().

Referenced by opdet::SimPhotonCounter::storeVisibility().

592  {
593  if (fTheLibrary == 0) LoadLibrary();
594 
595  PhotonLibrary* lib = dynamic_cast<PhotonLibrary*>(fTheLibrary);
596 
597  if (!wantReflected)
598  lib->SetCount(VoxID, OpChannel, N);
599 
600  else
601  lib->SetReflCount(VoxID, OpChannel, N);
602 
603  //std::cout<< " PVS logging " << VoxID << " " << OpChannel<<std::endl;
604  MF_LOG_DEBUG("PhotonVisibilityService")
605  << " PVS logging " << VoxID << " " << OpChannel << std::endl;
606  }
#define MF_LOG_DEBUG(id)
void phot::PhotonVisibilityService::SetLibraryReflT0Entry ( int  VoxID,
int  OpChannel,
float  value 
)

Definition at line 669 of file PhotonVisibilityService.cc.

References fTheLibrary, LoadLibrary(), MF_LOG_DEBUG, and phot::PhotonLibrary::SetReflT0().

Referenced by opdet::SimPhotonCounter::storeVisibility().

670  {
671  PhotonLibrary* lib = dynamic_cast<PhotonLibrary*>(fTheLibrary);
672  if (fTheLibrary == 0) LoadLibrary();
673 
674  lib->SetReflT0(VoxID, OpChannel, T0);
675 
676  MF_LOG_DEBUG("PhotonVisibilityService")
677  << " PVS logging " << VoxID << " " << OpChannel << std::endl;
678  }
#define MF_LOG_DEBUG(id)
void phot::PhotonVisibilityService::SetLibraryTimingParEntry ( int  VoxID,
int  OpChannel,
float  value,
size_t  parnum 
)

Definition at line 731 of file PhotonVisibilityService.cc.

References fTheLibrary, LoadLibrary(), MF_LOG_DEBUG, and phot::PhotonLibrary::SetTimingPar().

735  {
736  PhotonLibrary* lib = dynamic_cast<PhotonLibrary*>(fTheLibrary);
737  if (fTheLibrary == 0) LoadLibrary();
738 
739  lib->SetTimingPar(VoxID, OpChannel, par, parnum);
740 
741  MF_LOG_DEBUG("PhotonVisibilityService")
742  << " PVS logging " << VoxID << " " << OpChannel << std::endl;
743  }
#define MF_LOG_DEBUG(id)
void phot::PhotonVisibilityService::SetLibraryTimingTF1Entry ( int  VoxID,
int  OpChannel,
TF1 const &  func 
)

Definition at line 747 of file PhotonVisibilityService.cc.

References fTheLibrary, LoadLibrary(), MF_LOG_DEBUG, and phot::PhotonLibrary::SetTimingTF1().

748  {
749  PhotonLibrary* lib = dynamic_cast<PhotonLibrary*>(fTheLibrary);
750  if (fTheLibrary == 0) LoadLibrary();
751 
752  lib->SetTimingTF1(VoxID, OpChannel, func);
753 
754  MF_LOG_DEBUG("PhotonVisibilityService")
755  << " PVS logging " << VoxID << " " << OpChannel << std::endl;
756  }
#define MF_LOG_DEBUG(id)
void phot::PhotonVisibilityService::SetReflectedCOLightPropFunctions ( TF1 const *  functions[5],
double &  t0_max,
double &  t0_break_point 
) const
template<typename Point >
static double phot::PhotonVisibilityService::SolidAngleFactor ( Point const &  p,
unsigned int  OpDet 
)
inlinestatic

Definition at line 56 of file PhotonVisibilityService.h.

References geo::vect::toPoint().

57  {
58  return SolidAngleFactorImpl(geo::vect::toPoint(p), OpDet);
59  }
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
static double SolidAngleFactorImpl(geo::Point_t const &p, unsigned int OpDet)
double phot::PhotonVisibilityService::SolidAngleFactorImpl ( geo::Point_t const &  p,
unsigned int  OpDet 
)
staticprivate

Definition at line 522 of file PhotonVisibilityService.cc.

References geo::OpDetGeo::CosThetaFromNormal(), and geo::GeometryCore::OpDetGeoFromOpDet().

523  {
525  return geom->OpDetGeoFromOpDet(OpDet).CosThetaFromNormal(p);
526  }
OpDetGeo const & OpDetGeoFromOpDet(unsigned int OpDet) const
Returns the geo::OpDetGeo object for the given detector number.
double CosThetaFromNormal(geo::Point_t const &point) const
Get cos(angle) to normal of this detector - used for solid angle calcs.
Definition: OpDetGeo.cxx:113
void phot::PhotonVisibilityService::StoreLibrary ( )

Definition at line 241 of file PhotonVisibilityService.cc.

References fHybrid, fLibraryBuildJob, fLibraryFile, fParPropTime_npar, fStoreReflected, fStoreReflT0, fTheLibrary, LoadLibrary(), and phot::PhotonLibrary::StoreLibraryToFile().

242  {
243  if (fTheLibrary == 0) LoadLibrary();
244 
245  if (fLibraryBuildJob) {
246 
247  if (fHybrid) {
248  std::cout << "This is would be building a Hybrid Library. Not defined. " << std::endl;
249  }
250  mf::LogInfo("PhotonVisibilityService") << " Vis service "
251  << " Storing Library entries to file..." << std::endl;
252  PhotonLibrary* lib = dynamic_cast<PhotonLibrary*>(fTheLibrary);
253  lib->StoreLibraryToFile(fLibraryFile, fStoreReflected, fStoreReflT0, fParPropTime_npar);
254  }
255  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
void phot::PhotonVisibilityService::StoreLightProd ( int  VoxID,
double  N 
)

Definition at line 570 of file PhotonVisibilityService.cc.

References fCurrentValue, and fCurrentVoxel.

Referenced by evgen::LightSource::produce().

571  {
572  fCurrentVoxel = VoxID;
573  fCurrentValue = N;
574  mf::LogInfo("PhotonVisibilityService")
575  << " PVS notes production of " << N << " photons at Vox " << VoxID << std::endl;
576  }
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
float phot::PhotonVisibilityService::testVoxelSuggestion ( float  tpcMin,
float  tpcMax,
float  cryoMin,
float  cryoMax,
int &  nVoxels,
float &  voxelMin,
float &  voxelMax,
float  voxelSizeGoal,
int  jog,
std::string *  logString = nullptr 
) const
private

Definition at line 958 of file PhotonVisibilityService.cc.

References util::to_string().

Referenced by findVoxelSuggestion().

968  {
969  // Examine TPC to establish voxel size
970  float tpcSize = tpcMax - tpcMin;
971  int tpcVoxelNumber = ceil(tpcSize / voxelSizeGoal) + jog; // units are cm
972  float voxelSize = tpcSize / tpcVoxelNumber;
973  float cryoSize = cryoMax - cryoMin;
974 
975  // Extend voxel grid to full cryostat
976  voxelMin = tpcMin;
977  while (voxelMin > cryoMin)
978  voxelMin -= voxelSize;
979  voxelMax = tpcMax;
980  while (voxelMax < cryoMax)
981  voxelMax += voxelSize;
982  float cryoVoxelNumberGuess = cryoSize / voxelSize;
983  nVoxels = round((voxelMax - voxelMin) / voxelSize);
984 
985  if (logString) {
986  *logString += "\tTPC size " + std::to_string(tpcSize) + "cm requires " +
987  std::to_string(tpcVoxelNumber) + " voxels of size " +
988  std::to_string(voxelSize) + "cm\n";
989  *logString += "\tCryostat boundaries " + std::to_string(cryoMin) + " to " +
990  std::to_string(cryoMax) + "cm would use " +
991  std::to_string(cryoVoxelNumberGuess) + " voxels\n";
992  *logString += "\tCryostat voxel range " + std::to_string(voxelMin) + " to " +
993  std::to_string(voxelMax) + "cm uses " + std::to_string(nVoxels) + " voxels\n";
994  }
995 
996  // Return figure of merit for optimisation
997  float voxelDelta = fabs(nVoxels - cryoVoxelNumberGuess);
998  return voxelDelta;
999  }
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
bool phot::PhotonVisibilityService::UseNhitsModel ( ) const
inline
bool phot::PhotonVisibilityService::UseParameterization ( ) const
inline

Definition at line 156 of file PhotonVisibilityService.h.

std::string phot::PhotonVisibilityService::VISBorderCorrectionType ( ) const
inline

Definition at line 166 of file PhotonVisibilityService.h.

int phot::PhotonVisibilityService::VoxelAt ( geo::Point_t const &  p) const
inlineprivate

Definition at line 273 of file PhotonVisibilityService.h.

References DECLARE_ART_SERVICE, and sim::PhotonVoxelDef::GetVoxelID().

Referenced by doGetAllVisibilities(), doGetReflT0s(), doGetTimingPar(), doGetTimingTF1(), doGetVisibilityOfOpLib(), and doHasVisibility().

273 { return fVoxelDef.GetVoxelID(LibLocation(p)); }
int GetVoxelID(Point const &p) const
Returns the ID of the voxel containing p, or -1 if none.
Definition: PhotonVoxels.h:217
geo::Point_t LibLocation(geo::Point_t const &p) const

Member Data Documentation

double phot::PhotonVisibilityService::fangle_bin_timing_vis
private

Definition at line 235 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVISPar(), and reconfigure().

double phot::PhotonVisibilityService::fangle_bin_timing_vuv
private

Definition at line 228 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

bool phot::PhotonVisibilityService::fApplyVISBorderCorrection
private

Definition at line 194 of file PhotonVisibilityService.h.

Referenced by reconfigure().

std::vector<double> phot::PhotonVisibilityService::fborder_corr_angulo_dome
private

Definition at line 247 of file PhotonVisibilityService.h.

Referenced by LoadGHDome(), and reconfigure().

std::vector<double> phot::PhotonVisibilityService::fborder_corr_angulo_flat
private

Definition at line 243 of file PhotonVisibilityService.h.

Referenced by LoadGHFlat(), and reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fborder_corr_dome
private

Definition at line 248 of file PhotonVisibilityService.h.

Referenced by LoadGHDome(), and reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fborder_corr_flat
private

Definition at line 244 of file PhotonVisibilityService.h.

Referenced by LoadGHFlat(), and reconfigure().

double phot::PhotonVisibilityService::fCurrentValue
private

Definition at line 173 of file PhotonVisibilityService.h.

Referenced by RetrieveLightProd(), and StoreLightProd().

int phot::PhotonVisibilityService::fCurrentVoxel
private

Definition at line 172 of file PhotonVisibilityService.h.

Referenced by RetrieveLightProd(), and StoreLightProd().

std::vector<std::vector<std::vector<double> > > phot::PhotonVisibilityService::fCut_off
private

Definition at line 233 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVISPar(), and reconfigure().

double phot::PhotonVisibilityService::fD_break
private

Definition at line 212 of file PhotonVisibilityService.h.

Referenced by SetDirectLightPropFunctions().

double phot::PhotonVisibilityService::fD_max
private

Definition at line 212 of file PhotonVisibilityService.h.

Referenced by SetDirectLightPropFunctions().

double phot::PhotonVisibilityService::fdelta_angulo_vis
private

Definition at line 251 of file PhotonVisibilityService.h.

Referenced by LoadVisSemiAnalyticProperties(), and reconfigure().

double phot::PhotonVisibilityService::fdelta_angulo_vuv
private

Definition at line 240 of file PhotonVisibilityService.h.

Referenced by LoadVUVSemiAnalyticProperties(), and reconfigure().

std::vector<double> phot::PhotonVisibilityService::fDistances_exp
private

Definition at line 225 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

std::vector<double> phot::PhotonVisibilityService::fDistances_landau
private

Definition at line 221 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

std::vector<double> phot::PhotonVisibilityService::fDistances_radial_refl
private

Definition at line 232 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVISPar(), and reconfigure().

std::vector<double> phot::PhotonVisibilityService::fDistances_refl
private

Definition at line 231 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVISPar(), and reconfigure().

bool phot::PhotonVisibilityService::fDoNotLoadLibrary
private

Definition at line 187 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), and reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fExpo_over_Landau_norm
private

Definition at line 227 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fGHvuvpars_dome
private

Definition at line 246 of file PhotonVisibilityService.h.

Referenced by LoadGHDome(), and reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fGHvuvpars_flat
private

Definition at line 242 of file PhotonVisibilityService.h.

Referenced by LoadGHFlat(), and reconfigure().

bool phot::PhotonVisibilityService::fHybrid
private

Definition at line 189 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), reconfigure(), and StoreLibrary().

bool phot::PhotonVisibilityService::fIncludePropTime
private

Definition at line 192 of file PhotonVisibilityService.h.

Referenced by reconfigure().

double phot::PhotonVisibilityService::finflexion_point_distance
private

Definition at line 228 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

bool phot::PhotonVisibilityService::fInterpolate
private
bool phot::PhotonVisibilityService::fIsDomePDCorr
private
bool phot::PhotonVisibilityService::fIsFlatPDCorr
private
bool phot::PhotonVisibilityService::fLibraryBuildJob
private

Definition at line 186 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), reconfigure(), and StoreLibrary().

std::string phot::PhotonVisibilityService::fLibraryFile
private

Definition at line 264 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), reconfigure(), and StoreLibrary().

std::unique_ptr<phot::IPhotonMappingTransformations> phot::PhotonVisibilityService::fMapping
private

Mapping of detector space into library space.

Definition at line 269 of file PhotonVisibilityService.h.

Referenced by doGetAllVisibilities(), doGetReflT0s(), doGetTimingPar(), doGetTimingTF1(), doGetVisibility(), LibLocation(), NOpChannels(), and PhotonVisibilityService().

double phot::PhotonVisibilityService::fmax_d
private

Definition at line 228 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

double phot::PhotonVisibilityService::fmin_d
private

Definition at line 228 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fMpv
private

Definition at line 223 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fNorm_over_entries
private

Definition at line 222 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

int phot::PhotonVisibilityService::fNx
private

Definition at line 180 of file PhotonVisibilityService.h.

Referenced by reconfigure().

int phot::PhotonVisibilityService::fNy
private

Definition at line 180 of file PhotonVisibilityService.h.

Referenced by reconfigure().

int phot::PhotonVisibilityService::fNz
private

Definition at line 180 of file PhotonVisibilityService.h.

Referenced by reconfigure().

bool phot::PhotonVisibilityService::fParameterization
private

Definition at line 188 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), and reconfigure().

bool phot::PhotonVisibilityService::fParPropTime
private

Definition at line 197 of file PhotonVisibilityService.h.

Referenced by reconfigure().

std::string phot::PhotonVisibilityService::fParPropTime_formula
private

Definition at line 199 of file PhotonVisibilityService.h.

Referenced by reconfigure().

int phot::PhotonVisibilityService::fParPropTime_MaxRange
private

Definition at line 200 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), and reconfigure().

size_t phot::PhotonVisibilityService::fParPropTime_npar
private

Definition at line 198 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), reconfigure(), and StoreLibrary().

TF1* phot::PhotonVisibilityService::fparsCte = nullptr
private
TF1* phot::PhotonVisibilityService::fparsCte_far = nullptr
private
TF1* phot::PhotonVisibilityService::fparsCte_refl = nullptr
private
TF1* phot::PhotonVisibilityService::fparslogNorm = nullptr
private
TF1* phot::PhotonVisibilityService::fparslogNorm_far = nullptr
private
TF1* phot::PhotonVisibilityService::fparslogNorm_refl = nullptr
private
TF1* phot::PhotonVisibilityService::fparsMPV = nullptr
private
TF1* phot::PhotonVisibilityService::fparsMPV_far = nullptr
private
TF1* phot::PhotonVisibilityService::fparsMPV_refl = nullptr
private
TF1* phot::PhotonVisibilityService::fparsSlope = nullptr
private
TF1* phot::PhotonVisibilityService::fparsSlope_refl = nullptr
private
TF1* phot::PhotonVisibilityService::fparsWidth = nullptr
private
TF1* phot::PhotonVisibilityService::fparsWidth_refl = nullptr
private
double phot::PhotonVisibilityService::fradius
private
bool phot::PhotonVisibilityService::fReflectOverZeroX
private

Definition at line 202 of file PhotonVisibilityService.h.

Referenced by PhotonVisibilityService(), and reconfigure().

std::string phot::PhotonVisibilityService::fSaveOtherVoxels
private

Definition at line 184 of file PhotonVisibilityService.h.

Referenced by reconfigure().

std::string phot::PhotonVisibilityService::fSaveTPCVoxels
private

Definition at line 184 of file PhotonVisibilityService.h.

Referenced by reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fSlope
private

Definition at line 226 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

double phot::PhotonVisibilityService::fstep_size
private

Definition at line 228 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

bool phot::PhotonVisibilityService::fStoreReflected
private

Definition at line 190 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), reconfigure(), and StoreLibrary().

bool phot::PhotonVisibilityService::fStoreReflT0
private

Definition at line 191 of file PhotonVisibilityService.h.

Referenced by LoadLibrary(), reconfigure(), and StoreLibrary().

double phot::PhotonVisibilityService::fT0_break_point
private

Definition at line 218 of file PhotonVisibilityService.h.

Referenced by SetReflectedCOLightPropFunctions().

double phot::PhotonVisibilityService::fT0_max
private

Definition at line 218 of file PhotonVisibilityService.h.

Referenced by SetReflectedCOLightPropFunctions().

std::vector<std::vector<std::vector<double> > > phot::PhotonVisibilityService::fTau
private

Definition at line 234 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVISPar(), and reconfigure().

double phot::PhotonVisibilityService::fTF1_sampling_factor
private

Definition at line 212 of file PhotonVisibilityService.h.

Referenced by SetDirectLightPropFunctions().

bool phot::PhotonVisibilityService::fUseAutomaticVoxels
private

Definition at line 183 of file PhotonVisibilityService.h.

Referenced by reconfigure().

bool phot::PhotonVisibilityService::fUseCryoBoundary
private

Definition at line 182 of file PhotonVisibilityService.h.

Referenced by reconfigure().

bool phot::PhotonVisibilityService::fUseNhitsModel
private

Definition at line 193 of file PhotonVisibilityService.h.

Referenced by reconfigure().

std::vector<double> phot::PhotonVisibilityService::fvis_distances_r_dome
private

Definition at line 258 of file PhotonVisibilityService.h.

Referenced by LoadVisParsDome(), and reconfigure().

std::vector<double> phot::PhotonVisibilityService::fvis_distances_r_flat
private

Definition at line 254 of file PhotonVisibilityService.h.

Referenced by LoadVisParsFlat(), and reconfigure().

std::vector<double> phot::PhotonVisibilityService::fvis_distances_x_dome
private

Definition at line 257 of file PhotonVisibilityService.h.

Referenced by LoadVisParsDome(), and reconfigure().

std::vector<double> phot::PhotonVisibilityService::fvis_distances_x_flat
private

Definition at line 253 of file PhotonVisibilityService.h.

Referenced by LoadVisParsFlat(), and reconfigure().

double phot::PhotonVisibilityService::fvis_vmean
private

Definition at line 235 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVISPar(), and reconfigure().

std::string phot::PhotonVisibilityService::fVISBorderCorrectionType
private

Definition at line 195 of file PhotonVisibilityService.h.

Referenced by reconfigure().

std::vector<std::vector<std::vector<double> > > phot::PhotonVisibilityService::fvispars_dome
private

Definition at line 259 of file PhotonVisibilityService.h.

Referenced by LoadVisParsDome(), and reconfigure().

std::vector<std::vector<std::vector<double> > > phot::PhotonVisibilityService::fvispars_flat
private

Definition at line 255 of file PhotonVisibilityService.h.

Referenced by LoadVisParsFlat(), and reconfigure().

sim::PhotonVoxelDef phot::PhotonVisibilityService::fVoxelDef
private

Definition at line 266 of file PhotonVisibilityService.h.

Referenced by reconfigure().

double phot::PhotonVisibilityService::fvuv_vgroup_max
private

Definition at line 228 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

double phot::PhotonVisibilityService::fvuv_vgroup_mean
private

Definition at line 228 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

std::vector<std::vector<double> > phot::PhotonVisibilityService::fWidth
private

Definition at line 224 of file PhotonVisibilityService.h.

Referenced by LoadTimingsForVUVPar(), and reconfigure().

float phot::PhotonVisibilityService::fXmax
private

Definition at line 177 of file PhotonVisibilityService.h.

Referenced by reconfigure().

float phot::PhotonVisibilityService::fXmin
private

Definition at line 177 of file PhotonVisibilityService.h.

Referenced by reconfigure().

float phot::PhotonVisibilityService::fYmax
private

Definition at line 178 of file PhotonVisibilityService.h.

Referenced by reconfigure().

float phot::PhotonVisibilityService::fYmin
private

Definition at line 178 of file PhotonVisibilityService.h.

Referenced by reconfigure().

float phot::PhotonVisibilityService::fZmax
private

Definition at line 179 of file PhotonVisibilityService.h.

Referenced by reconfigure().

float phot::PhotonVisibilityService::fZmin
private

Definition at line 179 of file PhotonVisibilityService.h.

Referenced by reconfigure().


The documentation for this class was generated from the following files: