OMSim
Geant4 for IceCube optical module studies
Loading...
Searching...
No Matches
OMSimPMTResponse Class Reference

Class to simulate PMT response. More...

Detailed Description

Process hits on a photocathode and get resulting pulse properties based on lab. measurement data.

Classes

struct  PMTPulse
 Represents the output pulse for a detected photon. More...
 

Public Member Functions

 OMSimPMTResponse ()
 
PMTPulse processPhotocathodeHit (G4double pX, G4double pY, G4double pWavelength)
 Process a hit on the photocathode into a PMT pulse.
 
void makeQEweightInterpolator (const std::string &p_FileNameAbsorbedFraction)
 Configures the QE weight interpolator for PMT response.
 
void makeQEInterpolator (const std::string &p_FileName)
 Creates the QE interpolator from the target QE file.
 
void makeCEweightInterpolator (const std::string &p_FileName)
 Configures the CE weight interpolator for PMT response.
 
void makeScansInterpolators (const std::string &p_PathToFiles)
 
void setScannedWavelengths (std::vector< double > p_wavelengths)
 Set the scanned wavelengths for the PMT response.
 

Private Member Functions

G4double getCharge (G4double p_WavelengthKey)
 Retrieve the charge in PE from measurements for a given wavelength.
 
G4double getCharge (G4double p_WavelengthKey1, G4double p_WavelengthKey2)
 Retrieve the interpolated charge between two given wavelengths.
 
G4double getTransitTime (G4double p_WavelengthKey)
 Retrieve the transit time from measurements for a given wavelength.
 
G4double getTransitTime (G4double p_WavelengthKey1, G4double p_WavelengthKey2)
 Retrieve the interpolated transit time between two given wavelengths.
 
PMTPulse getPulseFromInterpolation (G4double p_WavelengthKey1, G4double p_WavelengthKey2)
 
PMTPulse getPulseFromKey (G4double p_WavelengthKey)
 
G4double wavelengthInterpolatedValue (std::map< G4double, TH2D * > p_Map, G4double p_WavelengthKey1, G4double p_WavelengthKey2)
 
std::vector< G4double > getScannedWavelengths ()
 Get the scanned wavelengths for the PMT response.
 

Private Attributes

bool m_scansInterpolatorsAvailable = false
 
bool m_QEWeightInterpolatorAvailable = false
 
bool m_QEInterpolatorAvailable = false
 
bool m_CEWeightInterpolatorAvailable = false
 
bool m_simplePMT
 
double m_X
 
double m_Y
 
G4double m_wavelength
 
std::vector< G4double > m_scannedWavelengths
 
TGraph * m_relativeDetectionEfficiencyInterpolator
 
TGraph * m_QEfileInterpolator
 
TGraph * m_weightAbsorbedToQEInterpolator
 
std::map< G4double, TH2D * > m_gainG2Dmap
 
std::map< G4double, TH2D * > m_gainResolutionG2Dmap
 
std::map< G4double, TH2D * > m_transitTimeG2Dmap
 
std::map< G4double, TH2D * > m_transitTimeSpreadG2Dmap
 

Constructor & Destructor Documentation

◆ OMSimPMTResponse()

OMSimPMTResponse::OMSimPMTResponse ( )
Todo:
Add PMT data of all PMT types

Member Function Documentation

◆ getCharge() [1/2]

G4double OMSimPMTResponse::getCharge ( G4double  p_WavelengthKey)
private

Charge sampled from a Gaussian distribution with the mean and standard deviation of the single photon electron (SPE) resolution for the provided wavelength key.

Parameters
p_WavelengthKeyThe key for selecting a scan from the available measurements.
Returns
G4double The charge in PE.

◆ getCharge() [2/2]

G4double OMSimPMTResponse::getCharge ( G4double  p_Wavelength1,
G4double  p_Wavelength2 
)
private

This method interpolates the charge between the two provided wavelengths and then returns the charge sampled from a Gaussian distribution with the mean interpolated charge and interpolated single photon electron (SPE) resolution.

