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

◆ Frame

typedef GloballyPositioned<double> SiHitDigitizer::Frame
private

Definition at line 62 of file SiHitDigitizer.h.

Constructor & Destructor Documentation

◆ SiHitDigitizer()

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
Definition: ParameterSet.h:303
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::~SiHitDigitizer ( )

Definition at line 28 of file SiHitDigitizer.cc.

28 {}

Member Function Documentation

◆ DriftDirection()

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

Definition at line 64 of file SiHitDigitizer.h.

References mkfit::Config::Bfield, GloballyPositioned< T >::position(), GloballyPositioned< T >::rotation(), GeomDet::surface(), and toLocal().

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
constexpr float Bfield
Definition: Config.h:96
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const PositionType & position() const
const RotationType & rotation() const
GloballyPositioned< double > Frame

◆ processHit()

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
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:40
std::unique_ptr< SiChargeDivider > theSiChargeDivider
const Bounds & bounds() const
Definition: Surface.h:87

◆ setChargeCollectionDrifter()

void SiHitDigitizer::setChargeCollectionDrifter ( SiChargeCollectionDrifter cd)
inline

Definition at line 39 of file SiHitDigitizer.h.

References hippyaddtobaddatafiles::cd(), and theSiChargeCollectionDrifter.

std::unique_ptr< SiChargeCollectionDrifter > theSiChargeCollectionDrifter

◆ setChargeDivider()

void SiHitDigitizer::setChargeDivider ( SiChargeDivider cd)
inline

Definition at line 37 of file SiHitDigitizer.h.

References hippyaddtobaddatafiles::cd(), and theSiChargeDivider.

37 { theSiChargeDivider.reset(cd); }
std::unique_ptr< SiChargeDivider > theSiChargeDivider

◆ setInduceChargeOnStrips()

void SiHitDigitizer::setInduceChargeOnStrips ( SiInduceChargeOnStrips cd)
inline

Definition at line 41 of file SiHitDigitizer.h.

References hippyaddtobaddatafiles::cd(), and theSiInduceChargeOnStrips.

41 { theSiInduceChargeOnStrips.reset(cd); }
std::unique_ptr< const SiInduceChargeOnStrips > theSiInduceChargeOnStrips

◆ setParticleDataTable()

void SiHitDigitizer::setParticleDataTable ( const ParticleDataTable pdt)
inline

Definition at line 43 of file SiHitDigitizer.h.

References theSiChargeDivider.

Referenced by DigiSimLinkAlgorithm::setParticleDataTable().

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

Member Data Documentation

◆ chargeMobility

const double SiHitDigitizer::chargeMobility
private

Definition at line 57 of file SiHitDigitizer.h.

Referenced by processHit().

◆ depletionVoltage

const double SiHitDigitizer::depletionVoltage
private

Definition at line 56 of file SiHitDigitizer.h.

Referenced by processHit().

◆ theSiChargeCollectionDrifter

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

Definition at line 59 of file SiHitDigitizer.h.

Referenced by processHit(), and setChargeCollectionDrifter().

◆ theSiChargeDivider

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

Definition at line 58 of file SiHitDigitizer.h.

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

◆ theSiInduceChargeOnStrips

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

Definition at line 60 of file SiHitDigitizer.h.

Referenced by processHit(), and setInduceChargeOnStrips().