1#include "SimCore/BiasOperators/PhotoNuclear.h"
4namespace biasoperators {
11 volume_ = p.getParameter<std::string>(
"volume");
12 threshold_ = p.getParameter<
double>(
"threshold");
13 factor_ = p.getParameter<
double>(
"factor");
25 "PhotoNuclearBiasing",
31 const G4Track* track,
const G4BiasingProcessInterface* callingProcess) {
43 std::string currentProcess =
44 callingProcess->GetWrappedProcess()->GetProcessName();
47 if (currentProcess.compare(this->getProcessToBias()) == 0) {
48 G4double interactionLength =
49 callingProcess->GetWrappedProcess()->GetCurrentInteractionLength();
64 G4double interactionLength =
65 callingProcess->GetWrappedProcess()->GetCurrentInteractionLength();
67 double emXsecUnbiased = 1. / interactionLength;
69 double emXsecBiased = std::max(
72 ldmx_log(debug) <<
"EM XS = PN unbiased XS! The biasing factor ("
Class encapsulating parameters for configuring a processor.
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.