Skip to content

Commit

Permalink
update old oxygen-16 CC implementations
Browse files Browse the repository at this point in the history
They now use the Event class and can be used to replace the new
implementations, e.g. to estimate systematic uncertainties.
  • Loading branch information
JostMigenda committed Jun 16, 2020
1 parent 3e0f0c1 commit 8e1f9f8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 28 deletions.
25 changes: 11 additions & 14 deletions interaction_channels/o16e_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,21 @@
2*epsilon wide and 1/(2*epsilon) high, so that the integral is 1.
'''

e_thr = 15 # energy threshold for this reaction
epsilon = 0.001 # for approximating DiracDelta distribution below
from event import Event


'''
targets_per_molecule:
number of interaction targets per water molecule
(i.e. 2 free protons, 1 oxygen nucleus or 10 electrons)
'''
targets_per_molecule = 1
def generate_event(eNu, dirx, diry, dirz):
eE = get_eE(eNu, dirz)

evt = Event(-1008016)
evt.incoming_particles.append((-12, eNu, 0, 0, 1)) # incoming neutrino
evt.incoming_particles.append((8016, 14900, 0, 0, 1)) # oxygen nucleus at rest
evt.outgoing_particles.append((-11, eE, dirx, diry, dirz)) # outgoing positron
return evt

'''
pid:
ID of the outgoing (detected) particle, using Particle Data Group conventions
(e.g. electron = 11, positron = -11)
'''
pid = 11

e_thr = 15 # energy threshold for this reaction
epsilon = 0.001 # for approximating DiracDelta distribution below


'''
Expand Down
24 changes: 10 additions & 14 deletions interaction_channels/o16eb_old.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,21 @@
Instead, below we implement an approximation to DiracDelta: a function that's
2*epsilon wide and 1/(2*epsilon) high, so that the integral is 1.
'''
from event import Event

e_thr = 11.4 # energy threshold for this reaction
epsilon = 0.001 # for approximating DiracDelta distribution below

def generate_event(eNu, dirx, diry, dirz):
eE = get_eE(eNu, dirz)

'''
targets_per_molecule:
number of interaction targets per water molecule
(i.e. 2 free protons, 1 oxygen nucleus or 10 electrons)
'''
targets_per_molecule = 1
evt = Event(-1008016)
evt.incoming_particles.append((-12, eNu, 0, 0, 1)) # incoming neutrino
evt.incoming_particles.append((8016, 14900, 0, 0, 1)) # oxygen nucleus at rest
evt.outgoing_particles.append((-11, eE, dirx, diry, dirz)) # outgoing positron
return evt


'''
pid:
ID of the outgoing (detected) particle, using Particle Data Group conventions
(e.g. electron = 11, positron = -11)
'''
pid = -11
e_thr = 11.4 # energy threshold for this reaction
epsilon = 0.001 # for approximating DiracDelta distribution below


'''
Expand Down

0 comments on commit 8e1f9f8

Please sign in to comment.