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 }
Vector3DBase< float, LocalTag >
mps_fire.i
i
Definition: mps_fire.py:355
SiLinearChargeCollectionDrifter::appliedVoltage
const double appliedVoltage
Definition: SiLinearChargeCollectionDrifter.h:27
EnergyDepositUnit::z
float z() const
Definition: EnergyDepositUnit.h:17
EnergyDepositUnit::x
float x() const
Definition: EnergyDepositUnit.h:15
SiChargeCollectionDrifter::ionization_type
std::vector< EnergyDepositUnit > ionization_type
Definition: SiChargeCollectionDrifter.h:15
shallow::drift
LocalVector drift(const StripGeomDetUnit *, const MagneticField &, const SiStripLorentzAngle &)
Definition: ShallowTools.cc:36
SiLinearChargeCollectionDrifter::depletionVoltage
const double depletionVoltage
Definition: SiLinearChargeCollectionDrifter.h:26
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
SiLinearChargeCollectionDrifter::chargeDistributionRMS
const double chargeDistributionRMS
Definition: SiLinearChargeCollectionDrifter.h:25
SiLinearChargeCollectionDrifter::SiLinearChargeCollectionDrifter
SiLinearChargeCollectionDrifter(double, double, double, double)
Definition: SiLinearChargeCollectionDrifter.cc:4
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
SiLinearChargeCollectionDrifter::drift
SiChargeCollectionDrifter::collection_type drift(const SiChargeCollectionDrifter::ionization_type &, const LocalVector &, double, double) override
Definition: SiLinearChargeCollectionDrifter.cc:11
SignalPoint
Definition: SignalPoint.h:11
SiChargeCollectionDrifter::collection_type
std::vector< SignalPoint > collection_type
Definition: SiChargeCollectionDrifter.h:14
EnergyDepositUnit::energy
float energy() const
Definition: EnergyDepositUnit.h:18
TtSemiLepEvtBuilder_cfi.mt
mt
Definition: TtSemiLepEvtBuilder_cfi.py:47
SiLinearChargeCollectionDrifter.h
SiLinearChargeCollectionDrifter::diffusionConstant
const double diffusionConstant
Definition: SiLinearChargeCollectionDrifter.h:24
EnergyDepositUnit
Definition: EnergyDepositUnit.h:10
EnergyDepositUnit::y
float y() const
Definition: EnergyDepositUnit.h:16