PhotonVisibilityServiceS2.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file PhotonVisibilityServiceS2.h
3 //
4 // \brief Service to report opdet visibility to different points in
5 // the system
6 //
7 // \author bjpjones@mit.edu
8 //
9 ////////////////////////////////////////////////////////////////////////
10 #ifndef PhotonVisibilityServiceS2_H
11 #define PhotonVisibilityServiceS2_H
12 
13 
19 
20 class TF1;
21 
22 #include "TF1.h"
23 
24 
25 ///General LArSoft Utilities
26 namespace phot{
27 
29  public:
30 
32 
33  void reconfigure(fhicl::ParameterSet const& p);
34 
35  double GetQuenchingFactor(double dQdx) const;
36 
37  static double DistanceToOpDet( double const* xyz, unsigned int OpDet );
38  static double SolidAngleFactor( double const* xyz, unsigned int OpDet );
39  float GetVisibility( double const* xyz, unsigned int OpChannel, bool wantReflected=false ) const;
40 
41  float const* GetAllVisibilities( double const* xyz, bool wantReflected=false ) const;
42 
43  void LoadLibrary() const;
44  void StoreLibrary();
45 
46 
47  void StoreLightProd( int VoxID, double N );
48  void RetrieveLightProd( int& VoxID, double& N ) const;
49 
50  void SetLibraryEntry( int VoxID, int OpChannel, float N, bool wantReflected=false );
51  float GetLibraryEntry( int VoxID, int OpChannel, bool wantReflected=false ) const;
52  float const* GetLibraryEntries( int VoxID, bool wantReflected=false ) const;
53 
54  float const* GetReflT0s( double const* xyz ) const;
55  void SetLibraryReflT0Entry( int VoxID, int OpChannel, float value );
56  float const* GetLibraryReflT0Entries( int VoxID ) const;
57  float GetLibraryReflT0Entry( int VoxID, int Channel ) const;
58 
59  const std::vector<float>* GetTimingPar( double const* xyz ) const;
60  void SetLibraryTimingParEntry( int VoxID, int OpChannel, float value, size_t parnum );
61  const std::vector<float>* GetLibraryTimingParEntries( int VoxID ) const;
62  float GetLibraryTimingParEntry( int VoxID, int Channel, size_t npar ) const;
63 
64  TF1* const GetTimingTF1( double const* xyz );
65  void SetLibraryTimingTF1Entry( int VoxID, int OpChannel, TF1 func );
66  TF1* const GetLibraryTimingTF1Entries( int VoxID );
67 
68  void SetDirectLightPropFunctions(TF1 const* functions[8], double& d_break, double& d_max, double& tf1_sampling_factor) const;
69  void SetReflectedCOLightPropFunctions(TF1 const* functions[5], double& t0_max, double& t0_break_point) const;
70 
71  bool IsBuildJob() const { return fLibraryBuildJob; }
72  bool UseParameterization() const {return fParameterization;}
73  bool StoreReflected() const { return fStoreReflected; }
74  bool StoreReflT0() const { return fStoreReflT0; }
75  bool IncludeParPropTime() const { return fParPropTime; }
76  size_t ParPropTimeNpar() const { return fParPropTime_npar; }
78 
79  bool IncludePropTime() const { return fIncludePropTime; }
80 
81  const sim::PhotonVoxelDef& GetVoxelDef() const {return fVoxelDef; }
82  size_t NOpChannels() const;
83 
84  private:
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 
109 
111 
114  TF1 *fparsMPV;
117  TF1 *fparsCte;
127 
131 
132 
133  }; // class PhotonVisibilityServiceS2
134 } //namespace phot
136 #endif // UTIL_DETECTOR_PROPERTIES_H
Definitions of voxel data structures.
static double DistanceToOpDet(double const *xyz, unsigned int OpDet)
const std::vector< float > * GetTimingPar(double const *xyz) const
Index OpChannel(Index detNum, Index channel)
float const * GetLibraryReflT0Entries(int VoxID) const
static double SolidAngleFactor(double const *xyz, unsigned int OpDet)
std::string string
Definition: nybbler.cc:12
float const * GetLibraryEntries(int VoxID, bool wantReflected=false) const
Representation of a region of space diced into voxels.
Definition: PhotonVoxels.h:58
float GetLibraryTimingParEntry(int VoxID, int Channel, size_t npar) const
void SetLibraryReflT0Entry(int VoxID, int OpChannel, float value)
void SetLibraryTimingTF1Entry(int VoxID, int OpChannel, TF1 func)
void SetLibraryEntry(int VoxID, int OpChannel, float N, bool wantReflected=false)
const sim::PhotonVoxelDef & GetVoxelDef() const
float GetVisibility(double const *xyz, unsigned int OpChannel, bool wantReflected=false) const
float GetLibraryReflT0Entry(int VoxID, int Channel) const
#define DECLARE_ART_SERVICE(svc, scope)
void RetrieveLightProd(int &VoxID, double &N) const
p
Definition: test.py:223
void reconfigure(fhicl::ParameterSet const &p)
void SetDirectLightPropFunctions(TF1 const *functions[8], double &d_break, double &d_max, double &tf1_sampling_factor) const
void SetLibraryTimingParEntry(int VoxID, int OpChannel, float value, size_t parnum)
void SetReflectedCOLightPropFunctions(TF1 const *functions[5], double &t0_max, double &t0_break_point) const
float const * GetReflT0s(double const *xyz) const
General LArSoft Utilities.
const std::vector< float > * GetLibraryTimingParEntries(int VoxID) const
def func()
Definition: docstring.py:7
PhotonVisibilityServiceS2(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
Interface shared by all PhotonLibrary-like classes.
float GetLibraryEntry(int VoxID, int OpChannel, bool wantReflected=false) const
float const * GetAllVisibilities(double const *xyz, bool wantReflected=false) const