Skip to content

Commit

Permalink
EarthModel to DetectorModel and EarthSector to DetectorSector and ear…
Browse files Browse the repository at this point in the history
…thparams folder to DetectorParams
  • Loading branch information
nickkamp1 authored and austinschneider committed Jan 10, 2024
1 parent 993bb6f commit 3d277ab
Show file tree
Hide file tree
Showing 118 changed files with 949 additions and 949 deletions.
4 changes: 2 additions & 2 deletions projects/detector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LIST (APPEND detector_SOURCES
${PROJECT_SOURCE_DIR}/projects/detector/private/ExponentialDistribution1D.cxx

${PROJECT_SOURCE_DIR}/projects/detector/private/DensityDistribution.cxx
${PROJECT_SOURCE_DIR}/projects/detector/private/EarthModel.cxx
${PROJECT_SOURCE_DIR}/projects/detector/private/DetectorModel.cxx
${PROJECT_SOURCE_DIR}/projects/detector/private/MaterialModel.cxx
${PROJECT_SOURCE_DIR}/projects/detector/private/Path.cxx
)
Expand Down Expand Up @@ -46,7 +46,7 @@ install(DIRECTORY "${PROJECT_SOURCE_DIR}/projects/detector/public/"
package_add_test(UnitTest_Axis ${PROJECT_SOURCE_DIR}/projects/detector/private/test/Axis_TEST.cxx)
package_add_test(UnitTest_DensityDistribution ${PROJECT_SOURCE_DIR}/projects/detector/private/test/DensityDistribution_TEST.cxx)
package_add_test(UnitTest_Distribution1D ${PROJECT_SOURCE_DIR}/projects/detector/private/test/Distribution1D_TEST.cxx)
package_add_test(UnitTest_EarthModel ${PROJECT_SOURCE_DIR}/projects/detector/private/test/EarthModel_TEST.cxx)
package_add_test(UnitTest_DetectorModel ${PROJECT_SOURCE_DIR}/projects/detector/private/test/DetectorModel_TEST.cxx)
package_add_test(UnitTest_MaterialModel ${PROJECT_SOURCE_DIR}/projects/detector/private/test/MaterialModel_TEST.cxx)
package_add_test(UnitTest_Path ${PROJECT_SOURCE_DIR}/projects/detector/private/test/Path_TEST.cxx)

Expand Down

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions projects/detector/private/Path.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <algorithm> // for max

#include "LeptonInjector/dataclasses/Particle.h" // for Particle
#include "LeptonInjector/detector/EarthModel.h" // for EarthModel
#include "LeptonInjector/detector/DetectorModel.h" // for DetectorModel
#include "LeptonInjector/geometry/Geometry.h" // for Geometry

namespace LI {
Expand All @@ -18,21 +18,21 @@ Path::Path() {

}

Path::Path(std::shared_ptr<const EarthModel> earth_model) {
SetEarthModel(earth_model);
Path::Path(std::shared_ptr<const DetectorModel> earth_model) {
SetDetectorModel(earth_model);
}

Path::Path(std::shared_ptr<const EarthModel> earth_model, math::Vector3D const & first_point, math::Vector3D const & last_point) {
SetEarthModel(earth_model);
Path::Path(std::shared_ptr<const DetectorModel> earth_model, math::Vector3D const & first_point, math::Vector3D const & last_point) {
SetDetectorModel(earth_model);
SetPoints(first_point, last_point);
}

Path::Path(std::shared_ptr<const EarthModel> earth_model, math::Vector3D const & first_point, math::Vector3D const & direction, double distance) {
SetEarthModel(earth_model);
Path::Path(std::shared_ptr<const DetectorModel> earth_model, math::Vector3D const & first_point, math::Vector3D const & direction, double distance) {
SetDetectorModel(earth_model);
SetPointsWithRay(first_point, direction, distance);
}

bool Path::HasEarthModel() {
bool Path::HasDetectorModel() {
return set_earth_model_;
}

Expand All @@ -48,7 +48,7 @@ bool Path::HasColumnDepth() {
return set_column_depth_;
}

std::shared_ptr<const EarthModel> Path::GetEarthModel() {
std::shared_ptr<const DetectorModel> Path::GetDetectorModel() {
return earth_model_;
}

Expand All @@ -72,12 +72,12 @@ geometry::Geometry::IntersectionList const & Path::GetIntersections() {
return intersections_;
}

void Path::SetEarthModel(std::shared_ptr<const EarthModel> earth_model) {
void Path::SetDetectorModel(std::shared_ptr<const DetectorModel> earth_model) {
earth_model_ = earth_model;
set_earth_model_ = true;
}

void Path::EnsureEarthModel() {
void Path::EnsureDetectorModel() {
if(not set_earth_model_) {
throw(std::runtime_error("Earth model not set!"));
}
Expand Down Expand Up @@ -119,7 +119,7 @@ void Path::SetIntersections(geometry::Geometry::IntersectionList const & interse
}

void Path::ComputeIntersections() {
EnsureEarthModel();
EnsureDetectorModel();
EnsurePoints();
intersections_ = earth_model_->GetIntersections(first_point_, direction_);
set_intersections_ = true;
Expand All @@ -134,7 +134,7 @@ void Path::EnsureIntersections() {
void Path::ClipToOuterBounds() {
EnsureIntersections();
EnsurePoints();
geometry::Geometry::IntersectionList bounds = EarthModel::GetOuterBounds(intersections_);
geometry::Geometry::IntersectionList bounds = DetectorModel::GetOuterBounds(intersections_);
if(bounds.intersections.size() > 0) {
assert(bounds.intersections.size() == 2);
math::Vector3D p0 = bounds.intersections[0].position;
Expand Down
2 changes: 1 addition & 1 deletion projects/detector/private/pybindings/Axis1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <pybind11/operators.h>
#include <pybind11/stl.h>

#include "../../public/LeptonInjector/detector/EarthModel.h"
#include "../../public/LeptonInjector/detector/DetectorModel.h"
#include "../../public/LeptonInjector/detector/Axis1D.h"
#include "../../../geometry/public/LeptonInjector/geometry/Geometry.h"

Expand Down
2 changes: 1 addition & 1 deletion projects/detector/private/pybindings/CartesianAxis1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <pybind11/operators.h>
#include <pybind11/stl.h>

#include "../../public/LeptonInjector/detector/EarthModel.h"
#include "../../public/LeptonInjector/detector/DetectorModel.h"
#include "../../public/LeptonInjector/detector/CartesianAxis1D.h"
#include "../../../geometry/public/LeptonInjector/geometry/Geometry.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <pybind11/operators.h>
#include <pybind11/stl.h>

#include "../../public/LeptonInjector/detector/EarthModel.h"
#include "../../public/LeptonInjector/detector/DetectorModel.h"
#include "../../public/LeptonInjector/detector/CartesianAxisExponentialDensityDistribution.h"
#include "../../../geometry/public/LeptonInjector/geometry/Geometry.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <pybind11/operators.h>
#include <pybind11/stl.h>

#include "../../public/LeptonInjector/detector/EarthModel.h"
#include "../../public/LeptonInjector/detector/DetectorModel.h"
#include "../../public/LeptonInjector/detector/CartesianAxisPolynomialDensityDistribution.h"
#include "../../../geometry/public/LeptonInjector/geometry/Geometry.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <pybind11/operators.h>
#include <pybind11/stl.h>

#include "../../public/LeptonInjector/detector/EarthModel.h"
#include "../../public/LeptonInjector/detector/DetectorModel.h"
#include "../../public/LeptonInjector/detector/ConstantDensityDistribution.h"
#include "../../../geometry/public/LeptonInjector/geometry/Geometry.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <pybind11/operators.h>
#include <pybind11/stl.h>

#include "../../public/LeptonInjector/detector/EarthModel.h"
#include "../../public/LeptonInjector/detector/DetectorModel.h"
#include "../../public/LeptonInjector/detector/Distribution1D.h"
#include "../../public/LeptonInjector/detector/ConstantDistribution1D.h"
#include "../../../geometry/public/LeptonInjector/geometry/Geometry.h"
Expand Down
2 changes: 1 addition & 1 deletion projects/detector/private/pybindings/DensityDistribution.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <pybind11/operators.h>
#include <pybind11/stl.h>

#include "../../public/LeptonInjector/detector/EarthModel.h"
#include "../../public/LeptonInjector/detector/DetectorModel.h"
#include "../../public/LeptonInjector/detector/DensityDistribution.h"
#include "../../../geometry/public/LeptonInjector/geometry/Geometry.h"

Expand Down
Loading

0 comments on commit 3d277ab

Please sign in to comment.