45 m_useWeightingPotential = on;
59 void RejectKinks(
const bool on =
true) { m_rejectKinks = on; }
79 const bool quiet =
false);
87 bool DriftElectron(
const double x0,
const double y0,
const double z0,
90 bool DriftHole(
const double x0,
const double y0,
const double z0,
93 bool DriftIon(
const double x0,
const double y0,
const double z0,
97 bool DriftPositron(
const double x0,
const double y0,
const double z0,
107 void GetEndPoint(
double& x,
double& y,
double& z,
double& t,
int& st)
const;
118 double GetGain(
const double eps = 1.e-4)
const ;
120 double GetLoss(
const double eps = 1.e-4)
const;
123 return m_t.empty() ? 0. : m_t.back() - m_t.front();
135 bool FieldLine(
const double xi,
const double yi,
const double zi,
136 std::vector<std::array<float, 3> >& xl,
137 const bool electron =
true)
const;
143 std::string m_className =
"DriftLineRKF";
146 Sensor* m_sensor =
nullptr;
152 double m_maxStepSize = 0.;
154 double m_accuracy = 1.e-8;
156 bool m_rejectKinks =
true;
158 bool m_useStepSizeLimit =
false;
164 std::vector<std::array<double, 3> > m_x;
166 std::vector<double> m_t;
171 bool m_doSignal =
true;
173 unsigned int m_navg = 2;
175 bool m_useWeightingPotential =
true;
178 double m_scaleE = 1.;
180 double m_scaleH = 1.;
182 double m_scaleI = 1.;
185 bool m_useVelocityMap =
false;
187 bool m_useTownsendMap =
false;
190 bool m_doAvalanche =
true;
191 enum class GainFluctuations { None = 0, Polya };
193 GainFluctuations m_gainFluctuations = GainFluctuations::None;
200 bool m_doIonTail =
false;
202 bool m_doNegativeIonTail =
false;
204 double m_nE = 0., m_nI = 0.;
207 bool m_debug =
false;
210 bool DriftLine(
const std::array<double, 3>& x0,
const double t0,
211 const Particle particle, std::vector<double>& ts,
212 std::vector<std::array<double, 3> >& xs,
int& status)
const;
215 bool Avalanche(
const Particle particle,
216 const std::vector<std::array<double, 3> >& xs,
217 std::vector<double>& ne, std::vector<double>& ni,
218 std::vector<double>& nn,
double& scale)
const;
221 bool AddIonTail(
const std::vector<double>& te,
222 const std::vector<std::array<double, 3> >& xe,
223 const std::vector<double>& ni,
const double scale)
const;
226 bool AddNegativeIonTail(
const std::vector<double>& te,
227 const std::vector<std::array<double, 3> >& xe,
228 const std::vector<double>& nn,
229 const double scale)
const;
231 int GetField(
const std::array<double, 3>& x,
232 double& ex,
double& ey,
double& ez,
233 double& bx,
double& by,
double& bz,
234 Medium*& medium)
const;
236 std::array<double, 3> GetVelocity(
const std::array<double, 3>& x,
239 bool GetDiffusion(
const std::array<double, 3>& x,
const Particle particle,
240 double& dl,
double& dt)
const;
241 double GetVar(
const std::array<double, 3>& x,
243 double GetAlpha(
const std::array<double, 3>& x,
245 double GetEta(
const std::array<double, 3>& x,
249 bool Terminate(
const std::array<double, 3>& xx0,
250 const std::array<double, 3>& xx1,
251 const Particle particle, std::vector<double>& ts,
252 std::vector<std::array<double, 3> >& xs)
const;
255 bool DriftToWire(
const double xw,
const double yw,
const double rw,
256 const Particle particle, std::vector<double>& ts,
257 std::vector<std::array<double, 3> >& xs,
int& stat)
const;
259 double ComputeSigma(
const std::vector<std::array<double, 3> >& x,
260 const Particle particle,
const double eps)
const;
262 double ComputeGain(
const std::vector<std::array<double, 3> >& x,
263 const Particle particle,
const double eps)
const;
265 double ComputeLoss(
const std::vector<std::array<double, 3> >& x,
266 const Particle particle,
const double eps)
const;
268 double IntegrateDiffusion(
const std::array<double, 3>& xi,
269 const std::array<double, 3>& xe,
270 const Particle particle,
const double tol)
const;
272 double IntegrateAlpha(
const std::array<double, 3>& xi,
273 const std::array<double, 3>& xe,
274 const Particle particle,
const double tol)
const;
276 double IntegrateEta(
const std::array<double, 3>& xi,
277 const std::array<double, 3>& xe,
278 const Particle particle,
const double tol)
const;
281 void ComputeSignal(
const Particle particle,
const double scale,
282 const std::vector<double>& ts,
283 const std::vector<std::array<double, 3> >& xs,
284 const std::vector<double>& ne)
const;
287 void Terminate(
const std::array<double, 3>& xx0,
288 const std::array<double, 3>& xx1,
289 std::vector<std::array<float, 3> >& xs)
const;
291 static double Charge(
const Particle particle) {