62 produces<std::vector<recob::SpacePoint>>();
63 produces<art::Assns<recob::SpacePoint, recob::Hit>>();
81 auto spptCollection = std::make_unique<std::vector<recob::SpacePoint>>();
82 auto spptAssociatedHits = std::make_unique<std::vector<std::vector<art::Ptr<recob::Hit>>>>();
87 std::vector<art::Ptr<recob::Hit>> hitVec_U;
92 std::vector<art::Ptr<recob::Hit>> hitVec_V;
97 std::vector<art::Ptr<recob::Hit>> hitVec_Y;
100 MF_LOG_DEBUG(
"TTSpacePointFinder") <<
"Got handles to hits:\n" 101 << hitVec_U.size() <<
" u hits, " << hitVec_V.size()
102 <<
" v hits, " << hitVec_Y.size() <<
" y hits.";
107 detProp, hitVec_U, hitVec_V, hitVec_Y, spptCollection, spptAssociatedHits);
110 <<
"Finished spacepoint alg. Created " << spptCollection->size() <<
" spacepoints.";
113 if (spptCollection->size() != spptAssociatedHits->size()) {
115 <<
"ERROR in space point alg.\n" 116 <<
"Spacepoint and associated hit collections have different sizes!\n" 117 << spptCollection->size() <<
" != " << spptAssociatedHits->size()
118 <<
"\nWill return with no space points put on event.";
123 std::unique_ptr<art::Assns<recob::SpacePoint, recob::Hit>> spptAssns(
125 for (
unsigned int isppt = 0; isppt < spptCollection->size(); isppt++) {
126 util::CreateAssn(evt, *spptCollection, spptAssociatedHits->at(isppt), *spptAssns, isppt);
std::string fHitModuleLabel
void setTimeOffsets(detinfo::DetectorPropertiesData const &detProp)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
EDProducer(fhicl::ParameterSet const &pset)
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define DEFINE_ART_MODULE(klass)
std::string fYHitsInstanceLabel
Input V hits instance name.
void produce(art::Event &evt)
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
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.
std::string fVHitsInstanceLabel
Input U hits instance name.
Declaration of signal hit object.
void beginRun(art::Run &run)
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)