Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidDiezIb authored Feb 21, 2024
1 parent 258938e commit a3d8ed5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TRestTrackEvent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ TRestTrack* TRestTrackEvent::GetSecondMaxEnergyTrack(TString option) {

Double_t en = t->GetEnergy();

if (option == "X" && (t->isXZ() || t->isXYZ)) {
if (option == "X" && (t->isXZ() || t->isXYZ())) {
if (en > maxEnergy) {
maxEnergy = t->GetEnergy();
track = tck;
}
} else if (option == "Y" && (t->isYZ() || t->isXYZ)) {
} else if (option == "Y" && (t->isYZ() || t->isXYZ())) {
if (t->GetEnergy() > maxEnergy) {
maxEnergy = t->GetEnergy();
track = tck;
Expand Down Expand Up @@ -226,10 +226,10 @@ Double_t TRestTrackEvent::GetEnergy(TString option) {
if (option == "")
en += t->GetEnergy();

else if (option == "X" && (t->isXZ() || t->isXYZ))
else if (option == "X" && (t->isXZ() || t->isXYZ()))
en += t->GetEnergy();

else if (option == "Y" && (t->isYZ() || t->isXYZ))
else if (option == "Y" && (t->isYZ() || t->isXYZ()))
en += t->GetEnergy();

else if (option == "XYZ" && t->isXYZ())
Expand Down

0 comments on commit a3d8ed5

Please sign in to comment.