Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 18, 2023
1 parent 9d160fe commit 051ac3b
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/TRestTrackEvent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,12 @@ void TRestTrackEvent::SetLevels() {
/// end is defined as the closest edge.
///
TRestVolumeHits TRestTrackEvent::GetMaxTrackBoundaries3D(TVector3& orig, TVector3& end) {

TRestTrack* tckX = GetMaxEnergyTrackInX();
TRestTrack* tckY = GetMaxEnergyTrackInY();

if(tckX == nullptr || tckY == nullptr){
RESTWarning << "Track is empty, skipping"<<RESTendl;
return {};
if (tckX == nullptr || tckY == nullptr) {
RESTWarning << "Track is empty, skipping" << RESTendl;
return {};
}

TRestVolumeHits hitsX = (TRestVolumeHits) * (tckX->GetVolumeHits());
Expand Down Expand Up @@ -358,7 +357,7 @@ TRestVolumeHits TRestTrackEvent::GetMaxTrackBoundaries3D(TVector3& orig, TVector
best3DHits = hits3D;
}

double totEn =0;
double totEn = 0;
for (unsigned int i = 0; i < best3DHits.GetNumberOfHits(); i++) {
totEn += best3DHits.GetEnergy(i);
}
Expand Down Expand Up @@ -402,9 +401,9 @@ void TRestTrackEvent::GetMaxTrackBoundaries(TVector3& orig, TVector3& end) {
TRestTrack* tckX = GetMaxEnergyTrackInX();
TRestTrack* tckY = GetMaxEnergyTrackInY();

if(tckX == nullptr || tckY == nullptr){
RESTWarning << "Track is empty, skipping"<<RESTendl;
return;
if (tckX == nullptr || tckY == nullptr) {
RESTWarning << "Track is empty, skipping" << RESTendl;
return;
}

TVector3 origX, endX;
Expand All @@ -429,9 +428,9 @@ Double_t TRestTrackEvent::GetMaxTrackRelativeZ() {
TRestTrack* tckX = GetMaxEnergyTrackInX();
TRestTrack* tckY = GetMaxEnergyTrackInY();

if(tckX == nullptr || tckY == nullptr){
RESTWarning << "Track is empty, skipping"<<RESTendl;
return -1;
if (tckX == nullptr || tckY == nullptr) {
RESTWarning << "Track is empty, skipping" << RESTendl;
return -1;
}

std::vector<std::pair<double, double> > zEn;
Expand Down

0 comments on commit 051ac3b

Please sign in to comment.