8 #include "art/Framework/Core/EDProducer.h"
9 #include "art/Framework/Core/ModuleMacros.h"
10 #include "art/Framework/Principal/Event.h"
11 #include "art/Framework/Principal/Handle.h"
12 #include "art/Framework/Services/Registry/ServiceHandle.h"
13 #include "fhiclcpp/ParameterSet.h"
43 std::vector<art::Ptr<recob::Hit>> hits1;
44 std::vector<art::Ptr<recob::Hit>> hits2;
45 std::vector<art::Ptr<recob::Hit>> hits3;
63 void produce(art::Event&
e)
override;
76 void Link(art::Event
const& e,
78 std::vector<ems::DirOfGamma*> input);
85 std::vector<ems::DirOfGamma*> pair);
88 std::vector<ems::DirOfGamma*> input,
103 std::vector<size_t>& used,
106 bool Has(
const std::vector<size_t>& v,
size_t idx);
110 std::vector<ems::DirOfGamma*> input,
117 std::vector<std::vector<art::Ptr<recob::Hit>>>
fClusters;
137 , fProjectionMatchingAlg(
p.get<fhicl::ParameterSet>(
"ProjectionMatchingAlg"))
138 , fCalorimetryAlg(
p.get<fhicl::ParameterSet>(
"CalorimetryAlg"))
140 fCluModuleLabel =
p.get<std::string>(
"ClustersModuleLabel");
141 fTrk3DModuleLabel =
p.get<std::string>(
"Trk3DModuleLabel");
143 produces<std::vector<recob::Track>>();
144 produces<std::vector<recob::Vertex>>();
145 produces<std::vector<recob::Cluster>>();
146 produces<std::vector<recob::SpacePoint>>();
147 produces<art::Assns<recob::Track, recob::Hit>>();
148 produces<art::Assns<recob::Track, recob::Vertex>>();
149 produces<art::Assns<recob::Cluster, recob::Hit>>();
150 produces<art::Assns<recob::Track, recob::SpacePoint>>();
151 produces<art::Assns<recob::SpacePoint, recob::Hit>>();
152 produces<art::Assns<recob::Track, recob::Cluster>>();
181 src[0]->WireID().planeID());
189 auto const* geom = lar::providerFrom<geo::Geometry>();
192 size_t nusedhitsmax = 0;
194 for (
unsigned int p = 0;
p < nplanes; ++
p) {
195 unsigned int nusedP = 0;
196 fProjectionMatchingAlg.selectInitialHits(src,
p, &nusedP);
198 if (nusedP > nusedhitsmax) {
199 nusedhitsmax = nusedP;
204 std::vector<std::vector<double>> vdedx;
205 std::vector<double> dedx;
207 for (
unsigned int p = 0;
p < nplanes; ++
p) {
208 unsigned int nusedP = 0;
209 double dqdxplane = fProjectionMatchingAlg.selectInitialHits(src,
p, &nusedP);
211 double dEdxplane = fCalorimetryAlg.dEdx_AREA(clock_data, detProp, dqdxplane, timeP,
p);
212 dedx.push_back(dEdxplane);
213 if (
int(
p) == bestplane)
217 vdedx.push_back(dedx);
220 std::vector<TVector3> xyz, dircos;
222 for (
size_t i = 0; i < src.
size(); i++) {
223 xyz.push_back(src[i]->
Point3D());
225 if (i < src.
size() - 1) {
226 TVector3 dc(src[i + 1]->
Point3D());
227 dc -= src[i]->Point3D();
228 dc *= 1.0 / dc.Mag();
229 dircos.push_back(dc);
232 dircos.push_back(dircos.back());
252 auto const* geom = lar::providerFrom<geo::Geometry>();
256 size_t nusedhitsmax = 0;
258 for (
unsigned int p = 0;
p < nplanes; ++
p) {
259 unsigned int nusedP = 0;
260 fProjectionMatchingAlg.selectInitialHits(src,
p, &nusedP);
262 if (nusedP > nusedhitsmax) {
263 nusedhitsmax = nusedP;
268 std::vector<std::vector<double>> vdedx;
269 std::vector<double> dedx;
271 for (
unsigned int p = 0;
p < nplanes; ++
p) {
272 unsigned int nusedP = 0;
273 double dqdxplane = fProjectionMatchingAlg.selectInitialHits(src,
p, &nusedP);
275 double dEdxplane = fCalorimetryAlg.dEdx_AREA(clockData, detProp, dqdxplane, timeP,
p);
276 dedx.push_back(dEdxplane);
277 if (
int(
p) == bestplane)
281 vdedx.push_back(dedx);
284 std::vector<TVector3> xyz, dircos;
286 for (
size_t i = 0; i < src.
size(); i++) {
287 xyz.push_back(src[i]->
Point3D());
289 if (i < src.
size() - 1) {
290 TVector3 dc(src[i + 1]->
Point3D());
291 dc -= src[i]->Point3D();
292 dc *= 1.0 / dc.Mag();
293 dircos.push_back(dc);
296 dircos.push_back(dircos.back());
314 art::ServiceHandle<geo::Geometry const> geom;
319 fClustersNotUsed.clear();
321 auto tracks = std::make_unique<std::vector<recob::Track>>();
322 auto vertices = std::make_unique<std::vector<recob::Vertex>>();
323 auto clusters = std::make_unique<std::vector<recob::Cluster>>();
324 auto allsp = std::make_unique<std::vector<recob::SpacePoint>>();
326 auto trk2hit = std::make_unique<art::Assns<recob::Track, recob::Hit>>();
327 auto trk2vtx = std::make_unique<art::Assns<recob::Track, recob::Vertex>>();
328 auto cl2hit = std::make_unique<art::Assns<recob::Cluster, recob::Hit>>();
329 auto trk2cl = std::make_unique<art::Assns<recob::Track, recob::Cluster>>();
330 auto trk2sp = std::make_unique<art::Assns<recob::Track, recob::SpacePoint>>();
331 auto sp2hit = std::make_unique<art::Assns<recob::SpacePoint, recob::Hit>>();
333 auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(e);
335 art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(e, clockData);
337 if (e.getByLabel(fCluModuleLabel, fCluListHandle)) {
338 fClustersNotUsed.clear();
340 art::FindManyP<recob::Hit> fb(fCluListHandle, e, fCluModuleLabel);
342 for (
size_t id = 0;
id < fCluListHandle->size();
id++) {
343 std::vector<art::Ptr<recob::Hit>> hitlist;
346 if (hitlist.size() > 5) fClustersNotUsed.push_back(
id);
349 std::vector<ems::DirOfGamma*> showernviews = CollectShower2D(
detProp, e);
351 Link(e,
detProp, showernviews);
353 while (fInisegs.size()) {
354 fSeltracks.push_back(fInisegs[0]);
355 fInisegs.erase(fInisegs.begin() + 0);
362 size_t spStart = 0, spEnd = 0;
363 double sp_pos[3], sp_err[6], vtx_pos[3];
364 for (
size_t i = 0; i < 6; i++)
369 for (
auto const trk : fSeltracks) {
370 tracks->push_back(ConvertFrom(clockData,
detProp, *(trk.track)));
372 vtx_pos[0] = trk.track->front()->Point3D().X();
373 vtx_pos[1] = trk.track->front()->Point3D().Y();
374 vtx_pos[2] = trk.track->front()->Point3D().Z();
375 vertices->emplace_back(vtx_pos, fTrkIndex);
379 std::vector<art::Ptr<recob::Cluster>> cl2d;
380 cl2d.emplace_back(fCluListHandle, trk.idcl1);
381 cl2d.emplace_back(fCluListHandle, trk.idcl2);
383 std::vector<art::Ptr<recob::Hit>> hits2d;
384 art::PtrVector<recob::Hit> sp_hits;
386 spStart = allsp->size();
387 for (
int h = trk.track->size() - 1;
h >= 0;
h--) {
391 if ((
h == 0) || (sp_pos[0] != h3d->
Point3D().X()) || (sp_pos[1] != h3d->
Point3D().Y()) ||
392 (sp_pos[2] != h3d->
Point3D().Z())) {
398 sp_pos[0] = h3d->
Point3D().X();
399 sp_pos[1] = h3d->
Point3D().Y();
400 sp_pos[2] = h3d->
Point3D().Z();
409 spEnd = allsp->size();
411 if (vertices->size()) {
412 size_t vtx_idx = (size_t)(vertices->size() - 1);
424 fIniIndex = fTrkIndex + 1;
425 for (
auto const trk : fPMA3D) {
426 tracks->push_back(ConvertFrom2(clockData,
detProp, *(trk.track)));
430 std::vector<art::Ptr<recob::Cluster>> cl2d;
431 cl2d.push_back(art::Ptr<recob::Cluster>(fCluListHandle, trk.idcl1));
432 cl2d.push_back(art::Ptr<recob::Cluster>(fCluListHandle, trk.idcl2));
434 std::vector<art::Ptr<recob::Hit>> hits2d;
435 art::PtrVector<recob::Hit> sp_hits;
437 spStart = allsp->size();
438 for (
int h = trk.track->size() - 1;
h >= 0;
h--) {
442 if ((
h == 0) || (sp_pos[0] != h3d->
Point3D().X()) || (sp_pos[1] != h3d->
Point3D().Y()) ||
443 (sp_pos[2] != h3d->
Point3D().Z())) {
449 sp_pos[0] = h3d->
Point3D().X();
450 sp_pos[1] = h3d->
Point3D().Y();
451 sp_pos[2] = h3d->
Point3D().Z();
460 spEnd = allsp->size();
472 for (
auto const& cl : fClusters)
474 clusters->push_back(ConvertFrom(cl));
480 for (
unsigned int i = 0; i < showernviews.size(); i++)
481 delete showernviews[i];
483 for (
unsigned int i = 0; i < fSeltracks.size(); i++)
484 delete fSeltracks[i].
track;
486 for (
unsigned int i = 0; i < fInisegs.size(); i++)
487 delete fInisegs[i].
track;
489 for (
unsigned int i = 0; i < fPMA3D.size(); i++)
490 delete fPMA3D[i].
track;
494 e.put(std::move(vertices));
495 e.put(std::move(clusters));
496 e.put(std::move(allsp));
498 e.put(std::move(trk2hit));
499 e.put(std::move(trk2vtx));
500 e.put(std::move(cl2hit));
501 e.put(std::move(trk2cl));
502 e.put(std::move(trk2sp));
503 e.put(std::move(sp2hit));
509 if (
empty(fSeltracks))
return;
510 const float min_dist = 3.0F;
512 while (ta < (fSeltracks.size() - 1)) {
515 while (tb < fSeltracks.size()) {
521 TVector3
p1 = fSeltracks[ta].track->front()->Point3D();
522 TVector3 p2 = fSeltracks[tb].track->front()->Point3D();
526 if ((fSeltracks[ta].idcl1 == fSeltracks[tb].idcl1) ||
527 (fSeltracks[ta].idcl1 == fSeltracks[tb].idcl2) ||
528 (fSeltracks[ta].idcl2 == fSeltracks[tb].idcl1) ||
529 (fSeltracks[ta].idcl2 == fSeltracks[tb].idcl2)) {
531 size_t view3 = fSeltracks[ta].view1;
532 size_t idcl3 = fSeltracks[ta].idcl1;
533 std::vector<art::Ptr<recob::Hit>> hits3 = fSeltracks[ta].hits1;
534 std::vector<art::Ptr<recob::Hit>> hits = fSeltracks[ta].hits1;
535 for (
size_t h = 0;
h < fSeltracks[ta].hits2.size(); ++
h)
536 hits.push_back(fSeltracks[ta].hits2[
h]);
538 if ((fSeltracks[tb].view1 != fSeltracks[ta].view1) &&
539 (fSeltracks[tb].view1 != fSeltracks[ta].view2)) {
540 view3 = fSeltracks[tb].view1;
541 for (
size_t h = 0; h < fSeltracks[tb].hits1.size(); ++
h)
542 hits.push_back(fSeltracks[tb].hits1[h]);
544 if ((fSeltracks[tb].view2 != fSeltracks[ta].view1) &&
545 (fSeltracks[tb].view2 != fSeltracks[ta].view2)) {
546 view3 = fSeltracks[tb].view2;
547 for (
size_t h = 0; h < fSeltracks[tb].hits2.size(); ++
h)
548 hits.push_back(fSeltracks[tb].hits2[h]);
551 if ((view3 == fSeltracks[ta].view1) || (view3 == fSeltracks[ta].view2)) {
552 delete fSeltracks[ta].track;
553 fSeltracks.erase(fSeltracks.begin() + ta);
563 initrack.idcl1 = fSeltracks[ta].idcl1;
564 initrack.idcl3 = idcl3;
565 initrack.view1 = fSeltracks[ta].view1;
566 initrack.view3 = view3;
567 initrack.hits1 = fSeltracks[ta].hits1;
568 initrack.hits3 = hits3;
569 initrack.idcl2 = fSeltracks[ta].idcl2;
570 initrack.view2 = fSeltracks[ta].view2;
571 initrack.hits2 = fSeltracks[ta].hits2;
572 initrack.track =
track;
574 delete fSeltracks[tb].track;
575 delete fSeltracks[ta].track;
576 fSeltracks.erase(fSeltracks.begin() + tb);
577 fSeltracks.erase(fSeltracks.begin() + ta);
578 fSeltracks.push_back(initrack);
590 std::vector<ems::DirOfGamma*>
594 std::vector<ems::DirOfGamma*> input;
596 if (e.getByLabel(fCluModuleLabel, fCluListHandle)) {
597 art::FindManyP<recob::Hit> fb(fCluListHandle, e, fCluModuleLabel);
598 for (
unsigned int c = 0; c < fCluListHandle->size(); c++) {
599 std::vector<art::Ptr<recob::Hit>> hitlist;
602 if (hitlist.size() > 5) {
603 std::vector<art::Ptr<recob::Hit>> hits_out;
604 FilterOutSmallParts(detProp, 2.0, hitlist, hits_out);
606 if (hits_out.size() > 5) {
607 fClusters.push_back(hits_out);
611 if (sh->
GetHits2D().size()) input.push_back(sh);
623 std::vector<ems::DirOfGamma*> input)
625 std::vector<std::vector<size_t>> saveids;
626 std::vector<size_t> saveidsnotusedcls;
629 while (i < input.size()) {
630 if (!input[i]->GetCandidates().size()) {
635 double mindist = 1.0;
636 std::vector<ems::DirOfGamma*> pairs;
638 size_t startview = input[i]->GetFirstHit()->WireID().Plane;
639 size_t tpc = input[i]->GetFirstHit()->WireID().TPC;
640 size_t cryo = input[i]->GetFirstHit()->WireID().Cryostat;
642 float t1 = detProp.
ConvertTicksToX(input[i]->GetFirstHit()->PeakTime(), startview, tpc, cryo);
644 unsigned int idsave = 0;
645 for (
unsigned int j = 0; j < input.size(); j++) {
646 if (!input[j]->GetCandidates().size())
continue;
648 size_t secondview = input[j]->GetFirstHit()->WireID().Plane;
649 size_t tpc_j = input[j]->GetFirstHit()->WireID().TPC;
650 size_t cryo_j = input[j]->GetFirstHit()->WireID().Cryostat;
652 if ((i != j) && (secondview != startview) && (tpc == tpc_j) && (cryo == cryo_j)) {
654 detProp.
ConvertTicksToX(input[j]->GetFirstHit()->PeakTime(), secondview, tpc_j, cryo_j);
655 float dist = fabs(t2 - t1);
657 if (dist < mindist) {
660 pairs.push_back(input[i]);
661 pairs.push_back(input[j]);
668 for (
unsigned int v = 0; v < saveids.size(); v++)
669 if ((saveids[v][0] == i) || (saveids[v][0] == idsave))
670 if ((saveids[v][1] == i) || (saveids[v][1] == idsave)) exist =
true;
673 if (!exist) Make3DSeg(e, detProp, pairs);
675 std::vector<size_t> ids;
677 ids.push_back(idsave);
678 saveids.push_back(ids);
681 saveidsnotusedcls.push_back(i);
688 while (i < saveidsnotusedcls.size()) {
689 LinkCandidates(e, detProp, input, i);
697 std::vector<ems::DirOfGamma*> input,
700 art::ServiceHandle<geo::Geometry const> geom;
705 if (input[
id]->GetCandidates().
size() < 2) {
return index; }
707 double mindist = 3.0;
708 std::vector<ems::DirOfGamma*> pairs;
714 while (c < input[
id]->GetCandidates().
size()) {
716 size_t startview = input[id]->GetCandidates()[c].GetPlane();
717 size_t tpc = input[id]->GetCandidates()[c].GetTPC();
718 size_t cryo = input[id]->GetCandidates()[c].GetCryo();
720 float t1 = input[id]->GetCandidates()[c].GetPosition().Y();
723 for (
size_t j = 0; j < input.size(); ++j) {
724 if (!input[j]->GetCandidates().size())
continue;
725 if (j ==
id)
continue;
728 for (
size_t cj = 0; cj < input[j]->GetCandidates().size(); ++cj) {
729 size_t secondview = input[j]->GetCandidates()[cj].GetPlane();
730 size_t tpc_j = input[j]->GetCandidates()[cj].GetTPC();
731 size_t cryo_j = input[j]->GetCandidates()[cj].GetCryo();
733 size_t thirdview = startview;
737 if ((
p == startview) || (
p == secondview)) {
continue; }
743 if ((startview != secondview) && (tpc == tpc_j) && (cryo == cryo_j)) {
744 float t2 = input[j]->GetCandidates()[cj].GetPosition().Y();
745 float dist = fabs(t2 - t1);
747 if ((dist < mindist) && Validate(detProp, input,
id, j, c, cj, thirdview)) {
750 pairs.push_back(input[
id]);
751 pairs.push_back(input[j]);
765 if (found && pairs.size()) {
766 input[id]->SetIdCandidate(idcsave);
767 input[idsave]->SetIdCandidate(idcjsave);
768 Make3DSeg(e, detProp, pairs);
777 std::vector<ems::DirOfGamma*> pair)
779 if (pair.size() < 2)
return;
782 size_t tpc1 = pair[0]->GetFirstHit()->WireID().TPC;
783 size_t tpc2 = pair[1]->GetFirstHit()->WireID().TPC;
785 std::vector<art::Ptr<recob::Hit>> vec1 = pair[0]->GetIniHits();
786 std::vector<art::Ptr<recob::Hit>> vec2 = pair[1]->GetIniHits();
788 if ((vec1.size() < 3) && (vec2.size() < 3))
return;
790 std::vector<art::Ptr<recob::Hit>> hitscl1uniquetpc;
791 std::vector<art::Ptr<recob::Hit>> hitscl2uniquetpc;
794 for (
size_t i = 0; i < vec1.size(); ++i)
795 for (
size_t j = 0; j < vec2.size(); ++j)
796 if ((vec1[i]->
WireID().
TPC == vec2[j]->
WireID().
TPC) && (tpc1 == vec2[j]->WireID().TPC)) {
797 hitscl1uniquetpc.push_back(vec1[i]);
798 hitscl2uniquetpc.push_back(vec2[j]);
801 if ((hitscl1uniquetpc.size() > 2) && (hitscl2uniquetpc.size() > 2)) {
803 fProjectionMatchingAlg.buildSegment(detProp, hitscl1uniquetpc, hitscl2uniquetpc);
806 if ((trk->
back()->
Hit2DPtr() == pair[0]->GetFirstHit()) ||
811 initrack.idcl1 = pair[0]->GetIdCl();
812 initrack.view1 = pair[0]->GetFirstHit()->WireID().Plane;
813 initrack.hits1 = hitscl1uniquetpc;
814 initrack.idcl2 = pair[1]->GetIdCl();
815 initrack.view2 = pair[1]->GetFirstHit()->WireID().Plane;
816 initrack.hits2 = hitscl2uniquetpc;
817 initrack.track = trk;
825 std::vector<ems::DirOfGamma*> input,
833 if (id1 == id2)
return false;
835 std::vector<art::Ptr<recob::Hit>> vec1 = input[id1]->GetCandidates()[c1].GetIniHits();
836 std::vector<art::Ptr<recob::Hit>> vec2 = input[id2]->GetCandidates()[c2].GetIniHits();
838 if ((vec1.size() < 3) || (vec2.size() < 3))
return false;
840 std::vector<art::Ptr<recob::Hit>> hitscl1uniquetpc;
841 std::vector<art::Ptr<recob::Hit>> hitscl2uniquetpc;
843 size_t tpc = vec1[0]->WireID().TPC;
844 for (
size_t i = 0; i < vec1.size(); ++i)
845 for (
size_t j = 0; j < vec2.size(); ++j)
846 if ((vec1[i]->
WireID().
TPC == tpc) && (vec2[j]->WireID().TPC == tpc)) {
847 hitscl1uniquetpc.push_back(vec1[i]);
848 hitscl2uniquetpc.push_back(vec2[j]);
851 if ((hitscl1uniquetpc.size() < 3) || (hitscl2uniquetpc.size() < 3))
return false;
854 fProjectionMatchingAlg.buildSegment(detProp, hitscl1uniquetpc, hitscl2uniquetpc);
855 for (
size_t i = 0; i < input.size(); ++i) {
856 std::vector<Hit2D*> hits2dcl = input[i]->GetHits2D();
857 for (
size_t h = 0;
h < hits2dcl.size(); ++
h) {
862 if ((
pma::Dist2(hits2dcl[
h]->GetPointCm(), pfront) < 1.0
F) &&
863 (
pma::Dist2(hits2dcl[
h]->GetPointCm(), pback) < 1.0F)) {
877 if (c == idx)
return true;
885 std::vector<size_t>& used,
891 const double gapMargin = 5.0;
894 while ((idx < hits_in.size()) && Has(used, idx))
897 if (idx < hits_in.size()) {
898 hits_out.push_back(hits_in[idx]);
901 double r2d2 = r2d * r2d;
902 double gapMargin2 = sqrt(2 * gapMargin * gapMargin);
903 gapMargin2 = (gapMargin2 + r2d) * (gapMargin2 + r2d);
908 for (
size_t i = 0; i < hits_in.size(); i++)
910 art::Ptr<recob::Hit> hi = hits_in[i];
916 hi->WireID().Cryostat);
920 for (
size_t idx_o = 0; idx_o < hits_out.size(); idx_o++) {
921 art::Ptr<recob::Hit> ho = hits_out[idx_o];
929 ho->WireID().Cryostat));
931 if (hi->WireID().TPC == ho->WireID().TPC) {
938 if (d2 < gapMargin2) {
946 hits_out.push_back(hi);
963 size_t min_size = hits_in.size() / 5;
964 if (min_size < 3) min_size = 3;
966 std::vector<size_t> used;
967 std::vector<art::Ptr<recob::Hit>> close_hits;
969 while (GetCloseHits(detProp, r2d, hits_in, used, close_hits)) {
970 if (close_hits.size() > min_size)
971 for (
auto h : close_hits)
972 hits_out.push_back(
h);
Utilities related to art service access.
ClusterModuleLabel join with tracks
unsigned int MaxPlanes() const
Returns the largest number of planes among the TPCs in this cryostat.
Implementation of the Projection Matching Algorithm.
double Dist2(const TVector2 &v1, const TVector2 &v2)
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 > > SMatrixSym55
std::vector< Vector_t > convertCollToVector(std::vector< Vector > const &coll)
Declaration of signal hit object.
pma::Hit3D const * front() const
std::vector< std::vector< art::Ptr< recob::Hit > > > fClusters
::fhicl::TupleAs< Point(::geo::Length_t,::geo::Length_t,::geo::Length_t)> Point3D
Atom object for reading a 3D point or vector (centimeters).
TrackTrajectory::Flags_t Flags_t
art::Handle< std::vector< recob::Cluster > > fCluListHandle
size_t LinkCandidates(art::Event const &e, detinfo::DetectorPropertiesData const &detProp, std::vector< ems::DirOfGamma * > input, size_t id)
TVector3 const & Point3D() const
std::size_t size(FixedBins< T, C > const &) noexcept
TVector2 WireDriftToCm(detinfo::DetectorPropertiesData const &detProp, unsigned int wire, float drift, unsigned int plane, unsigned int tpc, unsigned int cryo)
Set of hits with a 2D structure.
process_name use argoneut_mc_hitfinder track
Geometry information for a single cryostat.
unsigned int BackTPC() const
void FilterOutSmallParts(detinfo::DetectorPropertiesData const &detProp, double r2d, const std::vector< art::Ptr< recob::Hit >> &hits_in, std::vector< art::Ptr< recob::Hit >> &hits_out)
std::vector< IniSeg > fInisegs
bool Validate(detinfo::DetectorPropertiesData const &detProp, std::vector< ems::DirOfGamma * > input, size_t id1, size_t id2, size_t c1, size_t c2, size_t plane3)
unsigned int BackCryo() const
void produce(art::Event &e) override
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< Hit2D * > const & GetHits2D() const
EMShower3D(fhicl::ParameterSet const &p)
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
std::string fTrk3DModuleLabel
A trajectory in space reconstructed from hits.
void Make3DSeg(art::Event const &e, detinfo::DetectorPropertiesData const &detProp, std::vector< ems::DirOfGamma * > pair)
unsigned int TPC() const noexcept
double ConvertXToTicks(double X, int p, int t, int c) const
std::vector< Point_t > convertCollToPoint(std::vector< Point > const &coll)
unsigned int FrontTPC() const
unsigned int FrontCryo() const
Declaration of cluster object.
calo::CalorimetryAlg fCalorimetryAlg
std::vector< ems::DirOfGamma * > CollectShower2D(detinfo::DetectorPropertiesData const &detProp, art::Event const &e)
Provides recob::Track data product.
double ConvertTicksToX(double ticks, int p, int t, int c) const
void push_back(pma::Hit3D *hit)
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.
bool GetCloseHits(detinfo::DetectorPropertiesData const &detProp, double r2d, const std::vector< art::Ptr< recob::Hit >> &hits_in, std::vector< size_t > &used, std::vector< art::Ptr< recob::Hit >> &hits_out)
std::vector< IniSeg > fPMA3D
unsigned int Cryo() const noexcept
recob::Track ConvertFrom(detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop, pma::Track3D &src)
std::vector< size_t > fTracksNotUsed
Contains all timing reference information for the detector.
void Link(art::Event const &e, detinfo::DetectorPropertiesData const &detProp, std::vector< ems::DirOfGamma * > input)
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
pma::ProjectionMatchingAlg fProjectionMatchingAlg
recob::Track ConvertFrom2(detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop, pma::Track3D &src)
std::vector< size_t > fClustersNotUsed
TVector2 GetProjectionToPlane(const TVector3 &p, unsigned int plane, unsigned int tpc, unsigned int cryo)
pma::Hit3D const * back() const
art::Ptr< recob::Hit > const & Hit2DPtr() const
bool Has(const std::vector< size_t > &v, size_t idx)
std::vector< IniSeg > fSeltracks
TrackCollectionProxyElement< TrackCollProxy > Track
Proxy to an element of a proxy collection of recob::Track objects.
bool Flip(const detinfo::DetectorPropertiesData &detProp, std::vector< pma::Track3D * > &allTracks)
void Reoptimize(detinfo::DetectorPropertiesData const &detProp)
std::string fCluModuleLabel
bool empty(FixedBins< T, C > const &) noexcept
physics associatedGroupsWithLeft p1
EMShower3D & operator=(EMShower3D const &)=delete
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track: