Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NPDet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
EIC
NPDet
Commits
a20cf320
Commit
a20cf320
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
Add FastPhysicsList and ShowerModel to npsim
parent
16d12a36
Branches
90-support-fastsim-and-gflash
No related tags found
1 merge request
!273
Draft: Resolve "Support FastSim and GFlash"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dd4pod/python/npsim.py
+33
-5
33 additions, 5 deletions
src/dd4pod/python/npsim.py
with
33 additions
and
5 deletions
src/dd4pod/python/npsim.py
+
33
−
5
View file @
a20cf320
...
...
@@ -31,11 +31,11 @@ if __name__ == "__main__":
cerenkov
.
VerboseLevel
=
0
cerenkov
.
enableUI
()
seq
.
adopt
(
cerenkov
)
ph
=
PhysicsList
(
kernel
,
'
Geant4OpticalPhotonPhysics/OpticalGammaPhys
'
)
ph
.
addParticleConstructor
(
'
G4OpticalPhoton
'
)
ph
.
VerboseLevel
=
0
ph
.
enableUI
()
seq
.
adopt
(
ph
)
optical
=
PhysicsList
(
kernel
,
'
Geant4OpticalPhotonPhysics/OpticalGammaPhys
'
)
optical
.
addParticleConstructor
(
'
G4OpticalPhoton
'
)
optical
.
VerboseLevel
=
0
optical
.
enableUI
()
seq
.
adopt
(
optical
)
return
None
SIM
.
physics
.
setupUserPhysics
(
setupCerenkov
)
...
...
@@ -59,6 +59,34 @@ if __name__ == "__main__":
SIM
.
action
.
mapActions
[
'
PFRICH
'
]
=
'
Geant4OpticalTrackerAction
'
SIM
.
action
.
mapActions
[
'
DIRC
'
]
=
'
Geant4OpticalTrackerAction
'
# Fast simulation
def
setupFastPhysics
(
kernel
):
from
DDG4
import
PhysicsList
seq
=
kernel
.
physicsList
()
fast
=
PhysicsList
(
kernel
,
'
Geant4FastPhysics/FastPhysicsList
'
)
fast
.
EnabledParticles
=
[
'
e+
'
,
'
e-
'
]
fast
.
BeVerbose
=
True
fast
.
enableUI
()
seq
.
adopt
(
fast
)
return
None
from
DDG4
import
DetectorConstruction
model
=
DetectorConstruction
(
kernel
,
str
(
'
Geant4Par01EMShowerModel/ShowerModel
'
))
# Mandatory model parameters
model
.
RegionName
=
'
SiRegion
'
model
.
Material
=
'
Silicon
'
model
.
ApplicableParticles
=
[
'
e+
'
,
'
e-
'
]
model
.
Etrigger
=
{
'
e+
'
:
0.1
*
GeV
,
'
e-
'
:
0.1
*
GeV
}
model
.
Enable
=
True
# Energy boundaries are optional: Units are GeV
model
.
Emin
=
{
'
e+
'
:
0.1
*
GeV
,
'
e-
'
:
0.1
*
GeV
}
model
.
Ekill
=
{
'
e+
'
:
0.1
*
MeV
,
'
e-
'
:
0.1
*
MeV
}
model
.
enableUI
()
seq
.
adopt
(
model
)
return
None
SIM
.
physics
.
setupUserPhysics
(
setupFastPhysics
)
# Parse remaining options (command line and steering file override above)
SIM
.
parseOptions
()
...
...
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