Skip to content

Commit 529fb5b

Browse files
committed
Final misc changes before release: comments, tabs, fluct %-level fixes, S2t=40 min for pos res checks, LET min 1 not 0. -MMS
1 parent e0fd477 commit 529fb5b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

examples/efficiency.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ do
1313

1414
done
1515

16-
#make sure to use the "2>" operator to redirect the terminal screen output of this script to a text file to save it
16+
#make sure to use the "2>" operator to redirect the terminal screen output of this script to a text file to save it. Lastly, copy/paste results from Excel into txt in terminal.

examples/rootNEST.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ int main(int argc, char** argv) {
358358
!std::isnan(
359359
xSect[i - 1])) { // Print the results, skipping any weirdness
360360
// (low WIMP masses prone)
361-
if ( verbosity > 1 ) cout << Ul << "\t";
361+
if ( verbosity > 1 ) cout << Ul << "\t\t";
362362
cout << mass[i - 1] << "\t\t\t" << xSect[i - 1]
363363
<< endl; // final answer
364364
}

src/NEST.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ NESTresult NESTcalc::GetYieldERdEOdxBasis(const std::vector<double> &dEOdxParam,
584584
Ne += result.quanta.electrons;
585585
}
586586
else
587-
result.quanta = GetQuanta(result.yields, rho, default_NRERWidthsParam, true, -999.);
587+
result.quanta = GetQuanta(result.yields, rho, default_NRERWidthsParam, false, -999.);
588588
if (eMin > 0.)
589589
Nph += result.quanta.photons * (eStep / refEnergy);
590590
else {
@@ -1389,7 +1389,7 @@ const vector<double> &NESTcalc::GetS1(
13891389
Nphe, 1. - (1. - eff) / (1. + fdetector->get_P_dphe())));
13901390
// take into account the truncation of the PE distributions
13911391
pulseArea = RandomGen::rndm()->rand_gauss(
1392-
Nphe_det * (1. / NewMean), fdetector->get_sPEres() * sqrt(Nphe_det), true);
1392+
Nphe_det * (1. / NewMean), fdetector->get_sPEres() * sqrt(Nphe_det/NewMean), true);
13931393
spike = static_cast<double>(RandomGen::rndm()->binom_draw(
13941394
nHits, eff * (1. - belowThresh_percentile)));
13951395

@@ -1884,8 +1884,9 @@ const vector<double> &NESTcalc::GetS2(
18841884
RandomGen::rndm()->binom_draw(Nph, fdetector->get_g1_gas() * posDep);
18851885
Nphe =
18861886
nHits + RandomGen::rndm()->binom_draw(nHits, fdetector->get_P_dphe());
1887+
double NewMean = RandomGen::rndm()->FindNewMean(fdetector->get_sPEres());
18871888
pulseArea = RandomGen::rndm()->rand_gauss(
1888-
Nphe/RandomGen::rndm()->FindNewMean(fdetector->get_sPEres()), fdetector->get_sPEres() * sqrt(Nphe), true);
1889+
Nphe/NewMean, fdetector->get_sPEres() * sqrt(Nphe/NewMean), true);
18891890
}
18901891

18911892
if (fdetector->get_noiseLinear()[1] >= 0.1)
@@ -2502,7 +2503,7 @@ vector<double> NESTcalc::xyResolution(double xPos_mm, double yPos_mm,
25022503

25032504
if (sigmaR > 1e2 || std::isnan(sigmaR) || sigmaR <= 0. ||
25042505
std::abs(sigmaX) > 1e2 || std::abs(sigmaY) > 1e2) {
2505-
if (A_top > 30.) { // roughly 1.5 S2 electrons in most detectors
2506+
if (A_top > 40.) { // roughly two S2 electrons in most detectors (~1e- in LZ)
25062507
cerr << "WARNING: your position resolution is worse than 10 cm. Is that "
25072508
"correct?!"
25082509
<< endl;
@@ -2565,7 +2566,7 @@ double NESTcalc::CalcElectronLET(double E, int Z, bool CSDA) {
25652566
LET=1.8106-0.45086*log10(E)-.33151*pow(log10(E),2.)+.25916*pow(log10(E),3.)-0.2051*pow(log10(E),4.)+0.15279*pow(log10(E),5.)-.084659*pow(log10(E),6.)
25662567
+0.030441*pow(log10(E),7.)-.0058953*pow(log10(E),8.)+0.00045633*pow(log10(E),9.);
25672568
LET = pow(10.,LET);
2568-
if ( std::isnan(LET) || LET <= 0. ) LET = 1e2;
2569+
if ( std::isnan(LET) || LET <= 1. ) LET = 1e2;
25692570
return LET;
25702571
}
25712572

0 commit comments

Comments
 (0)