#Spectrum formulas of particle number from SterileDar import Oscspec from SterileDar import crosssections from SterileDar import expdata as exp from SterileDar import constants as ct from SterileDar import OscillationModel import numpy as np osc = Oscspec.Oscspec() model = OscillationModel.OscillationModel() cs = crosssections.crosssections() nproton = float(exp.hidrogeniototal) #number of protons at the detector npb = float(exp.pbnumber) #number of Pb atoms at the detector class Events: def __init__(self, *args, **kwargs): # you can add additional code here if needed pass #PPO/Paraffin/LAB (IBD process) def dNdEvebar(self,E1,Ue4_2,Umu4_2,DelM2): return ((nproton*exp.estimatednumber)*osc.Oscspecvebar(exp.Ljsns2,E1,Ue4_2,Umu4_2,DelM2)*cs.sigmaIBD(E1))/(4*np.pi*(exp.Ljsns2)**2) #208Pb #Charged current def dNdEvee(self,E2,Ue4_2,DelM2): return ((npb*exp.estimatednumber)*osc.Oscspecve(exp.Ljsns2,E2,Ue4_2,DelM2)*(ct.cm2tometer2*cs.sigmaPbvee(E2)))/(4*np.pi*(exp.Ljsns2)**2) def NMuOriginCC(self,E2,Ue4_2,Umu4_2,DelM2):
# This code plots the spectrum of particles emitted in pion DAR considering oscillation and survival probabilities # author: P. Chimenti, R.Bassi from SterileDar import Oscspec import matplotlib.pyplot as plt from SterileDar import constants as ct import numpy as np oscs = Oscspec.Oscspec() print("Gráfico do espectro oscilado dos antineutrinos do tau") plt.rcParams.update({ "figure.figsize": [8.0,6.0], "figure.dpi": 72.0, "text.usetex": True, "font.family": "sans-serif", "font.sans-serif": ["Helvetica"], "font.size": 16, "axes.titlepad": 25}) L = ct.Ljsns2 #int(input("Digite um valor para a distância: ")) E = np.arange(10e-15,ct.muonmass/2,0.01) plt.plot(E,oscs.Oscspecvtbar(L,E,ct.Umu4_2,ct.Ut4_2,ct.DelM2),'r',linewidth=1.5) plt.title(r'Espectro oscilado dos antineutrinos do tau emitidos para L={0}m'.format(L)) plt.grid(True) plt.xlabel(r'Energia dos antineutrinos [MeV]') plt.ylabel(r'dN/dE [MeV$^{-1}$]') #plt.savefig('Oscspecvmbar{0}.pdf'.format(L))