64 mf::LogWarning(
"MCReco_module") <<
"USING DEPRECATED G4ModName CONFIG IN MCRECO_MODULE" 65 <<
"\nUse 'MCParticleLabel' and 'SimChannelLabel' instead.";
73 pset.get<
art::InputTag>(
"MCParticleDroppedLabel",
"largeant:droppedMCParticles");
80 if (fUseSimEnergyDepositLite && fUseSimEnergyDeposit) {
82 <<
"Asked to use both SimEnergyDeposit and SimEnergyDepositLite - will use SimEnergyDeposit.";
85 produces<std::vector<sim::MCShower>>();
86 produces<std::vector<sim::MCTrack>>();
103 throw cet::exception(__FUNCTION__) <<
"Failed to retrieve simb::MCParticle";
108 std::vector<simb::Origin_t> orig_array;
109 orig_array.reserve(mcpHandle->size());
110 for (
size_t i = 0; i < mcpHandle->size(); ++i) {
112 orig_array.push_back(mct->
Origin());
115 const std::vector<simb::MCParticle>& mcp_array(*mcpHandle);
118 auto const& mcmp_array =
131 MakeMCEdep<sim::SimEnergyDepositLite>(
evt);
134 MakeMCEdep<sim::SimChannel>(
evt);
145 template <
typename T>
void MakeMCEdep(const std::vector< sim::SimChannel > &schArray)
EDProducer(fhicl::ParameterSet const &pset)
simb::Origin_t Origin() const
std::unique_ptr< std::vector< sim::MCShower > > Reconstruct(MCRecoPart &part_v, MCRecoEdep &edep_v)
::sim::MCShowerRecoAlg fMCSAlg
bool fIncludeDroppedParticles
void AddParticles(const std::vector< simb::MCParticle > &mcp_v, const std::vector< simb::Origin_t > &orig_v, const std::vector< simb::MCParticle > &mcmp_v={})
bool isValid() const noexcept
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
art::InputTag fMCParticleLabel
void MakeMCEdep(art::Event &evt)
#define DEFINE_ART_MODULE(klass)
bool fUseSimEnergyDepositLite
art::InputTag fSimChannelLabel
Class def header for mctrack data container.
MCReco(fhicl::ParameterSet const &p)
bool fUseSimEnergyDeposit
::sim::MCTrackRecoAlg fMCTAlg
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
void produce(art::Event &e) override
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
art::InputTag fMCParticleDroppedLabel
std::unique_ptr< std::vector< sim::MCTrack > > Reconstruct(MCRecoPart &part_v, MCRecoEdep &edep_v)
cet::coded_exception< error, detail::translate > exception