CMS 3D CMS Logo

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