-
Notifications
You must be signed in to change notification settings - Fork 2
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
Check energiesX #50
Check energiesX #50
Conversation
JPorron
commented
Nov 11, 2024
•
edited by pull-request-badge
bot
Loading
edited by pull-request-badge
bot
In https://github.com/rest-for-physics/tracklib/pull/47/files a new observable "MaxTrack_XZ_OK" (same for YZ) was created to check if the max track and second max track had both X and Y contributions. Then, some observables were created:
The condition to consider as OK or not the MaxTrack (same for SecondMaxTrack) is to check if energiesX is empty. However, this will never happen as energiesX will add a 0 if an element is added to energiesY (that way both will have the same dimension) and even if there are only energiesY, energiesX will be populated. An example of where this has effect is here:
MaxTrack_XZ_OK is set to be true, but we can see that there are no X-hits and, thus, no X-tracks and energiesX will not have any meaningful entry, but as energiesY does, then it is created and set to 0:
To solve the issue we must check if energiesX has a meaningful value, different to 0. In that case, there will be at least one hit in X and so at least one track. |
It is checked if the final entry in energiesX (and Y) is different to 0. As they are sorted this final entry will be the biggest value, there might be several 0s due to tracks in Y, but if there is 1 different to 0 value there is at least 1 X-tracks. For the secondMaxTrack the same logic is applied, checking if there are 2 different to 0 entries in energiesX (and Y) |