remage
Simulation framework for HPGe-based experiments
 
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 "G4GenericMessenger.hh"
20#include "G4ParticleDefinition.hh"
21#include "G4Positron.hh"
22#include "G4Step.hh"
23#include "G4Track.hh"
24#include "G4VParticleChange.hh"
25#include "G4WrapperProcess.hh"
26#include "globals.hh"
27
29
30 public:
31
39 const G4String& aNamePrefix = "RMG_IB",
40 G4ProcessType aType = fDecay
41 );
42
46 virtual ~RMGInnerBremsstrahlungProcess() = default;
47
61 G4VParticleChange* AtRestDoIt(const G4Track& aTrack, const G4Step& aStep) override;
62
76 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep) override;
77
83 void SetEnabled(bool enabled) { fEnabled = enabled; }
84
90 [[nodiscard]] bool IsEnabled() const { return fEnabled; }
91
97 void SetBiasingFactor(double factor) { fBiasingFactor = factor; }
98
104 [[nodiscard]] double GetBiasingFactor() const { return fBiasingFactor; }
105
106 private:
107
115 double PhiFunction(double W_prime, double omega);
116
123 double CalculateIBProbability(double electron_energy);
124
131 double SamplePhotonEnergy(double electron_energy);
132
139 void GenerateInnerBremsstrahlungForSecondaries(
140 G4VParticleChange* particle_change,
141 const G4Track& parent_track
142 );
143
150 bool IsBetaElectron(G4Track* track);
151
152 bool fEnabled = true;
153 double fBiasingFactor = 1.0;
154
155 // messenger stuff
156 std::unique_ptr<G4GenericMessenger> fMessenger;
157 void DefineCommands();
158};
159
160#endif
RMGInnerBremsstrahlungProcess(const G4String &aNamePrefix="RMG_IB", G4ProcessType aType=fDecay)
Constructs a new RMG Inner Bremsstrahlung wrapper process.
Definition RMGInnerBremsstrahlungProcess.cc:37
G4VParticleChange * PostStepDoIt(const G4Track &aTrack, const G4Step &aStep) override
Applies Inner Bremsstrahlung generation after radioactive decay during step.
Definition RMGInnerBremsstrahlungProcess.cc:60
G4VParticleChange * AtRestDoIt(const G4Track &aTrack, const G4Step &aStep) override
Applies Inner Bremsstrahlung generation after radioactive decay.
Definition RMGInnerBremsstrahlungProcess.cc:45
bool IsEnabled() const
Checks if Inner Bremsstrahlung generation is enabled.
Definition RMGInnerBremsstrahlungProcess.hh:90
void SetBiasingFactor(double factor)
Sets a scaling factor for IB probability (for systematic studies).
Definition RMGInnerBremsstrahlungProcess.hh:97
double GetBiasingFactor() const
Gets the current IB probability scaling factor.
Definition RMGInnerBremsstrahlungProcess.hh:104
virtual ~RMGInnerBremsstrahlungProcess()=default
Virtual destructor.
void SetEnabled(bool enabled)
Enables or disables Inner Bremsstrahlung generation.
Definition RMGInnerBremsstrahlungProcess.hh:83