16 #include "cetlib_except/exception.h" 74 auto const * larprop = lar::providerFrom<detinfo::LArPropertiesService>();
75 auto const * detprop = lar::providerFrom<detinfo::DetectorPropertiesService>();
82 <<
"InteractPlane called for non-planar surface.\n";
94 double mass = trk.
Mass();
98 if(pinv == 0. || s == 0.)
103 double p = 1./std::abs(pinv);
105 double e2 = p2 + mass*mass;
106 double e = std::sqrt(e2);
108 double dedx = 0.001 * detprop->Eloss(p, mass,
getTcut());
109 double range = t / dedx;
115 double x0 = larprop->RadiationLength() / detprop->Density();
121 double betainv = std::sqrt(1. + pinv*pinv * mass*mass);
122 double theta_fact = (0.0136 * pinv * betainv) * (1. + 0.038 * std::log(range/x0));
123 double theta02 = theta_fact*theta_fact * std::abs(s/x0);
127 double ufact2 = 1. + dudw*dudw;
128 double vfact2 = 1. + dvdw*dvdw;
129 double uvfact2 = 1. + dudw*dudw + dvdw*dvdw;
130 double uvfact = std::sqrt(uvfact2);
131 double uv = dudw * dvdw;
132 double dist2_3 = s*s / 3.;
133 double dist_2 = std::abs(s) / 2.;
139 double evar = 1.e-6 * detprop->ElossVar(p, mass) * std::abs(s);
140 double pinvvar = evar * e2 / (p2*p2*p2);
146 noise_matrix(0,0) = dist2_3 * theta02 * ufact2;
147 noise_matrix(1,0) = dist2_3 * theta02 * uv;
148 noise_matrix(1,1) = dist2_3 * theta02 * vfact2;
152 noise_matrix(2,2) = theta02 * uvfact2 * ufact2;
153 noise_matrix(3,2) = theta02 * uvfact2 * uv;
154 noise_matrix(3,3) = theta02 * uvfact2 * vfact2;
158 noise_matrix(2,0) = dist_2 * theta02 * uvfact * ufact2;
159 noise_matrix(3,1) = dist_2 * theta02 * uvfact * vfact2;
163 noise_matrix(2,1) = dist_2 * theta02 * uvfact * uv;
164 noise_matrix(3,0) = dist_2 * theta02 * uvfact * uv;
168 noise_matrix(4,0) = 0.;
169 noise_matrix(4,1) = 0.;
170 noise_matrix(4,2) = 0.;
171 noise_matrix(4,3) = 0.;
175 noise_matrix(4,4) = pinvvar;
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.
InteractPlane(double tcut)
Constructor.
virtual bool noise(const KTrack &trk, double s, TrackError &noise_matrix) const
Calculate noise matrix.
KVector< 5 >::type TrackVector
Track state vector, dimension 5.
const TrackVector & getVector() const
Track state vector.
Base class for Kalman filter planar surfaces.
Interactor for planar surfaces.
Surface::TrackDirection getDirection() const
Track direction.
virtual ~InteractPlane()
Destructor.
cet::coded_exception< error, detail::translate > exception