23 #include "Utilities/AssociationUtil.h" 32 namespace bpfit {
class BreakPoint; }
90 fDebugHitList0 = p.
get<
bool>(
"DebugHitList0");
91 fDebugHitList1 = p.
get<
bool>(
"DebugHitList1");
92 fDebugScatSurf = p.
get<
bool>(
"DebugScatSurf");
93 fDebugFitList0 = p.
get<
bool>(
"DebugFitList0");
94 fDebugFitList1 = p.
get<
bool>(
"DebugFitList1");
95 fLogResiduals = p.
get<
bool>(
"LogResiduals");
96 fFillTrackNt = p.
get<
bool>(
"FillTrackNt");
97 fFillExceptNt = p.
get<
bool>(
"FillExceptNt");
98 fVerbose = p.
get<
bool>(
"Verbose");
100 fExtendUp = p.
get<
double>(
"ExtendUp");
101 fExtendDn = p.
get<
double>(
"ExtendDn");
102 fFitAsMuon = p.
get<
bool>(
"FitAsMuon");
103 fFitAsPion = p.
get<
bool>(
"FitAsPion");
104 fFitAsProton = p.
get<
bool>(
"FitAsProton");
106 if(fFitAsMuon) fPartList.push_back(13);
107 if(fFitAsPion) fPartList.push_back(211);
108 if(fFitAsProton) fPartList.push_back(2212);
114 fNhitX = p.
get<
unsigned int>(
"NhitX");
115 fNhitY = p.
get<
unsigned int>(
"NhitY");
116 fNhit = p.
get<
unsigned int>(
"Nhit");
117 fChi2Cutoff = p.
get<
double>(
"Chi2Cutoff");
118 fdStol = p.
get<
double>(
"dStol");
119 fdXtol = p.
get<
double>(
"dXtol");
120 fdTtol = p.
get<
double>(
"dTtol");
121 fSigAdj = p.
get<
double>(
"SigmaAdjust");
122 fMaxSliceHits = p.
get<
unsigned int>(
"MaxSliceHits");
142 produces< std::vector<rb::Track> >();
143 produces< std::vector<rb::FitSum> >();
144 produces< art::Assns<rb::Track, rb::Prong> >();
145 produces< art::Assns<rb::Track, rb::Cluster> >();
146 produces< art::Assns<rb::FitSum, rb::Track> >();
162 for (i=0; i<
h->size(); ++
i) {
175 if (prongh.isValid()) {
176 prongp = prongh.at(islice);
183 if (prongh2.isValid()) {
184 if (prongh2.size()==1) {
185 prongp = prongh2.at(0);
189 <<
" Multiple vertices breaks our assumptions." 200 if (t->
Is2D())
return false;
202 unsigned int nx = t->
NXCell();
203 unsigned int ny = t->
NYCell();
204 if (nx<fNhitX || ny<fNhitY)
return false;
205 if (nx+ny<fNhit)
return false;
217 unsigned int n = prongp->
NCell();
223 for (itr=0; itr<2; ++itr) {
224 for (i=0; i<
n; ++
i) {
228 unsigned int ic = h->
Cell();
233 double xyz[3] = {0,0,0};;
234 double sigx=0, sigy=0, sigz=0, sigt=50;
264 sigx = hits[
i].fSigX;
265 sigy = hits[
i].fSigY;
266 sigz = hits[
i].fSigZ;
267 sigt = hits[
i].fSigT;
273 sigx, sigy, sigz, sigt,
w);
278 sigx, sigy, sigz, sigt,
w);
288 for (i=0; i<hits.size(); ++
i) {
315 for(
unsigned int i=0;
i<h.size();
i++){
320 unsigned int i_xhits[384], i_yhits[384];
326 for(
unsigned int j=
i+1;
j<h.size();
j++){
329 if((
fabs(h[
i].fZ-h[
j].fZ)<0.1)){
330 if(h[
i].fView == h[
j].fView){
333 if(n_xhits==0) i_xhits[n_xhits] =
i;
334 else i_xhits[n_xhits] =
j;
339 if(n_yhits==0) i_yhits[n_yhits] =
i;
340 else i_yhits[n_yhits] =
j;
349 if(n_xhits>0 && n_xhits<10){
351 for(
int xi=0; xi<n_xhits; xi++){
352 sumx += h[i_xhits[xi]].fX;
353 sigx2 += h[i_xhits[xi]].fSigX*h[i_xhits[xi]].fSigX;
358 if(xi!=0)h[i_xhits[xi]].fW = 1.0E-9;
360 double xave = sumx/n_xhits;
363 h.
SetHit(i_xhits[0], h[i_xhits[0]].fView, xave, h[i_xhits[0]].fY, h[i_xhits[0]].fZ,
364 h[i_xhits[0]].fT,
sqrt(sigx2), h[i_xhits[0]].fSigY,
365 h[i_xhits[0]].fSigZ, h[i_xhits[0]].fSigT, h[i_xhits[0]].fW);
368 if(n_yhits>0 && n_yhits<10){
370 for(
int yi=0; yi<n_yhits; yi++){
371 sumy += h[i_yhits[yi]].fY;
372 sigy2 += h[i_yhits[yi]].fSigY*h[i_yhits[yi]].fSigY;
376 if(yi!=0) h[i_yhits[yi]].fW = 1.0E-9;
378 double yave = sumy/n_yhits;
381 h.
SetHit(i_yhits[0], h[i_yhits[0]].fView, h[i_yhits[0]].fX, yave, h[i_yhits[0]].fZ,
382 h[i_yhits[0]].fT, h[i_yhits[0]].fSigX,
sqrt(sigy2),
383 h[i_yhits[0]].fSigZ, h[i_yhits[0]].fSigT, h[i_yhits[0]].fW);
405 if (fHitList0Nt==0) {
407 fHitList0Nt = tfs->
make<TNtuple>(
"hits0",
408 "Det Frame Hit List Debugging",
409 "run:subrun:evt:trk:v:x:y:z:sx:sy:sz:slice");
414 if (fHitList1Nt==0) {
416 fHitList1Nt = tfs->
make<TNtuple>(
"hits1",
417 "Trk Frame Hit List Debugging",
418 "run:subrun:evt:trk:v:x:y:z:sx:sy:sz:slice");
428 for (
unsigned int i=0;
i<h.size(); ++
i) {
450 fTrackNt = tfs->
make<TNtuple>(
"trks",
452 "run:subrun:evt:slice:trk:" 453 "nhitx:nhity:x0:y0:z0:x1:y1:z1:length:p:" 455 "chi2xh:chi2xa:chi2yh:chi2ya:pdgID");
458 unsigned int nhitx = 0, nhity = 0;
459 for (i=0; i<h.size(); ++
i) {
460 if (h[i].fView==
geo::kX && h[i].fW > 1.0
E-9) ++nhitx;
461 if (h[i].fView==
geo::kY && h[i].fW > 1.0
E-9) ++nhity;
466 if (pdg_id == 13) path.
MuonParams(0, 0, &p, 0, 0);
467 else if (pdg_id == 211) path.
PionParams(0, 0, &p, 0, 0);
468 else if (pdg_id == 2212) path.
ProtonParams(0, 0, &p, 0, 0);
473 double dx = path.
fXYZ[1].X() - path.
fXYZ[0].X();
474 double dy = path.
fXYZ[1].Y() - path.
fXYZ[0].Y();
475 double dz = path.
fXYZ[1].Z() - path.
fXYZ[0].Z();
476 if (dz==0.0) dz = 1.0E-9;
509 if (fExceptNt == 0) {
511 fExceptNt = tfs->
make<TNtuple>(
"except",
513 "run:subrun:evt:slice:prong:flag:value");
538 std::vector<double>
x(hits.size());
539 std::vector<double>
y(hits.size());
540 std::vector<double>
z(hits.size());
541 std::vector<double>
dx(hits.size());
542 std::vector<double>
dy(hits.size());
543 std::vector<double>
dz(hits.size());
545 for (i=0; i<hits.size(); ++
i) {
549 dx[
i] = hits[
i].fSigX;
550 dy[
i] = hits[
i].fSigY;
551 dz[
i] = hits[
i].fSigZ;
568 if (p[2]<0) p[2] = 0;
581 for (i=0; i<h.size(); ++
i) {
582 if (h[i].fZ<zmin) zmin = h[
i].fZ;
583 if (h[i].fZ>zmax) zmax = h[
i].fZ;
585 p0[0] = 0.0; p0[1] = 0.0; p0[2] = zmin;
586 p1[0] = 0.0; p1[1] = 0.0; p1[2] =
zmax;
591 &p0[0], &p0[1], &p0[2], &dx, &dy, &dz);
593 &p1[0], &p1[1], &p1[2], &dx, &dy, &dz);
602 if (fScatSurfNt==0) {
604 fScatSurfNt = tfs->
make<TNtuple>(
"scat",
605 "Scattering Surfaces",
606 "run:subrun:evt:trk:s:sigalpha:pdgid:slice");
614 for (
unsigned int i=0;
i<s.
N(); ++
i) {
618 fScatSurfNt->Fill(x);
625 const std::vector<double>&
x,
626 const std::vector<double>&
y,
627 const std::vector<double>&
z)
631 if (fFitList0Nt==0) {
633 fFitList0Nt = tfs->
make<TNtuple>(
"fit0",
634 "fitted track - det. frame",
635 "run:subrun:evt:trk:x:y:z:slice");
640 if (fFitList1Nt==0) {
642 fFitList1Nt = tfs->
make<TNtuple>(
"fit1",
643 "fitted track - track frame",
644 "run:subrun:evt:trk:x:y:z:slice");
656 for (i=0; i<z.size(); ++
i) {
690 fResidNt = tfs->
make<TNtuple>(
"resid",
692 "run:subrun:evt:trk:m:sig:fit:w:pdgid:zs:slice");
702 for (i=0; i<hit.size(); ++
i) {
705 v[6] = xfit.
X(hit[i].fZ);
707 if (hit[i].fView==
geo::kX) v[7] = 0;
708 if (hit[i].fView==
geo::kY) v[7] = 1;
713 v[6] = yfit.
X(hit[i].fZ);
715 if (hit[i].fView==
geo::kY) v[7] = 2;
716 if (hit[i].fView==
geo::kX) v[7] = 3;
719 for (i=0; i<scat.
N(); ++
i) {
741 std::vector<rb::Track>& tracks,
742 std::vector<rb::FitSum>& fitsums)
750 std::vector<double>
s(hits1.size());
758 std::set<unsigned int> Xplanes;
759 std::set<unsigned int> Yplanes;
760 for(
unsigned int p = 0;
p < prongp->
NCell(); ++
p) {
765 if(Xplanes.size() == 1 && Yplanes.size() == 1) {
768 if(Xplanes.size() == 1) {
771 if(Yplanes.size() == 1) {
791 for(i=0; i<hits0.size(); ++
i){
792 hits1.SetHit(i,hits0[i].fView, hits0[i].fX, hits0[i].fY, hits0[i].fZ, hits0[i].fT,
793 hits0[i].fSigX, hits0[i].fSigY, hits0[i].fSigZ, hits0[i].fSigT,
804 for (i=0; i<hits0.size(); ++
i) {
805 sys.
DetToTrk(hits0[i].fX, hits0[i].fY, hits0[i].fZ,
806 hits0[i].fSigX, hits0[i].fSigY, hits0[i].fSigZ,
807 &hits1[i].fX, &hits1[i].fY, &hits1[i].fZ,
808 &hits1[i].fSigX, &hits1[i].fSigY, &hits1[i].fSigZ);
819 for (i=0; i<hits1.size(); ++
i) {
825 if(fVerbose) Ex.
Print();
834 for(
unsigned int t = 0;
t < fPartList.size(); ++
t) {
851 if (fDebugScatSurf) this->
DebugScatSurf(scat_surf, fPartList[t]);
855 for (i=0; i<hits1.size(); ++
i) {
856 lutzx.
SetMeasurement(i, hits1[i].fZ, hits1[i].fX, hits1[i].fSigX);
857 lutzy.SetMeasurement(i, hits1[i].fZ, hits1[i].fY, hits1[i].fSigY);
859 for (j=0; j<scat_surf.
N(); ++
j) {
860 lutzx.SetScatteringPlane(j, scat_surf.
S(j), scat_surf.
SigAlpha(j));
861 lutzy.SetScatteringPlane(j, scat_surf.
S(j), scat_surf.
SigAlpha(j));
863 double alphax[scat_surf.
N()];
864 double alphay[scat_surf.
N()];
865 lutzx.Fit(0, 0, alphax, 0);
866 lutzy.Fit(0, 0, alphay, 0);
870 double chix, chiy, chim, fac;
871 for (i=0; i<hits1.size(); ++
i) {
872 chix = lutzx.Chi2XIi(i);
873 chiy = lutzy.Chi2XIi(i);
874 chim = (chix>chiy) ? chix : chiy;
876 if (chim>fChi2Cutoff) {
877 hits1[
i].fW = 1.0E-9;
878 hits1[
i].fSigX *= fac;
879 hits1[
i].fSigY *= fac;
880 hits1[
i].fSigZ *= fac;
887 hits1.CompleteOrtho();
888 for (i=0; i<hits1.size(); ++
i) {
889 lutzx.SetMeasurement(i, hits1[i].fZ, hits1[i].fX, hits1[i].fSigX);
890 lutzy.SetMeasurement(i, hits1[i].fZ, hits1[i].fY, hits1[i].fSigY);
892 lutzx.Fit(0, 0, alphax, 0);
893 lutzy.Fit(0, 0, alphay, 0);
900 std::vector<double> xfit(scat_surf.
N()+2);
901 std::vector<double> yfit(scat_surf.
N()+2);
902 std::vector<double> zfit(scat_surf.
N()+2);
903 zfit[0] = hits1[0].fZ;
904 for (j=0; j<scat_surf.
N(); ++
j) {
905 zfit[1+
j] = scat_surf.
S(j);
907 zfit[1+
j] = hits1[hits1.size()-1].fZ;
908 for (j=0; j<zfit.size(); ++
j) {
909 xfit[
j] = lutzx.X(zfit[j]);
910 yfit[
j] = lutzy.X(zfit[j]);
913 if (fDebugFitList1) this->
DebugFitList(1, xfit, yfit, zfit);
915 this->
LogResiduals(hits1, scat_surf, lutzx, lutzy, alphax, alphay, fPartList[t]);
921 std::vector<double> xfit_det;
922 std::vector<double> yfit_det;
923 std::vector<double> zfit_det;
924 double xyz[3],
dx,
dy,
dz;
926 for (j=0; j<zfit.size(); ++
j) {
927 sys.
TrkToDet(xfit[j], yfit[j], zfit[j], 0, 0, 0,
928 &xyz[0], &xyz[1], &xyz[2], &dx, &dy, &dz);
931 xfit_det.push_back(xyz[0]);
932 yfit_det.push_back(xyz[1]);
933 zfit_det.push_back(xyz[2]);
940 if (fDebugFitList0) this->
DebugFitList(1, xfit, yfit, zfit);
947 if (fFillTrackNt) this->
FillTrackNt(hits1, lutzx, lutzy, path, fPartList[t]);
954 for (i=1; i<path.
fXYZ.size(); ++
i) {
959 unsigned int nhitx = 0, nhity = 0;
960 for (
unsigned int i=0; i<hits1.size(); ++
i) {
961 if (hits1[i].fView==
geo::kX && hits1[i].fW > 1.0
E-9) ++nhitx;
962 if (hits1[i].fView==
geo::kY && hits1[i].fW > 1.0
E-9) ++nhity;
969 if (nhitx < 1 || nhity < 1 || (nhitx+nhity) <= 4) {
976 if(fPartList[t] == 13) {
980 if(fPartList[t] == 211) {
984 if(fPartList[t] == 2212) {
991 fitsum.
SetPDG(fPartList[t]);
992 fitsum.
SetChi2(lutzx.Chi2XI(),lutzy.Chi2XI(),
993 lutzx.Chi2Beta(),lutzy.Chi2Beta(),
994 nhitx, nhity, scat_surf.
N(), scat_surf.
N());
996 tracks.push_back(track);
997 fitsums.push_back(fitsum);
1001 if(fVerbose) Ex.
Print();
1017 std::unique_ptr<std::vector<rb::Track> >
1018 trackcol(
new std::vector<rb::Track>);
1019 std::unique_ptr<std::vector<rb::FitSum> >
1020 fitcol(
new std::vector<rb::FitSum>);
1021 std::unique_ptr< art::Assns<rb::Track, rb::Prong> >
1023 std::unique_ptr< art::Assns<rb::Track, rb::Cluster> >
1025 std::unique_ptr< art::Assns<rb::FitSum, rb::Track> >
1040 prongh(sliceh, evt,
art::InputTag(fClusterLabel,fClusterInstance));
1041 if (!vertexh.isValid()) {
1045 unsigned int islice;
1046 for (islice=0; islice<slicep.
size(); ++islice) {
1052 if (slicep[islice]->IsNoise())
continue;
1064 std::vector< art::Ptr<rb::Vertex> > vertexp;
1065 vertexp = vertexh.at(islice);
1066 if (vertexp.size()!=1)
continue;
1071 std::vector< art::Ptr<rb::Prong> > prongp;
1072 this->
FindProngs(evt, islice, prongh, vertexp, prongp);
1073 if (prongp.size()==0)
continue;
1079 unsigned int nprong_good = 0;
1080 for (fProng=0; fProng<prongp.size(); ++
fProng) {
1085 if (!this->
GoodProng(prongp[fProng]))
continue;
1091 std::vector<rb::Track> tracks;
1092 std::vector<rb::FitSum> fitsums;
1094 this->
FitTracks(vertexp[0], prongp[fProng], tracks, fitsums);
1097 assert(tracks.size() == fitsums.size());
1098 for(
unsigned int t = 0;
t < tracks.size(); ++
t) {
1099 trackcol->push_back(tracks[
t]);
1100 fitcol->push_back(fitsums[t]);
1109 evt.
put(std::move(trackcol));
1110 evt.
put(std::move(fitcol));
1111 evt.
put(std::move(trkPrngAssns));
1112 evt.
put(std::move(trkSlcAssns));
1113 evt.
put(std::move(fitTrkAssns));
std::string fClusterInstance
Which instance of clusters to find.
SubRunNumber_t subRun() const
static bool CreateAssn(art::EDProducer const &prod, art::Event &evt, std::vector< T > &a, art::Ptr< U > b, art::Assns< T, U > &assn, size_t indx=UINT_MAX, std::string const &instance=std::string())
Create a 1 to 1 association between a new product and one already in the event.
virtual void SetStart(TVector3 start)
double fSigAdj
Multiplier to adjust sigmaXYZ for hits (see comment in the FillHitList function.) Set to 1...
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
void MakeBasis(const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z, const std::vector< double > &dx, const std::vector< double > &dy, const std::vector< double > &dz, double vx, double vy, double vz)
void GetCenter(double *xyz, double localz=0.0) const
double fdStol
Scattering surface ds tolerance.
double Length() const
Return the total path length.
fvar< T > fabs(const fvar< T > &x)
TVector3 Dir(double s=0.0)
Return the direction of the track after it has travelled a distance s.
void SetMeasurement(unsigned int i, double z, double x, double sigx)
Add measurements.
unsigned int fMaxSliceHits
Don't bother processing a slice if it has more than this many hits. This is to prevent computing prob...
void FillTrackNt(const HitList3D &h, const Lutz &lx, const Lutz &ly, const Path &path, int pdg_id)
unsigned int fNhitY
Require prongs to have this many y hits.
double fdTtol
Scattering surface dt tolerance.
unsigned short Plane() const
bool fFillTrackNt
Fill ntuple of tracking results?
Construct scattering surfaces for Lutz.
unsigned int fNhitX
Require prongs to have this many x hits.
double fExtendDn
Fractionally, how far to extend track into downstream dead material.
bool GoodProng(art::Ptr< rb::Prong > &t)
Vertical planes which measure X.
void AdjustEndPoint(double f)
Adjust the track end point to account for dead material beyond the end point.
"Break-point" track fitter
void ProtonParams(double s, double *T=0, double *p=0, double *beta=0, double *gamma=0) const
A rb::Prong with full reconstructed trajectory.
const PlaneGeo * Plane(unsigned int i) const
std::string fClusterLabel
Where to find clusters in event.
DEFINE_ART_MODULE(TestTMapFile)
bool fFitAsPion
Fit tracks under the assumption of a pion?
const art::ProductToken< std::vector< rb::Cluster > > fSliceToken
void DebugFitList(unsigned int which, const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z)
double X(double z) const
After fit, best-fit x location of track at location z.
Horizontal planes which measure Y.
void FindProngs(art::Event &evt, unsigned int islice, art::FindManyP< rb::Prong > &prongh, std::vector< art::Ptr< rb::Vertex > > &vertexp, std::vector< art::Ptr< rb::Prong > > &prongp)
bool fDebugFitList0
Debug the fitted track locations (det. frame)
std::vector< TVector3 > fXYZ
x/y/z points along the path
unsigned int N() const
The number of scattering planes constructed.
ProductID put(std::unique_ptr< PROD > &&product)
unsigned short Cell() const
void MakeSurfaces(const geo::GeometryBase &geo, const double *p0, const double *p1, const std::vector< double > &s)
Build scattering surfaces.
View_t View() const
Which coordinate does this plane measure.
void FindSlices(const art::Event &evt, art::Handle< std::vector< rb::Cluster > > &h, art::PtrVector< rb::Cluster > &s)
void CompleteOrtho(Interp3D interp=0)
Break-point track fitter.
void AdjustStartPoint(double f)
void PionParams(double s, double *T=0, double *p=0, double *beta=0, double *gamma=0) const
void push_back(Ptr< U > const &p)
void FillHitList(art::Ptr< rb::Prong > &prongp, bpfit::HitList3D &hits)
Track parameters (s, X0, KE, beta, ...) along a particular path in the detector.
void ClampToDetector(double *p)
bool fFitAsMuon
Fit tracks under the assumption of a muon?
virtual void SetDir(TVector3 dir)
void AppendTrajectoryPoint(TVector3 pt)
T get(std::string const &key) const
Geometry information for a single readout plane.
Contain 3D hit information by extrapolating ortho view coordinate from surrounding points in the orth...
std::vector< int > fPartList
List of particle types (by pdg code) to be used for track fits.
double fExtendUp
Fractionally, how far to extend track into upstream dead material.
const unsigned int kNPLANES
too few planes in one (or both) views
double fChi2Cutoff
Drop hits with this chi2 or greater.
void AverageXY(bpfit::HitList3D &h)
double DetHalfHeight() const
void DetToTrk(double x, double y, double z, double dx, double dy, double dz, double *x1, double *y1, double *z1, double *dx1, double *dy1, double *dz1)
Vertex location in position and time.
Perform a "2 point" Hough transform on a collection of hits.
bool fDebugScatSurf
Debug the scattering surfaces.
void SetChi2(double chi2_hit1, double chi2_hit2, double chi2_angle1, double chi2_angle2, int Ndof_hit1, int Ndof_hit2, int Ndof_angle1, int Ndof_angle2)
Construct a set of scattering surfaces for Lutz.
void MuonParams(double s, double *T=0, double *p=0, double *beta=0, double *gamma=0) const
Return the estimated muon parameters at path length s.
void FitTracks(art::Ptr< rb::Vertex > &vertexp, art::Ptr< rb::Prong > &prongp, std::vector< rb::Track > &tracks, std::vector< rb::FitSum > &fitsums)
void FillExceptNt(BPException Ex)
const unsigned int kBAD_NDOF
too few hits used to make the track
void MakeBasis(art::Ptr< rb::Vertex > &vtx, const HitList3D &hits, bpfit::TrackBasis &sys)
unsigned int NYCell() const
Number of cells in the y-view.
EventNumber_t event() const
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
void DebugScatSurf(bpfit::ScatteringSurfaces &s, int pdgid)
A rawdata::RawDigit with channel information decoded.
bool fLogResiduals
Make ntuple of residuals?
T * make(ARGS...args) const
unsigned int fNhit
Require this many hits total.
double DetHalfWidth() const
void produce(art::Event &evt)
void reconfigure(fhicl::ParameterSet const &p)
unsigned int fFlag
Exception code thrown.
unsigned int NXCell() const
Number of cells in the x-view.
Construct a track-based (x,y,z) coordinate system.
void TrkToDet(double x, double y, double z, double dx, double dy, double dz, double *x1, double *y1, double *z1, double *dx1, double *dy1, double *dz1)
double fValue
(optional) Value of bad variable that caused the exception.
bool fVerbose
Run in verbose mode (print messages about all exceptions?)
assert(nhit_max >=nhit_nbins)
BreakPoint(fhicl::ParameterSet const &p)
bool fFitAsProton
Fit tracks under the assumption of a proton?
void SetKin(TVector3 dir, double momentum, double mass)
void SetPoint(unsigned int i, const double *xyz)
Add a space point to the path.
std::string fVertexLabel
Where to find vertices in event.
unsigned int Scrub(double eps=0.01)
Remove points from the trajectory that have negligible distances between them.
bool getByToken(ProductToken< PROD > const &token, Handle< PROD > &result) const
bool fDebugHitList1
Debug the track-frame hit list?
void LogResiduals(bpfit::HitList3D &hit, bpfit::ScatteringSurfaces &scat, bpfit::Lutz &xfit, bpfit::Lutz &yfit, double *alphax, double *alphay, float pdgid)
Encapsulate the cell geometry.
Essential 3D information for tracking.
ProductToken< T > consumes(InputTag const &)
bool fDebugFitList1
Debug the fitted track locations (track frame)
bool fFillExceptNt
Fill ntuple of exception cases?
Encapsulate the geometry of one entire detector (near, far, ndos)
void FindEndPoints(HitList3D &h, bpfit::TrackBasis &sys, double *p0, double *p1)
bool fDebugHitList0
Debug the detector-frame hit list?
double SigAlpha(unsigned int i) const
The predicted RMS scattering angle at plane i.
void SetHit(unsigned int i, geo::View_t, double x, double y, double z, double t, double sig_x, double sig_y, double sig_z, double sig_t, double w=1.0)
double S(unsigned int i) const
The location of the ith scattering plane.
A container for kinematic information.
double fdXtol
Scattering surface dx tolerance.
void DebugHitList(bpfit::HitList3D &h, int which)