Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
np
nptool
Commits
bb87094a
Commit
bb87094a
authored
1 month ago
by
audrey.chatillon
Browse files
Options
Downloads
Patches
Plain Diff
[EventGeneratorIsotropic] back to previous config, keep only flat dist
parent
8b56e13b
No related branches found
No related tags found
1 merge request
!27
Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline
#383906
passed
1 month ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPSimulation/EventGenerator/EventGeneratorIsotropic.cc
+0
-21
0 additions, 21 deletions
NPSimulation/EventGenerator/EventGeneratorIsotropic.cc
NPSimulation/EventGenerator/EventGeneratorIsotropic.hh
+0
-3
0 additions, 3 deletions
NPSimulation/EventGenerator/EventGeneratorIsotropic.hh
with
0 additions
and
24 deletions
NPSimulation/EventGenerator/EventGeneratorIsotropic.cc
+
0
−
21
View file @
bb87094a
...
...
@@ -69,9 +69,6 @@ EventGeneratorIsotropic::SourceParameters::SourceParameters(){
m_particle
=
NULL
;
m_direction
=
'z'
;
m_SourceProfile
=
"Gauss"
;
m_DecayLaw
=
"off"
;
m_ActivityBq
=
1.
;
m_TimeWindow
=
1.e-9
;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
...
...
@@ -131,12 +128,6 @@ void EventGeneratorIsotropic::ReadConfiguration(NPL::InputParser parser){
it
->
m_SigmaZ
=
blocks
[
i
]
->
GetDouble
(
"SigmaZ"
,
"mm"
);
if
(
blocks
[
i
]
->
HasToken
(
"Multiplicity"
))
it
->
m_Multiplicity
=
blocks
[
i
]
->
GetVectorInt
(
"Multiplicity"
);
if
(
blocks
[
i
]
->
HasToken
(
"DecayLaw"
))
it
->
m_DecayLaw
=
blocks
[
i
]
->
GetString
(
"DecayLaw"
);
if
(
blocks
[
i
]
->
HasToken
(
"ActivityBq"
))
it
->
m_ActivityBq
=
blocks
[
i
]
->
GetDouble
(
"ActivityBq"
,
"Bq"
);
if
(
blocks
[
i
]
->
HasToken
(
"TimeWindow"
))
it
->
m_TimeWindow
=
blocks
[
i
]
->
GetDouble
(
"TimeWindow"
,
"s"
);
}
else
{
cout
<<
"ERROR: check your input file formatting
\033
[0m"
<<
endl
;
...
...
@@ -165,13 +156,7 @@ void EventGeneratorIsotropic::ReadConfiguration(NPL::InputParser parser){
void
EventGeneratorIsotropic
::
GenerateEvent
(
G4Event
*
){
for
(
auto
&
par
:
m_Parameters
)
{
double
delta_t
=
0.
;
bool
DecayOn
=
true
;
for
(
unsigned
int
p
=
0
;
p
<
par
.
m_particleName
.
size
();
p
++
){
double
step_t
=
1.e-2
/
par
.
m_ActivityBq
;
// [s]
if
(
par
.
m_DecayLaw
==
"on"
){
par
.
m_Multiplicity
[
p
]
=
((
int
)(
par
.
m_TimeWindow
/
step_t
)
==
0
)
?
1
:
(
int
)(
50.e-9
/
step_t
);
}
for
(
int
i
=
0
;
i
<
par
.
m_Multiplicity
[
p
];
i
++
){
par
.
m_particle
=
NULL
;
if
(
par
.
m_particle
==
NULL
){
...
...
@@ -185,13 +170,8 @@ void EventGeneratorIsotropic::GenerateEvent(G4Event*){
NPL
::
Nucleus
*
N
=
new
NPL
::
Nucleus
(
par
.
m_particleName
[
p
]);
par
.
m_particle
=
G4ParticleTable
::
GetParticleTable
()
->
GetIonTable
()
->
GetIon
(
N
->
GetZ
(),
N
->
GetA
(),
par
.
m_ExcitationEnergy
[
p
]);
delete
N
;
if
(
par
.
m_DecayLaw
==
"on"
&&
i
>
0
){
delta_t
=
i
*
step_t
;
DecayOn
=
!
(
par
.
m_DecayLaw
==
"on"
&&
RandFlat
::
shoot
()
>
1.e-2
);
}
}
}
if
(
!
DecayOn
)
continue
;
G4double
cos_theta_min
=
cos
(
par
.
m_HalfOpenAngleMin
);
G4double
cos_theta_max
=
cos
(
par
.
m_HalfOpenAngleMax
);
G4double
cos_theta
=
cos_theta_min
+
(
cos_theta_max
-
cos_theta_min
)
*
RandFlat
::
shoot
();
...
...
@@ -249,7 +229,6 @@ void EventGeneratorIsotropic::GenerateEvent(G4Event*){
momentum_x
=
cos
(
theta
)
;
}
NPS
::
Particle
particle
(
par
.
m_particle
,
theta
,
particle_energy
,
G4ThreeVector
(
momentum_x
,
momentum_y
,
momentum_z
),
G4ThreeVector
(
x0
,
y0
,
z0
));
m_ParticleStack
->
AddParticleToStack
(
particle
);
}
...
...
This diff is collapsed.
Click to expand it.
NPSimulation/EventGenerator/EventGeneratorIsotropic.hh
+
0
−
3
View file @
bb87094a
...
...
@@ -72,9 +72,6 @@ private: // Source parameter from input file
vector
<
G4double
>
m_ExcitationEnergy
;
// Excitation energy of the emitted particle
vector
<
string
>
m_particleName
;
vector
<
G4int
>
m_Multiplicity
;
TString
m_DecayLaw
;
// [on]: mult follows the decay law controlled by T1/2 [off]: fix mult
G4double
m_ActivityBq
;
// if m_DecayLaw = "on" gives here the Activity in Bq of the sample
G4double
m_TimeWindow
;
// DAQ time window during we see the alpha pile-up
};
vector
<
SourceParameters
>
m_Parameters
;
ParticleStack
*
m_ParticleStack
;
...
...
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