Skip to content

Commit

Permalink
Tries to solve an errorr where the return value is zero and should be…
Browse files Browse the repository at this point in the history
… a pair of vectors
  • Loading branch information
Francisco Rodriguez Candon committed Dec 5, 2023
1 parent bfb20f3 commit 5a83a1f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/TRestAxionField.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -486,17 +486,7 @@ double TRestAxionField::GammaTransmissionFWHM(Double_t ma, Double_t Ea, Double_t
/// It returns a pair of vectors with the values for the scan, the first one is the axion mass and the second
/// one is the density.

std::pair<std::vector<double>, std::vector<double>> TRestAxionField::GetMassDensityScanning(
std::string gasName, double ma_max, double Ea) {
#ifndef USE_MPFR
RESTWarning
<< "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<double> uno = {0};
std::vector<double> dos = {0};
return std::make_pair(uno, dos);
#else
std::pair<std::vector<double>, std::vector<double>> TRestAxionField::GetMassDensityScanning(std::string gasName, double ma_max, double Ea) {
std::vector<double> photonMass;
std::vector<double> density;
TRestAxionField* ax = new TRestAxionField();
Expand Down Expand Up @@ -528,7 +518,6 @@ std::pair<std::vector<double>, std::vector<double>> TRestAxionField::GetMassDens
} while (photonMass[i] < ma_max);
// Define the first step of the parametersof the density
return std::make_pair(photonMass, density);
#endif
}

/// Commented because it uses ComplexReal structure that is moved to TRestAxionFieldPropagationProcess class
Expand Down

0 comments on commit 5a83a1f

Please sign in to comment.