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