Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Fix classification of alpha events #70

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

cfuselli
Copy link
Member

@cfuselli cfuselli commented Feb 9, 2023

Alpha events were removed by epix due to interaction misclassification

This pull request aims to fix issue#69.

Due to a problem with how the classify function is defined, all the alpha events are classified as nuclear recoils.
Because of this, when nest is called for alpha events, epix removes all the interactions because the energy is too high for a NR.

Just by inverting the order in which all the options of the classifier are checked, the classify function now correctly classifies alpha events.

Note that:
alpha nestid = 6
NR nestid = 0

As an example, here is what the function returns firstly with the old classifier, and secondly with the new inverted classifier:

types, parenttype, creaproc, edproc = 'alpha','','','ionIoni'
(0, 0, 0) -->  (4, 2, 6)   # changed!

types, parenttype, creaproc, edproc = 'e-','','',''
(0, 0, 8) --> (0, 0, 8)

types, parenttype, creaproc, edproc = '', '','','ionIoni'
(0, 0, 0) -->  (0, 0, 0)

types, parenttype, creaproc, edproc = 'gamma','','','ionIoni'
(0, 0, 0) -->  (0, 0, 7)

types, parenttype, creaproc, edproc = 'gamma','','','ionIoni'
(0, 0, 0) -->  (0, 0, 7)

types, parenttype, creaproc, edproc = '', 'Kr83[41.557]','',''
(32767, 0, 11)  --> (32767, 0, 11)

types, parenttype, creaproc, edproc = 'neutron', '','','hadElastic'
(0, 0, 0) (0, 0, 0)

The only change is in how the alpha are classified.
Hopefully this does not introduce extra misclassification for other types of events that I did not check.

@cfuselli cfuselli added the bug Something isn't working label Feb 9, 2023
@HenningSE
Copy link
Contributor

Hi @cfuselli, thank you for checking the classification method in epix and opening a PR. Right now, epix classifies every interaction with a edproc equal to ionIoni as NR interaction. Interactions are only classified as alpha interactions if their types is alpha and the two previous cases do not apply.

With your PR the order of the classification checks will be inverted with the result that an interaction with types = alpha and edproc = ionIoni is now classified as alpha interaction.

As the core functionality of epix was build we were mostly focusing on NRs from neutrons and the two ER models (beta and gamma)and I think so we did not check in detail how alpha interactions are handled in epix. I am a bit reluctant to just change the classification order to solve this problem as it can create potentially create new misclassifications with other interaction types. I have two proposals:

  1. Add more cases in the classifier to properly separate alpha and NR interactions.

or

  1. Change the classification function so that we get a clear classification independent of the classification ordering.

What do you think @ramirezdiego and @WenzDaniel ?

@cfuselli
Copy link
Member Author

cfuselli commented Feb 9, 2023

Hi Henning,

I agree this solution is not ideal, it is just a patch. To me it seems like it does the job, but I get the point.

I just needed this because the alpha events I am trying to simulate have types = alpha and edproc = ionIoni, and I wanted to treat them as alphas..

I think an ideal solution would be your second option, but I am not sure that I have enough ROOT knowledge to implement that.

PavelKavrigin and others added 22 commits March 27, 2023 10:47
* Fixed calculation of weighted average time per cluster

* BETA quanta generator.

* Version update.

* Beta-decay clustering.

* Brem clustering + refactoring.

* Fix.

* Fixed common awkwardify function

* Updated input arguments, version, and README
* Update HISTORY.md
* Bump version: 0.3.5 → 0.3.6
* Use trusted publisher
Co-authored-by: Pavel Kavrigin <[email protected]>
* added option to apply total Edep selection, in order to save resources before WFSim

* update the function for tot_e calculation

* move functions to common.py. Add explanations of new options in README

* bug fix

* Add escape for empty instructions after the energy selection

* add some lines so that to return empty instructions in case no events left after the energy selection

* Merge master with cut_by_eventid fix (#81)

* Fix cut_by_eventid again

* Fix cut_by_eventid again (#80)

Co-authored-by: Pavel Kavrigin <[email protected]>

---------

Co-authored-by: Pavel Kavrigin <[email protected]>

* Polish description in README

---------

Co-authored-by: Masatoshi Kobayashi <[email protected]>
Co-authored-by: Masatoshi Kobayashi <[email protected]>
Co-authored-by: Pavel Kavrigin <[email protected]>
Co-authored-by: Pavel Kavrigin <[email protected]>
Co-authored-by: Diego Ramírez García <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alpha events are always misclassified as NR
7 participants