Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit 79ccb4c

Browse files
EinarElentomeichlersmith
authored andcommitted
Update orderings
1 parent 11bfe4f commit 79ccb4c

3 files changed

Lines changed: 33 additions & 25 deletions

File tree

include/SimCore/KaonPhysics.h

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,25 @@ class KaonPhysics : public G4VPhysicsConstructor {
4040
* K^+ -> \mu^+ + \nu_\mu
4141
* K^+ -> \pi^+ + \pi^0
4242
* K^+ -> \pi^+ + \pi^- + \pi^+
43-
* K^+ -> \pi^+ + \pi^0 + \pi^0
4443
* K^+ -> \pi^0 + e^+ + \nu_e
4544
* K^+ -> \pi^0 + \mu^+ + \nu_\mu
45+
* K^+ -> \pi^+ + \pi^0 + \pi^0
4646
*
4747
* And vice versa for K^-.
4848
* The indices here correspond to the position of the branching ratio for
4949
* that process in the corresponding parameter as well as the position in
5050
* the decay table.
51+
*
52+
* @note: The order in the the decay table is sorted by the branching ratios
53+
* of the default physics settings!
5154
*/
5255
enum ChargedKaonDecayChannel {
5356
mu_nu = 0,
5457
pi_pi0 = 1,
5558
pi_pi_pi = 2,
56-
pi_pi0_pi0 = 3,
57-
pi0_e_nu = 4,
58-
pi0_mu_nu = 5
59+
pi0_e_nu = 3,
60+
pi0_mu_nu = 4,
61+
pi_pi0_pi0 = 5,
5962
};
6063
/**
6164
*
@@ -64,26 +67,29 @@ class KaonPhysics : public G4VPhysicsConstructor {
6467
*
6568
* The processes are
6669
*
67-
* K^0_L -> \pi^0 + \pi^0 + \pi^0
68-
* K^0_L -> \pi^0 + \pi^+ + \pi^-
6970
* K^0_L -> \pi^- + e^+ + \nu_e
7071
* K^0_L -> \pi^+ + e^- + \nu_e
72+
* K^0_L -> \pi^0 + \pi^0 + \pi^0
7173
* K^0_L -> \pi^- + \mu^+ + \nu_\mu
7274
* K^0_L -> \pi^+ + \mu^- + \nu_\mu
75+
* K^0_L -> \pi^0 + \pi^+ + \pi^-
7376
*
7477
* and
7578
*
7679
* K^0_S -> \pi^+ + \pi^-
7780
* K^0_S -> \pi^0 + \pi^0
7881
*
82+
* @note: The order in the the decay table is sorted by the branching ratios
83+
* of the default physics settings!
84+
*
7985
**/
8086
enum KaonZeroLongDecayChannel {
81-
pi0_pi0_pi0 = 0,
82-
pi0_pip_pim = 1,
83-
pip_e_nu = 2,
84-
pim_e_nu = 3,
85-
pim_mu_nu = 4,
86-
pip_mu_nu = 5,
87+
pim_e_nu = 0,
88+
pip_e_nu = 1,
89+
pi0_pi0_pi0 = 2,
90+
pim_mu_nu = 3,
91+
pip_mu_nu = 4,
92+
pi0_pip_pim = 5,
8793
};
8894
enum KaonZeroShortDecayChannel {
8995
pip_pim = 0,
@@ -107,6 +113,7 @@ class KaonPhysics : public G4VPhysicsConstructor {
107113
// If > 0, dump details about what was changed
108114
// If > 1, dump details about the initial branching ratios
109115
int verbosity;
116+
110117
public:
111118
KaonPhysics(const G4String& name,
112119
const framework::config::Parameters& parameters);

python/kaon_physics.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,25 @@ def __init__(self):
5555
0.6355, # K^+ -> mu^+ + nu_mu
5656
0.2066, # K^+ -> pi^+ + pi^0
5757
0.0559, # K^+ -> pi^+ + pi^- + pi^+
58-
0.01761, # K^+ -> pi^+ + pi^0 + pi^0
5958
0.0507, # K^+ -> pi^0 + e^+ + nu_e
6059
0.0335, # K^+ -> pi^0 + mu^+ + nu_mu
60+
0.01761, # K^+ -> pi^+ + pi^0 + pi^0
6161
]
6262
self.kminus_branching_ratios = [
6363
0.6355, # K^- -> mu^- + anti_nu_mu
6464
0.2066, # K^- -> pi^- + pi^0
6565
0.0559, # K^- -> pi^- + pi^+ + pi^-
66-
0.01761, # K-+ -> pi^- + pi^0 + pi^0
6766
0.0507, # K-+ -> pi^0 + e^- + anti_nu_e
6867
0.0335, # K-+ -> pi^0 + mu^- + anti_nu_mu
68+
0.01761, # K-+ -> pi^- + pi^0 + pi^0
6969
]
7070
self.k0l_branching_ratios = [
71-
0.1952, # K^0_L -> pi^0 + pi^0 + pi^0
72-
0.1254, # K^0_L -> pi^0 + pi^+ + pi^-
7371
0.2027, # K^0_L -> pi^- + e^+ + nu_e
7472
0.2027, # K^0_L -> pi^+ + e^- + anti_nu_e
73+
0.1952, # K^0_L -> pi^0 + pi^0 + pi^0
7574
0.1352, # K^0_L -> pi^- + mu^+ + nu_mu
7675
0.1352, # K^0_L -> pi^+ + mu^- + anti_nu_mu
76+
0.1254, # K^0_L -> pi^0 + pi^+ + pi^-
7777
]
7878
self.k0s_branching_ratios = [
7979
0.6920, # K^0_S -> pi^+ + pi^-
@@ -101,19 +101,19 @@ def upKaons():
101101
kaon_physics = KaonPhysics()
102102
kaon_physics.kplus_branching_ratios = [
103103
0.8831, # K^+ -> mu^+ + nu_mu
104-
0., # K^+ -> pi^+ + pi^0
105-
0., # K^+ -> pi^+ + pi^- + pi^+
106-
0., # K^+ -> pi^+ + pi^0 + pi^0
104+
0., # K^+ -> pi^+ + pi^0
105+
0., # K^+ -> pi^+ + pi^- + pi^+
107106
0.0704, # K^+ -> pi^0 + e^+ + nu_e
108107
0.0465, # K^+ -> pi^0 + mu^+ + nu_mu
108+
0., # K^+ -> pi^+ + pi^0 + pi^0
109109
]
110110
kaon_physics.kminus_branching_ratios = [
111111
0.8831, # K^- -> mu^- + anti_nu_mu
112-
0., # K^- -> pi^- + pi^0
113-
0., # K^- -> pi^- + pi^+ + pi^-
114-
0., # K-+ -> pi^- + pi^0 + pi^0
115-
0.0704, # K-+ -> pi^0 + e^- + anti_nu_e
116-
0.0464, # K-+ -> pi^0 + mu^- + anti_nu_mu
112+
0., # K^- -> pi^- + pi^0
113+
0., # K^- -> pi^- + pi^+ + pi^-
114+
0.0704, # K^- -> pi^0 + e^- + anti_nu_e
115+
0.0464, # K^- -> pi^0 + mu^- + anti_nu_mu
116+
0., # K^- -> pi^- + pi^0 + pi^0
117117
]
118118
kaon_physics.kplus_lifetime_factor = 1/50.
119119
kaon_physics.kminus_lifetime_factor = 1/50.

src/SimCore/KaonPhysics.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ KaonPhysics::KaonPhysics(const G4String& name,
2323
void KaonPhysics::setDecayProperties(
2424
G4ParticleDefinition* kaon, const std::vector<double>& branching_ratios,
2525
double lifetime_factor) const {
26-
kaon->SetPDGLifeTime(kaon->GetPDGLifeTime() * lifetime_factor);
2726
auto table{kaon->GetDecayTable()};
2827
if (!table) {
2928
EXCEPTION_RAISE("KaonPhysics", "Unable to get the decay table from " +
@@ -34,6 +33,7 @@ void KaonPhysics::setDecayProperties(
3433
<< std::endl;
3534
DumpDecayDetails(kaon);
3635
}
36+
kaon->SetPDGLifeTime(kaon->GetPDGLifeTime() * lifetime_factor);
3737
if (kaon == G4KaonZeroLong::Definition()) {
3838
(*table)[KaonZeroLongDecayChannel::pi0_pi0_pi0]->SetBR(
3939
branching_ratios[KaonZeroLongDecayChannel::pi0_pi0_pi0]);
@@ -112,4 +112,5 @@ void KaonPhysics::DumpDecayDetails(const G4ParticleDefinition* kaon) const {
112112
<< std::endl;
113113
}
114114
}
115+
115116
} // namespace simcore

0 commit comments

Comments
 (0)