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

Work on Tracks2D and 3D - Comment checkpoint #45

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

JPorron
Copy link
Contributor

@JPorron JPorron commented Jul 5, 2024

JPorron Ok: 2 Powered by Pull Request Badge

There are two different problems:

  • Some subruns are not analyzed when using the Tracks2D or Tracks3D analysis. I don´t know why!! It happens in some subruns but not in others. For example, it doesn´t work for "/storage/iaxo/iaxo-lab/data/R02145_Calibration_Vm_325_Vd_900_Pr_1.25_Gain_0x0_Shape_0xF_Clock_0xA-002.aqs" but it does for "/storage/iaxo/iaxo-lab/data/R02145_Calibration_Vm_325_Vd_900_Pr_1.25_Gain_0x0_Shape_0xF_Clock_0xA-001.aqs".

image
image

But for the other one:

image
image

  • For some events a TRestReflectorError is shown:

image

It comes in 3, this will be important later.

@JPorron
Copy link
Contributor Author

JPorron commented Jul 5, 2024

Commenting the some SetObservableValues solves the issue, at this checkpoint the Tracks2D can be used for subrun 2 of R02145:

image

Also, uncommenting now these observable´s setting solves the Segmentation breaking, but now the TRestReflector appears:

image
image

In conclusion:

  • The SegmentationFault breaking problem is identified to be produced by the "SetObservableValue("MaxTrack_XZ_NHitsX", XZ_NHitsX[energiesX[0].first]);", in particular accesing the "energiesX[0].first" value.
  • The TRestReflector warning is due to the 3 observables set in the if/else part.

@JPorron
Copy link
Contributor Author

JPorron commented Jul 5, 2024

I add this debbuging print statements:

image

It seems to be working fine:

image

However, uncommenting the added print statement "/std::cout << "energiesX[0].first: " << energiesX[0].first << std::endl;/" gives the error again.

image

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 ¿¿??.

@JPorron
Copy link
Contributor Author

JPorron commented Jul 5, 2024

This can be solved by saving the value in a variable:

image

Now the energiesX is not empty when I add the printing statement after:

image

Now we can save the observables that access energiesX, in this case "MaxTrack_XZ_NHitsX":

image

The observables have to be added like this:

image

For which the observables are fine:

image

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).

@JPorron
Copy link
Contributor Author

JPorron commented Jul 5, 2024

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.

@JPorron
Copy link
Contributor Author

JPorron commented Jul 8, 2024

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:

image

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.

@JPorron JPorron requested review from DavidDiezIb and lobis July 8, 2024 10:59
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.

None yet

1 participant