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

Fix true visible energy #152

Merged
merged 2 commits into from
Sep 18, 2024
Merged

Fix true visible energy #152

merged 2 commits into from
Sep 18, 2024

Conversation

jdkio
Copy link
Contributor

@jdkio jdkio commented Sep 11, 2024

Previously, we saved all non-tms hits and then filtered with z in MergeCoincidentHits.

Firstly, this z cut didn't actually cut all illegitimate hits: some of the hits were inside the z bounds but not associated with bars so they had the full y information.

Second, cutting those hits that late broke the calculation of the total visible energy in the TMS. Total visible energy should be only TMS-originating energy.

So this update moves the cut to where the hits are created. If the hit is not part of the TMS, it is not added to the list (we can think about saving all other hits in a separate list). Instead of using a z cut, which can be fooled, we check for a bar number. This bar number is found by comparing the position to the geometry. If the bar number is -1, then the hit is not in the scintillators and therefore not a hit we want to save.

Also updated particle info to be saved by vertex id * 100000 + track id. This is in case there are two with the same track id

Also changed OnlyPrimaryOrInteresting to false. So now TMS_Event saves all primary and secondary particles. Then the TMS_TrueParticle_NotWorthSaving filters all particles with no visible energy in the TMS out. This removes like 99% of most particles.

Also added an additional threshold of 0.5 MeV to save particle info. This removes only a few particles every few spills, so it's not strictly required but I worry about some random event with a bunch of low energy hits. We only currently worry about primary and secondary particles so the really low visible energy particles are unlikely to matter. Plus the pedestal threshold is about that low anyway so it's unlikely to be reco'd either. The code can handle not finding the particle anyway and will give it an "unknown" index

@jdkio jdkio requested a review from LiamOS September 11, 2024 19:58
Copy link
Member

@LiamOS LiamOS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely fix. 0.5 MeV threshold makes a lot of sense in the TMS context too.

Free to merge.

@jdkio jdkio merged commit 1d98a94 into main Sep 18, 2024
1 check passed
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.

2 participants