LDMX Software
PhotoNuclear.h
1
2#ifndef SIMCORE_BIASOPERATORS_PHOTONUCLEAR_H_
3#define SIMCORE_BIASOPERATORS_PHOTONUCLEAR_H_
4
5#include "SimCore/XsecBiasingOperator.h"
6
7namespace simcore {
8namespace biasoperators {
9
14 public:
16 PhotoNuclear(std::string name, const framework::config::Parameters& p);
17
19 void StartRun() override;
20
25 G4VBiasingOperation* ProposeOccurenceBiasingOperation(
26 const G4Track* track,
27 const G4BiasingProcessInterface* callingProcess) override;
28
30 std::string getProcessToBias() const override { return "photonNuclear"; }
31
33 std::string getParticleToBias() const override { return "gamma"; }
34
36 std::string getVolumeToBias() const override { return volume_; }
37
39 void RecordConfig(ldmx::RunHeader& h) const override {
40 h.setStringParameter("BiasOperators::PhotoNuclear::Volume", volume_);
41 h.setFloatParameter("BiasOperators::PhotoNuclear::Threshold", threshold_);
42 h.setFloatParameter("BiasOperators::PhotoNuclear::Factor", factor_);
43 h.setIntParameter("BiasOperators::PhotoNuclear::Bias Conv Down",
45 h.setIntParameter("BiasOperators::PhotoNuclear::Only Children Of Primary",
47 }
48
49 private:
51 static const std::string CONVERSION_PROCESS;
52
54 G4BOptnChangeCrossSection* emXsecOperation{nullptr};
55
57 double pnXsecUnbiased_{0};
58
60 double pnXsecBiased_{0};
61
63 std::string volume_;
64
66 double threshold_;
67
69 double factor_;
70
73
76
77}; // PhotoNuclear
78} // namespace biasoperators
79} // namespace simcore
80
81#endif // SIMCORE_BIASOPERATORS_PHOTONUCLEAR_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
void setIntParameter(const std::string &name, int value)
Set an int parameter value.
Definition RunHeader.h:164
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?
G4BOptnChangeCrossSection * emXsecOperation
Cross-section biasing operation for conversion process.
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?
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 threshold_
minimum kinetic energy [MeV] for a track to be biased
static const std::string CONVERSION_PROCESS
Geant4 gamma conversion process name.
double pnXsecUnbiased_
Unbiased photonuclear xsec.
double pnXsecBiased_
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