allpix::SensitiveDetectorActionG4

Handles the steps of the particles in all sensitive devices.

#include <SensitiveDetectorActionG4.hpp>

Inherits from G4VSensitiveDetector

Public Functions

Name
SensitiveDetectorActionG4(const std::shared_ptr< Detector > & detector, TrackInfoManager * track_info_manager, double charge_creation_energy, double fano_factor, double cutoff_time)
Constructs the action handling for every sensitive detector.
unsigned int getTotalDepositedCharge() const
Get total number of charges deposited in the sensitive device bound to this action.
unsigned int getDepositedCharge() const
Get the number of charges deposited in the sensitive device for this event only.
double getTotalDepositedEnergy() const
Get total energy deposited in the sensitive device bound to this action.
double getDepositedEnergy() const
Get the energy deposited in the sensitive device for this event only.
std::vector< ROOT::Math::XYZPoint > getTrackIncidentPositions() const
Get the position of the incident particle tracks for this event.
void clearEventInfo()
Clears deposition information vectors in preparation for the next event.
std::string getName() const
Get the name of the sensitive device bound to this action.
void seed(uint64_t random_seed)
Set the seed of the associated random number generator.
G4bool ProcessHits(G4Step * step, G4TouchableHistory * history) override
Process a single step of a particle passage through this sensor.
void dispatchMessages(Module * module, Messenger * messenger, Event * event)
Send the MCParticle and DepositedCharge messages.

Public Functions Documentation

function SensitiveDetectorActionG4

SensitiveDetectorActionG4(
    const std::shared_ptr< Detector > & detector,
    TrackInfoManager * track_info_manager,
    double charge_creation_energy,
    double fano_factor,
    double cutoff_time
)

Constructs the action handling for every sensitive detector.

Parameters:

  • detector Detector this sensitive device is bound to
  • track_info_manager Pointer to the track information manager
  • charge_creation_energy Energy needed per deposited charge
  • fano_factor Fano factor for fluctuations in the energy fraction going into e/h pair creation
  • cutoff_time Cut-off time for the creation of secondary particles

function getTotalDepositedCharge

unsigned int getTotalDepositedCharge() const

Get total number of charges deposited in the sensitive device bound to this action.

function getDepositedCharge

unsigned int getDepositedCharge() const

Get the number of charges deposited in the sensitive device for this event only.

Warning: The correct number is only available after dispatching the message, before it refers to the previous event.

function getTotalDepositedEnergy

double getTotalDepositedEnergy() const

Get total energy deposited in the sensitive device bound to this action.

function getDepositedEnergy

double getDepositedEnergy() const

Get the energy deposited in the sensitive device for this event only.

Warning: The correct number is only available after dispatching the message, before it refers to the previous event.

function getTrackIncidentPositions

std::vector< ROOT::Math::XYZPoint > getTrackIncidentPositions() const

Get the position of the incident particle tracks for this event.

Warning: The current track positions are only available after dispatching the message, before the function returns the track positions of the previous event.

function clearEventInfo

void clearEventInfo()

Clears deposition information vectors in preparation for the next event.

function getName

std::string getName() const

Get the name of the sensitive device bound to this action.

function seed

inline void seed(
    uint64_t random_seed
)

Set the seed of the associated random number generator.

function ProcessHits

G4bool ProcessHits(
    G4Step * step,
    G4TouchableHistory * history
) override

Process a single step of a particle passage through this sensor.

Parameters:

  • step Information about the step
  • history Parameter not used

function dispatchMessages

void dispatchMessages(
    Module * module,
    Messenger * messenger,
    Event * event
)

Send the MCParticle and DepositedCharge messages.

Parameters:

  • module The module which is responsible for dispatching the message
  • messenger The messenger used to dispatch it
  • event Event to dispatch the messages to

Updated on 2024-12-13 at 08:31:36 +0000