All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PhotonLibHypothesis.h
Go to the documentation of this file.
1 /**
2  * \file PhotonLibHypothesis.h
3  *
4  * \ingroup Algorithms
5  *
6  * \brief Class def header for a class PhotonLibHypothesis
7  *
8  * @author yuntse
9  */
10 
11 /** \addtogroup Algorithms
12 
13  @{*/
14 
15 #ifndef PHOTONLIBHYPOTHESIS_H
16 #define PHOTONLIBHYPOTHESIS_H
17 
18 #ifndef USING_LARSOFT
19 #define USING_LARSOFT 1
20 #endif
21 
22 #if USING_LARSOFT == 0
27 #else
32 #endif
33 
34 #include <iostream>
35 #include <cassert>
36 #include <chrono>
37 
38 namespace flashmatch {
39  /**
40  \class PhotonLibHypothesis
41  User custom analysis class made by SHELL_USER_NAME
42  */
44 
45  public:
46 
47  /// Default constructor
48  PhotonLibHypothesis(const std::string name="PhotonLibHypothesis");
49 
50  /// Default destructor
52 
53  void FillEstimate(const QCluster_t&, Flash_t&) const;
54 
55  private:
56  /// Fills the estimate using the semi analytical approach (SBND)
57  void FillEstimateSemiAnalytical(const QCluster_t&, Flash_t &) const;
58 
59  /// Fills the estimate using the photon library (ICARUS, SBND)
60  void FillEstimateLibrary(const QCluster_t&, Flash_t &) const;
61 
62  protected:
63 
64  void _Configure_(const Config_t &pset);
65 
66  double _global_qe; ///< Global QE for direct light
67  double _global_qe_refl; ///< Global QE for reflected light
68  double _sigma_qe; ///< Sigma for Gaussian centered on Global QE
69  std::vector<double> _qe_v; ///< PMT-wise relative QE
70  bool _use_semi_analytical; ///< If the semi-analytical approach should be used
71  #if USING_LARSOFT == 1
73  #endif
74  };
75 
76  /**
77  \class flashmatch::PhotonLibHypothesisFactory
78  */
80  public:
81  /// ctor
83  /// dtor
85  /// creation method
86  BaseFlashHypothesis* create(const std::string instance_name) { return new PhotonLibHypothesis(instance_name); }
87  };
88 }
89 #endif
90 
91 /** @} */ // end of doxygen group
double _global_qe
Global QE for direct light.
void FillEstimateLibrary(const QCluster_t &, Flash_t &) const
Fills the estimate using the photon library (ICARUS, SBND)
double _global_qe_refl
Global QE for reflected light.
Abstract base class for factory (to be implemented per flash)
BaseFlashHypothesis * create(const std::string instance_name)
creation method
fhicl::ParameterSet Config_t
Configuration object.
Definition: FMWKInterface.h:31
void add_factory(const std::string name, flashmatch::FlashHypothesisFactoryBase *factory)
Factory registration method (should be called by global factory instance in algorithm header) ...
Struct to represent an optical flash.
Class def header for a class FlashHypothesisFactory.
Class def header for a class BaseFlashFilter.
Collection of charge deposition 3D point (cluster)
void FillEstimateSemiAnalytical(const QCluster_t &, Flash_t &) const
Fills the estimate using the semi analytical approach (SBND)
Class def header for exception classes in OpT0Finder package.
void FillEstimate(const QCluster_t &, Flash_t &) const
Method to simply fill provided reference of flashmatch::Flash_t.
bool _use_semi_analytical
If the semi-analytical approach should be used.
std::vector< double > _qe_v
PMT-wise relative QE.
void _Configure_(const Config_t &pset)
virtual ~PhotonLibHypothesis()
Default destructor.
phot::PhotonVisibilityService const *const _vis
double _sigma_qe
Sigma for Gaussian centered on Global QE.
static FlashHypothesisFactory & get()
Static sharable instance getter.
const std::string & name() const
Name getter, defined in a logger instance attribute.
Definition: LoggerFeature.h:51
PhotonLibHypothesis(const std::string name="PhotonLibHypothesis")
Default constructor.