13 #include "cetlib_except/exception.h" 72 auto const* larprop = lar::providerFrom<detinfo::LArPropertiesService>();
78 throw cet::exception(
"InteractPlane") <<
"InteractPlane called for non-planar surface.\n";
90 double mass = trk.
Mass();
94 if (pinv == 0. || s == 0.)
return true;
100 double e2 = p2 + mass * mass;
101 double e = std::sqrt(e2);
104 double range = t / dedx;
105 if (range > 100.) range = 100.;
115 double betainv = std::sqrt(1. + pinv * pinv * mass * mass);
116 double theta_fact = (0.0136 * pinv * betainv) * (1. + 0.038 * std::log(range / x0));
117 double theta02 = theta_fact * theta_fact *
std::abs(s / x0);
121 double ufact2 = 1. + dudw * dudw;
122 double vfact2 = 1. + dvdw * dvdw;
123 double uvfact2 = 1. + dudw * dudw + dvdw * dvdw;
124 double uvfact = std::sqrt(uvfact2);
125 double uv = dudw * dvdw;
126 double dist2_3 = s * s / 3.;
133 double pinvvar = evar * e2 / (p2 * p2 * p2);
139 noise_matrix(0, 0) = dist2_3 * theta02 * ufact2;
140 noise_matrix(1, 0) = dist2_3 * theta02 * uv;
141 noise_matrix(1, 1) = dist2_3 * theta02 * vfact2;
145 noise_matrix(2, 2) = theta02 * uvfact2 * ufact2;
146 noise_matrix(3, 2) = theta02 * uvfact2 * uv;
147 noise_matrix(3, 3) = theta02 * uvfact2 * vfact2;
151 noise_matrix(2, 0) = dist_2 * theta02 * uvfact * ufact2;
152 noise_matrix(3, 1) = dist_2 * theta02 * uvfact * vfact2;
156 noise_matrix(2, 1) = dist_2 * theta02 * uvfact * uv;
157 noise_matrix(3, 0) = dist_2 * theta02 * uvfact * uv;
161 noise_matrix(4, 0) = 0.;
162 noise_matrix(4, 1) = 0.;
163 noise_matrix(4, 2) = 0.;
164 noise_matrix(4, 3) = 0.;
168 noise_matrix(4, 4) = pinvvar;
detinfo::DetectorPropertiesData const & fDetProp
double ElossVar(double mom, double mass) const
Energy loss fluctuation ( )
Utilities related to art service access.
InteractPlane(detinfo::DetectorPropertiesData const &detProp, double tcut)
double Mass() const
Based on pdg code.
const std::shared_ptr< const Surface > & getSurface() const
Surface.
KSymMatrix< 5 >::type TrackError
Track error matrix, dimension 5x5.
constexpr auto abs(T v)
Returns the absolute value of the argument.
double Density(double temperature=0.) const
Returns argon density at a given temperature.
KVector< 5 >::type TrackVector
Track state vector, dimension 5.
double Eloss(double mom, double mass, double tcut) const
Restricted mean energy loss (dE/dx)
const TrackVector & getVector() const
Track state vector.
Base class for Kalman filter planar surfaces.
Interactor for planar surfaces.
Surface::TrackDirection getDirection() const
Track direction.
bool noise(const KTrack &trk, double s, TrackError &noise_matrix) const override
Calculate noise matrix.
cet::coded_exception< error, detail::translate > exception