Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
advanced/microelectronics/src/G4ElectronCapture.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: G4ElectronCapture.cc,v 1.1 2010-08-31 11:23:58 vnivanch Exp $
27 // GEANT4 tag $Name: not supported by cvs2svn $
28 //
29 //---------------------------------------------------------------------------
30 //
31 // ClassName: G4ElectronCapture
32 //
33 // Description: The process to kill particles to save CPU
34 //
35 // Author: V.Ivanchenko 31 August 2010
36 //
37 //----------------------------------------------------------------------------
38 //
39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41 
42 #include "G4ElectronCapture.hh"
43 #include "G4SystemOfUnits.hh"
44 #include "G4ParticleDefinition.hh"
45 #include "G4Step.hh"
46 #include "G4Track.hh"
47 #include "G4Region.hh"
48 #include "G4RegionStore.hh"
49 #include "G4Electron.hh"
50 
51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
52 
54  : G4VDiscreteProcess("eCapture", fElectromagnetic), kinEnergyThreshold(ekinlim),
55  regionName(regName), region(0)
56 {
57  if(regName == "" || regName == "world") {
58  regionName = "DefaultRegionForTheWorld";
59  }
61 }
62 
63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
64 
66 {}
67 
68 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
69 
71 {
72  kinEnergyThreshold = val;
73  if(verboseLevel > 0) {
74  G4cout << "### G4ElectronCapture: Tracking cut E(MeV) = "
76  }
77 }
78 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79 
81 {
83  if(region && verboseLevel > 0) {
84  G4cout << "### G4ElectronCapture: Tracking cut E(MeV) = "
85  << kinEnergyThreshold/MeV << " is assigned to " << regionName
86  << G4endl;
87  }
88 }
89 
90 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
91 
93 {
94  return true;
95 }
96 
97 G4double
99  G4double,
101 {
102  // condition is set to "Not Forced"
103  *condition = NotForced;
104 
105  G4double limit = DBL_MAX;
106  if(region) {
107  if(aTrack.GetVolume()->GetLogicalVolume()->GetRegion() == region &&
108  aTrack.GetKineticEnergy() < kinEnergyThreshold) { limit = 0.0; }
109  }
110  return limit;
111 }
112 
113 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
114 
116  const G4Step&)
117 {
118  pParticleChange->Initialize(aTrack);
122  return pParticleChange;
123 }
124 
125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126 
129 {
130  return DBL_MAX;
131 }
132 
133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
134 
135 
G4double GetKineticEnergy() const
G4LogicalVolume * GetLogicalVolume() const
static constexpr double MeV
Definition: G4SIunits.hh:214
virtual G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition)
#define G4endl
Definition: G4ios.hh:61
virtual void BuildPhysicsTable(const G4ParticleDefinition &)
G4ElectronCapture(const G4String &regName, G4double ekinlimit)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
virtual G4double GetMeanFreePath(const G4Track &, G4double, G4ForceCondition *)
G4double condition(const G4ErrorSymMatrix &m)
virtual G4VParticleChange * PostStepDoIt(const G4Track &, const G4Step &)
virtual void Initialize(const G4Track &)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4VParticleChange * pParticleChange
Definition: G4VProcess.hh:283
Definition: G4Step.hh:76
static G4RegionStore * GetInstance()
G4int verboseLevel
Definition: G4VProcess.hh:371
G4ForceCondition
G4GLOB_DLL std::ostream G4cout
virtual G4bool IsApplicable(const G4ParticleDefinition &)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
#define DBL_MAX
Definition: templates.hh:83
void ProposeTrackStatus(G4TrackStatus status)
G4Region * GetRegion() const
G4VPhysicalVolume * GetVolume() const