118 auto sptvecs = std::make_unique<std::vector<art::PtrVector<recob::SpacePoint>>>();
119 auto spts = std::make_unique<std::vector<recob::SpacePoint>>();
120 auto sphitassn = std::make_unique<art::Assns<recob::SpacePoint, recob::Hit>>();
121 auto spclassn = std::make_unique<art::Assns<recob::SpacePoint, recob::Cluster>>();
131 auto const clockData =
136 int nclus = clusterh->size();
137 for (
int iclus = 0; iclus < nclus; ++iclus) {
141 std::vector<art::Ptr<recob::Hit>> ihits =
fm.at(iclus);
151 unsigned int nihits = ihits.size();
153 hits.reserve(nihits);
161 for (
int jclus = 0; jclus < iclus; ++jclus) {
165 std::vector<art::Ptr<recob::Hit>> jhits =
fm.at(jclus);
177 unsigned int njhits = jhits.size();
178 assert(hits.size() >= nihits);
180 while (hits.size() > nihits)
182 assert(hits.size() == nihits);
183 hits.reserve(nihits + njhits);
192 std::vector<recob::SpacePoint> new_spts;
197 if (new_spts.size() > 0) {
206 int nspt = spts->size();
207 spts->insert(spts->end(), new_spts.begin(), new_spts.end());
212 for (
unsigned int ispt = nspt; ispt < spts->size(); ++ispt) {
225 sptvecs->push_back(sptvec);
231 for (
int kclus = 0; kclus < jclus; ++kclus) {
235 std::vector<art::Ptr<recob::Hit>> khits =
fm.at(kclus);
243 kview != iview && kview != jview) {
247 unsigned int nkhits = khits.size();
248 assert(hits.
size() >= nihits + njhits);
250 while (hits.
size() > nihits + njhits)
252 assert(hits.
size() == nihits + njhits);
253 hits.
reserve(nihits + njhits + nkhits);
261 std::vector<recob::SpacePoint> new_spts;
266 if (new_spts.size() > 0) {
276 int nspt = spts->size();
277 spts->insert(spts->end(), new_spts.begin(), new_spts.end());
282 for (
unsigned int ispt = nspt; ispt < spts->size(); ++ispt) {
295 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
std::string fClusterModuleLabel
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
void makeMCTruthSpacePoints(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) 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)
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