CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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< double > &, size_t &, size_t &)
 
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 *_detp, GlobalVector _bfield, float langle)
 

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 69 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.

14  :conf_(conf),rndEngine(eng){
15 
16  // Construct default classes
17  depletionVoltage = conf_.getParameter<double>("DepletionVoltage");
18  appliedVoltage = conf_.getParameter<double>("AppliedVoltage");
19  chargeMobility = conf_.getParameter<double>("ChargeMobility");
20  temperature = conf_.getParameter<double>("Temperature");
21  gevperelectron = conf_.getParameter<double>("GevPerElectron");
22  chargeDistributionRMS = conf_.getParameter<double>("ChargeDistributionRMS");
23  noDiffusion = conf_.getParameter<bool>("noDiffusion");
24  double diffusionConstant = CBOLTZ/e_SI * chargeMobility * temperature;
25  if (noDiffusion) diffusionConstant *= 1.0e-3;
26 
28 
30  new SiLinearChargeCollectionDrifter(diffusionConstant,
31  chargeDistributionRMS,
33  appliedVoltage);
34 
36 }
T getParameter(std::string const &) const
double chargeDistributionRMS
double chargeMobility
#define CBOLTZ
edm::ParameterSet conf_
double gevperelectron
SiChargeDivider * theSiChargeDivider
#define e_SI
double appliedVoltage
double depletionVoltage
SiInduceChargeOnStrips * theSiInduceChargeOnStrips
SiChargeCollectionDrifter * theSiChargeCollectionDrifter
CLHEP::HepRandomEngine & rndEngine
SiHitDigitizer::~SiHitDigitizer ( )

Definition at line 38 of file SiHitDigitizer.cc.

References theSiChargeCollectionDrifter, theSiChargeDivider, and theSiInduceChargeOnStrips.

38  {
39  delete theSiChargeDivider;
42 }
SiChargeDivider * theSiChargeDivider
SiInduceChargeOnStrips * theSiInduceChargeOnStrips
SiChargeCollectionDrifter * theSiChargeCollectionDrifter

Member Function Documentation

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

Definition at line 71 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().

71  {
72  LocalVector Bfield=Frame(_detp->surface().position(),_detp->surface().rotation()).toLocal(_bfield);
73  return LocalVector(-langle * Bfield.y(),langle * Bfield.x(),1.);
74  }
Local3DVector LocalVector
Definition: LocalVector.h:12
T y() const
Definition: PV3DBase.h:62
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
const RotationType & rotation() const
T x() const
Definition: PV3DBase.h:61
const PositionType & position() const
GloballyPositioned< double > Frame
void SiHitDigitizer::processHit ( const PSimHit hit,
const StripGeomDetUnit det,
GlobalVector  bfield,
float  langle,
std::vector< double > &  locAmpl,
size_t &  firstChannelWithSignal,
size_t &  lastChannelWithSignal 
)

Definition at line 45 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().

46  {
47 
48  // Compute the drift direction for this det
49  double moduleThickness = det.specificSurface().bounds().thickness(); // active detector thicness
50  double timeNormalisation = (moduleThickness*moduleThickness)/(2.*depletionVoltage*chargeMobility);
51  LocalVector driftDir = DriftDirection(&det,bfield,langle);
52 
53  // Fully process one SimHit
56  theSiChargeDivider->divide(hit, driftDir, moduleThickness, det),
57  driftDir,moduleThickness,timeNormalisation),
58  det,locAmpl,firstChannelWithSignal,lastChannelWithSignal);
59 }
LocalVector DriftDirection(const StripGeomDetUnit *_detp, GlobalVector _bfield, float langle)
virtual ionization_type divide(const PSimHit *, const LocalVector &, double, const StripGeomDetUnit &det)=0
const BoundPlane & specificSurface() const
Same as surface(), kept for backward compatibility.
Definition: GeomDet.h:38
double chargeMobility
virtual float thickness() const =0
virtual void induce(SiChargeCollectionDrifter::collection_type, const StripGeomDetUnit &, std::vector< double > &, size_t &, size_t &)=0
SiChargeDivider * theSiChargeDivider
const Bounds & bounds() const
Definition: BoundSurface.h:89
double depletionVoltage
SiInduceChargeOnStrips * theSiInduceChargeOnStrips
SiChargeCollectionDrifter * theSiChargeCollectionDrifter
virtual collection_type drift(const ionization_type, const LocalVector &, double, double)=0
void SiHitDigitizer::setChargeCollectionDrifter ( SiChargeCollectionDrifter cd)
inline

Definition at line 39 of file SiHitDigitizer.h.

References theSiChargeCollectionDrifter.

39  {
42  }
SiChargeCollectionDrifter * theSiChargeCollectionDrifter
void SiHitDigitizer::setChargeDivider ( SiChargeDivider cd)
inline

Definition at line 34 of file SiHitDigitizer.h.

References theSiChargeDivider.

34  {
36  theSiChargeDivider = cd;
37  }
SiChargeDivider * theSiChargeDivider
void SiHitDigitizer::setInduceChargeOnStrips ( SiInduceChargeOnStrips cd)
inline

Definition at line 44 of file SiHitDigitizer.h.

References theSiInduceChargeOnStrips.

44  {
47  }
SiInduceChargeOnStrips * theSiInduceChargeOnStrips
void SiHitDigitizer::setParticleDataTable ( const ParticleDataTable pdt)
inline

Definition at line 49 of file SiHitDigitizer.h.

References SiChargeDivider::setParticleDataTable(), and theSiChargeDivider.

Referenced by SiStripDigitizerAlgorithm::setParticleDataTable().

49  {
51  }
virtual void setParticleDataTable(const ParticleDataTable *pdt)=0
SiChargeDivider * theSiChargeDivider

Member Data Documentation

double SiHitDigitizer::appliedVoltage
private

Definition at line 63 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

double SiHitDigitizer::chargeDistributionRMS
private

Definition at line 67 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

double SiHitDigitizer::chargeMobility
private

Definition at line 64 of file SiHitDigitizer.h.

Referenced by processHit(), and SiHitDigitizer().

edm::ParameterSet SiHitDigitizer::conf_
private

Definition at line 60 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

double SiHitDigitizer::depletionVoltage
private

Definition at line 62 of file SiHitDigitizer.h.

Referenced by processHit(), and SiHitDigitizer().

double SiHitDigitizer::gevperelectron
private

Definition at line 68 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

bool SiHitDigitizer::noDiffusion
private

Definition at line 66 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

CLHEP::HepRandomEngine& SiHitDigitizer::rndEngine
private

Definition at line 61 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

double SiHitDigitizer::temperature
private

Definition at line 65 of file SiHitDigitizer.h.

Referenced by SiHitDigitizer().

SiChargeCollectionDrifter* SiHitDigitizer::theSiChargeCollectionDrifter
private
SiChargeDivider* SiHitDigitizer::theSiChargeDivider
private
SiInduceChargeOnStrips* SiHitDigitizer::theSiInduceChargeOnStrips
private