LDMX Software
KaonPhysics.h
1#ifndef SIMCORE_KAON_PHYSICS_H
2#define SIMCORE_KAON_PHYSICS_H
3
4#include <G4ParticleDefinition.hh>
5#include <G4VDecayChannel.hh>
6#include <G4VPhysicsConstructor.hh>
7#include <vector>
8
9#include "Framework/Configure/Parameters.h"
10#include "Framework/Logger.h"
11
12namespace simcore {
13
23class KaonPhysics : public G4VPhysicsConstructor {
24 private:
51 mu_nu = 0,
52 pi_pi0 = 1,
53 pi_pi_pi = 2,
54 pi0_e_nu = 3,
55 pi0_mu_nu = 4,
56 pi_pi0_pi0 = 5,
57 };
83 pim_e_nu = 0,
84 pip_e_nu = 1,
85 pi0_pi0_pi0 = 2,
86 pim_mu_nu = 3,
87 pip_mu_nu = 4,
88 pi0_pip_pim = 5,
89 };
90 enum KaonZeroShortDecayChannel {
91 pip_pim = 0,
92 pi0_pi0 = 1,
93 };
94
95 // Factor to scale the K^+/K^-/K^0_L/K^0_S lifetimes by. To reduce the
96 // lifetime of all charged kaons by a factor 50, set these to 1/50.
97 double kplus_lifetime_factor_{1};
98 double kminus_lifetime_factor_{1};
99 double k0l_lifetime_factor_{1};
100 double k0s_lifetime_factor_{1};
101
102 // Branching ratios for each of the decay processes listed in the
103 // KaonDecayChannel enumerators
104 std::vector<double> kplus_branching_ratios_;
105 std::vector<double> kminus_branching_ratios_;
106 std::vector<double> k0l_branching_ratios_;
107 std::vector<double> k0s_branching_ratios_;
108
109 public:
110 KaonPhysics(const G4String& name,
111 const framework::config::Parameters& parameters);
112 virtual ~KaonPhysics() = default;
113
117 void setDecayProperties(G4ParticleDefinition* kaon,
118 const std::vector<double>& branching_ratios,
119 double lifetime_factor) const;
120
132 void ConstructParticle() override;
133
134 void dumpDecayDetails(const G4ParticleDefinition* kaon) const;
135
142 void ConstructProcess() override {};
143
144 private:
145 mutable framework::logging::logger the_log_{
146 framework::logging::makeLogger("KaonPhysics")};
147};
148} // namespace simcore
149
150#endif /* SIMCORE_KAON_PHYSICS_H */
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
Allows the configuration of properties of kaons produced in the simulation, in particular setting the...
Definition KaonPhysics.h:23
KaonZeroLongDecayChannel
Corresponding entries for the K^0_L.
Definition KaonPhysics.h:82
void ConstructProcess() override
Construct processes.
void setDecayProperties(G4ParticleDefinition *kaon, const std::vector< double > &branching_ratios, double lifetime_factor) const
Set the lifetime and branching ratios for one of the kaon species.
ChargedKaonDecayChannel
Represents the 6 possible decay channels for charged kaons in Geant4 (See G4KaonMinus....
Definition KaonPhysics.h:50
void ConstructParticle() override
Construct/Update particles.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...