31 #include "TPrincipal.h" 91 std::vector<recob::Seed> ReturnVector;
94 std::vector<recob::SpacePoint> spts;
101 return std::vector<recob::Seed>();
112 std::vector< std::vector< std::vector<int> > > OrgHits(3);
117 std::vector<std::vector<int> > SpacePointsPerHit(HitsFlat.
size(), std::vector<int>());
118 std::vector<std::vector<int> > HitsPerSpacePoint(spts.size(), std::vector<int>());
126 std::vector<char> HitStatus(HitsFlat.
size(),0);
131 for(
size_t i=0; i!=HitsFlat.
size(); ++i)
133 OrgHits[HitsFlat.
at(i)->View()][HitsFlat.
at(i)->Channel()].push_back(i);
139 for(
size_t iSP =0; iSP!=spts.size(); ++iSP)
143 for(
size_t iH = 0; iH != HitsThisSP.
size(); ++iH)
146 uint32_t ThisChannel = HitsThisSP.
at(iH)->Channel();
147 float ThisTime = HitsThisSP.
at(iH)->PeakTime();
151 for(
size_t iOrg = 0; iOrg!= OrgHits[ThisView][ThisChannel].size(); ++iOrg)
153 if(fabs(ThisTime - HitsFlat.
at( OrgHits[ThisView][ThisChannel][iOrg] )->PeakTime() ) < eta)
155 SpacePointsPerHit.at(OrgHits[ThisView][ThisChannel][iOrg]).push_back(iSP);
156 HitsPerSpacePoint.at(iSP).push_back(OrgHits[ThisView][ThisChannel][iOrg]);
176 std::vector<char> PointStatus(spts.size(),0);
178 std::vector<std::map<geo::View_t, std::vector<int> > > WhichHitsPerSeed;
181 bool KeepChopping =
true;
186 std::vector<int> PointsUsed;
197 for(
size_t iP=0; iP!=PointsUsed.size(); ++iP)
199 for(
size_t iH=0; iH!=HitsPerSpacePoint.at(PointsUsed.at(iP)).size(); ++iH)
201 int UsedHitID = HitsPerSpacePoint.at(PointsUsed.at(iP)).at(iH);
202 HitStatus[UsedHitID] = 2;
205 PointStatus[PointsUsed.at(0)] = 1;
214 std::vector<char> HitStatusGood;
216 for(
size_t r=0; r!=(
unsigned int)
fRefits; ++r)
221 HitStatusGood = HitStatus;
223 std::vector<int> PresentHitList;
224 for(
size_t iH=0; iH!=HitStatus.size(); ++iH)
228 PresentHitList.push_back(iH);
231 double pt[3],
dir[3], err[3];
238 std::vector<double> ViewRMS;
239 std::vector<int> HitsPerView;
242 Direction = Direction.Unit() * TheSeed.
GetLength();
244 int nViewsWithHits(0);
245 for(
size_t n=0;
n!=3; ++
n)
248 dir[
n] = Direction[
n];
253 if(HitsPerView[
n] > 0) nViewsWithHits++;
256 if (nViewsWithHits < 2) TheSeed.
SetValidity(
false);
267 HitStatus = HitStatusGood;
284 WhichHitsPerSeed.push_back(std::map<
geo::View_t, std::vector<int> >());
287 for(
size_t iH=0; iH!=HitStatus.size(); ++iH)
289 if(HitStatus.at(iH)==2)
291 WhichHitsPerSeed.at(WhichHitsPerSeed.size()-1)[HitsFlat[iH]->View()].push_back(iH);
295 for(
size_t iSP=0; iSP!=SpacePointsPerHit.at(iH).size(); ++iSP)
297 PointStatus[SpacePointsPerHit.at(iH).at(iSP)] = 1;
304 ReturnVector.push_back(TheSeed);
305 CataloguedHits.push_back(HitsWithThisSeed);
308 HitsWithThisSeed.
clear();
313 PointStatus.at(PointsUsed.at(0))=2;
317 for(
size_t i=0; i!=PointStatus.size(); ++i)
319 if(PointStatus[i]!=0) TotalSPsUsed++;
325 if((PointStatus[0]==3)||(PointStatus.size()==0)) KeepChopping=
false;
329 if( (ReturnVector.size()>=StopAfter)&&(StopAfter>0) )
break;
338 if(ReturnVector.size()==0)
340 std::vector<int> ListAllHits;
341 for(
size_t i=0; i!=HitsFlat.
size(); ++i)
343 ListAllHits.push_back(i);
346 TVector3 SeedCenter( 0, 0, 0 );
347 TVector3 SeedDirection( 0, 0, 0 );
349 std::vector<double> ViewRMS;
350 std::vector<int> HitsPerView;
352 std::vector<art::PtrVector<recob::Hit> > HitsInThisCollection(3);
356 bool ThrowOutSeed =
false;
358 double PtArray[3], DirArray[3];
359 int nViewsWithHits(0);
360 for(
size_t n=0;
n!=3; ++
n)
362 PtArray[
n] = SeedCenter[
n];
363 DirArray[
n] = SeedDirection[
n];
364 if(HitsPerView[
n] > 0) nViewsWithHits++;
368 if (nViewsWithHits < 2 || (nViewsWithHits < 3 && !
fAllow2DSeeds)) ThrowOutSeed =
true;
378 for(
size_t i=0; i!=HitStatus.size(); ++i)
380 if(HitStatus.at(i)==2)
381 ListAllHits.push_back(i);
383 std::vector<int> HitsPerView;
386 int nViewsWithHits(0);
387 for(
size_t n=0;
n!=3; ++
n)
389 PtArray[
n] = SeedCenter[
n];
390 DirArray[
n] = SeedDirection[
n];
392 if(HitsPerView[
n] > 0) nViewsWithHits++;
395 if (nViewsWithHits < 2 || (nViewsWithHits < 3 && !
fAllow2DSeeds)) ThrowOutSeed =
true;
411 if((!ThrowOutSeed)&&(TheSeed.
IsValid()))
413 ReturnVector.push_back(TheSeed);
415 for(
size_t i=0; i!=ListAllHits.size(); ++i)
417 HitsThisSeed.
push_back(HitsFlat.
at(ListAllHits.at(i)));
419 CataloguedHits.push_back(HitsThisSeed);
425 SpacePointsPerHit.clear();
426 HitsPerSpacePoint.clear();
431 for(
size_t i=0; i!=ReturnVector.size(); ++i)
433 double CrazyValue = 1000000;
434 double Length = ReturnVector.at(i).GetLength();
435 if(!((Length >
fLengthCut)&&(Length < CrazyValue)))
437 ReturnVector.erase(ReturnVector.begin()+i);
438 CataloguedHits.erase(CataloguedHits.begin()+i);
456 bool ThrowOutSeed =
false;
459 std::map<geo::View_t, std::map<uint32_t, std::vector<int> > > HitsInThisSeed;
463 double MinS = 1000, MaxS=-1000;
464 for(
size_t i=0; i!=HitStatus.size(); ++i)
466 if(HitStatus.at(i)==2)
481 HitsInThisSeed[HitsFlat.
at(i)->View()][HitsFlat.
at(i)->Channel()].push_back(i);
486 double LengthRescale = (MaxS - MinS)/2.;
487 double PositionShift = (MaxS + MinS)/2.;
489 double pt[3],
dir[3], err[3];
494 for(
size_t n=0;
n!=3; ++
n)
496 pt[
n] += dir[
n] * PositionShift;
497 dir[
n] *= LengthRescale;
505 for(
auto itP = HitsInThisSeed.begin(); itP!=HitsInThisSeed.end(); ++itP)
509 uint32_t LowestChan = itP->second.begin()->first;
510 uint32_t HighestChan = itP->second.rbegin()->first;
511 for(uint32_t c=LowestChan; c!=HighestChan; ++c)
513 for(
size_t h=0; h!=OrgHits[View][c].size(); ++h)
515 if(HitStatus[OrgHits[View][c].at(h)]==0)
522 HitStatus[OrgHits[View][c].at(h)]=2;
524 HitsInThisSeed[View][c].push_back(OrgHits[View][c].at(h));
526 else HitStatus[OrgHits[View][c].at(h)]=0;
532 if(NHitsThisSeed==0) ThrowOutSeed=
true;
537 uint32_t LowestChanInSeed[3], HighestChanInSeed[3];
538 double Occupancy[] = {0., 0., 0.};
539 int nHitsPerView[] = {0,0,0};
541 for(
auto itP = HitsInThisSeed.begin(); itP!=HitsInThisSeed.end(); ++itP)
546 LowestChanInSeed[View] = itP->second.begin()->first;
547 HighestChanInSeed[View] = itP->second.rbegin()->first;
549 nHitsPerView[View]++;
551 int FilledChanCount=0;
553 for(
size_t c = LowestChanInSeed[View]; c!=HighestChanInSeed[View]; ++c)
555 if(itP->second[c].size()>0) ++FilledChanCount;
558 Occupancy[View] = float(FilledChanCount) / float(HighestChanInSeed[View]-LowestChanInSeed[View]);
563 int nViewsWithHits(0);
564 for(
size_t n=0;
n!=3; ++
n)
567 if (nHitsPerView[
n] > 0) nViewsWithHits++;
574 if (nBelowCut > belowCut) ThrowOutSeed =
true;
576 if((Extend)&&(!ThrowOutSeed))
578 std::vector<std::vector<double> > ToAddNegativeS(3,std::vector<double>());
579 std::vector<std::vector<double> > ToAddPositiveS(3,std::vector<double>());
580 std::vector<std::vector<int> > ToAddNegativeH(3,std::vector<int>());
581 std::vector<std::vector<int> > ToAddPositiveH(3,std::vector<int>());
583 for(
auto itP = HitsInThisSeed.begin(); itP!=HitsInThisSeed.end(); ++itP)
589 if(LowestChanInSeed[View]>0)
591 for(uint32_t c=LowestChanInSeed[View]-1; c!=0; --c)
593 bool GotOneThisChannel=
false;
594 for(
size_t h=0; h!=OrgHits[View][c].size(); ++h)
596 if(HitStatus[OrgHits[View][c][h]]==0)
601 GotOneThisChannel=
true;
604 ToAddNegativeS[View].push_back(s);
605 ToAddNegativeH[View].push_back(OrgHits[View][c].at(h));
609 ToAddPositiveS[View].push_back(s);
610 ToAddPositiveH[View].push_back(OrgHits[View][c].at(h));
615 if(GotOneThisChannel==
false)
break;
622 for(uint32_t c=HighestChanInSeed[View]+1; c!=
fNChannels; ++c)
624 bool GotOneThisChannel=
false;
625 for(
size_t h=0; h!=OrgHits[View][c].size(); ++h)
627 if(HitStatus[OrgHits[View][c][h]]==0)
632 GotOneThisChannel=
true;
636 ToAddNegativeS[View].push_back(s);
637 ToAddNegativeH[View].push_back(OrgHits[View][c].at(h));
641 ToAddPositiveS[View].push_back(s);
642 ToAddPositiveH[View].push_back(OrgHits[View][c].at(h));
647 if(GotOneThisChannel==
false)
break;
652 double ExtendPositiveS=0, ExtendNegativeS=0;
654 if((ToAddPositiveS[0].size()>0)&&
655 (ToAddPositiveS[1].size()>0)&&
656 (ToAddPositiveS[2].size()>0))
658 for(
size_t n=0;
n!=3; ++
n)
663 if( (ToAddPositiveS[
n].back() <= ToAddPositiveS[n1].back()) &&
664 (ToAddPositiveS[
n].back() <= ToAddPositiveS[n2].back()) )
666 ExtendPositiveS = ToAddPositiveS[
n].back();
671 if((ToAddNegativeS[0].size()>0)&&
672 (ToAddNegativeS[1].size()>0)&&
673 (ToAddNegativeS[2].size()>0))
675 for(
size_t n=0;
n!=3; ++
n)
679 if( (ToAddNegativeS[
n].back() >= ToAddNegativeS[n1].back()) &&
680 (ToAddNegativeS[
n].back() >= ToAddNegativeS[n2].back()) )
682 ExtendNegativeS = ToAddNegativeS[
n].back();
687 if(fabs(ExtendNegativeS) < 1.) ExtendNegativeS=-1.;
688 if(fabs(ExtendPositiveS) < 1.) ExtendPositiveS=1.;
691 LengthRescale = (ExtendPositiveS - ExtendNegativeS)/2.;
692 PositionShift = (ExtendPositiveS + ExtendNegativeS)/2.;
694 for(
size_t n=0;
n!=3; ++
n)
696 pt[
n] += dir[
n] * PositionShift;
697 dir[
n] *= LengthRescale;
700 for(
size_t i=0; i!=ToAddPositiveS[
n].size(); ++i)
702 if(ToAddPositiveS[
n].at(i)<ExtendPositiveS)
703 HitStatus[ToAddPositiveH[
n].at(i)]=2;
705 HitStatus[ToAddPositiveH[
n].at(i)]=0;
708 for(
size_t i=0; i!=ToAddNegativeS[
n].size(); ++i)
710 if(ToAddNegativeS[
n].at(i)>ExtendNegativeS)
711 HitStatus[ToAddNegativeH[
n].at(i)]=2;
713 HitStatus[ToAddNegativeH[
n].at(i)]=0;
738 double xyzStart[3], xyzEnd[3];
747 double HitWidth = HitXHigh - HitXLow;
749 double pt[3],
dir[3], err[3];
756 TVector3 sPt (pt[0], pt[1], pt[2]);
757 TVector3 sDir (dir[0], dir[1], dir[2]);
758 TVector3 hPt (HitX, xyzStart[1], xyzStart[2]);
759 TVector3 hDir (0, xyzStart[1]-xyzEnd[1], xyzStart[2]-xyzEnd[2]);
761 s = (sPt - hPt).Dot(hDir*(hDir.Dot(sDir))-sDir*(hDir.Dot(hDir))) / (hDir.Dot(hDir)*sDir.Dot(sDir)-pow(hDir.Dot(sDir),2));
763 disp = fabs((sPt - hPt).Dot(sDir.Cross(hDir))/(sDir.Cross(hDir)).Mag()) / HitWidth;
776 std::vector<recob::SpacePoint> PointsUsed;
779 PointsInRange.clear();
782 TVector3 HighestZPoint;
783 bool NoPointFound=
true;
784 int counter = Points.size()-1;
785 while((NoPointFound==
true)&&(counter>=0))
787 if(PointStatus[counter]==0)
789 HighestZPoint = TVector3(Points.at(counter).XYZ()[0],
790 Points.at(counter).XYZ()[1],
791 Points.at(counter).XYZ()[2]);
810 for(
int index=Points.size()-1; index!=-1; --index)
812 if(PointStatus[index]==0)
816 if( ( HighestZPoint[2] - Points.at(index).XYZ()[2] ) < TwiceLength)
818 double DistanceToHighZ =pow(
819 pow(HighestZPoint[1]-Points.at(index).XYZ()[1],2) +
820 pow(HighestZPoint[2]-Points.at(index).XYZ()[2],2),0.5 );
821 if( DistanceToHighZ < TwiceLength)
823 PointsInRange.push_back(index);
824 PointsUsed.push_back(Points.at(index));
831 TVector3 SeedCenter( 0, 0, 0 );
832 TVector3 SeedDirection( 0, 0, 0 );
837 int NPoints = PointsInRange.size();
842 std::map<int, bool>
HitMap;
846 for(
unsigned int i=0; i!=PointsInRange.size(); i++)
848 std::vector<art::PtrVector<recob::Hit> > HitsInThisCollection(3);
852 itHit!=HitsThisSP.
end(); ++itHit)
854 uint32_t Channel = (*itHit)->Channel();
859 for(
size_t iH=0; iH!=OrgHits[View][Channel].size(); ++iH)
861 if( fabs( HitsFlat[OrgHits[View][Channel][iH]]->PeakTime() - (*itHit)->PeakTime() ) < eta)
863 HitMap[OrgHits[View][Channel][iH]]=
true;
870 for(
auto itH = HitMap.begin(); itH!=HitMap.end(); ++itH)
872 HitList.push_back(itH->first);
875 std::vector<double> ViewRMS;
876 std::vector<int> HitsPerView;
885 bool ThrowOutSeed =
false;
887 double PtArray[3], DirArray[3];
888 double AngleFactor = pow(pow(SeedDirection.Y(),2)+pow(SeedDirection.Z(),2),0.5)/SeedDirection.Mag();
890 int nViewsWithHits(0);
892 for(
size_t n=0;
n!=3; ++
n)
895 PtArray[
n] = SeedCenter[
n];
896 if(HitsPerView[
n] > 0) nViewsWithHits++;
899 if (nViewsWithHits < 2 || (nViewsWithHits < 3 && !
fAllow2DSeeds)) ThrowOutSeed =
true;
939 std::map<uint32_t, bool> HitsClaimed;
943 std::vector<std::vector<double> > HitTimes(3);
944 std::vector<std::vector<double> > HitWires(3);
945 std::vector<std::vector<double> > HitWidths(3);
946 std::vector<double> MeanWireCoord(3,0);
947 std::vector<double> MeanTimeCoord(3,0);
951 std::vector<double>
x(3,0),
y(3,0),
xx(3,0), xy(3,0), yy(3,0), sig(3,0);
953 for(
size_t i=0; i!=HitsToUse.size(); ++i)
955 auto itHit = HitsFlat.
begin()+HitsToUse[i];
959 auto const hitView = (*itHit)->View();
960 if( hitView ==
geo::kU) ViewIndex=0;
961 else if(hitView ==
geo::kV) ViewIndex=1;
962 else if(hitView ==
geo::kW) ViewIndex=2;
965 <<
"SpacePointAlg does not support view " 967 <<
" (#" << hitView <<
")\n";
969 double WireCoord = (*itHit)->WireID().Wire *
fPitches.at(ViewIndex);
970 double TimeCoord = det->
ConvertTicksToX((*itHit)->PeakTime(),ViewIndex,0,0);
971 double TimeUpper = det->
ConvertTicksToX((*itHit)->PeakTimePlusRMS(), ViewIndex,0,0);
972 double TimeLower = det->
ConvertTicksToX((*itHit)->PeakTimeMinusRMS(), ViewIndex,0,0);
973 double Width = fabs(0.5*(TimeUpper-TimeLower));
974 double Width2 = pow(Width,2);
976 HitWires.at(ViewIndex).push_back(WireCoord);
977 HitTimes.at(ViewIndex).push_back(TimeCoord);
978 HitWidths.at(ViewIndex).push_back(fabs(0.5*(TimeUpper-TimeLower)));
980 MeanWireCoord.at(ViewIndex) += WireCoord;
981 MeanTimeCoord.at(ViewIndex) += TimeCoord;
984 x.at(ViewIndex) += WireCoord / Width2;
985 y.at(ViewIndex) += TimeCoord / Width2;
986 xy.at(ViewIndex) += (TimeCoord * WireCoord) / Width2;
987 xx.at(ViewIndex) += (WireCoord * WireCoord) / Width2;
988 yy.at(ViewIndex) += (TimeCoord * TimeCoord) / Width2;
989 sig.at(ViewIndex) += 1./Width2;
995 std::vector<double> ViewGrad(3);
996 std::vector<double> ViewOffset(3);
999 for(
size_t n=0;
n!=3; ++
n)
1001 MeanWireCoord[
n] /= N[
n];
1002 MeanTimeCoord[
n] /= N[
n];
1004 double BigN=1000000;
1005 double SmallN=1./BigN;
1009 double Numerator = (
y[
n]/sig[
n] - xy[
n]/
x[
n]);
1010 double Denominator = (
x[
n]/sig[
n] -
xx[
n]/
x[
n]);
1011 if(fabs(Denominator) > SmallN)
1012 ViewGrad.at(
n) = Numerator/Denominator;
1013 else ViewGrad[
n] = BigN;
1016 else if(N[
n]==2) ViewGrad[
n] = xy[
n]/
xx[
n];
1017 else ViewGrad[
n] = BigN;
1020 ViewOffset.at(
n) = (
y[
n] - ViewGrad[
n]*
x[
n])/sig[
n];
1021 ViewRMS.at(
n) = pow((yy[
n]
1022 + pow(ViewGrad[
n],2) *
xx[n]
1023 + pow(ViewOffset[n], 2) * sig[n]
1024 - 2*ViewGrad[n]*xy[n]
1025 - 2*ViewOffset[n]*
y[n]
1026 + 2*ViewGrad[n]*ViewOffset[n]*
x[n]) / N[n],0.5);
1028 if(ViewGrad.at(n)!=0) ViewRMS[n] *= sin(atan(1./ViewGrad.at(n)));
1034 for(
size_t n=0;
n!=3; ++
n)
1036 size_t n1 = (
n+1)%3;
1037 size_t n2 = (
n+2)%3;
1038 if( (N[
n] <= N[n1]) &&
1046 if((N[n1]==0)||(N[n2]==0))
continue;
1059 double TimeCoord = 0.5 * (MeanTimeCoord[n1]+MeanTimeCoord[n2]);
1060 double WireCoordIn1 = (TimeCoord - ViewOffset[n1])/ViewGrad[n1] +
fWireZeroOffset[n1];
1061 double WireCoordIn2 = (TimeCoord - ViewOffset[n2])/ViewGrad[n2] +
fWireZeroOffset[n2];
1068 ViewRMS[
n] = -fabs(ViewRMS[
n]);
1069 ViewRMS[n1] = fabs(ViewRMS[n1]);
1070 ViewRMS[n2] = fabs(ViewRMS[n2]);
1097 fXDir = TVector3(1,0,0);
1098 fYDir = TVector3(0,1,0);
1099 fZDir = TVector3(0,0,1);
1105 double xyzStart1[3], xyzStart2[3];
1106 double xyzEnd1[3], xyzEnd2[3];
1109 for(
size_t n=0;
n!=3; ++
n)
1113 fWireDir[
n] = TVector3(xyzEnd1[0] - xyzStart1[0],
1114 xyzEnd1[1] - xyzStart1[1],
1115 xyzEnd1[2] - xyzStart1[2]).Unit();
1117 if(
fPitchDir[
n].Dot(TVector3(xyzEnd2[0] - xyzEnd1[0],
1118 xyzEnd2[1] - xyzEnd1[1],
1136 std::vector<recob::Seed> ReturnVec;
1138 ReturnVec =
FindSeeds( Hits, HitCatalogue, StopAfter);
1152 std::vector<std::vector<recob::Seed> > ReturnVec;
1158 mf::LogWarning(
"BezierTrackerModule")<<
"Warning: SpacePointAlg is does not have three views enabled. This may cause unexpected behaviour in the bezier tracker.";
1164 itU !=SortedHits.at(
geo::kU).end(); ++itU)
1166 itV !=SortedHits.at(
geo::kV).end(); ++itV)
1168 itW !=SortedHits.at(
geo::kW).end(); ++itW)
1173 for(
size_t i=0; i!=itU->size(); ++i)
1174 HitsThisComboFlat.
push_back(itU->at(i));
1177 for(
size_t i=0; i!=itV->size(); ++i)
1178 HitsThisComboFlat.
push_back(itV->at(i));
1181 for(
size_t i=0; i!=itW->size(); ++i)
1182 HitsThisComboFlat.
push_back(itW->at(i));
1184 std::vector<art::PtrVector<recob::Hit> > CataloguedHits;
1187 std::vector<recob::Seed> Seeds
1188 =
FindSeeds(HitsThisComboFlat, CataloguedHits, StopAfter);
1191 HitsPerSeed.push_back(CataloguedHits);
1192 ReturnVec.push_back(Seeds);
1195 CataloguedHits.clear();
1201 mf::LogWarning(
"SeedFinderTrackerModule")<<
" bailed during hit map lookup - have you enabled all 3 planes?";
1202 ReturnVec.push_back(std::vector<recob::Seed>());
std::vector< double > fPitches
SeedFinderAlgorithm(const fhicl::ParameterSet &pset)
static std::string ViewName(geo::View_t view)
Returns the name of the specified view.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
geo::WireID WireID() const
Initial tdc tick for hit.
Declaration of signal hit object.
void GetPoint(double *Pt, double *Err) const
void CalculateGeometricalElements()
recob::Seed FindSeedAtEnd(std::vector< recob::SpacePoint > const &, std::vector< char > &, std::vector< int > &, art::PtrVector< recob::Hit > const &HitsFlat, std::vector< std::vector< std::vector< int > > > &OrgHits)
void reconfigure(fhicl::ParameterSet const &pset)
WireID_t Wire
Index of the wire within its plane.
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
const art::PtrVector< recob::Hit > & getAssociatedHits(const recob::SpacePoint &spt) const
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< std::vector< recob::Seed > > GetSeedsFromSortedHits(std::vector< std::vector< art::PtrVector< recob::Hit > > > const &SortedHits, std::vector< std::vector< art::PtrVector< recob::Hit > > > &HitsPerSeed, unsigned int StopAfter=0)
Provides recob::Track data product.
void SetPoint(double *Pt, double *Err)
void push_back(Ptr< U > const &p)
void GetCenterAndDirection(art::PtrVector< recob::Hit > const &HitsFlat, std::vector< int > &HitsToUse, TVector3 &Center, TVector3 &Direction, std::vector< double > &ViewRMS, std::vector< int > &HitsPerView)
T get(std::string const &key) const
reference at(size_type n)
PlaneID_t Plane
Index of the plane within its TPC.
Declaration of cluster object.
float PeakTimeMinusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
data_t::const_iterator const_iterator
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
virtual double ConvertTicksToX(double ticks, int p, int t, int c) const =0
void makeSpacePoints(const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const
float PeakTime() const
Time of the signal peak, in tick units.
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
std::vector< recob::Seed > GetSeedsFromUnSortedHits(art::PtrVector< recob::Hit > const &, std::vector< art::PtrVector< recob::Hit > > &, unsigned int StopAfter=0)
std::vector< TVector3 > fWireDir
void ConsolidateSeed(recob::Seed &TheSeed, art::PtrVector< recob::Hit > const &, std::vector< char > &HitStatus, std::vector< std::vector< std::vector< int > > > &OrgHits, bool Extend)
std::vector< recob::Seed > FindSeeds(art::PtrVector< recob::Hit > const &HitsFlat, std::vector< art::PtrVector< recob::Hit > > &CataloguedHits, unsigned int StopAfter)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void WireEndPoints(geo::WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
std::vector< TVector3 > fPitchDir
void GetHitDistAndProj(recob::Seed const &ASeed, art::Ptr< recob::Hit > const &AHit, double &disp, double &s)
Planes which measure W (third view for Bo, MicroBooNE, etc).
float PeakTimePlusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
std::set< art::Ptr< recob::Hit > > HitList
void SetValidity(bool Validity)
void GetDirection(double *Dir, double *Err) const
std::map< int, art::Ptr< recob::Hit > > HitMap
std::vector< double > fWireZeroOffset
art framework interface to geometry description
Encapsulate the construction of a single detector plane.
void SetDirection(double *Dir, double *Err)
std::vector< double > fMaxViewRMS