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 Mar 18, 2024
1 parent ab848d5 commit 9c76609
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
4 changes: 1 addition & 3 deletions macros/REST_Axion_XMMAngleEffCSV.C
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ Int_t REST_Axion_XMMAngleEffCSV(

Int_t obsID = run->GetAnalysisTree()->GetObservableID("optics_efficiency");
if (obsID == -1) {
RESTError << "No observable \""
<< "optics_efficiency"
<< "\" in file " << files[n] << RESTendl;
RESTError << "No observable \"" << "optics_efficiency" << "\" in file " << files[n] << RESTendl;
continue;
}
Double_t eff = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,15 @@ void PrintVolumeBoundaries(Int_t volume_ID, TVector3 position, TVector3 directio

if (volume_ID == 0) {
myfile << "Initial position : (" << position.X() << ", " << position.Y() << ", " << position.Z()
<< ")"
<< "\n";
<< ")" << "\n";
myfile << "Direction : (" << direction.X() << ", " << direction.Y() << ", " << direction.Z() << ")"
<< "\n\n";
}
myfile << "Volume #" << volume_ID << "\n";
myfile << "Number of volume boundary points found : " << boundaries.size() << "\n";
for (int i = 0; i < boundaries.size(); i++)
myfile << "boundaries[" << i << "] = (" << boundaries[i].X() << ", " << boundaries[i].Y() << ", "
<< boundaries[i].Z() << ")"
<< "\n";
<< boundaries[i].Z() << ")" << "\n";
myfile << "\n\n";
}

Expand All @@ -84,8 +82,6 @@ void PrintFieldBoundaries(std::vector<TVector3> fieldboundaries) {
myfile << "Number of field boundary points found : " << fieldboundaries.size() << "\n";
for (int i = 0; i < fieldboundaries.size(); i++)
myfile << "fieldboundaries[" << i << "] = (" << fieldboundaries[i].X() << ", "
<< fieldboundaries[i].Y() << ", " << fieldboundaries[i].Z() << ")"
<< "\n";
myfile << "---------------------------------"
<< "\n";
<< fieldboundaries[i].Y() << ", " << fieldboundaries[i].Z() << ")" << "\n";
myfile << "---------------------------------" << "\n";
}
12 changes: 5 additions & 7 deletions src/TRestAxionMagneticField.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -735,13 +735,11 @@ void TRestAxionMagneticField::LoadMagneticFieldData(MagneticFieldVolume& mVol,
RESTWarning << "nX: " << nX << " nY: " << nY << " nZ: " << nZ << RESTendl;
RESTWarning << "WARNING: field[nX][nY][nZ] element not equal to initial value (0, 0, 0) !!"
<< RESTendl;
RESTWarning << "It has value: "
<< "mVol.field[" << nX << "][" << nY << "][" << nZ << "] = ("
RESTWarning << "It has value: " << "mVol.field[" << nX << "][" << nY << "][" << nZ << "] = ("
<< mVol.field[nX][nY][nZ].X() << " , " << mVol.field[nX][nY][nZ].Y() << " , "
<< mVol.field[nX][nY][nZ].Z() << ")" << RESTendl;
RESTWarning << "Values to write: "
<< "Bx: " << data[n][3] << " By: " << data[n][4] << " Bz: " << data[n][5] << RESTendl
<< RESTendl;
RESTWarning << "Values to write: " << "Bx: " << data[n][3] << " By: " << data[n][4]
<< " Bz: " << data[n][5] << RESTendl << RESTendl;

this->SetError("There was a problem assigning the field matrix!");
if (GetVerboseLevel() >= TRestStringOutput::REST_Verbose_Level::REST_Extreme) GetChar();
Expand Down Expand Up @@ -1516,8 +1514,8 @@ void TRestAxionMagneticField::PrintMetadata() {
RESTMetadata << "* Volume " << p << " centered at (" << centerX << "," << centerY << "," << centerZ
<< ") mm" << RESTendl;
RESTMetadata << " - Grid mesh element size. X: " << fMeshSize[p].X() << "mm "
<< " Y: " << fMeshSize[p].Y() << "mm "
<< " Z: " << fMeshSize[p].Z() << "mm " << RESTendl;
<< " Y: " << fMeshSize[p].Y() << "mm " << " Z: " << fMeshSize[p].Z() << "mm "
<< RESTendl;
RESTMetadata << " - Offset field [T] : (" << fConstantField[p].X() << ", " << fConstantField[p].Y()
<< ", " << fConstantField[p].Z() << ")" << RESTendl;
RESTMetadata << " - File loaded : " << fFileNames[p] << RESTendl;
Expand Down
4 changes: 2 additions & 2 deletions src/TRestAxionOpticsMirror.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ Double_t TRestAxionOpticsMirror::GetReflectivity(const Double_t angle, const Dou
}

Int_t lowAngBin = (Int_t)((ang) / 0.01);
Double_t deltaAng = (ang - (Double_t)(lowAngBin)*0.01) / 0.01; // between 0 and 1
Double_t deltaAng = (ang - (Double_t)(lowAngBin) * 0.01) / 0.01; // between 0 and 1

Double_t REnLowAngLow = fReflectivityTable[lowEnBin][lowAngBin];
Double_t REnLowAngHi = fReflectivityTable[lowEnBin][lowAngBin + 1];
Expand Down Expand Up @@ -449,7 +449,7 @@ Double_t TRestAxionOpticsMirror::GetTransmission(const Double_t angle, const Dou
}

Int_t lowAngBin = (Int_t)((ang) / 0.01);
Double_t deltaAng = (ang - (Double_t)(lowAngBin)*0.01) / 0.01; // between 0 and 1
Double_t deltaAng = (ang - (Double_t)(lowAngBin) * 0.01) / 0.01; // between 0 and 1

Double_t REnLowAngLow = fTransmissionTable[lowEnBin][lowAngBin];
Double_t REnLowAngHi = fTransmissionTable[lowEnBin][lowAngBin + 1];
Expand Down

0 comments on commit 9c76609

Please sign in to comment.