1#include "SimCore/XsecBiasingOperator.h"
3#include "Framework/Exception/Exception.h"
9 : G4VBiasingOperator(name) {}
15 processManager_ = G4Electron::ElectronDefinition()->GetProcessManager();
20 G4KaonZeroLong::KaonZeroLongDefinition()->GetProcessManager();
22 EXCEPTION_RAISE(
"BiasSetup",
"Invalid particle type '" +
26 std::cout <<
"[ XsecBiasingOperator ]: Biasing particles of type "
33 EXCEPTION_RAISE(
"BiasSetup",
35 " is not found in list of biased processes!");
42 const G4BiasingProcessSharedData* sharedData =
45 for (
size_t iprocess = 0;
46 iprocess < (sharedData->GetPhysicsBiasingProcessInterfaces()).size();
48 const G4BiasingProcessInterface* wrapperProcess =
49 (sharedData->GetPhysicsBiasingProcessInterfaces())[iprocess];
51 if (wrapperProcess->GetWrappedProcess()->GetProcessName().compareTo(
Class encapsulating parameters for configuring a processor.
virtual std::string getProcessToBias() const =0
Return the process whose cross-section will be biased.
void StartRun()
Method called at the beginning of a run.
XsecBiasingOperator(std::string name, const framework::config::Parameters ¶meters)
Constructor.
bool processIsBiased(std::string process)
Check if the given processed is being biased.
virtual std::string getParticleToBias() const =0
Return the particle which should be biased.
G4ProcessManager * processManager_
Process manager associated with the particle of interest.
G4BOptnChangeCrossSection * xsecOperation_
Cross-section biasing operation.