Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions larsim/PhotonPropagation/OpticalPropagation.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,12 @@
//---------------------------------------------------------------------------//
#include "OpticalPropPDFastSimPAR_tool.fcl"

process_name: OpticalPropagationProducer
BEGIN_PROLOG
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title of this file is probably incorrect now since it's more of a module declaration than a job execution.


services:
OpticalPropagation:
{
TimeTracker: {}
MemoryTracker: {}
module_type : OpticalPropagation
OpticalPropagationTool: @local::OpticalPropPDFastSimPAR
}

// Available tools are
// @local::OpticalPropPDFastSimPAR : Semi-analytical model
// @local::Celeritas : Optical photon propagation on CPU and GPU
// @local::Opticks : Optical photon propagation on Nvidia GPUs
physics:
{
producers:
{
OpticalPropagation:
{
OpticalPropagationTool: @local::OpticalPropPDFastSimPAR
}
}
}
END_PROLOG
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cet_make_library(LIBRARY_NAME OpticalPropagationTools INTERFACE
cet_make_library(LIBRARY_NAME OpticalPropagationTool INTERFACE
SOURCE IOpticalPropagation.h
LIBRARIES INTERFACE
lardataobj::Simulation
)

cet_write_plugin_builder(phot::OpticalPropagationTools art::tool Modules
cet_write_plugin_builder(phot::OpticalPropagationTool art::tool Modules
INSTALL_BUILDER
LIBRARIES CONDITIONAL
lardataobj::Simulation
Expand All @@ -13,9 +13,9 @@ cet_write_plugin_builder(phot::OpticalPropagationTools art::tool Modules
nurandom::RandomUtils_NuRandomService_service
)

include(phot::OpticalPropagationTools)
include(phot::OpticalPropagationTool)

cet_build_plugin(OpticalPropPDFastSimPAR phot::OpticalPropagationTools
cet_build_plugin(OpticalPropPDFastSimPAR phot::OpticalPropagationTool
IMPL_SOURCE OpticalPropPDFastSimPAR.cc
LIBRARIES PRIVATE
larsim::PhotonPropagation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ OpticalPropPDFastSimPAR:
VUVTiming: @local::common_vuv_timing_parameterization

// Required detector-specific parameters:
VISTiming:
VUVHits:
VISHits:
// VISTiming:
// VUVHits:
// VISHits:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of commenting these out could they be empty tables?

Suggested change
// VISHits:
VISHits: {}

}

END_PROLOG
25 changes: 25 additions & 0 deletions larsim/PhotonPropagation/OpticalPropagation_job.fcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//---------------------------------------------------------------------------//
// Job execution file for the OpticalPropagation module
//---------------------------------------------------------------------------//
#include "OpticalPropPDFastSimPAR_tool.fcl"

process_name: opticalpropagation

services:
{
TimeTracker: {}
MemoryTracker: {}
}

physics:
{
producers:
{
OpticalPropagation:
{
OpticalPropagationTool: @local::OpticalPropPDFastSimPAR
}
}

end_path: [ OpticalPropagation ]
}
9 changes: 6 additions & 3 deletions larsim/PhotonPropagation/OpticalPropagation_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "art/Framework/Principal/Handle.h"
#include "art/Utilities/make_tool.h"
#include "fhiclcpp/ParameterSet.h"
#include "fhiclcpp/types/DelegatedParameter.h"
#include "messagefacility/MessageLogger/MessageLogger.h"

#include "larsim/PhotonPropagation/OpticalPropagationTools/IOpticalPropagation.h"
Expand All @@ -33,8 +34,9 @@ class phot::OpticalPropagation : public art::EDProducer {
public:
//! FHiCL configuration parameter
struct Config {
fhicl::Table<fhicl::ParameterSet> OpticalPropagationTools{
fhicl::Name("OpticalPropagationTools")};
fhicl::DelegatedParameter OpticalPropagationTool{
fhicl::Name("OpticalPropagationTool"),
fhicl::Comment("Tool configuration block with tool_type and parameters")};
};

//!@{
Expand Down Expand Up @@ -75,8 +77,9 @@ phot::OpticalPropagation::OpticalPropagation(Parameters const& config) : EDProdu
{
using IOP = phot::IOpticalPropagation;

auto const& ps = config().OpticalPropagationTool.get<fhicl::ParameterSet>();
fOpticalPropagationTool =
std::unique_ptr<IOP>(art::make_tool<IOP>(config().OpticalPropagationTools()));
std::unique_ptr<phot::IOpticalPropagation>(art::make_tool<phot::IOpticalPropagation>(ps));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can restore the IOP; otherwise delete the type alias.


fOpticalPropagationTool->InitializeTools(
art::ServiceHandle<rndm::NuRandomService>()->registerAndSeedEngine(
Expand Down