CMS 3D CMS Logo

SiHitDigitizer Class Reference

Digitizes the response for a single SimHit. More...

#include <SimTracker/SiStripDigitizer/interface/SiHitDigitizer.h>

List of all members.

Public Member Functions

void processHit (const PSimHit &, const StripGeomDetUnit &, GlobalVector, float, std::vector< double > &, unsigned int &, unsigned int &)
void setChargeCollectionDrifter (SiChargeCollectionDrifter *cd)
void setChargeDivider (SiChargeDivider *cd)
void setInduceChargeOnStrips (SiInduceChargeOnStrips *cd)
void setParticleDataTable (const ParticleDataTable *pdt)
 SiHitDigitizer (const edm::ParameterSet &conf, CLHEP::HepRandomEngine &)
 ~SiHitDigitizer ()

Private Types

typedef GloballyPositioned
< double > 
Frame

Private Member Functions

LocalVector DriftDirection (const StripGeomDetUnit *, GlobalVector, float)

Private Attributes

double appliedVoltage
double chargeDistributionRMS
double chargeMobility
edm::ParameterSet conf_
double depletionVoltage
double gevperelectron
bool noDiffusion
CLHEP::HepRandomEngine & rndEngine
double temperature
SiChargeCollectionDriftertheSiChargeCollectionDrifter
SiChargeDividertheSiChargeDivider
SiInduceChargeOnStripstheSiInduceChargeOnStrips


Detailed Description

Digitizes the response for a single SimHit.

Definition at line 27 of file SiHitDigitizer.h.


Member Typedef Documentation

typedef GloballyPositioned<double> SiHitDigitizer::Frame [private]

Definition at line 67 of file SiHitDigitizer.h.


Constructor & Destructor Documentation

SiHitDigitizer::SiHitDigitizer ( const edm::ParameterSet conf,
CLHEP::HepRandomEngine &  eng 
)

Definition at line 14 of file SiHitDigitizer.cc.

References appliedVoltage, CBOLTZ, chargeDistributionRMS, chargeMobility, conf_, depletionVoltage, e_SI, edm::ParameterSet::getParameter(), gevperelectron, noDiffusion, rndEngine, temperature, theSiChargeCollectionDrifter, theSiChargeDivider, and theSiInduceChargeOnStrips.

00014                                                                                     :conf_(conf),rndEngine(eng){
00015   
00016   //
00017   // Construct default classes
00018   //
00019   depletionVoltage       = conf_.getParameter<double>("DepletionVoltage");
00020   appliedVoltage         = conf_.getParameter<double>("AppliedVoltage");
00021   chargeMobility         = conf_.getParameter<double>("ChargeMobility");
00022   temperature            = conf_.getParameter<double>("Temperature");
00023   gevperelectron         =conf_.getParameter<double>("GevPerElectron");
00024   chargeDistributionRMS  =conf_.getParameter<double>("ChargeDistributionRMS");
00025   noDiffusion            = conf_.getParameter<bool>("noDiffusion");
00026   double diffusionConstant = CBOLTZ/e_SI * chargeMobility * temperature;
00027   if (noDiffusion) diffusionConstant *= 1.0e-3;
00028   
00029   theSiChargeDivider = new SiLinearChargeDivider(conf_,rndEngine);
00030   
00031   theSiChargeCollectionDrifter = 
00032     new SiLinearChargeCollectionDrifter(diffusionConstant,
00033                                         chargeDistributionRMS,
00034                                         depletionVoltage,
00035                                         appliedVoltage);
00036 
00037   theSiInduceChargeOnStrips = new SiTrivialInduceChargeOnStrips(conf,gevperelectron);
00038 }

SiHitDigitizer::~SiHitDigitizer (  ) 

Definition at line 41 of file SiHitDigitizer.cc.

References theSiChargeCollectionDrifter, theSiChargeDivider, and theSiInduceChargeOnStrips.

00041                                {
00042   delete theSiChargeDivider;
00043   delete theSiChargeCollectionDrifter;
00044   delete theSiInduceChargeOnStrips;
00045 }


Member Function Documentation

LocalVector SiHitDigitizer::DriftDirection ( const StripGeomDetUnit _detp,
GlobalVector  _bfield,
float  langle 
) [private]

Definition at line 71 of file SiHitDigitizer.cc.

