22 #include "TPrincipal.h" 23 #include "TDatabasePDG.h" 37 #include "art_root_io/TFileService.h" 40 #include "canvas/Persistency/Common/FindManyP.h" 65 const double* xyz1 = h1->
XYZ();
66 const double* xyz2 = h2->
XYZ();
67 return xyz1[2] < xyz2[2];
71 const double* xyz1 = h1->
XYZ();
72 const double* xyz2 = h2->
XYZ();
73 return xyz1[1] < xyz2[1];
77 const double* xyz1 = h1->
XYZ();
78 const double* xyz2 = h2->
XYZ();
79 return xyz1[0] < xyz2[0];
84 const unsigned int s1 = h1.
size();
85 const unsigned int s2 = h2.
size();
104 void rotationCov(TMatrixT<Double_t> &cov,
const TVector3 &u,
const TVector3 &v);
215 fPosErr = pset.get< std::vector < double > >(
"PosErr3");
216 fMomErr = pset.get< std::vector < double > >(
"MomErr3");
217 fMomStart = pset.get< std::vector < double > >(
"MomStart3");
218 fPerpLim = pset.get<
double >(
"PerpLimit", 1.e6);
219 fDoFit = pset.get<
bool >(
"DoFit",
true);
220 fNumIt = pset.get<
int >(
"NumIt", 5);
222 fErrScaleS = pset.get<
double >(
"ErrScaleSim", 1.0);
223 fErrScaleM = pset.get<
double >(
"ErrScaleMeas", 1.0);
224 fDecimate = pset.get<
int >(
"DecimateC", 40);
225 fMaxUpdate = pset.get<
double >(
"MaxUpdateC", 0.1);
226 fDecimateU = pset.get<
int >(
"DecimateU", 100);
227 fDistanceU = pset.get<
double >(
"DistanceU", 10.0);
228 fMaxUpdateU = pset.get<
double >(
"MaxUpdateU", 0.02);
229 fMomLow = pset.get<
double >(
"MomLow", 0.01);
230 fMomHigh = pset.get<
double >(
"MomHigh", 20.);
231 fPdg = pset.get<
int >(
"PdgCode", -13);
232 fChi2Thresh = pset.get<
double >(
"Chi2HitThresh", 12.0E12);
234 fMaxPass = pset.get<
int >(
"MaxPass", 2);
236 if (pset.get_if_present(
"GenfPRINT", fGenfPRINT)) {
238 <<
"Parameter 'GenfPRINT' has been deprecated.\n" 239 "Please use the standard message facility to enable GenFit debug output.";
250 produces< std::vector<recob::Track> >();
251 produces<art::Assns<recob::Track, recob::Cluster> >();
252 produces<art::Assns<recob::Track, recob::SpacePoint> >();
253 produces<art::Assns<recob::Track, recob::Hit> >();
264 const double charge(1.0);
265 const double mEE(188.);
266 const double matZ(18.);
267 const double matA(40.);
268 const double matDensity(1.4);
269 const double me(0.000511);
271 double beta =
p/std::sqrt(mass*mass+
p*
p);
272 double gammaSquare = 1./(1.0 - beta*
beta);
274 double dedx = 0.307075*matDensity*matZ/matA/(beta*
beta)*charge*charge;
275 double massRatio = me/mass;
277 double argument = gammaSquare*beta*beta*me*1.E3*2./((1.E-6*mEE) * std::sqrt(1+2*std::sqrt(gammaSquare)*massRatio + massRatio*massRatio));
279 if (mass==0.0)
return(0.0);
280 if (argument <= exp(beta*beta))
285 dedx *= (log(argument)-beta*
beta);
287 if (dedx<0.) dedx = 0.;
294 TVector3 xhat(1.0,0.0,0.0);
295 TVector3 yhat(0.0,1.0,0.0);
296 TVector3 zhat(0.0,0.0,1.0);
297 TVector3
w(u.Cross(v));
299 TVector3 vprime(
w.Cross(xhat));
300 Double_t angle(v.Angle(vprime));
302 uprime.Rotate(angle,
w);
305 uprime.Rotate(TMath::Pi(),
w);
306 vprime.Rotate(TMath::Pi(),
w);
310 double c = TMath::Cos(angle),
s = TMath::Sin(angle);
311 TMatrixT<Double_t> rot(5,5);
334 std::vector <double> v;
338 double mindist(100.0);
339 auto spptminIt(sppt);
340 while (sppt != s.
end())
342 if (((**sppt).XYZ() -
loc).Mag() < mindist)
344 double dist = ((**sppt).XYZ() -
loc).Mag();
351 if (mindist < 0.01)
break;
361 std::vector< art::Ptr<recob::Hit> > hitlist = h.at(ind);
363 double wirePitch = 0.;
364 double angleToVert = 0;
370 ihit != hitlist.end(); ++ihit)
377 plane1 = hit1WireID.
Plane;
380 angleToVert = geom->
Plane(plane1).
Wire(0).
ThetaZ(
false) - 0.5*TMath::Pi();
383 double cosgamma = TMath::Abs(TMath::Sin(angleToVert)*dir.Y() +
384 TMath::Cos(angleToVert)*dir.Z());
388 v.push_back(charge/wirePitch/cosgamma);
402 stMCT =
new TMatrixT<Double_t>(5,1);
403 covMCT =
new TMatrixT<Double_t>(5,5);
404 stREC =
new TMatrixT<Double_t>(5,1);
405 covREC =
new TMatrixT<Double_t>(5,5);
409 fpREC =
new Float_t[4];
412 fCov0 =
new Float_t[25];
433 fPC1 =
new Float_t[3];
434 fPC2 =
new Float_t[3];
435 fPC3 =
new Float_t[3];
443 tree = tfs->make<TTree>(
"GENFITttree",
"GENFITttree");
448 tree->Branch(
"covMCT",
"TMatrixD",&covMCT,64000,0);
451 tree->Branch(
"covREC",
fCov0,
"covREC[25]/F");
456 tree->Branch(
"chi2",&
chi2,
"chi2/F");
458 tree->Branch(
"ndf",&
ndf,
"ndf/I");
459 tree->Branch(
"evtNo",&
evtt,
"evtNo/I");
466 tree->Branch(
"shx",
fshx,
"shx[ptsNo]/F");
467 tree->Branch(
"shy",
fshy,
"shy[ptsNo]/F");
468 tree->Branch(
"shz",
fshz,
"shz[ptsNo]/F");
469 tree->Branch(
"sep",
fsep,
"sep[ptsNo]/F");
470 tree->Branch(
"dQdx",
fdQdx,
"dQdx[ptsNo]/F");
471 tree->Branch(
"eshx",
feshx,
"eshx[ptsNo]/F");
472 tree->Branch(
"eshy",
feshy,
"eshy[ptsNo]/F");
473 tree->Branch(
"eshz",
feshz,
"eshz[ptsNo]/F");
474 tree->Branch(
"eshyz",
feshyz,
"eshyz[ptsNo]/F");
477 tree->Branch(
"th",
fth,
"th[ptsNo]/F");
478 tree->Branch(
"eth",
feth,
"eth[ptsNo]/F");
479 tree->Branch(
"edudw",
fedudw,
"edudw[ptsNo]/F");
480 tree->Branch(
"edvdw",
fedvdw,
"edvdw[ptsNo]/F");
481 tree->Branch(
"eu",
feu,
"eu[ptsNo]/F");
482 tree->Branch(
"ev",
fev,
"ev[ptsNo]/F");
488 tree->Branch(
"pcEvec1",
fPC1,
"pcEvec1[3]/F");
489 tree->Branch(
"pcEvec2",
fPC2,
"pcEvec2[3]/F");
490 tree->Branch(
"pcEvec3",
fPC3,
"pcEvec3[3]/F");
493 tree->Branch(
"pMCMom",fpMCMom,
"pMCMom[4]/F");
495 tree->Branch(
"pRECKalF",
fpREC,
"pRECKalF[4]/F");
496 tree->Branch(
"pRECKalL",
fpRECL,
"pRECKalL[4]/F");
565 std::unique_ptr<std::vector<recob::Track> > tcol(
new std::vector<recob::Track>);
569 unsigned int tcnt = 0;
595 for (
unsigned int ii = 0; ii < mctruthListHandle->size(); ++ii)
609 std::vector < art::PtrVector<recob::SpacePoint> > spptIn(spptListHandle->begin(),spptListHandle->end());
634 for(
unsigned int ii = 0; ii < mclist.
size(); ++ii )
641 MCOrigin.SetXYZ(part.Vx(),part.Vy(),part.Vz());
642 MCMomentum.SetXYZ(part.Px(),part.Py(),part.Pz());
644 <<
"FROM MC TRUTH, the particle's pdg code is: "<<part.PdgCode()<<
" with energy = "<<part.E() <<
", with energy = "<<part.E()
647 <<
"\n (both in Global (not volTPC) coords)";
663 MF_LOG_DEBUG(
"Track3DKalmanSPS_GenFit") <<
" repMC, covMC are ... \n" 669 TParticlePDG * part = TDatabasePDG::Instance()->GetParticle(
fPdg);
670 Double_t mass = part->Mass();
674 while (sppt!=spptIn.end())
684 unsigned int nTailPoints = 0;
685 if (spacepoints.
size()<5)
686 { sppt++; rePass0 = 3;
continue;}
689 <<
"\n\t found "<<spacepoints.
size()<<
" 3D spacepoint(s) for this element of std::vector<art:PtrVector> spacepoints. \n";
699 TPrincipal* principal =
new TPrincipal(3,
"ND");
710 for (
unsigned int point=0;point<spacepointss.
size();++point)
713 if (point<(spacepointss.
size()-nTailPoints))
715 principal->AddRow(spacepointss[point]->XYZ());
718 principal->MakePrincipals();
724 const TVectorD* evals = principal->GetEigenValues();
725 const TMatrixD* evecs = principal->GetEigenVectors();
726 const TVectorD* means = principal->GetMeanValues();
727 const TVectorD* sigmas = principal->GetSigmas();
738 Double_t
tmp[3], tmp2[3];
739 principal->X2P((Double_t *)(means->GetMatrixArray()),tmp);
740 principal->X2P((Double_t *)(sigmas->GetMatrixArray()),tmp2);
741 for (
unsigned int ii=0;ii<3;++ii)
745 fPCevals[ii] = (Float_t )(evals->GetMatrixArray())[ii];
750 evecs->ExtractRow(ii,0,w);
755 Double_t tmp3[3], tmp4[3], tmp5[3];
756 principal->X2P((Double_t *)
fPC1,tmp3);
757 principal->X2P((Double_t *)
fPC2,tmp4);
758 principal->X2P((Double_t *)
fPC3,tmp5);
763 fMomStart[0] = spacepointss[spacepointss.
size()-1]->XYZ()[0] - spacepointss[0]->XYZ()[0];
764 fMomStart[1] = spacepointss[spacepointss.
size()-1]->XYZ()[1] - spacepointss[0]->XYZ()[1];
765 fMomStart[2] = spacepointss[spacepointss.
size()-1]->XYZ()[2] - spacepointss[0]->XYZ()[2];
769 TVector3 mom(dEdx*
fMomStart[0],dEdx*fMomStart[1],dEdx*fMomStart[2]);
770 double pmag2 =
pow(mom.Mag()+mass, 2. - mass*mass);
771 mom.SetMag(std::sqrt(pmag2));
773 mom.SetMag(1.0 * mom.Mag());
781 bool uncontained(
false);
783 double epsMag(0.001);
788 spacepointss[spacepointss.
size()-1]->XYZ()[0] > (2.*geom->
DetHalfWidth(0,0)-
close) || spacepointss[spacepointss.
size()-1]->XYZ()[0] < close ||
789 spacepointss[0]->XYZ()[0] > (2.*geom->
DetHalfWidth(0,0)-
close) || spacepointss[0]->XYZ()[0] < close ||
792 spacepointss[spacepointss.
size()-1]->XYZ()[2] > (geom->
DetLength(0,0)-
close) || spacepointss[spacepointss.
size()-1]->XYZ()[2] < close ||
793 spacepointss[0]->XYZ()[2] > (geom->
DetLength(0,0)-
close) || spacepointss[0]->XYZ()[2] <
close 804 mom.SetMag(2.0 * mom.Mag());
805 MF_LOG_DEBUG(
"Track3DKalmanSPS_GenFit")<<
"Uncontained track ... ";
811 MF_LOG_DEBUG(
"Track3DKalmanSPS_GenFit")<<
"Contained track ... Run "<<evt.
run()<<
" Event "<<evt.
id().
event();
821 unsigned short rePass = rePass0;
823 unsigned short tcnt1(0);
824 while (rePass<=maxPass)
828 TVector3 momErrFit(momM[0]/3.0,
839 (TVector3)(spacepointss[0]->XYZ()),
854 std::vector <unsigned int> spptSurvivedIndex;
855 std::vector <unsigned int> spptSkippedIndex;
856 unsigned int ppoint(0);
857 for (
unsigned int point=0;point<spacepointss.
size();++point)
864 principal->X2P((Double_t *)(spacepointss[point]->XYZ()),tmp);
869 spptSkippedIndex.push_back(point);
874 TVector3 one(spacepointss[point]->XYZ());
875 TVector3 two(spacepointss[ppoint]->XYZ());
876 if (rePass==2 && uncontained)
880 fErrScaleMHere = 0.1;
888 else if (rePass==2 && !uncontained)
896 (one-two).Mag()<epsMag ||
897 ((one-two).Mag()>8.0&&rePass==1) ||
898 std::abs(spacepointss[point]->XYZ()[2]-spacepointss[ppoint]->XYZ()[2])<epsZ ||
899 std::abs(spacepointss[point]->XYZ()[0]-spacepointss[ppoint]->XYZ()[0])>epsX
905 spptSkippedIndex.push_back(point);
909 if (point%fDecimateHere && rePass<=1)
919 TVector3 spt3 = (TVector3)(spacepointss[point]->XYZ());
920 std::vector <double> err3;
921 err3.push_back(spacepointss[point]->ErrXYZ()[0]);
922 err3.push_back(spacepointss[point]->ErrXYZ()[2]);
923 err3.push_back(spacepointss[point]->ErrXYZ()[4]);
924 err3.push_back(spacepointss[point]->ErrXYZ()[5]);
940 fth[
fptsNo] = (pointer.Unit()).Angle(pointerPrev.Unit());
951 MF_LOG_DEBUG(
"Track3DKalmanSPS_GenFit") <<
"ihit xyz..." << spt3[0]<<
","<< spt3[1]<<
","<< spt3[2];
957 spptSurvivedIndex.push_back(point);
963 MF_LOG_DEBUG(
"Track3DKalmanSPS_GenFit") <<
"Bailing cuz only " <<
fptsNo <<
" spacepoints.";
967 MF_LOG_DEBUG(
"Track3DKalmanSPS_GenFit") <<
"Fitting on " <<
fptsNo <<
" spacepoints.";
980 bool skipFill =
false;
982 std::vector < TMatrixT<double> > hitMeasCov;
983 std::vector < TMatrixT<double> > hitUpdate;
984 std::vector < TMatrixT<double> > hitCov;
985 std::vector < TMatrixT<double> > hitCov7x7;
986 std::vector < TMatrixT<double> > hitState;
987 std::vector < double > hitChi2;
988 std::vector <TVector3> hitPlaneXYZ;
989 std::vector <TVector3> hitPlaneUxUyUz;
990 std::vector <TVector3> hitPlaneU;
991 std::vector <TVector3> hitPlaneV;
1000 MF_LOG_ERROR(
"Track3DKalmanSPS") <<
"just caught a cet::exception: " << e.what()
1001 <<
"\nExceptions won't be further handled; skip filling big chunks of the TTree.";
1010 std::ostringstream dbgmsg;
1011 dbgmsg <<
"Original plane:";
1012 planeG.
Print(dbgmsg);
1014 dbgmsg <<
"Current (fit) reference Plane:";
1017 dbgmsg <<
"Last reference Plane:";
1021 dbgmsg <<
" => original hit plane (not surprisingly) not current reference Plane!";
1023 MF_LOG_DEBUG(
"Track3DKalmanSPS_GenFit") << dbgmsg.str();
1037 unsigned int totHits = hitState.size();
1041 unsigned int jhit=0;
1042 for (
unsigned int ihit=totHits-2*totHits/(2*
fNumIt); ihit<(totHits-totHits/(2*
fNumIt)); ihit++)
1044 feth[jhit] = (Float_t ) (hitMeasCov.at(ihit)[0][0]);
1045 fedudw[jhit] = (Float_t ) (hitMeasCov.at(ihit)[1][1]);
1046 fedvdw[jhit] = (Float_t ) (hitMeasCov.at(ihit)[2][2]);
1047 feu[jhit] = (Float_t ) (hitMeasCov.at(ihit)[3][3]);
1048 fev[jhit] = (Float_t ) (hitMeasCov.at(ihit)[4][4]);
1049 fupdate[jhit] = (Float_t ) (hitUpdate.at(ihit)[0][0]);
1050 fchi2hit[jhit] = (Float_t ) (hitChi2.at(ihit));
1060 for (
unsigned int ii=0;ii<5;ii++)
1062 stREC->ExtractRow(ii,0,dum);
1064 covREC->ExtractRow(ii,0,dum2);
1065 for (
unsigned int jj=0;jj<5;jj++)
1067 fCov0[ii*5+jj] = dum2[jj];
1081 MF_LOG_DEBUG(
"Track3DKalmanSPS_GenFit") <<
"Track3DKalmanSPS about to do tree->Fill(). Chi2/ndf is " <<
chi2/
ndf <<
".";
1082 fpMCMom[3] = MCMomentum.Mag();
1083 for (
int ii=0;ii<3;++ii)
1087 fpREC[ii] = hitPlaneUxUyUz.at(totHits-2*totHits/(2*
fNumIt))[ii];
1088 fpRECL[ii] = hitPlaneUxUyUz.at(totHits-totHits/(2*
fNumIt)-1)[ii];
1095 std::vector < std::vector <double> > dQdx;
1097 std::vector < TMatrixT<double> > hitCovLFP;
1098 std::vector <TVector3> hitPlaneXYZLFP;
1099 std::vector <TVector3> hitPlaneUxUyUzLFP;
1100 std::vector <TVector3> hitPlanePxPyPzLFP;
1101 std::vector <TVector3> hitPlaneULFP;
1102 std::vector <TVector3> hitPlaneVLFP;
1103 std::vector <double> pLFP;
1104 std::vector < TMatrixT<double> > c7x7LFP;
1107 for (
unsigned int ii=0; ii<totHits/(2*
fNumIt); ii++)
1109 pLFP.push_back(1./hitState.at(totHits-2*totHits/(2*
fNumIt)+ii)[0][0]);
1111 c7x7LFP.push_back(hitCov7x7.at(totHits-2*totHits/(2*
fNumIt)+ii));
1112 hitCovLFP.push_back(hitCov.at(totHits-2*totHits/(2*
fNumIt)+ii));
1113 hitPlaneXYZLFP.push_back(hitPlaneXYZ.at(totHits-2*totHits/(2*
fNumIt)+ii));
1114 hitPlaneUxUyUzLFP.push_back(hitPlaneUxUyUz.at(totHits-2*totHits/(2*
fNumIt)+ii));
1115 hitPlanePxPyPzLFP.push_back(hitPlaneUxUyUzLFP.back()*pLFP.back());
1116 hitPlaneULFP.push_back(hitPlaneU.at(totHits-2*totHits/(2*
fNumIt)+ii));
1117 hitPlaneVLFP.push_back(hitPlaneV.at(totHits-2*totHits/(2*
fNumIt)+ii));
1124 hitPlaneULFP.back(),
1129 hitPlaneUxUyUzLFP.back(),
1130 hitPlaneXYZLFP.back()
1133 fdQdx[ii] = dQdx.back().back();
1144 for (
unsigned int i=0; i<5; i++) {
1145 for (
unsigned int j=i; j<5; j++) {
1146 covVtx(i,j) = hitCovLFP.front()(i,j);
1147 covEnd(i,j) = hitCovLFP.back()(i,j);
1153 0, -1., 0, covVtx, covEnd, tcnt++);
1154 if (rePass==1) tcnt1++;
1155 if (rePass!=1 && tcnt1) tcol->pop_back();
1156 tcol->push_back(the3DTrack);
1159 for (
unsigned int ii=0; ii < spacepointss.
size(); ++ii)
1163 hits.
insert(hits.
end(),hitAssns.at(ii).begin(),hitAssns.at(ii).end());
1175 for (
unsigned int ind=0;ind<spptSurvivedIndex.size();++ind)
1179 (!uncontained&&
fchi2hit[ind]>1.e9) ||
1193 for (
unsigned int ind=0;ind<spptSkippedIndex.size();++ind)
1200 std::stable_sort(spacepointss.
begin(),spacepointss.
end());
1201 std::stable_sort(spacepointssExcise.
begin(),spacepointssExcise.
end());
1202 std::set_union(spacepointssExcise.
begin(),spacepointssExcise.
end(),
1203 spacepointssExcise.
begin(),spacepointssExcise.
end(),
1204 spacepointssExcise.
begin()
1208 std::set_difference(spacepointss.
begin(),spacepointss.
end(),
1209 spacepointssExcise.
begin(),spacepointssExcise.
end(),
1210 spacepointss.
begin()
1212 spacepointss.
erase(diffSpptIt,spacepointss.
end());
1225 if (uncontained) kick = 0.5;
1226 for (
int ii=0;ii<3;++ii)
1229 mom[ii] = momM[ii]*kick;
1232 else if (uncontained)
1236 for (
int ii=0;ii<3;++ii)
1238 mom[ii] = momM[ii]*unstick;
1242 for (
int ii=0;ii<3;++ii)
1244 mom[ii] = 1.1*momM[ii];
TMatrixT< Double_t > * stREC
unsigned int getNDF() const
std::vector< double > fMomErr
void setMomLow(Double_t f)
std::vector< TVector3 > getHitPlaneUxUyUz()
void setMaxUpdate(Double_t f)
std::vector< TMatrixT< Double_t > > getHitUpdate()
geo::SigType_t SignalType() const
Signal type for the plane of the hit.
TMatrixT< Double_t > * stMCT
static bool sp_sort_3dz(const art::Ptr< recob::SpacePoint > &h1, const art::Ptr< recob::SpacePoint > &h2)
typename data_t::iterator iterator
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
double beta(double KE, const simb::MCParticle *part)
geo::Length_t DetHalfWidth(geo::TPCID const &tpcid) const
Returns the half width of the active volume of the specified TPC.
const GFDetPlane & getReferencePlane() const
std::string fG4ModuleLabel
GFDetPlane getLastPlane() const
void rotationCov(TMatrixT< Double_t > &cov, const TVector3 &u, const TVector3 &v)
WireGeo const & Wire(unsigned int iwire) const
creation of calibrated signals on wires
std::vector< TMatrixT< Double_t > > getHitState()
ROOT::Math::SMatrix< Double32_t, 5, 5, ROOT::Math::MatRepSym< Double32_t, 5 > > SMatrixSym55
std::vector< Vector_t > convertCollToVector(std::vector< Vector > const &coll)
geo::WireID WireID() const
EDProducer(fhicl::ParameterSet const &pset)
genf::GFAbsTrackRep * rep
void setMomHigh(Double_t f)
iterator erase(iterator position)
TrackTrajectory::Flags_t Flags_t
std::string fGenieGenModuleLabel
#define MF_LOG_ERROR(category)
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
std::vector< double > fPosErr
void Print(std::ostream &out=std::cout) const
const TMatrixT< Double_t > & getState() const
std::vector< TVector3 > getHitPlaneXYZ()
std::vector< TMatrixT< Double_t > > getHitCov()
std::string fSpptModuleLabel
static bool sp_sort_3dy(const art::Ptr< recob::SpacePoint > &h1, const art::Ptr< recob::SpacePoint > &h2)
std::string fClusterModuleLabel
void produce(art::Event &evt)
double ThetaZ() const
Returns angle of wire with respect to z axis in the Y-Z plane in radians.
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
art framework interface to geometry description
Base Class for genfit track representations. Defines interface for track parameterizations.
int close(int)
Closes the file descriptor fd.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
double dEdx(float dqdx, float Efield)
typename data_t::const_iterator const_iterator
geo::Length_t DetHalfHeight(geo::TPCID const &tpcid) const
Returns the half height of the active volume of the specified TPC.
std::vector< double > fMomStart
#define DEFINE_ART_MODULE(klass)
std::vector< TVector3 > getHitPlaneV()
void push_back(Ptr< U > const &p)
virtual TVector3 getMom(const GFDetPlane &pl)=0
std::vector< Double_t > getHitChi2()
static bool sp_sort_3dx(const art::Ptr< recob::SpacePoint > &h1, const art::Ptr< recob::SpacePoint > &h2)
A trajectory in space reconstructed from hits.
enum geo::_plane_sigtype SigType_t
void setBlowUpFactor(double f)
Set the blowup factor (see blowUpCovs() )
static bool sp_sort_nsppts(const art::PtrVector< recob::SpacePoint > &h1, const art::PtrVector< recob::SpacePoint > &h2)
double energyLossBetheBloch(const double &mass, const double p)
void setNumIterations(Int_t i)
Set number of iterations for Kalman Filter.
int getFailedHits(int repId=-1)
return the number of failed Hits in track fit repId == -1 will use cardinal rep
TMatrixT< Double_t > * covREC
void processTrack(GFTrack *)
Performs fit on a GFTrack.
geo::Length_t DetLength(geo::TPCID const &tpcid) const
Returns the length of the active volume of the specified TPC.
static GFFieldManager * getInstance()
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
TMatrixT< Double_t > * covMCT
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.
std::vector< Point_t > convertCollToPoint(std::vector< Point > const &coll)
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
PlaneID_t Plane
Index of the plane within its TPC.
const TMatrixT< Double_t > & getCov() const
std::vector< TVector3 > getHitPlaneU()
std::string ROOTobjectToString(const ROOTOBJ &obj)
Shortcut to write one ROOT object into a string.
Encapsulate the geometry of a wire.
std::vector< TMatrixT< Double_t > > getHitCov7x7()
const simb::MCParticle & GetParticle(int i) const
iterator insert(iterator position, Ptr< U > const &p)
Declaration of signal hit object.
std::vector< double > dQdxCalc(const art::FindManyP< recob::Hit > &h, const art::PtrVector< recob::SpacePoint > &s, const TVector3 &p, const TVector3 &d)
Encapsulate the construction of a single detector plane.
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
genf::GFAbsTrackRep * repMC
void setInitialDirection(int d)
Sets the inital direction of the track fit (1 for inner to outer, or -1 for outer to inner)...
Provides recob::Track data product.
const Double32_t * XYZ() const
void init(GFAbsBField *b)
set the magntic field here. Magnetic field classes must be derived from GFAbsBField ...
EventNumber_t event() const
void setErrorScaleSTh(Double_t f)
2D representation of charge deposited in the TDC/wire plane
void addHit(GFAbsRecoHit *theHit)
deprecated!
Track3DKalmanSPS(fhicl::ParameterSet const &pset)
#define MF_LOG_WARNING(category)
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
void setErrorScaleMTh(Double_t f)
cet::coded_exception< error, detail::translate > exception
std::vector< TMatrixT< Double_t > > getHitMeasuredCov()
std::string GetLArTPCVolumeName(geo::TPCID const &tpcid) const
Return the name of specified LAr TPC volume.
Signal from collection planes.