diff --git a/include/SimCore/KaonPhysics.h b/include/SimCore/KaonPhysics.h index 97571c1..1ced0b7 100644 --- a/include/SimCore/KaonPhysics.h +++ b/include/SimCore/KaonPhysics.h @@ -40,22 +40,25 @@ class KaonPhysics : public G4VPhysicsConstructor { * K^+ -> \mu^+ + \nu_\mu * K^+ -> \pi^+ + \pi^0 * K^+ -> \pi^+ + \pi^- + \pi^+ - * K^+ -> \pi^+ + \pi^0 + \pi^0 * K^+ -> \pi^0 + e^+ + \nu_e * K^+ -> \pi^0 + \mu^+ + \nu_\mu + * K^+ -> \pi^+ + \pi^0 + \pi^0 * * And vice versa for K^-. * The indices here correspond to the position of the branching ratio for * that process in the corresponding parameter as well as the position in * the decay table. + * + * @note: The order in the the decay table is sorted by the branching ratios + * of the default physics settings! */ enum ChargedKaonDecayChannel { mu_nu = 0, pi_pi0 = 1, pi_pi_pi = 2, - pi_pi0_pi0 = 3, - pi0_e_nu = 4, - pi0_mu_nu = 5 + pi0_e_nu = 3, + pi0_mu_nu = 4, + pi_pi0_pi0 = 5, }; /** * @@ -64,26 +67,29 @@ class KaonPhysics : public G4VPhysicsConstructor { * * The processes are * - * K^0_L -> \pi^0 + \pi^0 + \pi^0 - * K^0_L -> \pi^0 + \pi^+ + \pi^- * K^0_L -> \pi^- + e^+ + \nu_e * K^0_L -> \pi^+ + e^- + \nu_e + * K^0_L -> \pi^0 + \pi^0 + \pi^0 * K^0_L -> \pi^- + \mu^+ + \nu_\mu * K^0_L -> \pi^+ + \mu^- + \nu_\mu + * K^0_L -> \pi^0 + \pi^+ + \pi^- * * and * * K^0_S -> \pi^+ + \pi^- * K^0_S -> \pi^0 + \pi^0 * + * @note: The order in the the decay table is sorted by the branching ratios + * of the default physics settings! + * **/ enum KaonZeroLongDecayChannel { - pi0_pi0_pi0 = 0, - pi0_pip_pim = 1, - pip_e_nu = 2, - pim_e_nu = 3, - pim_mu_nu = 4, - pip_mu_nu = 5, + pim_e_nu = 0, + pip_e_nu = 1, + pi0_pi0_pi0 = 2, + pim_mu_nu = 3, + pip_mu_nu = 4, + pi0_pip_pim = 5, }; enum KaonZeroShortDecayChannel { pip_pim = 0, @@ -107,6 +113,7 @@ class KaonPhysics : public G4VPhysicsConstructor { // If > 0, dump details about what was changed // If > 1, dump details about the initial branching ratios int verbosity; + public: KaonPhysics(const G4String& name, const framework::config::Parameters& parameters); diff --git a/python/kaon_physics.py b/python/kaon_physics.py index f45caca..a35aa3b 100644 --- a/python/kaon_physics.py +++ b/python/kaon_physics.py @@ -55,25 +55,25 @@ def __init__(self): 0.6355, # K^+ -> mu^+ + nu_mu 0.2066, # K^+ -> pi^+ + pi^0 0.0559, # K^+ -> pi^+ + pi^- + pi^+ - 0.01761, # K^+ -> pi^+ + pi^0 + pi^0 0.0507, # K^+ -> pi^0 + e^+ + nu_e 0.0335, # K^+ -> pi^0 + mu^+ + nu_mu + 0.01761, # K^+ -> pi^+ + pi^0 + pi^0 ] self.kminus_branching_ratios = [ 0.6355, # K^- -> mu^- + anti_nu_mu 0.2066, # K^- -> pi^- + pi^0 0.0559, # K^- -> pi^- + pi^+ + pi^- - 0.01761, # K-+ -> pi^- + pi^0 + pi^0 0.0507, # K-+ -> pi^0 + e^- + anti_nu_e 0.0335, # K-+ -> pi^0 + mu^- + anti_nu_mu + 0.01761, # K-+ -> pi^- + pi^0 + pi^0 ] self.k0l_branching_ratios = [ - 0.1952, # K^0_L -> pi^0 + pi^0 + pi^0 - 0.1254, # K^0_L -> pi^0 + pi^+ + pi^- 0.2027, # K^0_L -> pi^- + e^+ + nu_e 0.2027, # K^0_L -> pi^+ + e^- + anti_nu_e + 0.1952, # K^0_L -> pi^0 + pi^0 + pi^0 0.1352, # K^0_L -> pi^- + mu^+ + nu_mu 0.1352, # K^0_L -> pi^+ + mu^- + anti_nu_mu + 0.1254, # K^0_L -> pi^0 + pi^+ + pi^- ] self.k0s_branching_ratios = [ 0.6920, # K^0_S -> pi^+ + pi^- @@ -101,19 +101,19 @@ def upKaons(): kaon_physics = KaonPhysics() kaon_physics.kplus_branching_ratios = [ 0.8831, # K^+ -> mu^+ + nu_mu - 0., # K^+ -> pi^+ + pi^0 - 0., # K^+ -> pi^+ + pi^- + pi^+ - 0., # K^+ -> pi^+ + pi^0 + pi^0 + 0., # K^+ -> pi^+ + pi^0 + 0., # K^+ -> pi^+ + pi^- + pi^+ 0.0704, # K^+ -> pi^0 + e^+ + nu_e 0.0465, # K^+ -> pi^0 + mu^+ + nu_mu + 0., # K^+ -> pi^+ + pi^0 + pi^0 ] kaon_physics.kminus_branching_ratios = [ 0.8831, # K^- -> mu^- + anti_nu_mu - 0., # K^- -> pi^- + pi^0 - 0., # K^- -> pi^- + pi^+ + pi^- - 0., # K-+ -> pi^- + pi^0 + pi^0 - 0.0704, # K-+ -> pi^0 + e^- + anti_nu_e - 0.0464, # K-+ -> pi^0 + mu^- + anti_nu_mu + 0., # K^- -> pi^- + pi^0 + 0., # K^- -> pi^- + pi^+ + pi^- + 0.0704, # K^- -> pi^0 + e^- + anti_nu_e + 0.0464, # K^- -> pi^0 + mu^- + anti_nu_mu + 0., # K^- -> pi^- + pi^0 + pi^0 ] kaon_physics.kplus_lifetime_factor = 1/50. kaon_physics.kminus_lifetime_factor = 1/50. diff --git a/src/SimCore/KaonPhysics.cxx b/src/SimCore/KaonPhysics.cxx index 8ebc33a..84546b8 100644 --- a/src/SimCore/KaonPhysics.cxx +++ b/src/SimCore/KaonPhysics.cxx @@ -23,7 +23,6 @@ KaonPhysics::KaonPhysics(const G4String& name, void KaonPhysics::setDecayProperties( G4ParticleDefinition* kaon, const std::vector& branching_ratios, double lifetime_factor) const { - kaon->SetPDGLifeTime(kaon->GetPDGLifeTime() * lifetime_factor); auto table{kaon->GetDecayTable()}; if (!table) { EXCEPTION_RAISE("KaonPhysics", "Unable to get the decay table from " + @@ -34,6 +33,7 @@ void KaonPhysics::setDecayProperties( << std::endl; DumpDecayDetails(kaon); } + kaon->SetPDGLifeTime(kaon->GetPDGLifeTime() * lifetime_factor); if (kaon == G4KaonZeroLong::Definition()) { (*table)[KaonZeroLongDecayChannel::pi0_pi0_pi0]->SetBR( branching_ratios[KaonZeroLongDecayChannel::pi0_pi0_pi0]); @@ -112,4 +112,5 @@ void KaonPhysics::DumpDecayDetails(const G4ParticleDefinition* kaon) const { << std::endl; } } + } // namespace simcore