HerdSoftware  0.3.2
Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
Herd::SiliconDetectorDriftDiffusionAlgo Class Reference

Base algorithm for digitizers of the Monte Carlo hits of silicon detector implementing the effect of charge dritf and diffusion in the silicon. More...

#include <algorithms/digitization/SiliconDetectorDriftDiffusionAlgo.h>

Inheritance diagram for Herd::SiliconDetectorDriftDiffusionAlgo:
Herd::ScdDriftDiffusionAlgo Herd::StkDriftDiffusionAlgo

Public Member Functions

 SiliconDetectorDriftDiffusionAlgo (const std::string &name)
 Constructor. More...
 
bool Initialize () override
 Initialization of the algorithm. More...
 
bool Process () override
 Process a single event. More...
 
std::vector< std::string > FreeObjects (const std::vector< std::string > &objs, Memory::Status memStatus) override
 Free the memory of unneeded objects. More...
 

Protected Attributes

float m_pitch
 
std::string m_detName
 Name of the detector, e.g "stk". More...
 
float m_minStepSize
 
std::string m_diffusionType
 
float m_posEffDiffCoeff
 
float m_negEffDiffCoeff
 
float m_biasVoltage
 
float m_intrinsicVoltage
 

Private Types

enum  DiffusionType { DiffusionType::Gaussian, DiffusionType::GaussianNonLinear }
 

Private Member Functions

void GenerateHits (const SiliconDetectorParticleHitsColl &particleHitsColl, const SiliconDetectorHitsColl &hitsColl, SiliconDetectorHitsColl &digHitsColl)
 Generate the diffused hits. More...
 
SiliconDetectorGeoParams CreateGeoParams (const SiliconDetectorGeoParams &origGeoParams)
 Creates the geometry parameter objects for the digitized detector. More...
 
std::vector< PointPartitionTrajectory (const ParticleHit &hit)
 Splits the trajectory of a particle hit into N sub-steps, according to the step-size specified in the algo. More...
 
void AccumulateSteps (std::vector< Hit > &layerHits, const SiliconDetectorGeoParams &geoParams, unsigned int firstStrip, unsigned int lastStrip, const SiliconDetectorDigitizationTools::SDChargePacket &packet, float edep)
 
std::unique_ptr< SiliconDetectorDigitizationTools::SDChargePacketCreatePacket (Point position, DiffusionType diffType, const SiliconDetectorGeoParams &geoParams)
 

Private Attributes

DiffusionType m_diffType = DiffusionType::GaussianNonLinear
 
SiliconDetectorHitsColl m_siliconDetectorDigHitsColl
 
observer_ptr< SiliconDetectorGeoParamsCollm_origSiliconDetectorGeoParamsColl
 
std::shared_ptr< SiliconDetectorGeoParamsCollm_digSiliconDetectorGeoParamsColl
 
StorePtr m_evStore
 
StorePtr m_globStore
 

Detailed Description

Base algorithm for digitizers of the Monte Carlo hits of silicon detector implementing the effect of charge dritf and diffusion in the silicon.

This algorithm assigns the energy released by single particles traversing a wafer of the silicon detector to the strips after propagating and diffusing charge deposits along the particle trajectory. Different diffusion methods should be implementable, but for now a simple gaussian model is used.

NOTE: this algorithm cannot be used directly in analysis job; use #StkDriftDiffusionAlgo for STK and #ScdDriftDiffusionAlgo for SCD.

Member Enumeration Documentation

◆ DiffusionType

Enumerator
Gaussian 
GaussianNonLinear 

Constructor & Destructor Documentation

◆ SiliconDetectorDriftDiffusionAlgo()

Herd::SiliconDetectorDriftDiffusionAlgo::SiliconDetectorDriftDiffusionAlgo ( const std::string &  name)

Constructor.

Parameters
nameThe name of the algorithm.

Member Function Documentation

◆ AccumulateSteps()

void Herd::SiliconDetectorDriftDiffusionAlgo::AccumulateSteps ( std::vector< Hit > &  layerHits,
const SiliconDetectorGeoParams geoParams,
unsigned int  firstStrip,
unsigned int  lastStrip,
const SiliconDetectorDigitizationTools::SDChargePacket packet,
float  edep 
)
private

◆ CreateGeoParams()

SiliconDetectorGeoParams Herd::SiliconDetectorDriftDiffusionAlgo::CreateGeoParams ( const SiliconDetectorGeoParams origGeoParams)
private

Creates the geometry parameter objects for the digitized detector.

Starting from the original geometry parameters this method computes the digitized parameters using the digitization parameters stored in private members.