Parameters
p_Wavelength1The first wavelength key for interpolation.
p_Wavelength2The second wavelength key for interpolation.
Returns
G4double The interpolated charge in PE.

◆ getPulseFromInterpolation()

OMSimPMTResponse::PMTPulse OMSimPMTResponse::getPulseFromInterpolation ( G4double  p_WavelengthKey1,
G4double  p_WavelengthKey2 
)
private

Get a finished Pulse interpolating scan results between measured wavelengths (simulated photons has a wavelength between these two)

Parameters
p_WavelengthKey1first wavelength key to be used
p_WavelengthKey2second wavelength key to be used
Returns
PMTPulse Struct with transit time, charge and detection probability

◆ getPulseFromKey()

OMSimPMTResponse::PMTPulse OMSimPMTResponse::getPulseFromKey ( G4double  p_WavelengthKey)
private

Get a finished Pulse using a key for the maps directly

Parameters
p_WavelengthKeywavelength key to be used
Returns
PMTPulse Struct with transit time, charge and detection probability

◆ getScannedWavelengths()

std::vector< G4double > OMSimPMTResponse::getScannedWavelengths ( )
private
Returns
std::vector<double> The scanned wavelengths.

◆ getTransitTime() [1/2]

G4double OMSimPMTResponse::getTransitTime ( G4double  p_WavelengthKey)
private

This method returns the transit time sampled from a Gaussian distribution with the mean transit time and transit time spread for the provided wavelength key.

Parameters
p_WavelengthKeyThe key for selecting a scan from the available measurements.
Returns
G4double The transit time in ns.

◆ getTransitTime() [2/2]

G4double OMSimPMTResponse::getTransitTime ( G4double  p_Wavelength1,
G4double  p_Wavelength2 
)
private

This method interpolates the transit time between the two provided wavelengths and then returns the time sampled from a Gaussian distribution with the mean interpolated transit time and interpolated transit time spread.

Parameters
p_Wavelength1The first wavelength key for interpolation.
p_Wavelength2The second wavelength key for interpolation.
Returns
G4double The interpolated transit time in ns.

◆ makeCEweightInterpolator()

void OMSimPMTResponse::makeCEweightInterpolator ( const std::string &  p_FileName)
Parameters
p_FileNameFile name containing CE weights

◆ makeQEInterpolator()

void OMSimPMTResponse::makeQEInterpolator ( const std::string &  p_FileNameTargetQE)
Parameters
p_FileNameTargetQEFile name containing target QE data.

◆ makeQEweightInterpolator()

void OMSimPMTResponse::makeQEweightInterpolator ( const std::string &  p_FileNameAbsorbedFraction)
Parameters
p_FileNameAbsorbedFractionFile name containing absorbed fraction data

◆ processPhotocathodeHit()

OMSimPMTResponse::PMTPulse OMSimPMTResponse::processPhotocathodeHit ( G4double  p_x,
G4double  p_y,
G4double  p_wavelength 
)

Transform a hit based on its location and photon wavelength to a PMT pulse, considering the transit time, charge, and detection probability.

Parameters
p_xx position on photocathode
p_yy position on photocathode
p_wavelengthWavelength of the hitting photon
Returns
PMTPulse representing the processed hit.

◆ setScannedWavelengths()

void OMSimPMTResponse::setScannedWavelengths ( std::vector< double >  p_wavelengths)
Parameters
p_wavelengthsThe scanned wavelengths.

◆ wavelengthInterpolatedValue()

G4double OMSimPMTResponse::wavelengthInterpolatedValue ( std::map< G4double, TH2D * >  p_Map,
G4double  p_Wavelength1,
G4double  p_Wavelength2 
)
private

Get interpolated value between two scans of different wavelenths

Parameters
p_MapMap with TGraph2D scans to be used
p_Wavelength1first reference wavelength for interpolation
p_Wavelength2second reference wavelength for interpolation
Returns
G4double interpolated value

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