CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiHitDigitizer.cc
Go to the documentation of this file.
5 
10 
11 #define CBOLTZ (1.38E-23)
12 #define e_SI (1.6E-19)
13 
14 SiHitDigitizer::SiHitDigitizer(const edm::ParameterSet& conf,CLHEP::HepRandomEngine& eng ):conf_(conf),rndEngine(eng){
15 
16  // Construct default classes
17  depletionVoltage = conf_.getParameter<double>("DepletionVoltage");
18  appliedVoltage = conf_.getParameter<double>("AppliedVoltage");
19  chargeMobility = conf_.getParameter<double>("ChargeMobility");
20  temperature = conf_.getParameter<double>("Temperature");
21  gevperelectron = conf_.getParameter<double>("GevPerElectron");
22  chargeDistributionRMS = conf_.getParameter<double>("ChargeDistributionRMS");
23  noDiffusion = conf_.getParameter<bool>("noDiffusion");
24  double diffusionConstant = CBOLTZ/e_SI * chargeMobility * temperature;
25  if (noDiffusion) diffusionConstant *= 1.0e-3;
26 
28 
30  new SiLinearChargeCollectionDrifter(diffusionConstant,
31  chargeDistributionRMS,
33  appliedVoltage);
34 
36 }
37 
39  delete theSiChargeDivider;
42 }
43 
44 void
45 SiHitDigitizer::processHit(const PSimHit* hit, const StripGeomDetUnit& det, GlobalVector bfield,float langle,
46  std::vector<double>& locAmpl, size_t& firstChannelWithSignal, size_t& lastChannelWithSignal){
47 
48  // Compute the drift direction for this det
49  double moduleThickness = det.specificSurface().bounds().thickness(); // active detector thicness
50  double timeNormalisation = (moduleThickness*moduleThickness)/(2.*depletionVoltage*chargeMobility);
51  LocalVector driftDir = DriftDirection(&det,bfield,langle);
52 
53  // Fully process one SimHit
56  theSiChargeDivider->divide(hit, driftDir, moduleThickness, det),
57  driftDir,moduleThickness,timeNormalisation),
58  det,locAmpl,firstChannelWithSignal,lastChannelWithSignal);
59 }
T getParameter(std::string const &) const
LocalVector DriftDirection(const StripGeomDetUnit *_detp, GlobalVector _bfield, float langle)
virtual ionization_type divide(const PSimHit *, const LocalVector &, double, const StripGeomDetUnit &det)=0
double chargeDistributionRMS
const BoundPlane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:38
double chargeMobility
#define CBOLTZ
virtual float thickness() const =0
edm::ParameterSet conf_
virtual void induce(SiChargeCollectionDrifter::collection_type, const StripGeomDetUnit &, std::vector< double > &, size_t &, size_t &)=0
double gevperelectron
void processHit(const PSimHit *, const StripGeomDetUnit &, GlobalVector, float, std::vector< double > &, size_t &, size_t &)
SiChargeDivider * theSiChargeDivider
tuple conf
Definition: dbtoconf.py:185
const Bounds & bounds() const
Definition: BoundSurface.h:89
#define e_SI
double appliedVoltage
double depletionVoltage
SiInduceChargeOnStrips * theSiInduceChargeOnStrips
SiChargeCollectionDrifter * theSiChargeCollectionDrifter
SiHitDigitizer(const edm::ParameterSet &conf, CLHEP::HepRandomEngine &)
CLHEP::HepRandomEngine & rndEngine
virtual collection_type drift(const ionization_type, const LocalVector &, double, double)=0