Skip to content

Commit 4b0f543

Browse files
committed
Piecemeal track method works now at Q_beta_beta, with basement-level customizable Fano-LIKE factor, and 4um step size. -MMS
1 parent e626956 commit 4b0f543

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/rootNEST.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,8 @@ void GetFile(char* fileName) {
791791
S2cor_phd.push_back(-999.);
792792
}
793793
}
794-
fclose(ifp); if ( E_keV.size() < 100000 ) { skewness = 0; cerr << "WARNING: Not enough stats (at least 10^5 events) for skew fits so doing Gaussian" << endl; }
794+
fclose(ifp);
795+
if ( E_keV.size() < 100000 && numBins > 1 ) { skewness = 0; cerr << "WARNING: Not enough stats (at least 10^5 events) for skew fits so doing Gaussian" << endl; }
795796

796797
if (numBins == 1) {
797798
TH1F* HistogramArray = new TH1F[3];

src/NEST.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,8 @@ NESTresult NESTcalc::GetYieldERdEOdxBasis(const std::vector<double> &dEOdxParam,
585585
else {
586586
if ( NRERWidthsParam[0] >= 0. ) {
587587
Nq = result.quanta.photons + result.quanta.electrons;
588-
double FanoOverall = 0.0015 * sqrt((-1e3*eMin/Wq_eV)*field);
589-
double FanoScint = 20. * FanoOverall;
588+
double FanoOverall = 1.; //use 6 for ~0.7% energy resolution at 2.6 MeV and 190 V/cm
589+
double FanoScint = 200.; //standin for recombination fluctuations in this approach
590590
Nq = int(floor(RandomGen::rndm()->rand_gauss(Nq,sqrt(FanoOverall*Nq),false)+0.5));
591591
result.quanta.photons = int(floor(RandomGen::rndm()->rand_gauss(
592592
result.quanta.photons,sqrt(FanoScint*result.quanta.photons),false)+0.5));
@@ -603,7 +603,7 @@ NESTresult NESTcalc::GetYieldERdEOdxBasis(const std::vector<double> &dEOdxParam,
603603
driftTime = (fdetector->get_TopDrift() - zz) / vD;
604604
if ( zz >= fdetector->get_cathode() && NRERWidthsParam[0] >= 0. ) {
605605
if (eMin > 0.)
606-
Ne += result.quanta.electrons * (eStep / refEnergy) * exp(-driftTime / fdetector->get_eLife_us());
606+
Ne += result.quanta.electrons * exp(-driftTime / fdetector->get_eLife_us()) * (eStep / refEnergy);
607607
else
608608
Ne += result.quanta.electrons *
609609
exp(-driftTime / fdetector->get_eLife_us());

0 commit comments

Comments
 (0)