490 constexpr
size_t nViews = 3;
493 std::array<std::vector<size_t>, nViews> ClsIndices;
496 std::array<std::vector<int>, nViews> Cls_matches;
499 for (
size_t i = 0; i < clusterVecHandle->size(); ++i) {
505 switch (
cl->View()) {
512 Cls_matches[view].push_back(0);
513 ClsIndices[view].push_back(i);
516 auto SuperClusters = std::make_unique<std::vector<recob::Cluster>>();
517 auto assn = std::make_unique<art::Assns<recob::Cluster, recob::Hit>>();
522 ClusterParamsImportWrapper<StandardClusterParamsAlg> ClusterParamAlgo;
526 for (
size_t i = 0; i < nViews; ++i) {
528 int clustersfound = 0;
531 for (
size_t c = 0;
c < ClsIndices[i].size(); ++
c) {
532 if (Cls_matches[i][clsnum1] == 1) {
540 recob::Cluster const& StartingCluster = clusterVecHandle->at(ClsIndices[i][
c]);
541 ClusterAndHitMerger cl1(StartingCluster, fmh.at(ClsIndices[i][c]));
544 Cls_matches[i][clsnum1] = 1;
548 for (
size_t c2 = 0; c2 < ClsIndices[i].size(); ++c2) {
550 if (Cls_matches[i][clsnum2] == 1) {
555 const recob::Cluster& cl2(clusterVecHandle->at(ClsIndices[i][c2]));
578 if (sameSlope && (sameEndpoint != 0)) {
583 cl1.Add(cl2, fmh.at(ClsIndices[i][c2]), sameEndpoint == 1);
584 Cls_matches[i][clsnum2] = 1;
592 ClusterParamAlgo.ImportHits(gser, cl1.Hits());
595 SuperClusters->emplace_back(cl1.StartWire(),
596 cl1.SigmaStartWire(),
598 cl1.SigmaStartTick(),
601 cl1.StartOpeningAngle(),
608 cl1.EndOpeningAngle(),
609 ClusterParamAlgo.Integral().value(),
610 ClusterParamAlgo.IntegralStdDev().value(),
611 ClusterParamAlgo.SummedADC().value(),
612 ClusterParamAlgo.SummedADCStdDev().value(),
613 ClusterParamAlgo.NHits(),
614 ClusterParamAlgo.MultipleHitDensity(),
630 for (
size_t i = 0; i < SuperClusters->size(); ++i)
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
int EndpointCompatibility(float sclstartwire, float sclstarttime, float sclendwire, float sclendtime, float cl2startwire, float cl2starttime, float cl2endwire, float cl2endtime)
Planes which measure Z direction.
Set of hits with a 2D structure.
static const SentryArgument_t Sentry
An instance of the sentry object.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
std::string fClusterModuleLabel
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.
Q_EXPORT QTSManip setw(int w)
ID_t ID() const
Identifier of this cluster.
bool SlopeCompatibility(double slope1, double slope2)
Q_EXPORT QTSManip setfill(int f)
int ID_t
Type of cluster ID.