2 #include "G4PhysicalConstants.hh" 3 #include "G4SystemOfUnits.hh" 4 #include "G4ParticleTable.hh" 5 #include "G4ParticleDefinition.hh" 6 #include "Randomize.hh" 7 #include "G4NucleiProperties.hh" 17 SetMinEnergy(0.0 * GeV);
18 SetMaxEnergy(100. * TeV);
21 theK0S = G4KaonZeroShort::KaonZeroShort();
22 theAntiL = G4AntiLambda::AntiLambda();
31 const int n_entries = 50;
33 G4double CDF_k[n_entries] = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
34 1.7, 1.8, 1.9, 2, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3, 3.1, 3.2, 3.3,
35 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4., 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9};
37 G4double
x[n_entries] = {0,
92 return CDF_k[n_entries - 1];
93 for (
int i = 1;
i < n_entries;
i++) {
95 return (CDF_k[
i] - CDF_k[
i - 1]) / (
x[
i] -
x[
i - 1]) * (x_in -
x[
i - 1]) + CDF_k[
i - 1];
102 theParticleChange.Clear();
103 const G4HadProjectile* aParticle = &aTrack;
104 G4double ekin = aParticle->GetKineticEnergy();
106 G4int
A = targetNucleus.GetA_asInt();
107 G4int
Z = targetNucleus.GetZ_asInt();
109 G4double m_K0S = G4KaonZeroShort::KaonZeroShort()->GetPDGMass();
110 G4double m_L = G4AntiLambda::AntiLambda()->GetPDGMass();
128 G4LorentzVector lv1 = aParticle->Get4Momentum();
129 edm::LogVerbatim(
"CMSSWNeutronAnnih") <<
"The neutron Fermi momentum (mag, x, y, z) " 130 << targetNucleus.GetFermiMomentum().mag() / MeV <<
" " 131 << targetNucleus.GetFermiMomentum().x() / MeV <<
" " 132 << targetNucleus.GetFermiMomentum().y() / MeV <<
" " 133 << targetNucleus.GetFermiMomentum().z() / MeV;
137 G4double k_neutron =
momDistr(G4UniformRand());
138 G4double momentum_neutron = 0.1973 * GeV * k_neutron;
140 G4double theta_neutron = TMath::ACos(2 * G4UniformRand() - 1);
141 G4double phi_neutron = 2. *
TMath::Pi() * G4UniformRand();
143 G4double p_neutron_x = momentum_neutron * TMath::Sin(theta_neutron) * TMath::Cos(phi_neutron);
144 G4double p_neutron_y = momentum_neutron * TMath::Sin(theta_neutron) * TMath::Sin(phi_neutron);
145 G4double p_neutron_z = momentum_neutron * TMath::Cos(theta_neutron);
148 G4LorentzVector lv0(p_neutron_x,
151 sqrt(
pow(G4Neutron::Neutron()->GetPDGMass(), 2) + momentum_neutron * momentum_neutron));
154 G4double BENeutronInNucleus = 0;
156 BENeutronInNucleus = G4NucleiProperties::GetBindingEnergy(
A,
Z) / (
A);
158 edm::LogVerbatim(
"CMSSWNeutronAnnih") <<
"BE of nucleon in the nucleus (GeV): " << BENeutronInNucleus / GeV;
160 G4LorentzVector lvBE(0, 0, 0, BENeutronInNucleus / GeV);
161 G4LorentzVector lv = lv0 + lv1 - lvBE;
164 G4double etot = lv0.e() + lv1.e() - lvBE.e();
165 if (etot < theK0S->GetPDGMass() +
theAntiL->GetPDGMass()) {
166 theParticleChange.SetEnergyChange(ekin);
167 theParticleChange.SetMomentumChange(aTrack.Get4Momentum().vect().unit());
168 return &theParticleChange;
171 float newIonMass = targetNucleus.AtomicMass(
A - 1,
Z) * 931.5 * MeV;
173 G4LorentzVector nlvIon(0, 0, 0, newIonMass);
175 G4double theta_KS0_star = TMath::ACos(2 * G4UniformRand() - 1);
176 G4double phi_KS0_star = 2. *
TMath::Pi() * G4UniformRand();
178 G4double p_K0S_star_x = TMath::Sin(theta_KS0_star) * TMath::Cos(phi_KS0_star);
179 G4double p_K0S_star_y = TMath::Sin(theta_KS0_star) * TMath::Sin(phi_KS0_star);
180 G4double p_K0S_star_z = TMath::Cos(theta_KS0_star);
182 G4ThreeVector
p(p_K0S_star_x, p_K0S_star_y, p_K0S_star_z);
184 double m0_2 = m0 * m0;
185 double m1_2 = m_K0S * m_K0S;
186 double m2_2 = m_L * m_L;
188 p *= 0.5 / m0 *
sqrt(m0_2 * m0_2 + m1_2 * m1_2 + m2_2 * m2_2 - 2 * m0_2 * m1_2 - 2 * m0_2 * m2_2 - 2 * m1_2 * m2_2);
189 double p2 =
p.mag2();
191 G4LorentzVector nlvK0S(
p,
sqrt(
p2 + m1_2));
192 G4LorentzVector nlvAntiL(-
p,
sqrt(
p2 + m2_2));
195 nlvK0S.boost(lv.boostVector());
196 nlvAntiL.boost(lv.boostVector());
199 theParticleChange.SetStatusChange(stopAndKill);
202 G4DynamicParticle* aSec1 =
new G4DynamicParticle(
theK0S, nlvK0S);
203 theParticleChange.AddSecondary(aSec1);
204 G4DynamicParticle* aSec2 =
new G4DynamicParticle(
theAntiL, nlvAntiL);
205 theParticleChange.AddSecondary(aSec2);
207 const G4ParticleDefinition* theRemainingNucleusDef =
theProton;
209 theRemainingNucleusDef = G4IonTable::GetIonTable()->GetIon(
Z,
A - 1);
210 G4DynamicParticle* aSec3 =
new G4DynamicParticle(theRemainingNucleusDef, nlvIon);
211 theParticleChange.AddSecondary(aSec3);
214 return &theParticleChange;
Log< level::Info, true > LogVerbatim
G4ParticleDefinition * theProton
G4double momDistr(G4double x_in)
~CMSSQNeutronAnnih() override
G4ParticleDefinition * theAntiL
G4ParticleDefinition * theK0S
static CMSSQ * SQ(double mass)
CMSSQNeutronAnnih(double mass)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus) override
G4ParticleDefinition * theSQ
Power< A, B >::type pow(const A &a, const B &b)