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

Please consider the following formatting changes to #5662 #24

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 22 additions & 21 deletions PWGUD/Core/SGSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,25 +77,26 @@ class SGSelector
result.value = 3;
return result;
}
if (gA && gC) { //loop once again for so-called DG events to get the most active FT0 BC
for (auto const& bc : bcRange) {
if (bc.has_foundFT0()){
tempampa = udhelpers::FT0AmplitudeA(bc.foundFT0());
tempampc = udhelpers::FT0AmplitudeC(bc.foundFT0());
if (tempampa > ampa){
ampa = tempampa;
newdgabc = bc;
}
if (tempampc > ampc){
ampc = tempampc;
newdgcbc = bc;
}
}
}
if (newdgabc != newdgcbc){
if (ampc/diffCuts.FITAmpLimits()[2] > ampa/diffCuts.FITAmpLimits()[2]) newdgabc = newdgcbc;
}
newbc = newdgabc;
if (gA && gC) { // loop once again for so-called DG events to get the most active FT0 BC
for (auto const& bc : bcRange) {
if (bc.has_foundFT0()) {
tempampa = udhelpers::FT0AmplitudeA(bc.foundFT0());
tempampc = udhelpers::FT0AmplitudeC(bc.foundFT0());
if (tempampa > ampa) {
ampa = tempampa;
newdgabc = bc;
}
if (tempampc > ampc) {
ampc = tempampc;
newdgcbc = bc;
}
}
}
if (newdgabc != newdgcbc) {
if (ampc / diffCuts.FITAmpLimits()[2] > ampa / diffCuts.FITAmpLimits()[2])
newdgabc = newdgcbc;
}
newbc = newdgabc;
}
result.bc = &newbc;
// LOGF(info, "Old BC: %i, New BC: %i",oldbc.globalBC(), newbc.globalBC());
Expand All @@ -115,7 +116,7 @@ class SGSelector
template <typename CC>
int trueGap(CC& collision, float fv0, float ft0a, float ft0c, float zdc_cut)
{
float fit_cut[3] = {fv0, ft0a, ft0c};
float fit_cut[3] = {fv0, ft0a, ft0c};
int gap = collision.gapSide();
int true_gap = gap;
if (gap == 0) {
Expand All @@ -125,7 +126,7 @@ class SGSelector
if (collision.totalFT0AmplitudeC() > fit_cut[2] || collision.energyCommonZNC() > zdc_cut)
true_gap = -1;
} else if (gap == 2) {
if ((collision.totalFV0AmplitudeA() > fit_cut[0] || collision.totalFT0AmplitudeA() > fit_cut[1] || collision.energyCommonZNA() > zdc_cut) && (collision.totalFT0AmplitudeC() > fit_cut[2] ||collision.energyCommonZNC() > zdc_cut))
if ((collision.totalFV0AmplitudeA() > fit_cut[0] || collision.totalFT0AmplitudeA() > fit_cut[1] || collision.energyCommonZNA() > zdc_cut) && (collision.totalFT0AmplitudeC() > fit_cut[2] || collision.energyCommonZNC() > zdc_cut))
true_gap = -1;
else if (collision.totalFV0AmplitudeA() > fit_cut[0] || collision.totalFT0AmplitudeA() > fit_cut[1] || collision.energyCommonZNA() > zdc_cut)
true_gap = 1;
Expand Down
Loading