80 ,
fTrackModuleLabel(pset.get<std::string>(
"TrackModuleLabel",
"trajclusterKalmanTrack"))
81 ,
fHitModuleLabel(pset.get<std::string>(
"HitModuleLabel",
"trajcluster"))
86 produces<std::vector<recob::Shower>>();
87 produces<art::Assns<recob::Shower, recob::Hit>>();
88 produces<art::Assns<recob::Slice, recob::Shower>>();
95 auto showers = std::make_unique<std::vector<recob::Shower>>();
96 auto hitShowerAssociations = std::make_unique<art::Assns<recob::Shower, recob::Hit>>();
97 auto sliceShowerAssociations = std::make_unique<art::Assns<recob::Slice, recob::Shower>>();
101 std::vector<art::Ptr<recob::Slice>> slicelist;
109 int foundShower = -1;
111 if (
empty(slicelist)) {
117 showers->emplace_back(TVector3{shwDir.X(), shwDir.Y(), shwDir.Z()},
119 TVector3{shwvtx.X(), shwvtx.Y(), shwvtx.Z()},
127 showers->back().set_id(showers->size() - 1);
133 for (
size_t i = 0; i < slicelist.size(); ++i) {
134 std::cout <<
"---------- slice " << i <<
" ----------" << std::endl;
139 std::cout <<
"FOUND SHOWER " << foundShower << std::endl;
144 showers->emplace_back(TVector3{shwDir.X(), shwDir.Y(), shwDir.Z()},
146 TVector3{shwvtx.X(), shwvtx.Y(), shwvtx.Z()},
154 showers->back().set_id(showers->size() - 1);
162 evt.
put(std::move(showers));
163 evt.
put(std::move(hitShowerAssociations));
164 evt.
put(std::move(sliceShowerAssociations));
187 auto const& hitlist = hitslice_fm.at(thisslice.
key());
190 auto const& clusterlist = clsslice_fm.at(thisslice.
key());
192 auto const& pfplist = pfpslice_fm.at(thisslice.
key());
217 std::vector<art::Ptr<recob::PFParticle>> pfplist;
221 std::vector<art::Ptr<recob::Cluster>> clusterlist;
225 std::vector<art::Ptr<recob::Hit>> hitlist;
shower::TCShowerAlg fTCAlg
std::vector< double > totalEnergyErr
int getShowersWithSlices(art::Event const &evt, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, art::Ptr< recob::Slice > const &thisslice)
int getShowersWithoutSlices(art::Event const &evt, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp)
std::vector< double > dEdx
Declaration of signal hit object.
std::string fVertexModuleLabel
EDProducer(fhicl::ParameterSet const &pset)
TCShower(fhicl::ParameterSet const &p)
std::string fSliceModuleLabel
int makeShowers(detinfo::DetectorClocksData const &dataClock, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::PFParticle >> const &pfplist, std::vector< art::Ptr< recob::Cluster >> const &clusterlist, std::vector< art::Ptr< recob::Hit >> const &hitlist, art::FindManyP< recob::Hit > const &cls_fm, art::FindManyP< recob::Cluster > const &clspfp_fm, art::FindManyP< recob::Vertex > const &vtxpfp_fm, art::FindManyP< recob::Cluster > const &hitcls_fm, art::FindManyP< recob::Track > const &trkpfp_fm)
TCShower & operator=(TCShower const &)=delete
std::string fTrackModuleLabel
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
#define DEFINE_ART_MODULE(klass)
void produce(art::Event &e) override
std::string fHitModuleLabel
key_type key() const noexcept
Provides recob::Track data product.
std::string fClusterModuleLabel
Declaration of cluster object.
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
Handle< PROD > getHandle(SelectorBase const &) const
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Utility object to perform functions of association.
Contains all timing reference information for the detector.
std::string fCalorimetryModuleLabel
std::vector< double > totalEnergy
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
std::vector< art::Ptr< recob::Hit > > showerHits
std::vector< double > dEdxErr
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.