1#include "SimCore/BiasOperators/PhotoNuclear.h"
4namespace biasoperators {
25 "PhotoNuclearBiasing",
31 const G4Track* track,
const G4BiasingProcessInterface* callingProcess) {
43 std::string currentProcess =
44 callingProcess->GetWrappedProcess()->GetProcessName();
45 if (currentProcess.compare(this->getProcessToBias()) == 0) {
46 G4double interactionLength =
47 callingProcess->GetWrappedProcess()->GetCurrentInteractionLength();
56 G4double interactionLength =
57 callingProcess->GetWrappedProcess()->GetCurrentInteractionLength();
59 double emXsecUnbiased = 1. / interactionLength;
61 double emXsecBiased = std::max(
64 G4cout <<
"[ PhotoNuclearXsecBiasingOperator ]: [ WARNING ]: "
65 <<
"Biasing factor is too large." << std::endl;
Class encapsulating parameters for configuring a processor.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
Our specialization of the biasing operator used with Geant4.
void StartRun()
Method called at the beginning of a run.
bool processIsBiased(std::string process)
Check if the given processed is being biased.
G4VBiasingOperation * BiasedXsec(double biased_xsec)
Helper method for passing a biased interaction length to the Geant4 biasing framework.
Bias the Photon-Nuclear process.
double factor_
factor to bias PN by
bool only_children_of_primary_
Should we restrict biasing to only children of primary?
G4BOptnChangeCrossSection * emXsecOperation
Cross-section biasing operation for conversion process.
bool down_bias_conv_
Should we down-bias the gamma conversion process?
G4VBiasingOperation * ProposeOccurenceBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess) override
void StartRun() override
Method called at the beginning of a run.
double threshold_
minimum kinetic energy [MeV] for a track to be biased
static const std::string CONVERSION_PROCESS
Geant4 gamma conversion process name.
double pnXsecUnbiased_
Unbiased photonuclear xsec.
PhotoNuclear(std::string name, const framework::config::Parameters &p)
Constructor.
double pnXsecBiased_
Biased photonuclear xsec.
std::string volume_
Volume we are going to bias within.