CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/SimTracker/SiStripDigitizer/plugins/SiHitDigitizer.cc

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 //#define CBOLTZ (1.38E-23)
00012 //#define e_SI (1.6E-19)
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   // Compute the drift direction for this det
00037   double moduleThickness = det.specificSurface().bounds().thickness(); // active detector thicness
00038   double timeNormalisation = (moduleThickness*moduleThickness)/(2.*depletionVoltage*chargeMobility);
00039   LocalVector driftDir = DriftDirection(&det,bfield,langle);
00040   
00041   // Fully process one SimHit
00042   theSiInduceChargeOnStrips->induce(
00043       theSiChargeCollectionDrifter->drift(
00044           theSiChargeDivider->divide(hit, driftDir, moduleThickness, det),
00045           driftDir,moduleThickness,timeNormalisation),
00046       det,locAmpl,firstChannelWithSignal,lastChannelWithSignal,tTopo);
00047 }