-
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
Work on Tracks2D and 3D - Comment checkpoint #45
Conversation
for more information, see https://pre-commit.ci
Commenting the some SetObservableValues solves the issue, at this checkpoint the Tracks2D can be used for subrun 2 of R02145: Also, uncommenting now these observable´s setting solves the Segmentation breaking, but now the TRestReflector appears: In conclusion:
|
I add this debbuging print statements: It seems to be working fine: However, uncommenting the added print statement "/std::cout << "energiesX[0].first: " << energiesX[0].first << std::endl;/" gives the error again. I don´t understand why, but adding that seems to change the nature of "energiesX" and it is empty now that i tried to access it again, but it is not empty if i dont try to access it later ¿¿??. |
This can be solved by saving the value in a variable: Now the energiesX is not empty when I add the printing statement after: Now we can save the observables that access energiesX, in this case "MaxTrack_XZ_NHitsX": The observables have to be added like this: For which the observables are fine: This is quite unconfortable as a new variable will have to be added for each used key: secondKey for "energiesX[0].second", thirdKey for "energiesY[0].first" and so on (better names for the variables will be used). |
As this works I will make it work for all of the observables and then we can decide if we are okay with it, maybe someone understands the issue better than me, because im quite surprised by the quantum behaviour of the energiesX in the 3rd comment, being checked to be NOT empty when i dont add another debbuging print statement but empty when i do. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
As for the TRestReflector error, the problems is that in the "else" condition, the value added if the "if" condition is not fulfilled is "0", which is "int". As we fill the analysis tree we will add different types for different events depending on if the "if" condition is fulfilled or not. To solve this we simply change: Also, the number of tracks condition is changed to >2 instead of >1, as the tracks are separated in XZ and YZ type, so one track (the MaxTrack, in this case) will have 2 tracks. If >1 then events with 2 tracks (one XZ and one YZ) will fulfill the "if" condition, but when accesing the energiesX and energiesY second keys, there will be a problem and "Observable : tckAna2D_SecondMaxTrack_XZ_YZ_EnergyBalanceXY Value : -nan", changing to >2 will correctly set it to 0. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There are two different problems:
But for the other one:
It comes in 3, this will be important later.