NESTCollaboration / nest

Noble Element Simulation Technique is used to simulate noble-element energy deposition microphysics.
http://nest.physics.ucdavis.edu
Other
23 stars 42 forks source link

pulseArea GetS1 Gaussian width #107

Closed sophiafarrell closed 3 years ago

sophiafarrell commented 3 years ago

In the NESTcalc::GetS1 function, there is a basic, no-timing block of code here: https://github.com/NESTCollaboration/nest/blob/3322903b7cd2439c349418ad25e6caeaa820acfe/src/NEST.cpp#L886-L891

In these lines, pulseArea is smeared by sPEres * sqrt(Nphe) where the Nphe is defined: https://github.com/NESTCollaboration/nest/blob/3322903b7cd2439c349418ad25e6caeaa820acfe/src/NEST.cpp#L886

To my understanding, this slightly (very, very slightly) overestimates the smearing effect, but it should probably not be ignored. My suggestion would be to replace the linked lines above with something like this to make the pulseArea calculation more statistically accurate. But, perhaps I am missing something.

    Nphe = nHits + BinomFluct(nHits, fdetector->get_P_dphe());
    Nphe_det = BinomFluct(Nphe, 1. - (1. - eff) / (1. + fdetector->get_P_dphe()));
    pulseArea = RandomGen::rndm()->rand_gauss(
                          Nphe_det,
                          fdetector->get_sPEres() * sqrt(Nphe_det));

This is in regards to the question I asked @mszydagis and then directed toward @riffard, but I figured that a git issue is more trackable for everyone. (Tagging @robertsjames here because he had the same question as well.)

mszydagis commented 3 years ago

thank you for catching this mistake. For >90% detection efficiency there is no difference, but who knows if we can maintain (like into G3 in the future) such high efficiencies. Therefore, it is important to do this right. The problem has been corrected

sophiafarrell commented 3 years ago

(Referencing https://github.com/NESTCollaboration/nest/commit/9363b9689d9fd7afaeef8cbf4178a0baeb2bcba9 so people can track the change). Thanks!