CMS 3D CMS Logo

SiLinearChargeCollectionDrifter.cc
Go to the documentation of this file.
2 #include "vdt/log.h"
3 
4 SiLinearChargeCollectionDrifter::SiLinearChargeCollectionDrifter(double dc, double cdr, double dv, double av)
5  : // Everything which does not depend on the specific det
6  diffusionConstant(dc),
7  chargeDistributionRMS(cdr),
8  depletionVoltage(dv),
9  appliedVoltage(av) {}
10 
12  const SiChargeCollectionDrifter::ionization_type& ion, const LocalVector& driftDir, double mt, double tn) {
13  // prepare output
14  collection_type _temp;
15  _temp.resize(ion.size());
16  // call the drift method for each deposit
17  for (size_t i = 0; i < ion.size(); i++) {
18  _temp[i] = drift(ion[i], driftDir, mt, tn);
19  }
20  return _temp;
21 }
22 
24  const LocalVector& drift,
25  double moduleThickness,
26  double timeNormalisation) {
27  // computes the fraction of the module the charge has to drift through,
28  // ensuring it is bounded in [0,1]
29  double depth = (moduleThickness / 2. - edu.z());
30  double thicknessFraction = depth / moduleThickness;
31  thicknessFraction = thicknessFraction > 0. ? thicknessFraction : 0.;
32  thicknessFraction = thicknessFraction < 1. ? thicknessFraction : 1.;
33 
34  // computes the drift time in the sensor
35  double driftTime = -timeNormalisation * vdt::fast_log(1. - 2 * depletionVoltage * thicknessFraction /
38 
39  // returns the signal: an energy on the surface, with a size due to diffusion.
40  return SignalPoint(edu.x() + depth * drift.x() / drift.z(),
41  edu.y() + depth * drift.y() / drift.z(),
42  sqrt(2. * diffusionConstant * driftTime),
43  edu.energy());
44 }
float x() const
float y() const
SiChargeCollectionDrifter::collection_type drift(const SiChargeCollectionDrifter::ionization_type &, const LocalVector &, double, double) override
T y() const
Definition: PV3DBase.h:63
std::vector< SignalPoint > collection_type
SiLinearChargeCollectionDrifter(double, double, double, double)
T sqrt(T t)
Definition: SSEVec.h:18
float z() const
T z() const
Definition: PV3DBase.h:64
std::vector< EnergyDepositUnit > ionization_type
float energy() const
T x() const
Definition: PV3DBase.h:62