CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
SiHitDigitizer Class Reference

#include <SiHitDigitizer.h>

Public Member Functions

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

Private Types

typedef GloballyPositioned< double > Frame
 

Private Member Functions

LocalVector DriftDirection (const StripGeomDetUnit *_detp, GlobalVector _bfield, float langle)
 

Private Attributes

const double chargeMobility
 
const double depletionVoltage
 
std::unique_ptr< SiChargeCollectionDriftertheSiChargeCollectionDrifter
 
std::unique_ptr< SiChargeDividertheSiChargeDivider
 
std::unique_ptr< const SiInduceChargeOnStripstheSiInduceChargeOnStrips
 

Detailed Description

Digitizes the response for a single SimHit.

Definition at line 31 of file SiHitDigitizer.h.

Member Typedef Documentation

typedef GloballyPositioned<double> SiHitDigitizer::Frame
private

Definition at line 62 of file SiHitDigitizer.h.

Constructor & Destructor Documentation

SiHitDigitizer::SiHitDigitizer ( const edm::ParameterSet conf)

Definition at line 16 of file SiHitDigitizer.cc.

17  : depletionVoltage(conf.getParameter<double>("DepletionVoltage")),
18  chargeMobility(conf.getParameter<double>("ChargeMobility")),
21  CBOLTZ_over_e_SI * chargeMobility * conf.getParameter<double>("Temperature") *
22  (conf.getParameter<bool>("noDiffusion") ? noDiffusionMultiplier : 1.0),
23  conf.getParameter<double>("ChargeDistributionRMS"),
25  conf.getParameter<double>("AppliedVoltage"))),
26  theSiInduceChargeOnStrips(new SiTrivialInduceChargeOnStrips(conf, conf.getParameter<double>("GevPerElectron"))) {}
T getParameter(std::string const &) const
const double chargeMobility
const double depletionVoltage
static const double noDiffusionMultiplier
static const double CBOLTZ_over_e_SI
std::unique_ptr< const SiInduceChargeOnStrips > theSiInduceChargeOnStrips
std::unique_ptr< SiChargeCollectionDrifter > theSiChargeCollectionDrifter
std::unique_ptr< SiChargeDivider > theSiChargeDivider
SiHitDigitizer::~SiHitDigitizer ( )

Definition at line 28 of file SiHitDigitizer.cc.

28 {}

Member Function Documentation

LocalVector SiHitDigitizer::DriftDirection ( const StripGeomDetUnit _detp,
GlobalVector  _bfield,
float  langle 
)
inlineprivate

Definition at line 64 of file SiHitDigitizer.h.

References GloballyPositioned< T >::position(), GloballyPositioned< T >::rotation(), GeomDet::surface(), toLocal(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().

Referenced by processHit().

64  {
65  LocalVector Bfield = Frame(_detp->surface().position(), _detp->surface().rotation()).toLocal(_bfield);
66  return LocalVector(-langle * Bfield.y(), langle * Bfield.x(), 1.);
67  }
Local3DVector LocalVector
Definition: LocalVector.h:12
T y() const
Definition: PV3DBase.h:63
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
const RotationType & rotation() const
T x() const
Definition: PV3DBase.h:62
const PositionType & position() const
GloballyPositioned< double > Frame
void SiHitDigitizer::processHit ( const PSimHit hit,
const StripGeomDetUnit det,
GlobalVector  bfield,
float  langle,
std::vector< float > &  locAmpl,
size_t &  firstChannelWithSignal,
size_t &  lastChannelWithSignal,
const TrackerTopology tTopo,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 30 of file SiHitDigitizer.cc.

References Surface::bounds(), chargeMobility, depletionVoltage, DriftDirection(), GeomDet::specificSurface(), theSiChargeCollectionDrifter, theSiChargeDivider, theSiInduceChargeOnStrips, and Bounds::thickness().

Referenced by DigiSimLinkAlgorithm::run().

38  {
39  // Compute the drift direction for this det
40  double moduleThickness = det.specificSurface().bounds().thickness(); // active detector thicness
41  double timeNormalisation = (moduleThickness * moduleThickness) / (2. * depletionVoltage * chargeMobility);
42  LocalVector driftDir = DriftDirection(&det, bfield, langle);
43 
44  // Fully process one SimHit
46  theSiChargeCollectionDrifter->drift(theSiChargeDivider->divide(hit, driftDir, moduleThickness, det, engine),
47  driftDir,
48  moduleThickness,
49  timeNormalisation),
50  det,
51  locAmpl,
52  firstChannelWithSignal,
53  lastChannelWithSignal,
54  tTopo);
55 }
LocalVector DriftDirection(const StripGeomDetUnit *_detp, GlobalVector _bfield, float langle)
const double chargeMobility
const double depletionVoltage
const Bounds & bounds() const
Definition: Surface.h:120
virtual float thickness() const =0
std::unique_ptr< const SiInduceChargeOnStrips > theSiInduceChargeOnStrips
std::unique_ptr< SiChargeCollectionDrifter > theSiChargeCollectionDrifter
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:45
std::unique_ptr< SiChargeDivider > theSiChargeDivider
void SiHitDigitizer::setChargeCollectionDrifter ( SiChargeCollectionDrifter cd)
inline

Definition at line 39 of file SiHitDigitizer.h.

39 { theSiChargeCollectionDrifter.reset(cd); }
std::unique_ptr< SiChargeCollectionDrifter > theSiChargeCollectionDrifter
void SiHitDigitizer::setChargeDivider ( SiChargeDivider cd)
inline

Definition at line 37 of file SiHitDigitizer.h.

37 { theSiChargeDivider.reset(cd); }
std::unique_ptr< SiChargeDivider > theSiChargeDivider
void SiHitDigitizer::setInduceChargeOnStrips ( SiInduceChargeOnStrips cd)
inline

Definition at line 41 of file SiHitDigitizer.h.

41 { theSiInduceChargeOnStrips.reset(cd); }
std::unique_ptr< const SiInduceChargeOnStrips > theSiInduceChargeOnStrips
void SiHitDigitizer::setParticleDataTable ( const ParticleDataTable pdt)
inline

Definition at line 43 of file SiHitDigitizer.h.

43 { theSiChargeDivider->setParticleDataTable(pdt); }
std::unique_ptr< SiChargeDivider > theSiChargeDivider

Member Data Documentation

const double SiHitDigitizer::chargeMobility
private

Definition at line 57 of file SiHitDigitizer.h.

Referenced by processHit().

const double SiHitDigitizer::depletionVoltage
private

Definition at line 56 of file SiHitDigitizer.h.

Referenced by processHit().

std::unique_ptr<SiChargeCollectionDrifter> SiHitDigitizer::theSiChargeCollectionDrifter
private

Definition at line 59 of file SiHitDigitizer.h.

Referenced by processHit().

std::unique_ptr<SiChargeDivider> SiHitDigitizer::theSiChargeDivider
private

Definition at line 58 of file SiHitDigitizer.h.

Referenced by processHit().

std::unique_ptr<const SiInduceChargeOnStrips> SiHitDigitizer::theSiInduceChargeOnStrips
private

Definition at line 60 of file SiHitDigitizer.h.

Referenced by processHit().