12 #include "cetlib_except/exception.h"
32 const art::Ptr<recob::Hit>&
hit,
33 const std::shared_ptr<const Surface>& psurf)
34 :
KHit(psurf), fHit(hit)
41 double t = hit->PeakTime();
42 double terr = hit->SigmaPeakTime();
47 if (terr < 1. / std::sqrt(12.)) terr = 1. / std::sqrt(12.);
59 if (psurf.get() == 0) {
60 std::shared_ptr<const Surface> new_psurf(
new SurfWireLine(wireid, x));
65 if (!check_surf.
isEqual(*psurf))
66 throw cet::exception(
"KHitWireLine") <<
"Measurement surface doesn't match hit.\n";
77 merr(0, 0) = xerr * xerr;
82 fID = (hit->Channel() % 200000) * 10000 + (
int(
std::abs(t)) % 10000);
98 art::ServiceHandle<geo::Geometry const> geom;
111 merr(0, 0) = xerr * xerr;
125 throw cet::exception(
"KHitWireLine")
126 <<
"Track surface not the same as measurement surface.\n";
131 pvec.resize(1,
false);
135 perr.resize(1,
false);
141 art::ServiceHandle<geo::Geometry const> geom;
142 double pitch = geom->WirePitch();
144 double cosphi = std::cos(phi);
145 double slopevar = pitch * pitch * cosphi * cosphi / 12.;
146 perr(0, 0) += slopevar;
150 hmatrix.resize(1, size,
false);
void setMeasSurface(const std::shared_ptr< const Surface > &psurf)
Measurement surface.
ublas::symmetric_matrix< double, ublas::lower, ublas::row_major, ublas::bounded_array< double, N *(N+1)/2 > > type
const TrackError & getError() const
Track error matrix.
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
const std::shared_ptr< const Surface > & getSurface() const
Surface.
process_name opflash particleana ie x
double GetXTicksCoefficient(int t, int c) const
CryostatID_t Cryostat
Index of cryostat.
std::size_t size(FixedBins< T, C > const &) noexcept
virtual bool isEqual(const Surface &surf) const
Test two surfaces for equality, within tolerance.
KMatrix< N, 5 >::type type
void setMeasVector(const typename KVector< N >::type &mvec)
Set measurement vector.
bool subpredict(const KETrack &tre, KVector< 1 >::type &pvec, KSymMatrix< 1 >::type &perr, KHMatrix< 1 >::type &hmatrix) const override
ublas::vector< double, ublas::bounded_array< double, N > > type
Linear surface defined by wire id and x coordinate.
void setMeasError(const typename KSymMatrix< N >::type &merr)
Set measurement error.
PlaneID_t Plane
Index of the plane within its TPC.
double ConvertTicksToX(double ticks, int p, int t, int c) const
const TrackVector & getVector() const
Track state vector.
Kalman filter wire-time measurement on a SurfWireLine surface.
KHitWireLine(const detinfo::DetectorPropertiesData &detProp, const art::Ptr< recob::Hit > &hit, const std::shared_ptr< const Surface > &psurf)
Constructor from Hit.
constexpr WireID()=default
Default constructor: an invalid TPC ID.
void setMeasPlane(int plane)
Measurement plane.
TPCID_t TPC
Index of the TPC within its cryostat.
art framework interface to geometry description
const std::shared_ptr< const Surface > & getMeasSurface() const
Measurement surface.