|
20 | 20 | #include "art/Framework/Principal/Handle.h" |
21 | 21 | #include "art/Framework/Principal/Run.h" |
22 | 22 | #include "art/Framework/Principal/SubRun.h" |
| 23 | +#include "art/Utilities/make_tool.h" |
23 | 24 | #include "canvas/Utilities/InputTag.h" |
24 | 25 | #include "fhiclcpp/ParameterSet.h" |
25 | 26 | #include "messagefacility/MessageLogger/MessageLogger.h" |
|
40 | 41 | #include "larcore/Geometry/WireReadout.h" |
41 | 42 | #include "larcorealg/Geometry/GeometryCore.h" |
42 | 43 | #include "larsim/PhotonPropagation/SemiAnalyticalModel.h" |
| 44 | +#include "larsim/PhotonPropagation/OpticalPathTools/OpticalPath.h" |
43 | 45 | #include "larcore/CoreUtils/ServiceUtil.h" |
44 | 46 | #include "sbndcode/OpDetSim/sbndPDMapAlg.hh" |
45 | 47 |
|
@@ -289,6 +291,7 @@ class TPCPMTBarycenterMatchProducer : public art::EDProducer { |
289 | 291 | std::unique_ptr<phot::SemiAnalyticalModel> _semi_model; |
290 | 292 | fhicl::ParameterSet _vuv_params; |
291 | 293 | fhicl::ParameterSet _vis_params; |
| 294 | + std::shared_ptr<phot::OpticalPath> _optical_path_tool; |
292 | 295 |
|
293 | 296 | }; |
294 | 297 |
|
@@ -384,8 +387,8 @@ TPCPMTBarycenterMatchProducer::TPCPMTBarycenterMatchProducer(fhicl::ParameterSet |
384 | 387 |
|
385 | 388 | _vuv_params = p.get<fhicl::ParameterSet>("VUVHits"); |
386 | 389 | _vis_params = p.get<fhicl::ParameterSet>("VIVHits"); |
387 | | - _semi_model = std::make_unique<phot::SemiAnalyticalModel>(_vuv_params, _vis_params, true, false); |
388 | | - |
| 390 | + _optical_path_tool = std::shared_ptr<phot::OpticalPath>(art::make_tool<phot::OpticalPath>(p.get<fhicl::ParameterSet>("OpticalPathTool"))); |
| 391 | + _semi_model = std::make_unique<phot::SemiAnalyticalModel>(_vuv_params, _vis_params, _optical_path_tool, true, false); |
389 | 392 | } |
390 | 393 |
|
391 | 394 | void TPCPMTBarycenterMatchProducer::produce(art::Event& e) |
|
0 commit comments