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#include "SimCore/G4User/PtrRetrieval.h"
7
8namespace simcore {
9namespace biasoperators {
10
15 public:
17 PhotoNuclear(std::string name, const framework::config::Parameters& p);
18
20 void StartRun() override;
21
26 G4VBiasingOperation* ProposeOccurenceBiasingOperation(
27 const G4Track* track,
28 const G4BiasingProcessInterface* callingProcess) override;
29
31 std::string getProcessToBias() const override { return "photonNuclear"; }
32
34 std::string getParticleToBias() const override { return "gamma"; }
35
37 std::string getVolumeToBias() const override { return volume_; }
38
40 void RecordConfig(ldmx::RunHeader& h) const override {
41 h.setStringParameter("BiasOperators::PhotoNuclear::Volume", volume_);
42 h.setFloatParameter("BiasOperators::PhotoNuclear::Threshold", threshold_);
43 h.setFloatParameter("BiasOperators::PhotoNuclear::Factor", factor_);
44 h.setIntParameter("BiasOperators::PhotoNuclear::Bias Conv Down",
46 h.setIntParameter("BiasOperators::PhotoNuclear::Only Children Of Primary",
48 }
49
50 private:
52 static const std::string CONVERSION_PROCESS;
53
55 G4BOptnChangeCrossSection* em_xsec_operation_{nullptr};
56
59
61 double pn_xsec_biased_{0};
62
64 std::string volume_;
65
67 double threshold_;
68
70 double factor_;
71
74
77
78}; // PhotoNuclear
79} // namespace biasoperators
80} // namespace simcore
81
82#endif // SIMCORE_BIASOPERATORS_PHOTONUCLEAR_H_
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:57
void setFloatParameter(const std::string &name, float value)
Set a float parameter value.
Definition RunHeader.h:197
void setStringParameter(const std::string &name, std::string value)
Set a string parameter value.
Definition RunHeader.h:222
void setIntParameter(const std::string &name, int value)
Set an int parameter value.
Definition RunHeader.h:172
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?
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 ...