CD rings time and ring matching in CD E detector#140
Open
mvmavi wants to merge 2 commits intoISOLDESolenoidalSpectrometer:mainfrom
Open
CD rings time and ring matching in CD E detector#140mvmavi wants to merge 2 commits intoISOLDESolenoidalSpectrometer:mainfrom
mvmavi wants to merge 2 commits intoISOLDESolenoidalSpectrometer:mainfrom
Conversation
lpgaff
reviewed
Jan 15, 2026
| if( std::find( used_idx.begin(), used_idx.end(), k ) != used_idx.end() ) | ||
| ring_used = true; | ||
|
|
||
| double time_diff = TMath::Abs(cdrtd_list[i][k] - cd_evt[partid]->GetETime()); |
Contributor
There was a problem hiding this comment.
here you want to compare to the sector time in the E, which hasn't been set yet when we enter this loop. So instead of using cd_evt[partid]->GetETime(), you should use cdstd_list[i][j].
The loop over partid is giving you the initial hits from the dE layer.
lpgaff
reviewed
Jan 15, 2026
| ring_used = true; | ||
|
|
||
| double time_diff = TMath::Abs(cdrtd_list[i][k] - cd_evt[partid]->GetETime()); | ||
| double en_diff = TMath::Abs(cdren_list[i][k] - cd_evt[partid]->GetEnergy(1)); |
Contributor
There was a problem hiding this comment.
Similar to the above, to compare the ring and sector energies, use cdsen_list[i][j] instead of cd_evt[partid]->GetEnergy(1).
lpgaff
reviewed
Jan 15, 2026
| } | ||
| } | ||
|
|
||
| if( best_en_diff < 9e12 && matching_ring_index >=0 ){ |
Contributor
There was a problem hiding this comment.
best_en_diff is initialised as 8e12, so I think this test should use a smaller number than that, because it is testing if we actually found any matches at all. The same would be true for the dE layer on L2962
Author
|
Thanks a lot!!!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Liam!
I am currently working on the time alignment of the CD detectors.
I modified a bit the event builder in order to have the ring-side time (both for the dE and E layers) saved in the evt_tree.
It seems to work "fine", but I am not 100% confident. I still see very few matches between sector-ring sides in the dE...