Skip to content

Commit

Permalink
Removed non-integer bins
Browse files Browse the repository at this point in the history
  • Loading branch information
tegonzalo committed Dec 8, 2023
1 parent aabe748 commit 6246a13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/obscura/Direct_Detection_Ionization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class DM_Detector_Ionization : public DM_Detector
// (a) Poisson: Electron threshold
void Use_Electron_Threshold(unsigned int ne_thr, unsigned int nemax = 0);
// (b) Binned Poisson: Electron bins
void Use_Electron_Bins(unsigned int ne_thr, unsigned int N_bins, double bin_width = 1);
void Use_Electron_Bins(unsigned int ne_thr, unsigned int N_bins);

// PE (or S2) spectrum
double R_S2(unsigned int S2, const DM_Particle& DM, DM_Distribution& DM_distr, double W, const Nucleus& nucleus, Atomic_Electron& shell, std::vector<double> electron_spectrum = {});
Expand Down
4 changes: 2 additions & 2 deletions src/Direct_Detection_Ionization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,13 @@ void DM_Detector_Ionization::Use_Electron_Threshold(unsigned int ne_thr, unsigne
}
}

void DM_Detector_Ionization::Use_Electron_Bins(unsigned int ne_thr, unsigned int N_bins, double bin_width)
void DM_Detector_Ionization::Use_Electron_Bins(unsigned int ne_thr, unsigned int N_bins)
{
Initialize_Binned_Poisson(N_bins);
using_electron_bins = true;

ne_threshold = ne_thr;
ne_max = ne_threshold + int((N_bins - 1)*bin_width);
ne_max = ne_threshold + N_bins - 1;
if(ne_max < ne_threshold)
{
std::cerr << libphysica::Formatted_String("Error", "Red", true) << " in obscura::DM_Detector::Use_Electron_Bins(): ne threshold (" << ne_threshold << ") is higher than maximum (" << ne_max << ")." << std::endl;
Expand Down
20 changes: 12 additions & 8 deletions src/Experiments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,13 @@ DM_Detector_Ionization_ER DarkSide50_S2_ER_2023()
double exposure = 12306 * kg * day;
unsigned int ne_threshold = 4;
// Digitised from Figure 1 (x Ne x 0.25 x exposure)
std::vector<unsigned long int> observed_event_bins = {92, 76, 90, 65, 96, 95, 108, 101, 124, 117, 128, 114, 111, 104, 139, \
//std::vector<unsigned long int> observed_event_bins = {92, 76, 90, 65, 96, 95, 108, 101, 124, 117, 128, 114, 111, 104, 139, \
162, 155, 131, 171, 152, 152, 233, 242, 180, 201, 262, 278, 261, 254, \
224, 294, 319, 288, 280, 331, 321, 367, 450, 448, 428, 425, 438, 463, \
443, 516, 469, 459, 599, 672, 580, 604, 606, 585, 640, 559, 666, 612, \
729, 837, 614, 654, 819, 861, 872, 830};

std::vector<unsigned long int> observed_event_bins = {298, 372, 456, 488, 583, 775, 965, 1053, 1182, 1644, 1723, 1992, \
2408, 2397, 2735, 3139, 3366};
// Digitise bkg from Figure 1 (x 0.25 x exposure)
// TODO: not used because it causes upwards fluctuations
std::vector<double> bkg_bins = {15.3809, 16.1617, 16.363, 16.7732, 17.1937, 17.4078, 17.4078, \
Expand All @@ -210,7 +211,8 @@ DM_Detector_Ionization_ER DarkSide50_S2_ER_2023()
35.6922, 35.2531, 36.1368, 37.0427, 36.5869, 37.9712, 38.4442, \
38.9231, 38.4442, 39.4079, 39.8988, 40.3958, 40.3958, 41.9243};
DM_Detector_Ionization_ER detector("DarkSide-50_S2_2023", exposure, target_name);
detector.Use_Electron_Bins(ne_threshold, 65, 0.25);
//detector.Use_Electron_Bins(ne_threshold, 65, 0.25);
detector.Use_Electron_Bins(ne_threshold, 17);
detector.Set_Observed_Events(observed_event_bins);
//detector.Set_Expected_Background(bkg_bins);

Expand All @@ -222,7 +224,7 @@ DM_Detector_Ionization_ER LZ_S2_ER()
// Source: 2307.15753
// TODO: WIP
std::string target_name = "Xe";
double exposure = 0 * kg * day;
double exposure = 330000 * kg * day;
unsigned int ne_threshold = 0;
std::vector<unsigned long int> observed_event_bins = {};

Expand Down Expand Up @@ -319,7 +321,7 @@ DM_Detector_Crystal CDMS_HVeV_2020()
return detector;
}

DM_Detector_Crystal DAMIC_M_2023_ER()
DM_Detector_Crystal DAMIC_M_2023()
{
// Source: arXiv:2302.02372
double DAMIC_M_exposure = 85.23 * gram * day;
Expand Down Expand Up @@ -419,12 +421,13 @@ DM_Detector_Ionization_Migdal DarkSide50_S2_Migdal_2023()
std::string target_name = "Ar";
double exposure = 6786.0 * kg * day;
unsigned int ne_threshold = 4;
std::vector<unsigned long int> observed_event_bins = {92, 76, 90, 65, 96, 95, 108, 101, 124, 117, 128, 114, 111, 104, 139, \
//std::vector<unsigned long int> observed_event_bins = {92, 76, 90, 65, 96, 95, 108, 101, 124, 117, 128, 114, 111, 104, 139, \
162, 155, 131, 171, 152, 152, 233, 242, 180, 201, 262, 278, 261, 254, \
224, 294, 319, 288, 280, 331, 321, 367, 450, 448, 428, 425, 438, 463, \
443, 516, 469, 459, 599, 672, 580, 604, 606, 585, 640, 559, 666, 612, \
729, 837, 614, 654, 819, 861, 872, 830};

std::vector<unsigned long int> observed_event_bins = {298, 372, 456, 488, 583, 775, 965, 1053, 1182, 1644, 1723, 1992, \
2408, 2397, 2735, 3139, 3366};
// Digitise bkg from Figure 1 (x 0.25 x exposure)
// TODO: not used because it causes upwards fluctuations
std::vector<double> bkg_bins = {15.3809, 16.1617, 16.363, 16.7732, 17.1937, 17.4078, 17.4078, \
Expand All @@ -437,7 +440,8 @@ DM_Detector_Ionization_Migdal DarkSide50_S2_Migdal_2023()
35.6922, 35.2531, 36.1368, 37.0427, 36.5869, 37.9712, 38.4442, \
38.9231, 38.4442, 39.4079, 39.8988, 40.3958, 40.3958, 41.9243};
DM_Detector_Ionization_Migdal detector("DarkSide-50_S2_2023", exposure, target_name);
detector.Use_Electron_Bins(ne_threshold, 65, 0.25);
//detector.Use_Electron_Bins(ne_threshold, 65, 0.25);
detector.Use_Electron_Bins(ne_threshold, 17);
detector.Set_Observed_Events(observed_event_bins);
//detector.Set_Expected_Background(bkg_bins);

Expand Down

0 comments on commit 6246a13

Please sign in to comment.