120 std::unique_ptr<std::vector<art::PtrVector<recob::SpacePoint>>> sptvecs(
122 std::unique_ptr<std::vector<recob::SpacePoint>> spts(
new std::vector<recob::SpacePoint>);
123 std::unique_ptr<art::Assns<recob::SpacePoint, recob::Hit>> sphitassn(
125 std::unique_ptr<art::Assns<recob::SpacePoint, recob::Cluster>> spclassn(
134 auto const clockData =
141 int nclus = clusterh->size();
142 for (
int iclus = 0; iclus < nclus; ++iclus) {
146 std::vector<art::Ptr<recob::Hit>> ihits =
fm.at(iclus);
156 unsigned int nihits = ihits.size();
166 for (
int jclus = 0; jclus < iclus; ++jclus) {
170 std::vector<art::Ptr<recob::Hit>> jhits =
fm.at(jclus);
182 unsigned int njhits = jhits.size();
183 assert(hits.
size() >= nihits);
185 while (hits.
size() > nihits)
187 assert(hits.
size() == nihits);
197 std::vector<recob::SpacePoint> new_spts;
202 if (new_spts.size() > 0) {
211 int nspt = spts->size();
212 spts->insert(spts->end(), new_spts.begin(), new_spts.end());
217 for (
unsigned int ispt = nspt; ispt < spts->size(); ++ispt) {
230 sptvecs->push_back(sptvec);
236 for (
int kclus = 0; kclus < jclus; ++kclus) {
240 std::vector<art::Ptr<recob::Hit>> khits =
fm.at(kclus);
248 kview != iview && kview != jview) {
252 unsigned int nkhits = khits.size();
253 assert(hits.
size() >= nihits + njhits);
255 while (hits.
size() > nihits + njhits)
257 assert(hits.
size() == nihits + njhits);
258 hits.
reserve(nihits + njhits + nkhits);
266 std::vector<recob::SpacePoint> new_spts;
271 if (new_spts.size() > 0) {
281 int nspt = spts->size();
282 spts->insert(spts->end(), new_spts.begin(), new_spts.end());
287 for (
unsigned int ispt = nspt; ispt < spts->size(); ++ispt) {
300 sptvecs->push_back(sptvec);
void reserve(size_type n)
bool enableW() const noexcept
bool enableV() const noexcept
ProductID getProductID(std::string const &instance_name="") const
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Planes which measure Z direction.
int minViews() const noexcept
const art::PtrVector< recob::Hit > & getAssociatedHits(const recob::SpacePoint &spt) const
bool isValid() const noexcept
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
void push_back(Ptr< U > const &p)
void makeSpacePoints(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const
EDProductGetter const * productGetter(ProductID const pid) const
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.
bool enableU() const noexcept
static constexpr double fm
std::string fClusterModuleLabel