From bfb20f31ac59c023ac4b15c4ebeddc44ad517303 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Dec 2023 18:24:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/TRestAxionField.cxx | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/TRestAxionField.cxx b/src/TRestAxionField.cxx index 2c6f8899..ac8dded5 100644 --- a/src/TRestAxionField.cxx +++ b/src/TRestAxionField.cxx @@ -422,24 +422,26 @@ double TRestAxionField::GammaTransmissionFWHM(Double_t ma, Double_t Ea, Double_t << "MPFR libraries not linked to REST libraries. Try adding -DREST_MPFR=ON to your REST compilation" << RESTendl; RESTWarning << "TRestAxionField::GammaTransmissionFWHM will return 0" << RESTendl; - std::vector uno={0}; - std::vector dos={0}; - return std::make_pair(uno,dos); + std::vector uno = {0}; + std::vector dos = {0}; + return std::make_pair(uno, dos); #else - if(!fBufferGas){ - double ma_start=ma; + if (!fBufferGas) { + double ma_start = ma; for (int i = 0; i < n; i++) { - if (GammaTransmissionProbability(Bmag, Lcoh, Ea, ma_start) > GammaTransmissionProbability(Bmag, Lcoh, Ea, ma)/2) { + if (GammaTransmissionProbability(Bmag, Lcoh, Ea, ma_start) > + GammaTransmissionProbability(Bmag, Lcoh, Ea, ma) / 2) { ma_start += step; } else { break; } - } - RESTWarning << "No buffer gas defined, assuming vacuum an the resulting point is the m_a where P_ag=Pagmax/2 " << RESTendl; + RESTWarning << "No buffer gas defined, assuming vacuum an the resulting point is the m_a where " + "P_ag=Pagmax/2 " + << RESTendl; return ma_start; } else { - Double_t photonMass; + Double_t photonMass; photonMass = fBufferGas->GetPhotonMass(Ea); double center_plus = 0; double center_minus = 0; @@ -451,7 +453,7 @@ double TRestAxionField::GammaTransmissionFWHM(Double_t ma, Double_t Ea, Double_t } else { center_plus = center; center = photonMass; - break; + break; } } for (int i = 0; i < n; i++) { @@ -465,10 +467,11 @@ double TRestAxionField::GammaTransmissionFWHM(Double_t ma, Double_t Ea, Double_t } if (center_minus <= 0) { center_minus = photonMass; - cout << "WARNING: The left value for the condition P_a = P_amax/2 is zero or negative, redifinning it to P_amax. " - << endl; + cout << "WARNING: The left value for the condition P_a = P_amax/2 is zero or negative, " + "redifinning it to P_amax. " + << endl; } - return center_plus - center_minus; + return center_plus - center_minus; } #endif } @@ -490,9 +493,9 @@ std::pair, std::vector> TRestAxionField::GetMassDens << "MPFR libraries not linked to REST libraries. Try adding -DREST_MPFR=ON to your REST compilation" << RESTendl; RESTWarning << "TRestAxionField::GetMassDensityScanning will return 0" << RESTendl; - std::vector uno={0}; - std::vector dos={0}; - return std::make_pair(uno,dos); + std::vector uno = {0}; + std::vector dos = {0}; + return std::make_pair(uno, dos); #else std::vector photonMass; std::vector density;