Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
G4EmCaptureCascadeWithMudirac
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zhou Zhihao
G4EmCaptureCascadeWithMudirac
Commits
291183ff
Commit
291183ff
authored
2 months ago
by
Zhou Zhihao
Browse files
Options
Downloads
Patches
Plain Diff
Update 3 files
- /src/MyPhysicsMessenger.cc - /README.md - /README_English.md
parent
67ba3fde
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+4
-4
4 additions, 4 deletions
README.md
README_English.md
+6
-5
6 additions, 5 deletions
README_English.md
src/MyPhysicsMessenger.cc
+18
-8
18 additions, 8 deletions
src/MyPhysicsMessenger.cc
with
28 additions
and
17 deletions
README.md
+
4
−
4
View file @
291183ff
...
@@ -38,12 +38,12 @@ Geant4默认使用波尔模型计算mu-和介子被原子俘获后跃迁释放
...
@@ -38,12 +38,12 @@ Geant4默认使用波尔模型计算mu-和介子被原子俘获后跃迁释放
## 示例
## 示例
以G4beamline-3.06为例
以G4beamline-3.06为例
1.
在${g4bl_source_path}/g4bl/BLCMDphysics
List
.cc中引入头文件MyPhysics.hh
1.
在${g4bl_source_path}/g4bl/BLCMDphysics.cc中引入头文件MyPhysics.hh
2.
在
return physicsLists;前
添加
2.
在
G4VModularPhysicsList
*pl = dynamic_cast<G4VModularPhysicsList*
>(physicsList);下面
添加
MyPhysics
*
myPhysics = new MyPhysics();
MyPhysics
*
myPhysics = new MyPhysics();
p
hysicsList
->RegisterPhysics(myPhysics);
p
l
->RegisterPhysics(myPhysics);
3.
修改${g4bl_source_path}/g4bl/CMakeLists.txt
3.
修改${g4bl_source_path}/g4bl/CMakeLists.txt
1> include_directories(/path_to_MyMuonMinusAtomicCapture
)
1>
添加
include_directories(/path_to_MyMuonMinusAtomicCapture
/include)和link_directories(/path_to_libMyMuonMinusAtomicCapture.so)
2> 修改
2> 修改
target_link_libraries(g4bl ${LIBS})
target_link_libraries(g4bl ${LIBS})
为
为
...
...
This diff is collapsed.
Click to expand it.
README_English.md
+
6
−
5
View file @
291183ff
...
@@ -41,15 +41,16 @@ make
...
@@ -41,15 +41,16 @@ make
Taking G4beamline-3.06 as an example:
Taking G4beamline-3.06 as an example:
1.
Introduce the header file MyMuonMinusAtomicCapture.hh in ${g4bl_source_path}/g4bl/BLCMDphysics
List
.cc
1.
Introduce the header file MyMuonMinusAtomicCapture.hh in ${g4bl_source_path}/g4bl/BLCMDphysics.cc
Add
Add
`MyPhysics* myPhysics = new MyPhysics();`
`MyPhysics* myPhysics = new MyPhysics();`
`p
hysicsList
->RegisterPhysics(myPhysics);`
`p
l
->RegisterPhysics(myPhysics);`
before
after
`
return physicsLists
;`
`
G4VModularPhysicsList *pl = dynamic_cast<G4VModularPhysicsList*>(physicsList)
;`
2.
Modify g4blsourcepath/g4bl/CMakeLists.txt
2.
Modify g4blsourcepath/g4bl/CMakeLists.txt
1> Add
1> Add
`include_directories(/pathtoMyMuonMinusAtomicCapture)`
`include_directories(/path_to_MyMuonMinusAtomicCapture/include)`
`link_directories(/path_to_libMyMuonMinusAtomicCapture.so)`
2> Change
2> Change
`target_link_libraries(g4bl ${LIBS})`
`target_link_libraries(g4bl ${LIBS})`
to
to
...
...
This diff is collapsed.
Click to expand it.
src/MyPhysicsMessenger.cc
+
18
−
8
View file @
291183ff
...
@@ -23,6 +23,10 @@
...
@@ -23,6 +23,10 @@
#include
"G4HadronicInteractionRegistry.hh"
#include
"G4HadronicInteractionRegistry.hh"
#include
"G4RunManager.hh"
#include
"G4RunManager.hh"
#include
"G4ParticleTable.hh"
#include
"G4GenericMuonicAtom.hh"
#include
"G4MuonicAtomDecay.hh"
MyPhysicsMessenger
::
MyPhysicsMessenger
(
MyPhysics
*
phy
)
MyPhysicsMessenger
::
MyPhysicsMessenger
(
MyPhysics
*
phy
)
:
fMyPhysics
(
phy
)
:
fMyPhysics
(
phy
)
...
@@ -61,14 +65,20 @@ void MyPhysicsMessenger::Work() {
...
@@ -61,14 +65,20 @@ void MyPhysicsMessenger::Work() {
if
(
muMinus
)
{
if
(
muMinus
)
{
G4ProcessManager
*
processManager
=
muMinus
->
GetProcessManager
();
G4ProcessManager
*
processManager
=
muMinus
->
GetProcessManager
();
if
(
processManager
)
{
if
(
processManager
)
{
MyMuonMinusAtomicCapture
*
mymmac
=
new
MyMuonMinusAtomicCapture
;
MyMuonMinusAtomicCapture
*
myMinusMuonicCapture
=
new
MyMuonMinusAtomicCapture
(
"myMuonMinusAtomicCapture"
);
if
(
mymmac
)
{
//跃迁之后,考虑缪子原子,构建Muonic Atom并为其注册一些过程
G4GenericMuonicAtom
*
genericMuonicAtom
=
G4GenericMuonicAtom
::
Definition
();
processManager
->
AddRestProcess
(
mymmac
);
G4ParticleTable
*
pt
=
G4ParticleTable
::
GetParticleTable
();
}
else
{
pt
->
SetGenericMuonicAtom
(
genericMuonicAtom
);
G4cout
<<
"MyMuonMinusAtomicCapture construction process failed. exit!"
<<
G4endl
;
G4ProcessManager
*
pManager
=
new
G4ProcessManager
(
genericMuonicAtom
);
exit
(
0
);
genericMuonicAtom
->
SetProcessManager
(
pManager
);
}
pManager
->
AddRestProcess
(
new
G4MuonicAtomDecay
);
if
(
myMinusMuonicCapture
)
{
processManager
->
AddRestProcess
(
myMinusMuonicCapture
);
}
else
{
G4cout
<<
"MyMuonMinusAtomicCapture construction process failed. exit!"
<<
G4endl
;
exit
(
0
);
}
}
else
{
}
else
{
G4cout
<<
"Can't get ProcessManager of mu-"
<<
G4endl
;
G4cout
<<
"Can't get ProcessManager of mu-"
<<
G4endl
;
exit
(
0
);
exit
(
0
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment