Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
np
nptool
Commits
2f59ddec
Commit
2f59ddec
authored
Oct 03, 2018
by
Elidiano Tronchin
Browse files
* Changed event selection
parent
d9ab6bd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
NPSimulation/EventGenerator/EventGeneratorCosmic.cc
NPSimulation/EventGenerator/EventGeneratorCosmic.cc
+11
-3
No files found.
NPSimulation/EventGenerator/EventGeneratorCosmic.cc
View file @
2f59ddec
...
...
@@ -172,15 +172,15 @@ void EventGeneratorCosmic::GenerateEvent(G4Event*){
G4double
randomize
=
.5
-
RandFlat
::
shoot
();
if
(
randomize
>
0
){
/* //Putting a cylinder
if(randomize>0){
//top
momentum_x = cos(angle)*dis;
momentum_z = sin(angle)*dis;
x0 = cos(shift*2)*R*(randomize*2);
z0 = sin(shift*2)*R*(randomize*2);
par.m_y0 = H/2;
}
else
{
} else {
//lateral surface
x0 = cos(angle)*R;
z0 = sin(angle)*R;
...
...
@@ -189,7 +189,15 @@ void EventGeneratorCosmic::GenerateEvent(G4Event*){
momentum_x = -cos(angle+shift)*dis;
momentum_z = -sin(angle+shift)*dis;
}
*/
// Constrain to pass in a circle with radius 2R
momentum_x
=
cos
(
angle
)
*
dis
;
momentum_z
=
sin
(
angle
)
*
dis
;
x0
=
cos
(
shift
*
2
)
*
R
*
2
*
(
randomize
*
2
)
-
momentum_x
*
(
H
/
2
/
momentum_y
);
z0
=
sin
(
shift
*
2
)
*
R
*
2
*
(
randomize
*
2
)
-
momentum_z
*
(
H
/
2
/
momentum_y
);
par
.
m_y0
=
H
/
2
;
momentum_y
=
-
momentum_y
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment