Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fuse cuts and selections #193

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Add fuse cuts and selections #193

wants to merge 20 commits into from

Conversation

HenningSE
Copy link
Collaborator

No description provided.

@coveralls
Copy link

coveralls commented Apr 18, 2024

Pull Request Test Coverage Report for Build 9842082368

Details

  • 114 of 136 (83.82%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.3%) to 80.256%

Changes Missing Coverage Covered Lines Changed/Added Lines %
fuse/plugins/micro_physics/cuts_and_selections/apply_selections.py 50 51 98.04%
fuse/plugins/micro_physics/cuts_and_selections/detector_volumes.py 42 47 89.36%
fuse/plugins/micro_physics/cuts_and_selections/physics_cases.py 14 30 46.67%
Totals Coverage Status
Change from base Build 9759413086: -0.3%
Covered Lines: 2634
Relevant Lines: 3282

💛 - Coveralls

@HenningSE HenningSE marked this pull request as ready for review April 18, 2024 10:47
@MasatoshiKobayashi
Copy link

@HenningSE Thanks a lot!
Just a confirmation, are below correct?

  • Since we are using the clustered info, we are not merging the energy deposit outside TPC
  • Also, the evt_id is the EventID in Geant4

@HenningSE
Copy link
Collaborator Author

@HenningSE Thanks a lot! Just a confirmation, are below correct?

  • Since we are using the clustered info, we are not merging the energy deposit outside TPC
  • Also, the evt_id is the EventID in Geant4

Hi @MasatoshiKobayashi, yes both of them are correct.

  1. As default only energy deposits in LXe are stored in Geant4. The clustering distance is quite small compared to the detector dimensions, so it should be more or less impossible to form a cluster of in and out of TPC interactions.
  2. We renamed evtid in one of the recent PRs to eventid to make it consistent throughout the full simulation. It is taken from the Geant4 input here.

@MasatoshiKobayashi
Copy link

Sure, thanks. then the energy selection part looks fine for me.
Are other files, like detector_volume or apply_selection are just copied?
I am not sure if I have to review also for them, or just energy cut part is fine.

@HenningSE
Copy link
Collaborator Author

Thanks Masatoshi, the detector volumes are a little different different with this PR to better integrate with the energy selection. I will ask @ramirezdiego to take a look at this part.

@MasatoshiKobayashi
Copy link

@HenningSE
Sorry, one more question:
the energy used for cut should be stored in truth as well. it looks there's already the total energy deposit of the event --

result["total_energy_in_event_truth"][i] = np.sum(
.
what's the difference between this and the energy used for cut?

@HenningSE
Copy link
Collaborator Author

Hi @MasatoshiKobayashi these two energies are not identical and depend on the definition of an event. In EventTruth an event is what strax(en) considers to be one event. This must not always be the same what we have as an event from Geant4. The energy range cut in this PR uses the Geant4 event definition as we do not know at this stage how straxen will build the events.

@MasatoshiKobayashi
Copy link

MasatoshiKobayashi commented May 4, 2024

Hi @HenningSE , thanks.

In EventTruth an event is what strax(en) considers to be one event. This must not always be the same what we have as an event from Geant4.

yes, this I understood -- we may have event without s1 or s2 due to CIV, below cathode, misidentification etc. However, once the event is recorded as an event, the truth energy should be more or less the same, no?

@MasatoshiKobayashi
Copy link

MasatoshiKobayashi commented May 4, 2024

By the way, another confirmation:
I am not the expert of fuse yet, but is "clustering" process also eliminates the cluster outside the sensitive volume as epix does? otherwise the energy cut includes the e_dep outside TPC, which we should not do.)

@HenningSE
Copy link
Collaborator Author

However, once the event is recorded as an event, the truth energy should be more or less the same, no?

This depends on the Geant4 simulation setting. In most cases I should be like this but you could also have e.g. a full U decay chain in one single Geant4 event. This would then lead to multiple straxen events that are ages apart from each other.

I am not the expert of fuse yet, but is "clustering" process also eliminates the cluster outside the sensitive volume as epix does? otherwise the energy cut includes the e_dep outside TPC, which we should not do.)

Hmm good point. I think with the method that is in this PR right now The energy deposits outside would still be included in the energy cut. There I would need to change the plugins in a way that we first evaluate the detector volumes and then the energy cut.

@MasatoshiKobayashi
Copy link

@HenningSE
Thank you for the reply!!
Now I understood -- I was talking about the energy cut at the epix level (time and volume clustered) while it's not the case for fuse.
As you say, in that case we need to apply the cut after volume (and time if needed) selection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants