Belle II Software development
G4mplIonisationWithDeltaModel.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9// modified from GEANT4 exoticphysics/monopole/*
10
11#pragma once
12
13#include <G4VEmModel.hh>
14#include <G4VEmFluctuationModel.hh>
15#include <vector>
16
17class G4ParticleChangeForLoss;
18
19namespace Belle2 {
25 namespace Monopoles {
26
34 class G4mplIonisationWithDeltaModel : public G4VEmModel, public G4VEmFluctuationModel {
35
36 public:
37
44 explicit G4mplIonisationWithDeltaModel(G4double mCharge,
45 const G4String& nam = "mplIonisationWithDelta");
46
51
57 virtual void Initialise(const G4ParticleDefinition* p,
58 const G4DataVector&) override;
59
72 virtual G4double ComputeDEDXPerVolume(const G4Material* material,
73 const G4ParticleDefinition* p,
74 G4double kineticEnergy,
75 G4double maxEnergy) override;
76
86 virtual G4double ComputeCrossSectionPerElectron(
87 const G4ParticleDefinition* p,
88 G4double kineticEnergy,
89 G4double cutEnergy,
90 G4double maxEnergy);
91
103 virtual G4double ComputeCrossSectionPerAtom(
104 const G4ParticleDefinition* p,
105 G4double kineticEnergy,
106 G4double Z, G4double A,
107 G4double cutEnergy,
108 G4double maxEnergy) override;
109
119 virtual void SampleSecondaries(std::vector<G4DynamicParticle*>* vdp,
120 const G4MaterialCutsCouple* materialCutsCouple,
121 const G4DynamicParticle* dp,
122 G4double tmin,
123 G4double maxEnergy) override;
124
125
137 virtual G4double SampleFluctuations(const G4MaterialCutsCouple* couple,
138 const G4DynamicParticle* dp,
139 G4double tcut,
140 G4double tmax,
141 G4double length,
142 G4double meanLoss) override;
143
154 virtual G4double Dispersion(const G4Material* material,
155 const G4DynamicParticle*,
156 G4double tcut,
157 G4double tmax,
158 G4double length) override;
159
163 virtual G4double MinEnergyCut(const G4ParticleDefinition*,
164 const G4MaterialCutsCouple* couple) override;
165
166 void SetParticle(const G4ParticleDefinition* p);
168 protected:
169
177 virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition* p,
178 G4double kinEnergy) override;
179
180 private:
181
196 G4double ComputeDEDXAhlen(const G4Material* material, G4double bg2, G4double cut);
197
211
212 const G4ParticleDefinition* monopole;
213 G4ParticleDefinition* theElectron;
214 G4ParticleChangeForLoss* fParticleChange;
216 G4double mass;
217 G4double magCharge;
218 //FIXME following is lazy programming
219 G4double twoln10;
220 G4double betalow;
221 G4double betalim;
222 G4double beta2lim;
223 G4double bg2lim;
224 G4double chargeSquare;
225 G4double dedxlim;
227 G4double nmpl;
229 static std::vector<G4double>* dedx0;
230 };
231
232 } //end Monopoles namespace
233
235} //end Belle2 namespace
G4double pi_hbarc2_over_mc2
Convenient constants combination with mass.
G4double betalow
Beta threshold for low asymptotic.
virtual G4double MinEnergyCut(const G4ParticleDefinition *, const G4MaterialCutsCouple *couple) override
Threshold for zero value.
G4double chargeSquare
Square of magnetic charge in units of Dirac charge.
virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition *p, G4double kineticEnergy, G4double Z, G4double A, G4double cutEnergy, G4double maxEnergy) override
Compute cross section per atom for delta electrons emission.
G4ParticleChangeForLoss * fParticleChange
Pointer to ionising particle.
G4ParticleDefinition * theElectron
Electron definition.
const G4ParticleDefinition * monopole
Monopole definition.
G4double dedxlim
dedx limit in asymptotic formula, not used
virtual G4double ComputeDEDXPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double kineticEnergy, G4double maxEnergy) override
G4VEmModel::ComputeDEDXPerVolume implementation.
virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition *p, G4double kinEnergy) override
Calculate maximum energy available for secondary particle emission.
G4double magCharge
Monopole magnetic charge in e+ units.
G4double ComputeDEDXAhlen(const G4Material *material, G4double bg2, G4double cut)
Calculate dedx based on extrapolated Ahlen formula.
virtual void Initialise(const G4ParticleDefinition *p, const G4DataVector &) override
G4VEmModel::Initialise implementation.
G4mplIonisationWithDeltaModel(const G4mplIonisationWithDeltaModel &copy)=delete
Copy constructor should be hidden.
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *vdp, const G4MaterialCutsCouple *materialCutsCouple, const G4DynamicParticle *dp, G4double tmin, G4double maxEnergy) override
Create the sample of secondary delta electrons.
void SetParticle(const G4ParticleDefinition *p)
Read definition of the monopole.
virtual G4double SampleFluctuations(const G4MaterialCutsCouple *couple, const G4DynamicParticle *dp, G4double tcut, G4double tmax, G4double length, G4double meanLoss) override
Create fluctuations in the energies lost to a secondary delta electron.
virtual G4double ComputeCrossSectionPerElectron(const G4ParticleDefinition *p, G4double kineticEnergy, G4double cutEnergy, G4double maxEnergy)
Compute cross section per electron for delta electrons emission.
G4mplIonisationWithDeltaModel & operator=(const G4mplIonisationWithDeltaModel &right)=delete
Assignment operator should be hidden.
virtual G4double Dispersion(const G4Material *material, const G4DynamicParticle *, G4double tcut, G4double tmax, G4double length) override
Calculate dispersion.
static std::vector< G4double > * dedx0
Base dedx for each couple in current material.
G4double betalim
Beta threshold for high energy (only Ahlen formula)
Abstract base class for different kinds of events.