12 #include "canvas/Persistency/Common/FindOneP.h" 59 mf::LogWarning(
"MCReco_module") <<
"USING DEPRECATED G4ModName CONFIG IN MCRECO_MODULE" 60 <<
"\nUse 'MCParticleLabel' and 'SimChannelLabel' instead.";
68 produces< std::vector< sim::MCShower> >();
69 produces< std::vector< sim::MCTrack> >();
85 if(!mcpHandle.
isValid())
throw cet::exception(__FUNCTION__) <<
"Failed to retrieve simb::MCParticle";;
89 std::vector<simb::Origin_t> orig_array;
90 orig_array.reserve(mcpHandle->size());
91 for(
size_t i=0; i<mcpHandle->size(); ++i) {
93 orig_array.push_back(mct->
Origin());
96 const std::vector<simb::MCParticle>& mcp_array(*mcpHandle);
106 if(!sedHandle.
isValid())
throw cet::exception(__FUNCTION__) <<
"Failed to retrieve sim::SimEnergyDeposit";
108 const std::vector<sim::SimEnergyDeposit>& sed_array(*sedHandle);
117 const std::vector<sim::SimChannel>& sch_array(*schHandle);
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 isValid() const noexcept
art::InputTag fMCParticleLabel
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define DEFINE_ART_MODULE(klass)
void AddParticles(const std::vector< simb::MCParticle > &mcp_v, const std::vector< simb::Origin_t > &orig_v)
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
art::InputTag fSimChannelLabel
Class def header for mctrack data container.
MCReco(fhicl::ParameterSet const &p)
bool fUseSimEnergyDeposit
::sim::MCTrackRecoAlg fMCTAlg
void produce(art::Event &e) override
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::unique_ptr< std::vector< sim::MCTrack > > Reconstruct(MCRecoPart &part_v, MCRecoEdep &edep_v)
cet::coded_exception< error, detail::translate > exception