|
15 | 15 | #include "art/Framework/Principal/Handle.h" |
16 | 16 | #include "art/Framework/Principal/Run.h" |
17 | 17 | #include "art/Framework/Principal/SubRun.h" |
| 18 | +#include "art/Utilities/make_tool.h" |
18 | 19 | #include "art_root_io/TFileService.h" |
19 | 20 | #include "canvas/Utilities/InputTag.h" |
20 | 21 | #include "canvas/Persistency/Common/Assns.h" |
|
40 | 41 | #include "larcore/CoreUtils/ServiceUtil.h" |
41 | 42 |
|
42 | 43 | #include "larsim/PhotonPropagation/SemiAnalyticalModel.h" |
| 44 | +#include "larsim/PhotonPropagation/OpticalPathTools/OpticalPath.h" |
43 | 45 | #include "larsim/Simulation/LArG4Parameters.h" |
44 | 46 |
|
45 | 47 | #include "larpandora/LArPandoraInterface/LArPandoraHelper.h" |
@@ -104,6 +106,7 @@ class SBNDOpT0Finder : public art::EDProducer { |
104 | 106 | std::unique_ptr<phot::SemiAnalyticalModel> _semi_model; |
105 | 107 | fhicl::ParameterSet _vuv_params; |
106 | 108 | fhicl::ParameterSet _vis_params; |
| 109 | + std::shared_ptr<phot::OpticalPath> _optical_path_tool; |
107 | 110 |
|
108 | 111 | ::flashmatch::FlashMatchManager _mgr; ///< The flash matching manager |
109 | 112 | std::vector<flashmatch::FlashMatch_t> _result_v; ///< Matching result will be stored here |
@@ -176,7 +179,8 @@ SBNDOpT0Finder::SBNDOpT0Finder(fhicl::ParameterSet const& p) |
176 | 179 |
|
177 | 180 | _vuv_params = p.get<fhicl::ParameterSet>("VUVHits"); |
178 | 181 | _vis_params = p.get<fhicl::ParameterSet>("VIVHits"); |
179 | | - _semi_model = std::make_unique<phot::SemiAnalyticalModel>(_vuv_params, _vis_params, true, false); |
| 182 | + _optical_path_tool = std::shared_ptr<phot::OpticalPath>(art::make_tool<phot::OpticalPath>(p.get<fhicl::ParameterSet>("OpticalPathTool"))); |
| 183 | + _semi_model = std::make_unique<phot::SemiAnalyticalModel>(_vuv_params, _vis_params, _optical_path_tool, true, false); |
180 | 184 |
|
181 | 185 | _opflash_producer_v = p.get<std::vector<std::string>>("OpFlashProducers"); |
182 | 186 | _opflash_ara_producer_v = p.get<std::vector<std::string>>("OpFlashAraProducers"); |
|
0 commit comments