LArSoft  v07_13_02
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 
30 
31  void reconfigure(fhicl::ParameterSet const& p);
32 
33  double GetQuenchingFactor(double dQdx) const;
34 
35  static double DistanceToOpDet( double const* xyz, unsigned int OpDet );
36  static double SolidAngleFactor( double const* xyz, unsigned int OpDet );
37  float GetVisibility( double const* xyz, unsigned int OpChannel, bool wantReflected=false ) const;
38 
39  float const* GetAllVisibilities( double const* xyz, bool wantReflected=false ) const;
40 
41  void LoadLibrary() const;
42  void StoreLibrary();
43 
44 
45  void StoreLightProd( int VoxID, double N );
46  void RetrieveLightProd( int& VoxID, double& N ) const;
47 
48  void SetLibraryEntry( int VoxID, int OpChannel, float N, bool wantReflected=false );
49  float GetLibraryEntry( int VoxID, int OpChannel, bool wantReflected=false ) const;
50  float const* GetLibraryEntries( int VoxID, bool wantReflected=false ) const;
51 
52  float const* GetReflT0s( double const* xyz ) const;
53  void SetLibraryReflT0Entry( int VoxID, int OpChannel, float value );
54  float const* GetLibraryReflT0Entries( int VoxID ) const;
55  float GetLibraryReflT0Entry( int VoxID, int Channel ) const;
56 
57  const std::vector<float>* GetTimingPar( double const* xyz ) const;
58  void SetLibraryTimingParEntry( int VoxID, int OpChannel, float value, size_t parnum );
59  const std::vector<float>* GetLibraryTimingParEntries( int VoxID ) const;
60  float GetLibraryTimingParEntry( int VoxID, int Channel, size_t npar ) const;
61 
62  TF1* GetTimingTF1( double const* xyz ) const;
63  void SetLibraryTimingTF1Entry( int VoxID, int OpChannel, TF1 func );
64  TF1* GetLibraryTimingTF1Entries( int VoxID ) const;
65 
66  void SetDirectLightPropFunctions(TF1 const* functions[8], double& d_break, double& d_max, double& tf1_sampling_factor) const;
67  void SetReflectedCOLightPropFunctions(TF1 const* functions[5], double& t0_max, double& t0_break_point) const;
68 
69  bool IsBuildJob() const { return fLibraryBuildJob; }
70  bool UseParameterization() const {return fParameterization;}
71  bool StoreReflected() const { return fStoreReflected; }
72  bool StoreReflT0() const { return fStoreReflT0; }
73  bool IncludeParPropTime() const { return fParPropTime; }
74  size_t ParPropTimeNpar() const { return fParPropTime_npar; }
75  std::string ParPropTimeFormula() const { return fParPropTime_formula; }
76 
77  bool IncludePropTime() const { return fIncludePropTime; }
78 
79  const sim::PhotonVoxelDef& GetVoxelDef() const {return fVoxelDef; }
80  size_t NOpChannels() const;
81 
82  private:
83 
84  const TVector3 LibLocation(const double * xyz) const;
85 
87  double fCurrentValue;
88  // for c2: fCurrentReflValue is unused
89  //double fCurrentReflValue;
90 
91  float fXmin, fXmax;
92  float fYmin, fYmax;
93  float fZmin, fZmax;
94  int fNx, fNy, fNz;
95 
97 
101  bool fHybrid;
105 
108  std::string fParPropTime_formula;
112 
113  TF1 *fparslogNorm = nullptr;
114  TF1 *fparslogNorm_far = nullptr;
115  TF1 *fparsMPV = nullptr;
116  TF1 *fparsMPV_far = nullptr;
117  TF1 *fparsWidth = nullptr;
118  TF1 *fparsCte = nullptr;
119  TF1 *fparsCte_far = nullptr;
120  TF1 *fparsSlope = nullptr;
122  TF1 *fparslogNorm_refl = nullptr;
123  TF1 *fparsMPV_refl = nullptr;
124  TF1 *fparsWidth_refl = nullptr;
125  TF1 *fparsCte_refl = nullptr;
126  TF1 *fparsSlope_refl = nullptr;
128 
129  std::string fLibraryFile;
132 
133 
134  }; // class PhotonVisibilityService
135 } //namespace phot
137 #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.
const TVector3 LibLocation(const double *xyz) const
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)