LDMX Software
APrimeToFCPPair.cxx
Go to the documentation of this file.
1
8
9namespace simcore {
10namespace biasoperators {
11
14 : XsecBiasingOperator(name, p) {
15 volume_ = p.get<std::string>("volume");
16 factor_ = p.get<double>("factor");
17 threshold_ = p.get<double>("threshold");
18}
19
21 const G4Track* track, const G4BiasingProcessInterface* callingProcess) {
22 if (track->GetKineticEnergy() < threshold_) {
23 return nullptr;
24 }
25
26 std::string current_process =
27 callingProcess->GetWrappedProcess()->GetProcessName();
28 if (current_process.compare(this->getProcessToBias()) == 0) {
29 G4double interaction_length =
30 callingProcess->GetWrappedProcess()->GetCurrentInteractionLength();
31
32 double xsec_unbiased = 1. / interaction_length;
33 double xsec_biased = xsec_unbiased * factor_;
34
35 return BiasedXsec(xsec_biased);
36 }
37 return nullptr;
38}
39
40} // namespace biasoperators
41} // namespace simcore
42
43DECLARE_XSECBIASINGOPERATOR(simcore::biasoperators::APrimeToFCPPair)
Biasing operator for the A' -> fcp+ fcp- process.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:78
Our specialization of the biasing operator used with Geant4.
G4VBiasingOperation * BiasedXsec(double biased_xsec)
Helper method for passing a biased interaction length to the Geant4 biasing framework.
Bias the A' -> fcp+ fcp- process.
APrimeToFCPPair(std::string name, const framework::config::Parameters &p)
Constructor.
G4VBiasingOperation * ProposeOccurenceBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess) override
double threshold_
Minimum kinetic energy [MeV] to allow a track to be biased.
std::string volume_
The volume to bias in.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...