Geant4_10
G4MuMinusCapturePrecompound.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4MuMinusCapturePrecompound.cc 68700 2013-04-05 08:44:19Z gcosmo $
27 //
28 //-----------------------------------------------------------------------------
29 //
30 // GEANT4 Class file
31 //
32 // File name: G4MuMinusCapturePrecompound
33 //
34 // Author: V.Ivanchenko (Vladimir.Ivantchenko@cern.ch)
35 //
36 // Creation date: 22 April 2012 on base of G4MuMinusCaptureCascade
37 //
38 //
39 //-----------------------------------------------------------------------------
40 //
41 // Modifications:
42 //
43 //-----------------------------------------------------------------------------
44 
46 #include "Randomize.hh"
47 #include "G4RandomDirection.hh"
48 #include "G4PhysicalConstants.hh"
49 #include "G4SystemOfUnits.hh"
50 #include "G4MuonMinus.hh"
51 #include "G4NeutrinoMu.hh"
52 #include "G4Neutron.hh"
53 #include "G4Proton.hh"
54 #include "G4Triton.hh"
55 #include "G4LorentzVector.hh"
56 #include "G4ParticleDefinition.hh"
57 #include "G4NucleiProperties.hh"
58 #include "G4VPreCompoundModel.hh"
59 #include "G4PreCompoundModel.hh"
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63 
66  : G4HadronicInteraction("muMinusNuclearCapture")
67 {
68  fMuMass = G4MuonMinus::MuonMinus()->GetPDGMass();
69  fProton = G4Proton::Proton();
70  fNeutron = G4Neutron::Neutron();
71  fThreshold = 10*MeV;
72  fTime = 0.0;
73  fPreCompound = ptr;
74  if(!ptr) {
77  ptr = static_cast<G4VPreCompoundModel*>(p);
78  fPreCompound = ptr;
79  if(!ptr) { fPreCompound = new G4PreCompoundModel(); }
80  }
81 }
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
84 
86 {
87  result.Clear();
88 }
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
91 
94  G4Nucleus& targetNucleus)
95 {
96  result.Clear();
98  fTime = projectile.GetGlobalTime();
99  G4double time0 = fTime;
100 
101  G4double muBindingEnergy = projectile.GetBoundEnergy();
102 
103  G4int Z = targetNucleus.GetZ_asInt();
104  G4int A = targetNucleus.GetA_asInt();
106 
107  /*
108  G4cout << "G4MuMinusCapturePrecompound::ApplyYourself: Emu= "
109  << muBindingEnergy << G4endl;
110  */
111  // Energy on K-shell
112  G4double muEnergy = fMuMass + muBindingEnergy;
113  G4double muMom = std::sqrt(muBindingEnergy*(muBindingEnergy + 2.0*fMuMass));
114  G4double availableEnergy = massA + fMuMass - muBindingEnergy;
115  G4double residualMass = G4NucleiProperties::GetNuclearMass(A, Z - 1);
116 
117  G4ThreeVector vmu = muMom*G4RandomDirection();
118  G4LorentzVector aMuMom(vmu, muEnergy);
119 
120  // p or 3He as a target
121  // two body reaction mu- + A(Z,A) -> nuMu + A(Z-1,A)
122  if((1 == Z && 1 == A) || (2 == Z && 3 == A)) {
123 
124  G4ParticleDefinition* pd = 0;
125  if(1 == Z) { pd = fNeutron; }
126  else { pd = G4Triton::Triton(); }
127 
128  //
129  // Computation in assumption of CM reaction
130  //
131  G4double e = 0.5*(availableEnergy -
132  residualMass*residualMass/availableEnergy);
133 
135  AddNewParticle(G4NeutrinoMu::NeutrinoMu(), nudir, e);
136  nudir *= -1.0;
137  AddNewParticle(pd, nudir, availableEnergy - e - residualMass);
138 
139 
140  } else {
141  // sample mu- + p -> nuMu + n reaction in CM of muonic atom
142 
143  // muon
144 //
145 // NOTE by K.Genser and J.Yarba:
146 // The code below isn't working because emu always turns smaller than fMuMass
147 // For this reason the sqrt is producing a NaN
148 //
149 // G4double emu = (availableEnergy*availableEnergy - massA*massA
150 // + fMuMass*fMuMass)/(2*availableEnergy);
151 // G4ThreeVector mudir = G4RandomDirection();
152 // G4LorentzVector momMuon(std::sqrt(emu*emu - fMuMass*fMuMass)*mudir, emu);
153 
154  // nucleus
155  G4LorentzVector momInitial(0.0,0.0,0.0,availableEnergy);
156  G4LorentzVector momResidual, momNu;
157 
158  // pick random proton inside nucleus
159  G4double eEx;
160  fNucleus.Init(A, Z);
161  const std::vector<G4Nucleon>& nucleons= fNucleus.GetNucleons();
162  G4ParticleDefinition* pDef;
163 
164  G4int nneutrons = 1;
165  G4int reentryCount = 0;
166 
167  do {
168  ++reentryCount;
169  G4int index = 0;
170  do {
171  index=G4int(A*G4UniformRand());
172  pDef = nucleons[index].GetDefinition();
173  } while(pDef != fProton);
174  G4LorentzVector momP = nucleons[index].Get4Momentum();
175 
176  // Get CMS kinematics
177  G4LorentzVector theCMS = momP + aMuMom;
178  G4ThreeVector bst = theCMS.boostVector();
179 
180  G4double Ecms = theCMS.mag();
181  G4double Enu = 0.5*(Ecms - neutron_mass_c2*neutron_mass_c2/Ecms);
182  eEx = 0.0;
183 
184  if(Enu > 0.0) {
185  // make the nu, and transform to lab;
186  momNu.set(Enu*G4RandomDirection(), Enu);
187 
188  // nu in lab.
189  momNu.boost(bst);
190  momResidual = momInitial - momNu;
191  eEx = momResidual.mag() - residualMass;
192 
193  // release neutron
194 
195  if(eEx > 0.0) {
196  G4double eth = residualMass - massA + fThreshold + 2*neutron_mass_c2;
197  if(Ecms - Enu > eth) {
198  theCMS -= momNu;
199  G4double ekin = theCMS.e() - eth;
200  G4ThreeVector dir = theCMS.vect().unit();
201  AddNewParticle(fNeutron, dir, ekin);
202  momResidual -=
203  result.GetSecondary(0)->GetParticle()->Get4Momentum();
204  --Z;
205  --A;
206  residualMass = G4NucleiProperties::GetNuclearMass(A, Z);
207  nneutrons = 0;
208  }
209  }
210  }
211  if(Enu <= 0.0 && eEx <= 0.0 && reentryCount > 100) {
213  ed << "Call for " << GetModelName() << G4endl;
214  ed << "Target Z= " << Z
215  << " A= " << A << G4endl;
216  ed << " ApplyYourself does not completed after 100 attempts" << G4endl;
217  G4Exception("G4MuMinusCapturePrecompound::AtRestDoIt", "had006",
218  FatalException, ed);
219  }
220  } while(eEx <= 0.0);
221 
222  G4ThreeVector dir = momNu.vect().unit();
223  AddNewParticle(G4NeutrinoMu::NeutrinoMu(), dir, momNu.e());
224 
225  G4Fragment initialState(A, Z, momResidual);
226  initialState.SetNumberOfExcitedParticle(nneutrons,0);
227  initialState.SetNumberOfHoles(1,1);
228 
229  // decay time for pre-compound/de-excitation starts from zero
230  G4ReactionProductVector* rpv = fPreCompound->DeExcite(initialState);
231  size_t n = rpv->size();
232  for(size_t i=0; i<n; ++i) {
233  G4ReactionProduct* rp = (*rpv)[i];
234 
235  // reaction time
236  fTime = time0 + rp->GetTOF();
237  G4ThreeVector direction = rp->GetMomentum().unit();
238  AddNewParticle(rp->GetDefinition(), direction, rp->GetKineticEnergy());
239  delete rp;
240  }
241  delete rpv;
242  }
243  if(verboseLevel > 1)
244  G4cout << "G4MuMinusCapturePrecompound::ApplyYourself: Nsec= "
245  << result.GetNumberOfSecondaries()
246  <<" E0(MeV)= " <<availableEnergy/MeV
247  <<" Mres(GeV)= " <<residualMass/GeV
248  <<G4endl;
249 
250  return &result;
251 }
252 
253 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
254 
256 {
257  outFile << "Sampling of mu- capture by atomic nucleus from K-shell"
258  << " mesoatom orbit.\n"
259  << "Primary reaction mu- + p -> n + neutrino, neutron providing\n"
260  << " initial excitation of the target nucleus and PreCompound"
261  << " model samples final state\n";
262 }
263 
264 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4MuMinusCapturePrecompound(G4VPreCompoundModel *ptr=0)
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
Hep3Vector boostVector() const
static G4double GetNuclearMass(const G4double A, const G4double Z)
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4HadSecondary * GetSecondary(size_t i)
Int_t index
Definition: macro.C:9
std::ofstream outFile
Definition: GammaRayTel.cc:68
virtual G4ReactionProductVector * DeExcite(G4Fragment &aFragment)=0
const char * p
Definition: xmltok.h:285
void ModelDescription(std::ostream &outFile) const
G4ThreeVector G4RandomDirection()
const G4String & GetModelName() const
int G4int
Definition: G4Types.hh:78
G4ParticleDefinition * GetDefinition() const
void SetStatusChange(G4HadFinalStateStatus aS)
std::vector< G4ReactionProduct * > G4ReactionProductVector
Char_t n[5]
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:87
G4GLOB_DLL std::ostream G4cout
Float_t Z
Definition: plot.C:39
double mag() const
static G4NeutrinoMu * NeutrinoMu()
Definition: G4NeutrinoMu.cc:85
G4double GetBoundEnergy() const
HepLorentzVector & boost(double, double, double)
void Init(G4int theA, G4int theZ)
G4double GetGlobalTime() const
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4LorentzVector Get4Momentum() const
const std::vector< G4Nucleon > & GetNucleons()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
float neutron_mass_c2
Definition: hepunit.py:276
G4double GetKineticEnergy() const
G4HadronicInteraction * FindModel(const G4String &name)
void set(double x, double y, double z, double t)
G4double GetPDGMass() const
static G4HadronicInteractionRegistry * Instance()
Hep3Vector unit() const
G4DynamicParticle * GetParticle()
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
G4double GetTOF() const
G4ThreeVector GetMomentum() const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4int GetNumberOfSecondaries() const
TDirectory * dir
Definition: macro.C:5