LDMX Software
NeutronInelastic.h
1#ifndef SIMCORE_BIASOPERATORS_NEUTRONINELASTIC_H_
2#define SIMCORE_BIASOPERATORS_NEUTRONINELASTIC_H_
3
4#include "SimCore/XsecBiasingOperator.h"
5
6namespace simcore {
7namespace biasoperators {
8
13 public:
20 NeutronInelastic(std::string name, const framework::config::Parameters& p);
21
23 virtual ~NeutronInelastic() = default;
24
29 G4VBiasingOperation* ProposeOccurenceBiasingOperation(
30 const G4Track* track,
31 const G4BiasingProcessInterface* callingProcess) override;
32
34 std::string getProcessToBias() const override { return "neutronInelastic"; }
35
37 std::string getParticleToBias() const override { return "neutron"; }
38
40 std::string getVolumeToBias() const override { return volume_; }
41
47 void RecordConfig(ldmx::RunHeader& header) const override {
48 header.setStringParameter("BiasOperator::NeutronInelastic::Volume",
49 volume_);
50 header.setFloatParameter("BiasOperator::NeutronInelastic::Factor", factor_);
51 header.setFloatParameter("BiasOperator::NeutronInelastic::Threshold",
53 }
54
55 private:
57 std::string volume_;
58
60 double factor_;
61
63 double threshold_;
64};
65
66} // namespace biasoperators
67} // namespace simcore
68
69#endif // SIMCORE_BIASOPERATORS_NEUTRONINELASTIC_H_
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:54
void setFloatParameter(const std::string &name, float value)
Set a float parameter value.
Definition RunHeader.h:189
void setStringParameter(const std::string &name, std::string value)
Set a string parameter value.
Definition RunHeader.h:214
Our specialization of the biasing operator used with Geant4.
Bias the neutron inelastic collsions.
std::string getVolumeToBias() const override
Return the volume to bias in.
G4VBiasingOperation * ProposeOccurenceBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess) override
double threshold_
Minimum kinetic energy [MeV] to allow a track to be biased.
std::string getProcessToBias() const override
Return the process to bias.
void RecordConfig(ldmx::RunHeader &header) const override
Record the configuration to the run header.
std::string volume_
The volume to bias in.
virtual ~NeutronInelastic()=default
Destructor.
std::string getParticleToBias() const override
Return the particle to bias.