Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4MuonMinusAtomicCapture.cc
이 파일의 문서화 페이지로 가기
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: G4MuonMinusAtomicCapture.cc $
27 //
28 //---------------------------------------------------------------------
29 //
30 // GEANT4 Class
31 //
32 // GEANT4 Class header file
33 //
34 // File name: G4MuonMinusAtomicCapture
35 //
36 // 20160912 K.L. Genser - New process using G4MuonicAtom somewhat
37 // based on G4HadronStoppingProcess
38 //
39 // Class Description:
40 //
41 // Stopping of mu-
42 //
43 // G4VParticleChange will contain gammas from G4EmCaptureCascade and
44 // resulting G4MuonicAtom
45 //
46 //
47 //------------------------------------------------------------------------
48 
50 #include "G4ParticleDefinition.hh"
51 #include "G4HadronicProcessType.hh"
52 #include "G4MuonMinusBoundDecay.hh"
53 #include "G4HadronicInteraction.hh"
54 #include "G4HadProjectile.hh"
56 #include "G4EmCaptureCascade.hh"
57 #include "G4MuonMinus.hh"
58 #include "G4IonTable.hh"
59 #include "G4RandomDirection.hh"
60 #include "G4HadSecondary.hh"
61 
62 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
63 
65  : G4VRestProcess(name, fHadronic),
66  // : G4HadronicProcess(name, fHadronAtRest),// name, process type
67  fElementSelector(new G4ElementSelector()),
68  fEmCascade(new G4EmCaptureCascade()), // Owned by InteractionRegistry
69  theTotalResult(new G4ParticleChange())
70 {
71  // Modify G4VProcess flags to emulate G4VRest instead of G4VDiscrete
72  // enableAtRestDoIt = true;
73  // enablePostStepDoIt = false;
76 }
77 
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
79 
81 {
83  delete theTotalResult;
84 }
85 
86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
87 
89 {
90  return (&p == G4MuonMinus::MuonMinus());
91 }
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
93 
94 void
96 {
98 }
99 
100 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
101 
103 {
105 }
106 
107 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
108 
111 {
112  *condition = NotForced;
113  return 0.0;
114 }
115 
116 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
117 
119  const G4Step&)
120 {
121  // if primary is not Alive then do nothing (how?)
122  theTotalResult->Initialize(track);
123 
124  G4Nucleus* nucleus = &targetNucleus;
125  // the call below actually sets the nucleus params;
126  // G4Nucleus targetNucleus; is a member of G4HadronicProcess
127  // G4Element* elm =
128  fElementSelector->SelectZandA(track, nucleus);
129 
130  thePro.Initialise(track); // thePro was G4HadProjectile from G4HadronicProcess
131 
132  // save track time an dstart capture from zero time
133  thePro.SetGlobalTime(0.0);
134  G4double time0 = track.GetGlobalTime();
135 
136  // Do the electromagnetic cascade in the nuclear field.
137  // EM cascade should keep G4HadFinalState object,
138  // because it will not be deleted at the end of this method
139  //
140  result = fEmCascade->ApplyYourself(thePro, *nucleus);
141  G4double ebound = result->GetLocalEnergyDeposit(); // may need to carry this over; review
142  G4double edep = 0.0;
143  G4int nSecondaries = result->GetNumberOfSecondaries();
144  thePro.SetBoundEnergy(ebound);
145 
146  // creating the muonic atom
147  ++nSecondaries;
148 
150  G4ParticleDefinition* muonicAtom = itp->GetMuonicAtom(nucleus->GetZ_asInt(),
151  nucleus->GetA_asInt());
152 
153  G4DynamicParticle* dp = new G4DynamicParticle(muonicAtom,G4RandomDirection(),0.);
154  G4HadSecondary hadSec(dp);
155  hadSec.SetTime(time0);
156  result->AddSecondary(hadSec);
157 
158  // Fill results
159  //
162  theTotalResult->SetNumberOfSecondaries(nSecondaries);
163  G4double w = track.GetWeight();
165 
166 #ifdef G4VERBOSE
167  if (GetVerboseLevel() > 1) {
168  G4cout << __func__
169  << " nSecondaries "
170  << nSecondaries
171  << G4endl;
172  }
173 #endif
174 
175  for(G4int i=0; i<nSecondaries; ++i) {
177 
178  // add track global time to the reaction time
179  G4double time = sec->GetTime();
180  if(time < 0.0) { time = 0.0; }
181  time += time0;
182 
183 #ifdef G4VERBOSE
184  if (GetVerboseLevel() > 1) {
185  G4cout << __func__
186  << " "
187  << i
188  << " Resulting secondary "
189  << sec->GetParticle()->GetPDGcode()
190  << " "
192  << G4endl;
193  }
194 #endif
195 
196  // create secondary track
197  G4Track* t = new G4Track(sec->GetParticle(),
198  time,
199  track.GetPosition());
200  t->SetWeight(w*sec->GetWeight());
201 
204  }
205  result->Clear();
206 
207  // fixme: needs to be done at the MuonicAtom level
208  // if (epReportLevel != 0) { // G4HadronicProcess::
209  // CheckEnergyMomentumConservation(track, *nucleus);
210  // }
211  return theTotalResult;
212 }
213 
214 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
215 
216 void G4MuonMinusAtomicCapture::ProcessDescription(std::ostream& outFile) const
217 {
218  outFile << "Stopping of mu- using default element selector, EM cascade"
219  << "G4MuonicAtom is created\n";
220 }
221 
222 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
const XML_Char * name
Definition: expat.h:151
G4double GetWeight() const
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
void ProcessDescription(std::ostream &outFile) const
void SetWeight(G4double aValue)
void RegisterExtraProcess(G4VProcess *)
static G4IonTable * GetIonTable()
Definition: G4IonTable.hh:78
G4int GetPDGcode() const
G4HadSecondary * GetSecondary(size_t i)
void ProposeWeight(G4double finalWeight)
#define G4endl
Definition: G4ios.hh:61
const char * p
Definition: xmltok.h:285
void SetGlobalTime(G4double t)
const G4String & GetParticleName() const
G4MuonMinusAtomicCapture(const G4String &name="muMinusAtomicCaptureAtRest")
const G4TouchableHandle & GetTouchableHandle() const
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
G4ThreeVector G4RandomDirection()
G4double condition(const G4ErrorSymMatrix &m)
void AddSecondary(G4Track *aSecondary)
G4double GetWeight() const
void Initialise(const G4Track &aT)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4double GetTime() const
G4ParticleDefinition * GetDefinition() const
virtual void Initialize(const G4Track &)
G4HadronicInteraction * fEmCascade
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)=0
G4double GetGlobalTime() const
G4int GetVerboseLevel() const
Definition: G4VProcess.hh:445
void SetTouchableHandle(const G4TouchableHandle &apValue)
const G4ThreeVector & GetPosition() const
Definition: G4Step.hh:76
G4bool IsApplicable(const G4ParticleDefinition &)
Double_t edep
G4int GetNumberOfSecondaries() const
void PrintInfo(const G4ParticleDefinition *)
static G4HadronicProcessStore * Instance()
void DeRegisterExtraProcess(G4VProcess *)
G4double GetLocalEnergyDeposit() const
virtual G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition)
int G4int
Definition: G4Types.hh:78
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
virtual G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
G4DynamicParticle * GetParticle()
void SetProcessSubType(G4int)
Definition: G4VProcess.hh:435
G4ForceCondition
G4ParticleDefinition * GetMuonicAtom(G4Ions const *)
Definition: G4IonTable.cc:1917
G4GLOB_DLL std::ostream G4cout
virtual void PreparePhysicsTable(const G4ParticleDefinition &)
void SetTime(G4double aT)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void ProposeTrackStatus(G4TrackStatus status)
void SetBoundEnergy(G4double e)
virtual G4Element * SelectZandA(const G4Track &track, G4Nucleus *)
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
void SetNumberOfSecondaries(G4int totSecondaries)