In [1]:
import dmdd
import numpy as np
%matplotlib inline


WARNING:root:pymultinest not imported!
WARNING:root:DMDD_MAIN_PATH environment variable not defined, defaulting to:   ~/.dmdd

In [2]:
# shortcut for scattering models corresponding to rates coded in rate_UV:
anapole_model = dmdd.UV_Model('Anapole', ['mass','sigma_anapole'])
SI_model = dmdd.UV_Model('SI', ['mass','sigma_si'])

print 'model: {}, parameters: {}.'.format(anapole_model.name, anapole_model.param_names)
print 'model: {}, parameters: {}.'.format(SI_model.name, SI_model.param_names)


model: Anapole, parameters: ['mass', 'sigma_anapole'].
model: SI, parameters: ['mass', 'sigma_si'].

In [3]:
# intialize an Experiment with XENON target, to be passed to Simulation_AM:
xe = dmdd.Experiment('1xe', 'xenon', 5, 80, 1000, dmdd.eff.efficiency_unit, energy_resolution=True)

In [4]:
xe_xsmallQ = dmdd.Experiment('1xe', 'xenon', 1, 3, 1000, dmdd.eff.efficiency_unit, energy_resolution=True)

Trial 1, ~1000 events over time for SI and Anapole models


In [5]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':50.,'sigma_si':1500.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1500., 
                        element = 'xenon', force_sim = True)

#make cross section particularly large to generate more events
#max pdf value is about 1.74


Simulation data and/or pickle file does not exist. Forcing simulation.


940
100
200
300
400
500
600
700
800
900
simulated: 940 events (expected 905).

In [6]:
ana_xsmall = dmdd.Simulation_AM('Anapole', xe_xsmallQ, anapole_model, 
                        {'mass':50.,'sigma_anapole':1000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_anapole = 1000., 
                        element = 'xenon', force_sim = True)
#make cross section particularly large to generate more events
#max pdf value is 1.7
#for some reason slower to calculate each individual pdf value


Simulation data and/or pickle file does not exist. Forcing simulation.


1011
100
200
300
400
500
600
700
800
900
1000
simulated: 1011 events (expected 1014).

Trial 2, ~1000 events over time for SI and Anapole models


In [7]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':50.,'sigma_si':1500.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1500., 
                        element = 'xenon', force_sim = True)

#make cross section particularly large to generate more events
#max pdf value is about 1.74


Simulation data and/or pickle file does not exist. Forcing simulation.


929
100
200
300
400
500
600
700
800
900
simulated: 929 events (expected 905).

In [8]:
ana_xsmall = dmdd.Simulation_AM('Anapole', xe_xsmallQ, anapole_model, 
                        {'mass':50.,'sigma_anapole':1000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_anapole = 1000., 
                        element = 'xenon', force_sim = True)
#make cross section particularly large to generate more events
#max pdf value is 1.7
#for some reason slower to calculate each individual pdf value


Simulation data and/or pickle file does not exist. Forcing simulation.


1040
100
200
300
400
500
600
700
800
900
1000
simulated: 1040 events (expected 1014).

Trial 3, ~1000 events over time for SI and Anapole models


In [7]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':50.,'sigma_si':1500.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1500., 
                        element = 'xenon', force_sim = True)

#make cross section particularly large to generate more events
#max pdf value is about 1.74
#30 bins instead of 50


Simulation data and/or pickle file does not exist. Forcing simulation.


891
100
200
300
400
500
600
700
800
simulated: 891 events (expected 905).

In [8]:
ana_xsmall = dmdd.Simulation_AM('Anapole', xe_xsmallQ, anapole_model, 
                        {'mass':50.,'sigma_anapole':1000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_anapole = 1000., 
                        element = 'xenon', force_sim = True)
#make cross section particularly large to generate more events
#max pdf value is 1.7
#for some reason slower to calculate each individual pdf value
#30 bins instead of 50


Simulation data and/or pickle file does not exist. Forcing simulation.


1032
100
200
300
400
500
600
700
800
900
1000
simulated: 1032 events (expected 1014).

SI Simulation for 2000 events


In [6]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':50.,'sigma_si':3500.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 3500., 
                        element = 'xenon', force_sim = True)

#make cross section particularly large to generate more events
#max pdf value is about 1.74
#30 bins instead of 50


Simulation data and/or pickle file does not exist. Forcing simulation.


2111
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
1400
1500
1600
1700
1800
1900
2000
2100
simulated: 2111 events (expected 2111).

SI Simulation for ~10,000 events in low energy range from 1-3keV


In [6]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':50.,'sigma_si':17000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 17000., 
                        element = 'xenon', force_sim = True)

#make cross section particularly large to generate more events
#max pdf value is about 1.74


Simulation data and/or pickle file does not exist. Forcing simulation.


10238
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
simulated: 10238 events (expected 10251).

In [5]:
anapole_xsmall = dmdd.Simulation_AM('Anapole', xe_xsmallQ, anapole_model, 
                        {'mass':50.,'sigma_anapole':10000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_anapole = 10000., 
                        element = 'xenon', force_sim = True)

#make cross section particularly large to generate more events
#max pdf value is about 1.74


Simulation data and/or pickle file does not exist. Forcing simulation.


10187
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
simulated: 10187 events (expected 10136).

Testing for lower mass ~20GeV


In [5]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':20.,'sigma_si':1000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1000., 
                        element = 'xenon', force_sim = True)
#lower mass should have more modulation


Simulation data and/or pickle file does not exist. Forcing simulation.


1149
100
200
300
400
500
600
700
800
900
1000
1100
simulated: 1149 events (expected 1206).

In [5]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':20.,'sigma_si':1700.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1700., 
                        element = 'xenon', force_sim = True)


Simulation data and/or pickle file does not exist. Forcing simulation.


2084
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
1400
1500
1600
1700
1800
1900
2000
simulated: 2084 events (expected 2050).

In [6]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':20.,'sigma_si':1700.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1700., 
                        element = 'xenon', force_sim = True)


Simulation data and/or pickle file does not exist. Forcing simulation.


1983
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
1400
1500
1600
1700
1800
1900
simulated: 1983 events (expected 2050).

In [7]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':20.,'sigma_si':1700.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1700., 
                        element = 'xenon', force_sim = True)
#2000 events


Simulation data and/or pickle file does not exist. Forcing simulation.


2062
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
1400
1500
1600
1700
1800
1900
2000
simulated: 2062 events (expected 2050).

In [8]:
#1000 events
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':20.,'sigma_si':1000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1000., 
                        element = 'xenon', force_sim = True)


Simulation data and/or pickle file does not exist. Forcing simulation.


1168
100
200
300
400
500
600
700
800
900
1000
1100
simulated: 1168 events (expected 1206).

In [9]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':20.,'sigma_si':1000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1000., 
                        element = 'xenon', force_sim = True)


Simulation data and/or pickle file does not exist. Forcing simulation.


1241
100
200
300
400
500
600
700
800
900
1000
1100
1200
simulated: 1241 events (expected 1206).

In [10]:
si_xsmall = dmdd.Simulation_AM('SI', xe_xsmallQ, SI_model, 
                        {'mass':20.,'sigma_si':1000.}, Qmin = np.asarray([1.]), 
                        Qmax = np.asarray([3.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 1000., 
                        element = 'xenon', force_sim = True)


Simulation data and/or pickle file does not exist. Forcing simulation.


1257
100
200
300
400
500
600
700
800
900
1000
1100
1200
simulated: 1257 events (expected 1206).

In [ ]: