Go to the documentation of this file.00001 #include "SiHitDigitizer.h"
00002 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00003 #include "SiLinearChargeCollectionDrifter.h"
00004 #include "SiLinearChargeDivider.h"
00005
00006 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
00007 #include "SiTrivialInduceChargeOnStrips.h"
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00010
00011
00012
00013 static const double CBOLTZ_over_e_SI = 1.38E-23/1.6E-19;
00014 static const double noDiffusionMultiplier = 1.0e-3;
00015
00016 SiHitDigitizer::SiHitDigitizer(const edm::ParameterSet& conf, CLHEP::HepRandomEngine& eng) :
00017 depletionVoltage(conf.getParameter<double>("DepletionVoltage")),
00018 chargeMobility(conf.getParameter<double>("ChargeMobility")),
00019 theSiChargeDivider(new SiLinearChargeDivider(conf, eng)),
00020 theSiChargeCollectionDrifter(new SiLinearChargeCollectionDrifter(
00021 CBOLTZ_over_e_SI * chargeMobility * conf.getParameter<double>("Temperature") * (conf.getParameter<bool>("noDiffusion") ? noDiffusionMultiplier : 1.0),
00022 conf.getParameter<double>("ChargeDistributionRMS"),
00023 depletionVoltage,
00024 conf.getParameter<double>("AppliedVoltage"))),
00025 theSiInduceChargeOnStrips(new SiTrivialInduceChargeOnStrips(conf, conf.getParameter<double>("GevPerElectron"))) {
00026 }
00027
00028 SiHitDigitizer::~SiHitDigitizer(){
00029 }
00030
00031 void
00032 SiHitDigitizer::processHit(const PSimHit* hit, const StripGeomDetUnit& det, GlobalVector bfield,float langle,
00033 std::vector<float>& locAmpl, size_t& firstChannelWithSignal, size_t& lastChannelWithSignal,
00034 const TrackerTopology *tTopo){
00035
00036
00037 double moduleThickness = det.specificSurface().bounds().thickness();
00038 double timeNormalisation = (moduleThickness*moduleThickness)/(2.*depletionVoltage*chargeMobility);
00039 LocalVector driftDir = DriftDirection(&det,bfield,langle);
00040
00041
00042 theSiInduceChargeOnStrips->induce(
00043 theSiChargeCollectionDrifter->drift(
00044 theSiChargeDivider->divide(hit, driftDir, moduleThickness, det),
00045 driftDir,moduleThickness,timeNormalisation),
00046 det,locAmpl,firstChannelWithSignal,lastChannelWithSignal,tTopo);
00047 }