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, SI_model, 
                        {'mass':50.,'sigma_si':1500.}, Qmin = np.asarray([5.]), 
                        Qmax = np.asarray([80.]), 
                        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, anapole_model, 
                        {'mass':50.,'sigma_anapole':1000.}, Qmin = np.asarray([5.]), 
                        Qmax = np.asarray([80.]), 
                        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 [7]:
si_xsmall = dmdd.Simulation_AM('SI', xe, SI_model, 
                        {'mass':50.,'sigma_si':500.}, Qmin = np.asarray([5.]), 
                        Qmax = np.asarray([80.]), 
                        Tmin = 0, Tmax = 365, sigma_si = 500., 
                        element = 'xenon', force_sim = True)

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


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


1149
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730
740
750
760
770
780
790
800
810
820
830
840
850
860
870
880
890
900
910
920
930
940
950
960
970
980
990
1000
1010
1020
1030
1040
1050
1060
1070
1080
1090
1100
1110
1120
1130
1140
simulated: 1149 events (expected 1117).

In [5]:
ana_sim = dmdd.Simulation_AM('Anapole', xe, anapole_model, 
                        {'mass':50.,'sigma_anapole':300.}, Qmin = np.asarray([5.]), 
                        Qmax = np.asarray([80.]), 
                        Tmin = 0, Tmax = 365, sigma_anapole = 300., 
                        element = 'xenon', force_sim = True)
#make cross section particularly large to generate more events
#max pdf value is 110


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


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

In [ ]: