63 produces<std::vector<recob::SpacePoint>>();
64 produces<art::Assns<recob::SpacePoint, recob::Hit>>();
80 auto spptCollection = std::make_unique<std::vector<recob::SpacePoint>>();
81 auto spptAssociatedHits = std::make_unique<std::vector<std::vector<art::Ptr<recob::Hit>>>>();
86 std::vector<art::Ptr<recob::Hit>> hitVec_U;
91 std::vector<art::Ptr<recob::Hit>> hitVec_V;
96 std::vector<art::Ptr<recob::Hit>> hitVec_Y;
99 MF_LOG_DEBUG(
"TTSpacePointFinder") <<
"Got handles to hits:\n" 100 << hitVec_U.size() <<
" u hits, " << hitVec_V.size()
101 <<
" v hits, " << hitVec_Y.size() <<
" y hits.";
106 detProp, hitVec_U, hitVec_V, hitVec_Y, spptCollection, spptAssociatedHits);
109 <<
"Finished spacepoint alg. Created " << spptCollection->size() <<
" spacepoints.";
112 if (spptCollection->size() != spptAssociatedHits->size()) {
114 <<
"ERROR in space point alg.\n" 115 <<
"Spacepoint and associated hit collections have different sizes!\n" 116 << spptCollection->size() <<
" != " << spptAssociatedHits->size()
117 <<
"\nWill return with no space points put on event.";
122 std::unique_ptr<art::Assns<recob::SpacePoint, recob::Hit>> spptAssns(
124 for (
unsigned int isppt = 0; isppt < spptCollection->size(); isppt++) {
125 util::CreateAssn(evt, *spptCollection, spptAssociatedHits->at(isppt), *spptAssns, isppt);
129 evt.
put(std::move(spptCollection));
130 evt.
put(std::move(spptAssns));
std::string fHitModuleLabel
void setTimeOffsets(detinfo::DetectorPropertiesData const &detProp)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
Declaration of signal hit object.
EDProducer(fhicl::ParameterSet const &pset)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
#define DEFINE_ART_MODULE(klass)
std::string fYHitsInstanceLabel
Input V hits instance name.
void produce(art::Event &evt)
std::string fVHitsInstanceLabel
Input U hits instance name.
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.
void beginRun(art::Run &run)
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Utility object to perform functions of association.
void fillCoordinatesArrays()
std::string fUHitsInstanceLabel
Input hit module name.
void createSpacePoints(detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit >> &hitVec_U, std::vector< art::Ptr< recob::Hit >> &hitVec_V, std::vector< art::Ptr< recob::Hit >> &hitVec_Y, std::unique_ptr< std::vector< recob::SpacePoint >> &spptCollection, std::unique_ptr< std::vector< std::vector< art::Ptr< recob::Hit >>>> &spptAssociatedHits)
SpacePointAlg_TimeSort fSpptAlg
Input Y hits instance name.
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
TTSpacePointFinder(fhicl::ParameterSet const &pset)