20 #include "canvas/Persistency/Common/FindManyP.h" 85 produces<std::vector<recob::Shower>>();
86 produces<art::Assns<recob::Shower, recob::Hit>>();
87 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)) {
131 for (
size_t i = 0; i < slicelist.size(); ++i) {
132 std::cout <<
"---------- slice " << i <<
" ----------" <<
std::endl;
137 std::cout <<
"FOUND SHOWER " << foundShower <<
std::endl;
188 art::FindManyP<recob::Hit> hitslice_fm(sliceListHandle, evt,
fHitModuleLabel);
189 art::FindManyP<recob::PFParticle> pfpslice_fm(sliceListHandle, evt,
fHitModuleLabel);
190 art::FindManyP<recob::Cluster> clsslice_fm(sliceListHandle, evt,
fHitModuleLabel);
191 art::FindManyP<recob::Cluster> clspfp_fm(pfpListHandle, evt,
fHitModuleLabel);
195 std::vector<art::Ptr<recob::Hit>> hitlist;
196 std::vector<art::Ptr<recob::Cluster>> clusterlist;
197 std::vector<art::Ptr<recob::Vertex>> vertexlist;
198 std::vector<art::Ptr<recob::EndPoint2D>> vx2list;
201 hitlist = hitslice_fm.at(thisslice.
key());
204 clusterlist = clsslice_fm.at(thisslice.
key());
206 std::vector<art::Ptr<recob::PFParticle>> pfplist = pfpslice_fm.at(thisslice.
key());
208 for (
size_t i = 0; i < pfplist.size(); ++i) {
209 std::vector<art::Ptr<recob::Vertex>> thisvtxlist = vtxpfp_fm.at(pfplist[i].
key());
211 for (
size_t j = 0; j < thisvtxlist.size(); ++j) {
212 vertexlist.push_back(thisvtxlist[j]);
218 art::FindManyP<recob::PFParticle> hit_fm(hitListHandle, evt,
fHitModuleLabel);
247 std::vector<art::Ptr<recob::PFParticle>> pfplist;
251 std::vector<art::Ptr<recob::Hit>> hitlist;
255 std::vector<art::Ptr<recob::Cluster>> clusterlist;
260 std::vector<art::Ptr<recob::Vertex>> vertexlist;
268 art::FindManyP<recob::Cluster> clspfp_fm(pfpListHandle, evt,
fHitModuleLabel);
271 art::FindManyP<recob::PFParticle> hit_fm(hitListHandle, evt,
fHitModuleLabel);
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
std::string fVertexModuleLabel
EDProducer(fhicl::ParameterSet const &pset)
TCShower(fhicl::ParameterSet const &p)
std::string fSliceModuleLabel
TCShower & operator=(TCShower const &)=delete
std::string fTrackModuleLabel
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
int makeShowers(detinfo::DetectorClocksData const &dataClock, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::PFParticle >> const &pfplist, std::vector< art::Ptr< recob::Vertex >> const &vertexlist, 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::PFParticle > const &hit_fm, art::FindManyP< recob::Cluster > const &hitcls_fm, art::FindManyP< recob::Track > const &trkpfp_fm, art::FindManyP< anab::Calorimetry > const &fmcal)
#define DEFINE_ART_MODULE(klass)
void produce(art::Event &e) override
std::string fHitModuleLabel
key_type key() const noexcept
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
std::string fClusterModuleLabel
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
Declaration of signal hit object.
Contains all timing reference information for the detector.
std::string fCalorimetryModuleLabel
Provides recob::Track data product.
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.
QTextStream & endl(QTextStream &s)