XENONnT / epix

Electron and Photon Instructions generator for XENON
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

NRs beyond NEST validity #22

Open ramirezdiego opened 3 years ago

ramirezdiego commented 3 years ago

We currently get a lot of these while processing our files:

.../epix/quanta_generation.py:51: UserWarning: Energy deposition of 330.34259855747223 keV beyond
NEST validity for NR model of 200 keV - Remove Interaction
   warnings.warn(f"Energy deposition of {en} keV beyond NEST validity for
   NR model of 200 keV - Remove Interaction")

which could indicate that our NR clusters are probably too big, or our NR selection is unprecise. As expected, these messages pop up more often when we enlarge the MicroSeparation size, but the current default is already quite small (50 microns). I would like to revisit these two key points and hopefully figure out the cluster size that NEST "expects".

To reproduce the warning, you can just run:

bin/run_epix --InputFile /dali/lgrandi/xenonnt/simulations/testing_epix_wfsim/tpc_cryoneutrons_200.root\
--Detector XENONnT --OutputPath . --Debug

with the current epix release.

sophiafarrell commented 3 years ago

Hi Diego, if I understand this warning right, it's a warning that you've also propagated from NEST itself for where we are outside the fit-regime of validity with NRs. (By the way we can probably increase this to oh, about 330 keV now with newer AmBe data I believe. Or so the NEST docs tell me!)

Can you explain how the microclustering will affect this particular line? Because this warning is thrown based on only input arguments (energy and interaction only.) So how will you envision the MicroSeparation will impact this error?

sophiafarrell commented 3 years ago

To clarify, it seems you're generating quanta internally from some energy you fill in. Can you link here where in the code that is so I Can take a look at the related step prior to this error?

ramirezdiego commented 3 years ago

Hi Sophia, the step for quanta generation is indeed just calling NEST with some energy and drift field value for a given cluster. It happens in this file, while the actual warning I quoted is here and relies on the NEST limits that we just hardcoded (maybe there's a better way to do this....).

The relation with MicroSeparation arises because the clustering step happens before we fetch the efield at the interaction site, call NEST, etc. MicroSeparation decides if two energy deposits were close enough to tag them as a single one and, once this is done, this function takes care of merging the actual interactions into a cluster. The resulting vertex has weighted position according to the energy of the merged steps, recoil type according to time/energy, and energy deposit as the sum of the individual interactions. If MicroSeparation is too big, we will merge more events into a single cluster and the resulting total energy will be larger, therefore higher chances to reach the NEST limits afterwards.

sophiafarrell commented 3 years ago

Hi Diego, thanks for the explanation. I think this makes sense to me.

The only thing to be careful of is that just because it hits NEST limits does not mean that the energy is unphysical... The cryoneutrons root file you provided: does that have a max cutoff energy or is it monoenergetic? (I'm guessing since it is called tpc_cryoneutrons_200.root you have some 200 keV energy cutoff or something but let me know if I'm wrong.)

ramirezdiego commented 3 years ago

Quick reply on the second thing: sorry, the filename is a bit stupid since this was just a small sample test. The 200 stands for the number of simulated primaries (neutrons). The initial energy of these neutrons (with starting position confined to the inner and outer cryostat volumes) follows a flat distribution from 0 to 10 MeV.

(Update: tpc stands for the fact that only LXe records entries in this simulation, and not PMTs or other sensitive volumes -- please ignore).

sophiafarrell commented 3 years ago

I see. So really we could physically have an energy deposition of >300 keV, given the initial energy spectrum. I don't know of any constraints there but maybe the kinematics don't allow it. The only constraint I'm aware of is that we don't have data fit in this region.. meaning, you want to split up the events into smaller events where we have data (and then I assume sum these quanta back together into a final "event".) Let me know if I'm still missing something.

ramirezdiego commented 3 years ago

This is indeed the question. We wonder if our MicroSeparation is too big, since we get such warnings so often, or, on the contrary, it is fine and we need to accept that many interactions are beyond the NEST fitted data; but in that case we should decide how to handle these interactions (removing them sounds messy).

meaning, you want to split up the events into smaller events where we have data (and then I assume sum these quanta back together into a final "event".) Let me know if I'm still missing something.

Since summing the quanta from interactions with energy E1 and E2 would differ from the quanta obtained for an interaction with E=E1+E2, we keep trying to find a reasonable (~ NEST-being-happy-with-it) microseparation before quanta generation.

I don't really have an asnwer, but this issue is just part of the recoil classification and clustering review that I am trying to conduct with @HenningSE (and you, if interested!), who looked compared more in-depth the NEST methods with ours. Do you think this would deserve a call?