LDMX Software
|
Bias operator for the dark brem process. More...
#include <DarkBrem.h>
Public Member Functions | |
DarkBrem (std::string name, const framework::config::Parameters &p) | |
Constructor. | |
virtual | ~DarkBrem ()=default |
Destructor. | |
G4VBiasingOperation * | ProposeOccurenceBiasingOperation (const G4Track *track, const G4BiasingProcessInterface *callingProcess) override |
Calculate the biased cross section given the input process and track. | |
std::string | getProcessToBias () const override |
Return the name of the process this operator biases. | |
std::string | getParticleToBias () const override |
Return the name of the particle this operator biases. | |
std::string | getVolumeToBias () const override |
Return the volume this operator biases. | |
void | RecordConfig (ldmx::RunHeader &header) const override |
Record the configuration of this biasing operator into the run header. | |
Public Member Functions inherited from simcore::XsecBiasingOperator | |
XsecBiasingOperator (std::string name, const framework::config::Parameters ¶meters) | |
Constructor. | |
virtual | ~XsecBiasingOperator ()=default |
Destructor. | |
void | StartRun () |
Method called at the beginning of a run. | |
Private Attributes | |
std::string | volume_ |
DEBUG FUNCTION This function is called by the biasing interface class during PostStepDoIt. | |
double | factor_ |
factor we want to bias by | |
bool | bias_all_ |
should we bias all electrons? (or only the primary) | |
Additional Inherited Members | |
Public Types inherited from simcore::XsecBiasingOperator | |
using | Factory = ::simcore::Factory< XsecBiasingOperator, std::shared_ptr< XsecBiasingOperator >, std::string, const framework::config::Parameters & > |
The BiasingOperator factory. | |
Protected Member Functions inherited from simcore::XsecBiasingOperator | |
G4VBiasingOperation * | BiasedXsec (double biased_xsec) |
Helper method for passing a biased interaction length to the Geant4 biasing framework. | |
bool | processIsBiased (std::string process) |
Check if the given processed is being biased. | |
G4VBiasingOperation * | ProposeFinalStateBiasingOperation (const G4Track *, const G4BiasingProcessInterface *) |
Do not propose any biasing on final states. | |
G4VBiasingOperation * | ProposeNonPhysicsBiasingOperation (const G4Track *, const G4BiasingProcessInterface *) |
Do not propose any non-physics biasing. | |
Protected Attributes inherited from simcore::XsecBiasingOperator | |
G4BOptnChangeCrossSection * | xsecOperation_ {nullptr} |
Cross-section biasing operation. | |
G4ProcessManager * | processManager_ {nullptr} |
Process manager associated with the particle of interest. | |
Bias operator for the dark brem process.
Definition at line 16 of file DarkBrem.h.
simcore::biasoperators::DarkBrem::DarkBrem | ( | std::string | name, |
const framework::config::Parameters & | p | ||
) |
Constructor.
Calls base class constructor and allows access to configuration parameters.
Definition at line 12 of file DarkBrem.cxx.
References bias_all_, factor_, framework::config::Parameters::getParameter(), and volume_.
|
virtualdefault |
Destructor.
Blank right now
|
inlineoverridevirtual |
Return the name of the particle this operator biases.
Implements simcore::XsecBiasingOperator.
Definition at line 56 of file DarkBrem.h.
|
inlineoverridevirtual |
Return the name of the process this operator biases.
Implements simcore::XsecBiasingOperator.
Definition at line 51 of file DarkBrem.h.
|
inlineoverridevirtual |
Return the volume this operator biases.
Implements simcore::XsecBiasingOperator.
Definition at line 59 of file DarkBrem.h.
References volume_.
|
overridevirtual |
Calculate the biased cross section given the input process and track.
This allows for us to have access to the current information about the track while calculating the biased cross section.
[in] | track | const pointer to track to Bias |
[in] | callingProcess | process that might be biased by this operator |
Implements simcore::XsecBiasingOperator.
Definition at line 19 of file DarkBrem.cxx.
References bias_all_, simcore::XsecBiasingOperator::BiasedXsec(), and factor_.
|
overridevirtual |
Record the configuration of this biasing operator into the run header.
[in,out] | header | RunHeader to record configuration to |
Implements simcore::XsecBiasingOperator.
Definition at line 44 of file DarkBrem.cxx.
References bias_all_, factor_, ldmx::RunHeader::setFloatParameter(), ldmx::RunHeader::setIntParameter(), ldmx::RunHeader::setStringParameter(), and volume_.
|
private |
should we bias all electrons? (or only the primary)
Definition at line 103 of file DarkBrem.h.
Referenced by DarkBrem(), ProposeOccurenceBiasingOperation(), and RecordConfig().
|
private |
factor we want to bias by
Definition at line 100 of file DarkBrem.h.
Referenced by DarkBrem(), ProposeOccurenceBiasingOperation(), and RecordConfig().
|
private |
DEBUG FUNCTION This function is called by the biasing interface class during PostStepDoIt.
You can observe the particle change that was produced by the process and the weight that will be multiplied into this particle change.
This is called inside G4VBiasingOperator::ReportOperationApplied which is called inside G4BiasingProcessInterface::PostStepDoIt void OperationApplied(const G4BiasingProcessInterface* callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation* operationApplied, G4double weight, G4VBiasingOperation* finalStateOpApplied, const G4VParticleChange* particleChangeProduced ) { std::string currentProcess = callingProcess->GetWrappedProcess()->GetProcessName(); if (currentProcess.compare(this->getProcessToBias()) == 0) { std::cout << "DB Final State Biasing Operator Applied: " << callingProcess->GetProcessName() << " -> " << weight*particleChangeProduced->GetWeight() << std::endl; } } volume we want to bias in
Definition at line 97 of file DarkBrem.h.
Referenced by DarkBrem(), getVolumeToBias(), and RecordConfig().