LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
PhotonVisibilityService.h
Go to the documentation of this file.
1 // \file PhotonVisibilityService.h
3 //
4 // \brief Service to report opdet visibility to different points in
5 // the system
6 //
7 // \author bjpjones@mit.edu
8 //
10 #ifndef PHOTONVISIBILITYSERVICE_H
11 #define PHOTONVISIBILITYSERVICE_H
12 
13 
19 
20 class TF1;
21 
23 namespace phot{
24 
26  public:
27 
29 
30  void reconfigure(fhicl::ParameterSet const& p);
31 
32  double GetQuenchingFactor(double dQdx) const;
33 
34  static double DistanceToOpDet( double const* xyz, unsigned int OpDet );
35  static double SolidAngleFactor( double const* xyz, unsigned int OpDet );
36  float GetVisibility( double const* xyz, unsigned int OpChannel, bool wantReflected=false ) const;
37 
38  float const* GetAllVisibilities( double const* xyz, bool wantReflected=false ) const;
39 
40  void LoadLibrary() const;
41  void StoreLibrary();
42 
43 
44  void StoreLightProd( int VoxID, double N );
45  void RetrieveLightProd( int& VoxID, double& N ) const;
46 
47  void SetLibraryEntry( int VoxID, int OpChannel, float N, bool wantReflected=false );
48  float GetLibraryEntry( int VoxID, int OpChannel, bool wantReflected=false ) const;
49  float const* GetLibraryEntries( int VoxID, bool wantReflected=false ) const;
50 
51  float const* GetReflT0s( double const* xyz ) const;
52  void SetLibraryReflT0Entry( int VoxID, int OpChannel, float value );
53  float const* GetLibraryReflT0Entries( int VoxID ) const;
54  float GetLibraryReflT0Entry( int VoxID, int Channel ) const;
55 
56  const std::vector<float>* GetTimingPar( double const* xyz ) const;
57  void SetLibraryTimingParEntry( int VoxID, int OpChannel, float value, size_t parnum );
58  const std::vector<float>* GetLibraryTimingParEntries( int VoxID ) const;
59  float GetLibraryTimingParEntry( int VoxID, int Channel, size_t npar ) const;
60 
61  TF1* GetTimingTF1( double const* xyz ) const;
62  void SetLibraryTimingTF1Entry( int VoxID, int OpChannel, TF1 func );
63  TF1* GetLibraryTimingTF1Entries( int VoxID ) const;
64 
65  void SetDirectLightPropFunctions(TF1 const* functions[8], double& d_break, double& d_max, double& tf1_sampling_factor) const;
66  void SetReflectedCOLightPropFunctions(TF1 const* functions[5], double& t0_max, double& t0_break_point) const;
67 
68  bool IsBuildJob() const { return fLibraryBuildJob; }
69  bool UseParameterization() const {return fParameterization;}
70  bool StoreReflected() const { return fStoreReflected; }
71  bool StoreReflT0() const { return fStoreReflT0; }
72  bool IncludeParPropTime() const { return fParPropTime; }
73  size_t ParPropTimeNpar() const { return fParPropTime_npar; }
74  std::string ParPropTimeFormula() const { return fParPropTime_formula; }
75 
76  bool IncludePropTime() const { return fIncludePropTime; }
77 
78  const sim::PhotonVoxelDef& GetVoxelDef() const {return fVoxelDef; }
79  size_t NOpChannels() const;
80 
81  private:
82 
84  double fCurrentValue;
85  // for c2: fCurrentReflValue is unused
86  //double fCurrentReflValue;
87 
88  float fXmin, fXmax;
89  float fYmin, fYmax;
90  float fZmin, fZmax;
91  int fNx, fNy, fNz;
92 
94 
98  bool fHybrid;
102 
105  std::string fParPropTime_formula;
106 
108 
111  TF1 *fparsMPV;
114  TF1 *fparsCte;
124 
125  std::string fLibraryFile;
128 
129 
130  }; // class PhotonVisibilityService
131 } //namespace phot
133 #endif // UTIL_DETECTOR_PROPERTIES_H
void RetrieveLightProd(int &VoxID, double &N) const
void SetDirectLightPropFunctions(TF1 const *functions[8], double &d_break, double &d_max, double &tf1_sampling_factor) const
const std::vector< float > * GetLibraryTimingParEntries(int VoxID) const
void SetLibraryTimingParEntry(int VoxID, int OpChannel, float value, size_t parnum)
const std::vector< float > * GetTimingPar(double const *xyz) const
#define DECLARE_ART_SERVICE(svc, scope)
Definition: ServiceMacros.h:91
float const * GetLibraryReflT0Entries(int VoxID) const
PhotonVisibilityService(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
void SetLibraryTimingTF1Entry(int VoxID, int OpChannel, TF1 func)
float const * GetLibraryEntries(int VoxID, bool wantReflected=false) const
void SetReflectedCOLightPropFunctions(TF1 const *functions[5], double &t0_max, double &t0_break_point) const
float const * GetAllVisibilities(double const *xyz, bool wantReflected=false) const
void SetLibraryReflT0Entry(int VoxID, int OpChannel, float value)
TF1 * GetTimingTF1(double const *xyz) const
void reconfigure(fhicl::ParameterSet const &p)
void SetLibraryEntry(int VoxID, int OpChannel, float N, bool wantReflected=false)
const sim::PhotonVoxelDef & GetVoxelDef() const
General LArSoft Utilities.
std::string value(boost::any const &)
float GetLibraryTimingParEntry(int VoxID, int Channel, size_t npar) const
static double SolidAngleFactor(double const *xyz, unsigned int OpDet)
float GetLibraryReflT0Entry(int VoxID, int Channel) const
Interface shared by all PhotonLibrary-like classes.
float GetLibraryEntry(int VoxID, int OpChannel, bool wantReflected=false) const
float const * GetReflT0s(double const *xyz) const
float GetVisibility(double const *xyz, unsigned int OpChannel, bool wantReflected=false) const
static double DistanceToOpDet(double const *xyz, unsigned int OpDet)