LDMX Software
PhotoNuclear.h
1
2#ifndef SIMCORE_BIASOPERATORS_PHOTONUCLEAR_H_
3#define SIMCORE_BIASOPERATORS_PHOTONUCLEAR_H_
4
5#include "SimCore/BiasOperators/XsecBiasingOperator.h"
6
7namespace simcore {
8namespace biasoperators {
9
14 public:
16 PhotoNuclear(std::string name, const framework::config::Parameters& p);
17
19 ~PhotoNuclear() override { delete em_xsec_operation_; }
20
22 void StartRun() override;
23
28 G4VBiasingOperation* ProposeOccurenceBiasingOperation(
29 const G4Track* track,
30 const G4BiasingProcessInterface* callingProcess) override;
31
33 std::string getProcessToBias() const override { return "photonNuclear"; }
34
36 std::string getParticleToBias() const override { return "gamma"; }
37
39 std::string getVolumeToBias() const override { return volume_; }
40
42 void RecordConfig(ldmx::RunHeader& h) const override {
43 h.setStringParameter("BiasOperators::PhotoNuclear::Volume", volume_);
44 h.setFloatParameter("BiasOperators::PhotoNuclear::Threshold", threshold_);
45 h.setFloatParameter("BiasOperators::PhotoNuclear::Factor", factor_);
46 h.setIntParameter("BiasOperators::PhotoNuclear::Bias Conv Down",
48 h.setIntParameter("BiasOperators::PhotoNuclear::Only Children Of Primary",
50 }
51
52 private:
54 static const std::string CONVERSION_PROCESS;
55
57 G4BOptnChangeCrossSection* em_xsec_operation_{nullptr};
58
61
63 double pn_xsec_biased_{0};
64
66 std::string volume_;
67
69 double threshold_;
70
72 double factor_;
73
76
79
80}; // PhotoNuclear
81} // namespace biasoperators
82} // namespace simcore
83
84#endif // SIMCORE_BIASOPERATORS_PHOTONUCLEAR_H_
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:68
void setFloatParameter(const std::string &name, float value)
Set a float parameter value.
Definition RunHeader.h:236
void setStringParameter(const std::string &name, std::string value)
Set a string parameter value.
Definition RunHeader.h:261
void setIntParameter(const std::string &name, int value)
Set an int parameter value.
Definition RunHeader.h:211
Our specialization of the biasing operator used with Geant4.
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?
~PhotoNuclear() override
Destructor.
std::string getVolumeToBias() const override
return the volume we want to bias within
bool down_bias_conv_
Should we down-bias the gamma conversion process?
G4BOptnChangeCrossSection * em_xsec_operation_
Cross-section biasing operation for conversion process.
std::string getProcessToBias() const override
return the process we want to bias
std::string getParticleToBias() const override
return the particle that we want to bias
G4VBiasingOperation * ProposeOccurenceBiasingOperation(const G4Track *track, const G4BiasingProcessInterface *callingProcess) override
void StartRun() override
Method called at the beginning of a run.
double pn_xsec_unbiased_
Unbiased photonuclear xsec.
double threshold_
minimum kinetic energy [MeV] for a track to be biased
static const std::string CONVERSION_PROCESS
Geant4 gamma conversion process name.
PhotoNuclear(std::string name, const framework::config::Parameters &p)
Constructor.
double pn_xsec_biased_
Biased photonuclear xsec.
std::string volume_
Volume we are going to bias within.
void RecordConfig(ldmx::RunHeader &h) const override
record the configuration into the run header
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...