References conf_, StripGeomDetUnit::geographicalId(), edm::ParameterSet::getUntrackedParameter(), GloballyPositioned< T >::position(), DetId::rawId(), GloballyPositioned< T >::rotation(), GeomDet::surface(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by processHit().

00071                                                                                                          {
00072   // taken from ORCA/Tracker/SiStripDet/src/SiStripDet.cc
00073   Frame detFrame(_detp->surface().position(),_detp->surface().rotation());
00074   LocalVector Bfield=detFrame.toLocal(_bfield);
00075   
00076   float dir_x = -langle * Bfield.y();
00077   float dir_y = +langle * Bfield.x();
00078   float dir_z = 1.; // E field always in z direction
00079   LocalVector theDriftDirection = LocalVector(dir_x,dir_y,dir_z);
00080   if ( conf_.getUntrackedParameter<int>("VerbosityLevel") > 0 ) {
00081     edm::LogInfo("StripDigiInfo")<< " The drift direction in local coordinate is "<<theDriftDirection;
00082     if(langle==0.)
00083       edm::LogWarning("StripDigiInfo")<< "ERROR: Lorentz angle = 0 for module "<<_detp->geographicalId().rawId();
00084   }
00085   return theDriftDirection;
00086   
00087 }

void SiHitDigitizer::processHit ( const PSimHit hit,
const StripGeomDetUnit det,
GlobalVector  bfield,
float  langle,
std::vector< double > &  locAmpl,
unsigned int firstChannelWithSignal,
unsigned int lastChannelWithSignal 
)

Definition at line 49 of file SiHitDigitizer.cc.

References BoundSurface::bounds(), chargeMobility, depletionVoltage, SiChargeDivider::divide(), SiChargeCollectionDrifter::drift(), DriftDirection(), SiInduceChargeOnStrips::induce(), GeomDet::specificSurface(), theSiChargeCollectionDrifter, theSiChargeDivider, theSiInduceChargeOnStrips, and Bounds::thickness().

Referenced by SiStripDigitizerAlgorithm::run().

00050                                                                                                                                  {
00051   
00052   //
00053   // Compute the drift direction for this det
00054   //
00055   
00056   double moduleThickness = det.specificSurface().bounds().thickness(); // full detector thicness
00057   double timeNormalisation = (moduleThickness*moduleThickness)/(2.*depletionVoltage*chargeMobility);
00058   
00059   LocalVector driftDir = DriftDirection(&det,bfield,langle);
00060   
00061   //
00062   // Fully process one SimHit
00063   //
00064   
00065   SiChargeCollectionDrifter::ionization_type ion = theSiChargeDivider->divide(hit, driftDir, moduleThickness, det);
00066   
00067   theSiInduceChargeOnStrips->induce(theSiChargeCollectionDrifter->drift(ion,driftDir,moduleThickness,timeNormalisation),det,
00068                                     locAmpl,firstChannelWithSignal,lastChannelWithSignal);
00069 }

void SiHitDigitizer::setChargeCollectionDrifter ( SiChargeCollectionDrifter cd  )  [inline]

Definition at line 38 of file SiHitDigitizer.h.

References theSiChargeCollectionDrifter.

void SiHitDigitizer::setChargeDivider ( SiChargeDivider cd  )  [inline]

Definition at line 34 of file SiHitDigitizer.h.

References theSiChargeDivider.

00034                                             {
00035     if (theSiChargeDivider) delete theSiChargeDivider;
00036     theSiChargeDivider = cd;
00037   }

void SiHitDigitizer::setInduceChargeOnStrips ( SiInduceChargeOnStrips cd  )  [inline]

Definition at line 42 of file SiHitDigitizer.h.

References theSiInduceChargeOnStrips.

00042                                                           {
00043     if (theSiInduceChargeOnStrips) delete theSiInduceChargeOnStrips;
00044     theSiInduceChargeOnStrips = cd;
00045   }

void SiHitDigitizer::setParticleDataTable ( const ParticleDataTable pdt  ) 

Definition at line 88 of file SiHitDigitizer.cc.

References SiChargeDivider::setParticleDataTable(), and theSiChargeDivider.

Referenced by SiStripDigitizerAlgorithm::setParticleDataTable().

00089 {
00090   theSiChargeDivider->setParticleDataTable(pdt);
00091 }


Member Data Documentation

double SiHitDigitizer::appliedVoltage [private]

Definition at line 60 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

double SiHitDigitizer::chargeDistributionRMS [private]

Definition at line 64 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

double SiHitDigitizer::chargeMobility [private]

Definition at line 61 of file SiHitDigitizer.h.

Referenced by processHit(), and SiHitDigitizer().

edm::ParameterSet SiHitDigitizer::conf_ [private]

Definition at line 57 of file SiHitDigitizer.h.

Referenced by DriftDirection(), and SiHitDigitizer().

double SiHitDigitizer::depletionVoltage [private]

Definition at line 59 of file SiHitDigitizer.h.

Referenced by processHit(), and SiHitDigitizer().

double SiHitDigitizer::gevperelectron [private]

Definition at line 65 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

bool SiHitDigitizer::noDiffusion [private]

Definition at line 63 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

CLHEP::HepRandomEngine& SiHitDigitizer::rndEngine [private]

Definition at line 58 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

double SiHitDigitizer::temperature [private]

Definition at line 62 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

SiChargeCollectionDrifter* SiHitDigitizer::theSiChargeCollectionDrifter [private]

Definition at line 54 of file SiHitDigitizer.h.

Referenced by processHit(), setChargeCollectionDrifter(), SiHitDigitizer(), and ~SiHitDigitizer().

SiChargeDivider* SiHitDigitizer::theSiChargeDivider [private]

Definition at line 53 of file SiHitDigitizer.h.

Referenced by processHit(), setChargeDivider(), setParticleDataTable(), SiHitDigitizer(), and ~SiHitDigitizer().

SiInduceChargeOnStrips* SiHitDigitizer::theSiInduceChargeOnStrips [private]

Definition at line 55 of file SiHitDigitizer.h.

Referenced by processHit(), setInduceChargeOnStrips(), SiHitDigitizer(), and ~SiHitDigitizer().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:32 2009 for CMSSW by  doxygen 1.5.4