diff --git a/Environment/BaseExponential.h b/Environment/BaseExponential.h index 028aa79a846292f87d9151c201b943321df340c5..ba9f85d54df52ac576a24435974d3f0ea4abfe47 100644 --- a/Environment/BaseExponential.h +++ b/Environment/BaseExponential.h @@ -50,16 +50,15 @@ namespace corsika::environment { */ // clang-format on units::si::GrammageType IntegratedGrammage( - geometry::Trajectory<geometry::Line> const& line, - units::si::LengthType pTo, + geometry::Trajectory<geometry::Line> const& line, units::si::LengthType to, geometry::Vector<units::si::dimensionless_d> const& axis) const { auto const vDotA = line.NormalizedDirection().dot(axis).magnitude(); auto const rhoStart = GetImplementation().GetMassDensity(line.GetR0()); if (vDotA == 0) { - return pTo * rhoStart; + return to * rhoStart; } else { - return rhoStart * (fLambda / vDotA) * (exp(vDotA * pTo * fInvLambda) - 1); + return rhoStart * (fLambda / vDotA) * (exp(vDotA * to * fInvLambda) - 1); } } @@ -83,15 +82,15 @@ namespace corsika::environment { // clang-format on units::si::LengthType ArclengthFromGrammage( geometry::Trajectory<corsika::geometry::Line> const& line, - units::si::GrammageType pGrammage, + units::si::GrammageType grammage, geometry::Vector<units::si::dimensionless_d> const& axis) const { auto const vDotA = line.NormalizedDirection().dot(axis).magnitude(); auto const rhoStart = GetImplementation().GetMassDensity(line.GetR0()); if (vDotA == 0) { - return pGrammage / rhoStart; + return grammage / rhoStart; } else { - auto const logArg = pGrammage * fInvLambda * vDotA / rhoStart + 1; + auto const logArg = grammage * fInvLambda * vDotA / rhoStart + 1; if (logArg > 0) { return fLambda / vDotA * log(logArg); } else { diff --git a/Environment/FlatAtmosphere/FlatAtmosphere.h b/Environment/FlatAtmosphere/FlatAtmosphere.h deleted file mode 100644 index 6839def48c2f6fddfafd0beb5fd4ca46058ebd09..0000000000000000000000000000000000000000 --- a/Environment/FlatAtmosphere/FlatAtmosphere.h +++ /dev/null @@ -1,10 +0,0 @@ - -/* - * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu - * - * See file AUTHORS for a list of contributors. - * - * This software is distributed under the terms of the GNU General Public - * Licence version 3 (GPL Version 3). See file LICENSE for a full version of - * the license. - */ diff --git a/Environment/FlatExponential.h b/Environment/FlatExponential.h index ef8cdc9a312d3ff3d345312a6349390deb9e11a8..123d0d0d1a80e80b34133313d2d4f8ae25547412 100644 --- a/Environment/FlatExponential.h +++ b/Environment/FlatExponential.h @@ -20,7 +20,7 @@ #include <corsika/units/PhysicalUnits.h> namespace corsika::environment { - + //clang-format off /** * flat exponential density distribution with @@ -48,23 +48,22 @@ namespace corsika::environment { , fAxis(axis) , fNuclComp(nuclComp) {} - corsika::units::si::MassDensityType GetMassDensity( - corsika::geometry::Point const& p) const override { + units::si::MassDensityType GetMassDensity(geometry::Point const& p) const override { return Base::fRho0 * exp(Base::fInvLambda * (p - Base::fP0).dot(fAxis)); } NuclearComposition const& GetNuclearComposition() const override { return fNuclComp; } - corsika::units::si::GrammageType IntegratedGrammage( - corsika::geometry::Trajectory<corsika::geometry::Line> const& line, - corsika::units::si::LengthType pTo) const override { - return Base::IntegratedGrammage(line, pTo, fAxis); + units::si::GrammageType IntegratedGrammage( + geometry::Trajectory<geometry::Line> const& line, + units::si::LengthType to) const override { + return Base::IntegratedGrammage(line, to, fAxis); } - corsika::units::si::LengthType ArclengthFromGrammage( - corsika::geometry::Trajectory<corsika::geometry::Line> const& line, - corsika::units::si::GrammageType pGrammage) const override { - return Base::ArclengthFromGrammage(line, pGrammage, fAxis); + units::si::LengthType ArclengthFromGrammage( + geometry::Trajectory<geometry::Line> const& line, + units::si::GrammageType grammage) const override { + return Base::ArclengthFromGrammage(line, grammage, fAxis); } }; } // namespace corsika::environment diff --git a/Environment/SlidingPlanarExponential.h b/Environment/SlidingPlanarExponential.h index faa363394bbb03769f0488a5be72117d1f124e6a..476bb0160ab6f770c34fdad768d0be55a0b155e0 100644 --- a/Environment/SlidingPlanarExponential.h +++ b/Environment/SlidingPlanarExponential.h @@ -45,26 +45,25 @@ namespace corsika::environment { : Base(p0, rho, lambda) , fNuclComp(nuclComp) {} - corsika::units::si::MassDensityType GetMassDensity( - corsika::geometry::Point const& p) const override { + units::si::MassDensityType GetMassDensity(geometry::Point const& p) const override { auto const height = (p - Base::fP0).norm(); return Base::fRho0 * exp(Base::fInvLambda * height); } NuclearComposition const& GetNuclearComposition() const override { return fNuclComp; } - corsika::units::si::GrammageType IntegratedGrammage( - corsika::geometry::Trajectory<corsika::geometry::Line> const& line, - corsika::units::si::LengthType pTo) const override { + units::si::GrammageType IntegratedGrammage( + geometry::Trajectory<geometry::Line> const& line, + units::si::LengthType to) const override { auto const axis = (line.GetR0() - Base::fP0).normalized(); - return Base::IntegratedGrammage(line, pTo, axis); + return Base::IntegratedGrammage(line, to, axis); } - corsika::units::si::LengthType ArclengthFromGrammage( - corsika::geometry::Trajectory<corsika::geometry::Line> const& line, - corsika::units::si::GrammageType pGrammage) const override { + units::si::LengthType ArclengthFromGrammage( + geometry::Trajectory<geometry::Line> const& line, + units::si::GrammageType grammage) const override { auto const axis = (line.GetR0() - Base::fP0).normalized(); - return Base::ArclengthFromGrammage(line, pGrammage, axis); + return Base::ArclengthFromGrammage(line, grammage, axis); } };