diff --git a/sbndcode/TPCPMTBarycenterMatching/CMakeLists.txt b/sbndcode/TPCPMTBarycenterMatching/CMakeLists.txt index 9a409d8f0..7ade54740 100644 --- a/sbndcode/TPCPMTBarycenterMatching/CMakeLists.txt +++ b/sbndcode/TPCPMTBarycenterMatching/CMakeLists.txt @@ -10,6 +10,7 @@ set( MODULE_LIBRARIES larreco::Calorimetry larsim::PhotonPropagation larsim::PhotonPropagation_PhotonVisibilityService_service + larsim::OpticalPath lardata::Utilities nusimdata::SimulationBase nurandom::RandomUtils_NuRandomService_service diff --git a/sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc b/sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc index a9f260fe3..70fea3aa7 100644 --- a/sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc +++ b/sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc @@ -20,6 +20,7 @@ #include "art/Framework/Principal/Handle.h" #include "art/Framework/Principal/Run.h" #include "art/Framework/Principal/SubRun.h" +#include "art/Utilities/make_tool.h" #include "canvas/Utilities/InputTag.h" #include "fhiclcpp/ParameterSet.h" #include "messagefacility/MessageLogger/MessageLogger.h" @@ -40,6 +41,7 @@ #include "larcore/Geometry/WireReadout.h" #include "larcorealg/Geometry/GeometryCore.h" #include "larsim/PhotonPropagation/SemiAnalyticalModel.h" +#include "larsim/PhotonPropagation/OpticalPathTools/OpticalPath.h" #include "larcore/CoreUtils/ServiceUtil.h" #include "sbndcode/OpDetSim/sbndPDMapAlg.hh" @@ -289,6 +291,7 @@ class TPCPMTBarycenterMatchProducer : public art::EDProducer { std::unique_ptr _semi_model; fhicl::ParameterSet _vuv_params; fhicl::ParameterSet _vis_params; + std::shared_ptr _optical_path_tool; }; @@ -384,8 +387,8 @@ TPCPMTBarycenterMatchProducer::TPCPMTBarycenterMatchProducer(fhicl::ParameterSet _vuv_params = p.get("VUVHits"); _vis_params = p.get("VIVHits"); - _semi_model = std::make_unique(_vuv_params, _vis_params, true, false); - + _optical_path_tool = std::shared_ptr(art::make_tool(p.get("OpticalPathTool"))); + _semi_model = std::make_unique(_vuv_params, _vis_params, _optical_path_tool, true, false); } void TPCPMTBarycenterMatchProducer::produce(art::Event& e) diff --git a/sbndcode/TPCPMTBarycenterMatching/job/sbnd_tpcpmt3dbarycentermatching_config.fcl b/sbndcode/TPCPMTBarycenterMatching/job/sbnd_tpcpmt3dbarycentermatching_config.fcl index d6f622c8a..57924e4ea 100644 --- a/sbndcode/TPCPMTBarycenterMatching/job/sbnd_tpcpmt3dbarycentermatching_config.fcl +++ b/sbndcode/TPCPMTBarycenterMatching/job/sbnd_tpcpmt3dbarycentermatching_config.fcl @@ -1,6 +1,7 @@ #include "opticalsimparameterisations_sbnd.fcl" #include "digi_pmt_sbnd.fcl" #include "calorimetry_sbnd.fcl" +#include "sbndopticalpath_tool.fcl" BEGIN_PROLOG @@ -24,6 +25,7 @@ TPCPMTBarycenterMatchProducer: ZError: 23 // cm AngleError: 27 // deg FlashVetoWindow: [-1500000,1500000] // ns + OpticalPathTool: @local::SBNDOpticalPath module_type: "TPCPMTBarycenterMatchProducer" }