1 #include "art/Framework/Core/EDProducer.h"
2 #include "art/Framework/Core/ModuleMacros.h"
3 #include "art/Framework/Principal/Event.h"
4 #include "art/Framework/Principal/Handle.h"
5 #include "art/Framework/Principal/Run.h"
6 #include "art/Framework/Principal/SubRun.h"
8 #include "messagefacility/MessageLogger/MessageLogger.h"
10 #include "fhiclcpp/ParameterSet.h"
11 #include "fhiclcpp/types/Atom.h"
12 #include "fhiclcpp/types/Table.h"
13 #include "canvas/Utilities/InputTag.h"
14 #include "canvas/Persistency/Common/FindManyP.h"
49 Comment(
"Label of recob::TrackTrajectory Collection to be fit")
55 fhicl::Table<MCSFitProducerICARUS::Inputs>
inputs {
58 fhicl::Table<TrajectoryMCSFitterICARUS::Config>
fitter {
73 void produce(art::Event &
e)
override;
84 : EDProducer{p}, p_(
p), mcsfitter(p_().fitter)
86 inputTag = art::InputTag(p_().inputs().inputLabel());
87 produces<std::vector<recob::MCSFitResult> >();
96 auto output = std::make_unique<std::vector<recob::MCSFitResult> >();
98 art::Handle<std::vector<recob::Track> > inputH;
99 bool ok = e.getByLabel(inputTag,inputH);
100 if (!ok)
throw cet::exception(
"MCSFitProducerICARUS") <<
"Cannot find input art::Handle with inputTag " << inputTag;
101 const auto& inputVec = *(inputH.product());
105 for (
const auto&
element : inputVec) {
107 std::vector<recob::Hit> hits2d=projectHitsOnPlane(e,
element,2);
108 mcsfitter.set2DHits(hits2d);
109 mcsfitter.ComputeD3P();
112 output->emplace_back(std::move(result));
124 std::vector<recob::Hit> v;
128 auto const&
tracks = proxy::getCollection<proxy::Tracks>(
e,inputTag);
133 for (
const art::Ptr<recob::Hit>&
h : track.hits())
134 if(
h->WireID().Plane ==
p) {
MCSFitProducerICARUS & operator=(MCSFitProducerICARUS const &)=delete
ClusterModuleLabel join with tracks
process_name use argoneut_mc_hitfinder track
TrajectoryMCSFitterICARUS mcsfitter
Offers proxy::Tracks and proxy::Track class for recob::Track access.
fhicl::Table< MCSFitProducerICARUS::Inputs > inputs
art::EDProducer::Table< Config > Parameters
BEGIN_PROLOG vertical distance to the surface Name
Declaration of cluster object.
std::vector< recob::Hit > projectHitsOnPlane(art::Event &e, const recob::Track &traj, unsigned int p) const
Provides recob::Track data product.
MCSFitProducerICARUS(Parameters const &p)
void produce(art::Event &e) override
Class storing the result of the Maximum Likelihood fit of Multiple Coulomb Scattering angles between ...
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingORW output
Class for Maximum Likelihood fit of Multiple Coulomb Scattering angles between segments within a Trac...
Producer for TrajectoryMCSFitterICARUS.
fhicl::Table< TrajectoryMCSFitterICARUS::Config > fitter
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track: