forked from hyperk/Prob3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.py
43 lines (37 loc) · 968 Bytes
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import numpy as np
from Prob3 import BargerPropagator
# define the path length
LengthParam = 0
DipAngle_degrees = 5.8
LengthParam = np.cos(np.radians(90.0 + DipAngle_degrees))
# neutrino types are:
# 0: data_type (don't use)
# 1: nue_type
# 2: numu_type
# 3: nutau_type
# 4: sterile_type
# 5: unknown_type
ToType = 2
FromType = 2
# initialize the propagator
bp = BargerPropagator()
bp.DefinePath(LengthParam, 0)
Espace = np.linspace(0, 10, 1000)
Pspace = []
for E in Espace:
# parameters to SetMNS are:
# s_12, s_13, s_23,
# dm_21, dm_atm, d_cp,
# E, kSquared, flavor
bp.SetMNS(0.846, 0.093, 0.92,
7.53e-5, 2.44e-3, 0.0,
E, True, FromType)
bp.propagate(ToType)
prob = bp.GetProb(FromType, ToType)
Pspace.append(prob)
import matplotlib.pyplot as plt
plt.plot(Espace, Pspace)
plt.ylim(0, 1)
plt.xlabel(r'$E_\nu$ (GeV)')
plt.ylabel(r'$P (\nu_\mu \rightarrow \nu_\mu)$')
plt.show()