OMSim
Geant4 for IceCube optical module studies
OMSimSensitiveDetector Class Reference

Represents a sensitive detector.

Inheritance diagram for OMSimSensitiveDetector:
[legend]
Collaboration diagram for OMSimSensitiveDetector:
[legend]

Public Member Functions

 OMSimSensitiveDetector (G4String pName, DetectorType pDetectorType)
 Constructor for OMSimSensitiveDetector. More...
 
 ~OMSimSensitiveDetector ()
 Destructor for OMSimSensitiveDetector.
 
G4bool ProcessHits (G4Step *pStep, G4TouchableHistory *pTouchableHistory) override
 Processes hits for optical photons in the detector. More...
 
void setPMTResponse (OMSimPMTResponse *pResponse)
 Sets the PMT response model. More...
 

Private Member Functions

G4bool checkVolumeAbsorption (G4Step *pStep)
 Checks if the photon was absorbed in the volume. More...
 
G4bool checkBoundaryAbsorption (G4Step *pStep)
 Checks if the photon was detected at a boundary. More...
 
PhotonInfo getPhotonInfo (G4Step *pStep)
 Retrieves photon information from a given step. More...
 
G4bool handlePMT (G4Step *pStep, G4TouchableHistory *pTouchableHistory)
 Handles hits for PMT detectors. More...
 
G4bool handleGeneralPhotonDetector (G4Step *pStep, G4TouchableHistory *pTouchableHistory)
 Handles hits for general photon detectors. More...
 
bool isPhotonDetected (double p_efficiency)
 Monte carlo if the photon was detected based on the detection probability. More...
 
void storePhotonHit (PhotonInfo &pInfo)
 Stores photon hit information into the HitManager. More...
 
void fetchBoundaryProcess ()
 Fetches the boundary process for detecting boundary absorptions. More...
 
void killParticle (G4Track *pTrack)
 Stop the particle from propagating further. Necessary for 100% efficient detectors.
 

Private Attributes

bool m_QEcut
 
OMSimPMTResponsem_PMTResponse
 
DetectorType m_detectorType
 

Static Private Attributes

static thread_local G4OpBoundaryProcessm_boundaryProcess = nullptr
 

Constructor & Destructor Documentation

◆ OMSimSensitiveDetector()

OMSimSensitiveDetector::OMSimSensitiveDetector ( G4String  p_name,
DetectorType  p_detectorType 
)
Parameters
p_nameName of the sensitive detector.
p_detectorTypeType of the detector (e.g., PMT, VolumePhotonDetector).

Member Function Documentation

◆ checkBoundaryAbsorption()

G4bool OMSimSensitiveDetector::checkBoundaryAbsorption ( G4Step *  p_step)
private
Parameters
p_stepThe current step information.
Returns
True if the photon was detected at the boundary, false otherwise.

◆ checkVolumeAbsorption()

G4bool OMSimSensitiveDetector::checkVolumeAbsorption ( G4Step *  p_step)
private
Parameters
p_stepThe current step information.
Returns
True if the photon was absorbed, false otherwise.

◆ fetchBoundaryProcess()

void OMSimSensitiveDetector::fetchBoundaryProcess ( )
private

Retrieves and stores the G4OpBoundaryProcess to check for photon detection at boundaries. Logs an error if the process is not found.

◆ getPhotonInfo()

PhotonInfo OMSimSensitiveDetector::getPhotonInfo ( G4Step *  p_step)
private
Parameters
p_stepThe current step information.
Returns
PhotonInfo struct containing the photon details.

◆ handleGeneralPhotonDetector()

G4bool OMSimSensitiveDetector::handleGeneralPhotonDetector ( G4Step *  p_step,
G4TouchableHistory *  p_touchableHistory 
)
private
Parameters
p_stepThe current step information.
p_touchableHistoryThe history of touchable objects.
Returns
True if the hit was stored, always true for general photon detectors.

◆ handlePMT()

G4bool OMSimSensitiveDetector::handlePMT ( G4Step *  p_step,
G4TouchableHistory *  p_touchableHistory 
)
private
Parameters
p_stepThe current step information.
p_touchableHistoryThe history of touchable objects.
Returns
True if the hit was stored, false otherwise.

◆ isPhotonDetected()

bool OMSimSensitiveDetector::isPhotonDetected ( double  p_efficiency)
private
Parameters
p_efficiencyThe detection probability.
Returns
True if the photon was detected, false otherwise.

◆ ProcessHits()

G4bool OMSimSensitiveDetector::ProcessHits ( G4Step *  p_step,
G4TouchableHistory *  p_touchableHistory 
)
override

If the detector type is one of the perfect detectors (100% efficient), the photon hit is registered directly. Otherwise, it checks for volume or boundary absorption based on the detector type.

Parameters
p_stepThe current step information.
p_touchableHistoryThe history of touchable objects.
Returns
True if the photon hit was stored, false otherwise.

◆ setPMTResponse()

void OMSimSensitiveDetector::setPMTResponse ( OMSimPMTResponse p_response)
Parameters
p_responsePointer to the PMT response object.

◆ storePhotonHit()

void OMSimSensitiveDetector::storePhotonHit ( PhotonInfo p_info)
private
Parameters
p_infoThe photon hit information.

Member Data Documentation

◆ m_boundaryProcess

thread_local G4OpBoundaryProcess * OMSimSensitiveDetector::m_boundaryProcess = nullptr
staticprivate
Todo:
Test several optical modules of same type with new type

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