Parameters
origGeoParamsthe original geometry parameters.
Returns
The geometry parameters of the digitized detectors.
Exceptions
std::runtime_errorif the relative position of the first strip on the wafer is less than 0 (i.e. strip outside the wafer).

◆ CreatePacket()

std::unique_ptr< SiliconDetectorDigitizationTools::SDChargePacket > Herd::SiliconDetectorDriftDiffusionAlgo::CreatePacket ( Point  position,
DiffusionType  diffType,
const SiliconDetectorGeoParams geoParams 
)
private

◆ FreeObjects()

std::vector< std::string > Herd::SiliconDetectorDriftDiffusionAlgo::FreeObjects ( const std::vector< std::string > &  objs,
Memory::Status  memStatus 
)
override

Free the memory of unneeded objects.

Currently this method frees the memory of the digitized hits if memStatus is EXHAUSTED.

Parameters
objsThe list of objects to be freed.
memStatusThe current memory occupation status.
Returns
a list of freed objects.

◆ GenerateHits()

void Herd::SiliconDetectorDriftDiffusionAlgo::GenerateHits ( const SiliconDetectorParticleHitsColl particleHitsColl,
const SiliconDetectorHitsColl hitsColl,
SiliconDetectorHitsColl digHitsColl 
)
private

Generate the diffused hits.

This function generates hits on the silicon detector after charge diffusion. It fills the collection passed as the digHitsColl argument with the digitized hits.

Parameters
digGeoParamsCollThe geometry parameters of the digitized detector.
particleHitsCollThe collection of particle hits.
hitsCollThe collection of hits.
digHitsCollThe collection of digitized hits.

◆ Initialize()

bool Herd::SiliconDetectorDriftDiffusionAlgo::Initialize ( )
override

Initialization of the algorithm.

Returns
true if the initialization procedure is successful.

◆ PartitionTrajectory()

std::vector< Point > Herd::SiliconDetectorDriftDiffusionAlgo::PartitionTrajectory ( const ParticleHit hit)
private

Splits the trajectory of a particle hit into N sub-steps, according to the step-size specified in the algo.

Parameters
hitthe particle hit.
Returns
A vector with the mid-points of all the sub-steps.

◆ Process()

bool Herd::SiliconDetectorDriftDiffusionAlgo::Process ( )
override

Process a single event.

Returns
If event processing is successful.

Member Data Documentation

◆ m_biasVoltage

float Herd::SiliconDetectorDriftDiffusionAlgo::m_biasVoltage
protected

◆ m_detName

std::string Herd::SiliconDetectorDriftDiffusionAlgo::m_detName
protected

Name of the detector, e.g "stk".

◆ m_diffType

DiffusionType Herd::SiliconDetectorDriftDiffusionAlgo::m_diffType = DiffusionType::GaussianNonLinear
private

◆ m_diffusionType

std::string Herd::SiliconDetectorDriftDiffusionAlgo::m_diffusionType
protected

◆ m_digSiliconDetectorGeoParamsColl

std::shared_ptr<SiliconDetectorGeoParamsColl> Herd::SiliconDetectorDriftDiffusionAlgo::m_digSiliconDetectorGeoParamsColl
private

◆ m_evStore

StorePtr Herd::SiliconDetectorDriftDiffusionAlgo::m_evStore
private

◆ m_globStore

StorePtr Herd::SiliconDetectorDriftDiffusionAlgo::m_globStore
private

◆ m_intrinsicVoltage

float Herd::SiliconDetectorDriftDiffusionAlgo::m_intrinsicVoltage
protected

◆ m_minStepSize

float Herd::SiliconDetectorDriftDiffusionAlgo::m_minStepSize
protected

◆ m_negEffDiffCoeff

float Herd::SiliconDetectorDriftDiffusionAlgo::m_negEffDiffCoeff
protected

◆ m_origSiliconDetectorGeoParamsColl

observer_ptr<SiliconDetectorGeoParamsColl> Herd::SiliconDetectorDriftDiffusionAlgo::m_origSiliconDetectorGeoParamsColl
private

◆ m_pitch

float Herd::SiliconDetectorDriftDiffusionAlgo::m_pitch
protected

◆ m_posEffDiffCoeff

float Herd::SiliconDetectorDriftDiffusionAlgo::m_posEffDiffCoeff
protected

◆ m_siliconDetectorDigHitsColl

SiliconDetectorHitsColl Herd::SiliconDetectorDriftDiffusionAlgo::m_siliconDetectorDigHitsColl
private

The documentation for this class was generated from the following files: