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 
4  double cdr,
5  double dv,
6  double av){
7  // Everything which does not depend on the specific det
10  depletionVoltage = dv;
11  appliedVoltage = av;
12 }
13 
15  const LocalVector& driftDir,double mt, double tn) {
16  // set some variables used in the main method
17  moduleThickness = mt;
18  timeNormalisation = tn;
19  // prepare output
20  collection_type _temp;
21  _temp.resize(ion.size());
22  // call the drift method for each deposit
23  for (size_t i=0; i<ion.size(); i++){
24  _temp[i] = drift(ion[i], driftDir);
25  }
26  return _temp;
27 }
28 
30 (const EnergyDepositUnit& edu, const LocalVector& drift) {
31  // computes the fraction of the module the charge has to drift through,
32  // ensuring it is bounded in [0,1]
33  double depth = (moduleThickness/2.-edu.z());
34  double thicknessFraction = depth/moduleThickness ;
35  thicknessFraction = thicknessFraction>0. ? thicknessFraction : 0. ;
36  thicknessFraction = thicknessFraction<1. ? thicknessFraction : 1. ;
37 
38  // computes the drift time in the sensor
39  double driftTime = -timeNormalisation*
40  log(1.-2*depletionVoltage*thicknessFraction/
41  (depletionVoltage+appliedVoltage))
42  +chargeDistributionRMS;
43 
44  // returns the signal: an energy on the surface, with a size due to diffusion.
45  return SignalPoint(edu.x() + depth*drift.x()/drift.z(),
46  edu.y() + depth*drift.y()/drift.z(),
47  sqrt(2.*diffusionConstant*driftTime),
48  edu.energy());
49 }
50 
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:62
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:46
float z() const
T z() const
Definition: PV3DBase.h:63
std::vector< EnergyDepositUnit > ionization_type
float energy() const
T x() const
Definition: PV3DBase.h:61