Skip to content

CD rings time and ring matching in CD E detector#140

Open
mvmavi wants to merge 2 commits intoISOLDESolenoidalSpectrometer:mainfrom
mvmavi:CD_ring
Open

CD rings time and ring matching in CD E detector#140
mvmavi wants to merge 2 commits intoISOLDESolenoidalSpectrometer:mainfrom
mvmavi:CD_ring

Conversation

@mvmavi
Copy link

@mvmavi mvmavi commented Jan 15, 2026

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

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());
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

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));
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to the above, to compare the ring and sector energies, use cdsen_list[i][j] instead of cd_evt[partid]->GetEnergy(1).

}
}

if( best_en_diff < 9e12 && matching_ring_index >=0 ){
Copy link
Contributor

Choose a reason for hiding this comment

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

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

@mvmavi
Copy link
Author

mvmavi commented Jan 16, 2026

Thanks a lot!!!!

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.

2 participants