remage
Simulation framework for HPGe-based experiments
Toggle main menu visibility
Loading...
Searching...
No Matches
RMGInnerBremsstrahlungProcess.hh
1
// Copyright (C) 2025 Zichen "Francis" Wang <https://orcid.org/0009-0007-4386-0819>
2
//
3
// This program is free software: you can redistribute it and/or modify it under
4
// the terms of the GNU Lesser General Public License as published by the Free
5
// Software Foundation, either version 3 of the License, or (at your option) any
6
// later version.
7
//
8
// This program is distributed in the hope that it will be useful, but WITHOUT
9
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11
// details.
12
//
13
// You should have received a copy of the GNU Lesser General Public License
14
// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
16
#ifndef _RMG_INNER_BREMSSTRAHLUNG_PROCESS_HH
17
#define _RMG_INNER_BREMSSTRAHLUNG_PROCESS_HH
18
19
#include <memory>
20
#include <vector>
21
22
#include "G4GenericMessenger.hh"
23
#include "G4ParticleDefinition.hh"
24
#include "G4Positron.hh"
25
#include "G4Step.hh"
26
#include "G4Track.hh"
27
#include "G4VParticleChange.hh"
28
#include "G4WrapperProcess.hh"
29
#include "globals.hh"
30
31
class
RMGInnerBremsstrahlungProcess
:
public
G4WrapperProcess
{
32
33
public
:
34
41
explicit
RMGInnerBremsstrahlungProcess
(
42
const
G4String
& aNamePrefix =
"RMG_IB"
,
43
G4ProcessType aType = fDecay
44
);
45
49
virtual
~RMGInnerBremsstrahlungProcess
() =
default
;
50
64
G4VParticleChange
*
AtRestDoIt
(
const
G4Track
& aTrack,
const
G4Step
& aStep)
override
;
65
79
G4VParticleChange
*
PostStepDoIt
(
const
G4Track
& aTrack,
const
G4Step
& aStep)
override
;
80
86
void
SetEnabled
(
bool
enabled) { fEnabled = enabled; }
87
93
[[nodiscard]]
bool
IsEnabled
()
const
{
return
fEnabled; }
94
101
void
SetBiasingFactor
(
double
factor) { fBiasingFactor = factor; }
102
108
[[nodiscard]]
double
GetBiasingFactor
()
const
{
return
fBiasingFactor; }
109
110
private
:
111
119
double
PhiFunction(
double
W_prime,
double
omega);
120
132
double
ComputeIBSpectrum(
133
double
electron_energy,
134
std::vector<double>& omegas,
135
std::vector<double>& cdf
136
);
137
145
double
SamplePhotonEnergy(
const
std::vector<double>& omegas,
const
std::vector<double>& cdf);
146
153
void
GenerateInnerBremsstrahlungForSecondaries(
154
G4VParticleChange
* particle_change,
155
const
G4Track
& parent_track
156
);
157
164
bool
IsBetaElectron(
G4Track
* track);
165
166
// messenger stuff. Static so that only one messenger is registered at the shared command path,
167
// regardless of how many per-isotope process instances are constructed.
168
inline
static
std::unique_ptr<G4GenericMessenger> fMessenger =
nullptr
;
169
void
DefineCommands();
170
171
inline
static
bool
fEnabled =
true
;
172
inline
static
double
fBiasingFactor = 1.0;
173
};
174
175
#endif
G4Step
G4String
G4Track
G4VParticleChange
G4WrapperProcess
RMGInnerBremsstrahlungProcess::RMGInnerBremsstrahlungProcess
RMGInnerBremsstrahlungProcess(const G4String &aNamePrefix="RMG_IB", G4ProcessType aType=fDecay)
Constructs a new RMG Inner Bremsstrahlung wrapper process.
Definition
RMGInnerBremsstrahlungProcess.cc:36
RMGInnerBremsstrahlungProcess::PostStepDoIt
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep) override
Applies Inner Bremsstrahlung generation after radioactive decay during step.
Definition
RMGInnerBremsstrahlungProcess.cc:59
RMGInnerBremsstrahlungProcess::AtRestDoIt
G4VParticleChange * AtRestDoIt(const G4Track &aTrack, const G4Step &aStep) override
Applies Inner Bremsstrahlung generation after radioactive decay.
Definition
RMGInnerBremsstrahlungProcess.cc:44
RMGInnerBremsstrahlungProcess::IsEnabled
bool IsEnabled() const
Checks if Inner Bremsstrahlung generation is enabled.
Definition
RMGInnerBremsstrahlungProcess.hh:93
RMGInnerBremsstrahlungProcess::SetBiasingFactor
void SetBiasingFactor(double factor)
Sets a scaling factor for IB probability (for systematic studies).
Definition
RMGInnerBremsstrahlungProcess.hh:101
RMGInnerBremsstrahlungProcess::GetBiasingFactor
double GetBiasingFactor() const
Gets the current IB probability scaling factor.
Definition
RMGInnerBremsstrahlungProcess.hh:108
RMGInnerBremsstrahlungProcess::~RMGInnerBremsstrahlungProcess
virtual ~RMGInnerBremsstrahlungProcess()=default
Virtual destructor.
RMGInnerBremsstrahlungProcess::SetEnabled
void SetEnabled(bool enabled)
Enables or disables Inner Bremsstrahlung generation.
Definition
RMGInnerBremsstrahlungProcess.hh:86
include
RMGInnerBremsstrahlungProcess.hh
Generated by
1.17.0