Skip to content

Conversation

@AlvaroEzq
Copy link

@AlvaroEzq AlvaroEzq commented Sep 30, 2025

AlvaroEzq Large: 287 Powered by Pull Request Badge

The new process TRestTrackLineGainMapCorrectionProcess applies the calibration of a TRestDataSetGainMap to a TRestTrackEvent which should have been already linearized (by the process TRestTrackLinearizationProcess). The key point of this process is that it applies the gain map hit by hit (where this hits are the nodes of the linearized track).

Note

Suggestions for the process name are welcomed 😅

@AlvaroEzq AlvaroEzq marked this pull request as draft September 30, 2025 08:58
// apply calibration from gainmap
TRestTrack* tckXYZcalibrated = new TRestTrack();
TRestVolumeHits* hitsXYZcalibrated = new TRestVolumeHits();
for (int i = 0; i < hitsXYZ->GetNumberOfHits(); i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (int i = 0; i < hitsXYZ->GetNumberOfHits(); i++) {
for (size_t i = 0; i < hitsXYZ->GetNumberOfHits(); i++) {

double zClosestYhit = 9e9;
double eClosestYhit = 0;
double yClosestYhit = 0;
for (int j = 0; j < hitsY->GetNumberOfHits(); j++) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (int j = 0; j < hitsY->GetNumberOfHits(); j++) {
for (size_t j = 0; j < hitsY->GetNumberOfHits(); j++) {

TRestVolumeHits* hitsXYZ = new TRestVolumeHits();
auto hitsX = tckX->GetHits();
auto hitsY = tckY->GetHits();
for (int i = 0; i < hitsX->GetNumberOfHits(); i++) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (int i = 0; i < hitsX->GetNumberOfHits(); i++) {
for (size_t i = 0; i < hitsX->GetNumberOfHits(); i++) {

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.

3 participants