Skip to content

Commit

Permalink
Adjusted Vitrovex scintillation yields for new PMT simulation + docum…
Browse files Browse the repository at this point in the history
…entation
  • Loading branch information
MarkusDittmer committed Jan 31, 2025
1 parent b909cba commit c87a047
Show file tree
Hide file tree
Showing 14 changed files with 658,388 additions and 6 deletions.
35 changes: 29 additions & 6 deletions common/framework/src/OMSimMaterialHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,15 @@ namespace ScintillationProcessor
void extractYieldAlpha(ParameterTable *p_dataFile, const boost::property_tree::ptree &p_jsonTree, G4MaterialPropertiesTable *p_MPT, G4String p_temperature)
{
extractYield(p_dataFile, p_jsonTree, p_MPT, p_temperature, "SCINTILLATIONYIELD", "yield_alphas", "jYieldAlphaTemperature", "jYieldAlpha");

// Scale the Vitrovex alpha yield by a temperature dependant factor resulting from PMT simulation changes. (See OMSim/documentation/notebooks/scintillation_yield_PMTefficiencyCorrection/GetYieldFactorAndRescale.ipynb).
if (p_jsonTree.get<G4String>("jMaterialName") == "RiAbs_Glass_Vitrovex")
{
log_info("Vitrovex alpha yield will be scaled due to PMT efficiency changes.");
G4double alphaYield = p_MPT->GetConstProperty("SCINTILLATIONYIELD");
alphaYield *= 0.0009725 * std::stod(p_temperature) + 1.40;
p_MPT->AddConstProperty("SCINTILLATIONYIELD", alphaYield, true);
}
}
/**
* @brief Extracts and interpolates the electron scintillation yield for a given temperature.
Expand All @@ -551,17 +560,31 @@ namespace ScintillationProcessor
*/
void extractYieldElectron(ParameterTable *p_dataFile, const boost::property_tree::ptree &p_jsonTree, G4MaterialPropertiesTable *p_MPT, G4String p_temperature)
{
try
// Scale Vitrovex electron yield with the temperature dependant measured electron yield. (See OMSim/documentation/notebooks/scintillation_yield_PMTefficiencyCorrection/GetYieldFactorAndRescale.ipynb).
if (p_jsonTree.get<G4String>("jMaterialName") == "RiAbs_Glass_Vitrovex")
{
extractYield(p_dataFile, p_jsonTree, p_MPT, p_temperature, "SCINTILLATIONYIELDELECTRONS", "yield_electrons", "jYieldElectronTemperature", "jYieldElectron");
log_info("Vitrovex electron yield set to alpha yield scaled by electron yield factor.");

G4double alphaYield = p_MPT->GetConstProperty("SCINTILLATIONYIELD");
G4double temperature = std::stod(p_temperature);
G4double electronYield = alphaYield * (-0.0028602 * temperature + 1.66032); //2018 glass batch

p_MPT->AddConstProperty("SCINTILLATIONYIELDELECTRONS", electronYield, true);
log_trace("Alpha yield: {} Electron yield: {}", alphaYield, electronYield);
}
catch (...)
else
{
log_warning("Electron yield not found, using alpha yield.");
extractYield(p_dataFile, p_jsonTree, p_MPT, p_temperature, "SCINTILLATIONYIELDELECTRONS", "yield_alphas", "jYieldAlphaTemperature", "jYieldAlpha");
try
{
extractYield(p_dataFile, p_jsonTree, p_MPT, p_temperature, "SCINTILLATIONYIELDELECTRONS", "yield_electrons", "jYieldElectronTemperature", "jYieldElectron");
}
catch (...)
{
log_warning("Electron yield not found, using alpha yield.");
extractYield(p_dataFile, p_jsonTree, p_MPT, p_temperature, "SCINTILLATIONYIELDELECTRONS", "yield_alphas", "jYieldAlphaTemperature", "jYieldAlpha");
}
}
}

}

/**
Expand Down
Loading

1 comment on commit c87a047

@martinunland
Copy link
Collaborator

@martinunland martinunland commented on c87a047 Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarkusDittmer Why not change the yield on the scintillation file?
Read function should be general

Please sign in to comment.