Skip to content

Commit

Permalink
new cases
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger committed Nov 25, 2024
1 parent 103cccd commit 38ef2dd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ struct GeometricConfig {
bool strip = false;

/// The variances for this digitization
std::map<Acts::BoundIndices, std::vector<Acts::ActsScalar>> varianceMap = {};
std::map<Acts::BoundIndices, std::vector<double>> varianceMap = {};

/// Charge generation (configurable via the chargeSmearer)
Acts::ActsScalar charge(Acts::ActsScalar path, RandomEngine &rng) const {
double charge(double path, RandomEngine &rng) const {
if (!chargeSmearer) {
return path;
}
Expand All @@ -82,9 +82,8 @@ struct GeometricConfig {
/// @param cmins is the cluster minimum in the different dimensions
///
/// @return a vector of variances for the cluster
std::vector<Acts::ActsScalar> variances(
const std::array<std::size_t, 2u> &csizes,
const std::array<std::size_t, 2u> &cmins) const;
std::vector<double> variances(const std::array<std::size_t, 2u> &csizes,
const std::array<std::size_t, 2u> &cmins) const;

/// Drift generation (currently not implemented)
/// Takes as an argument the position, and a random engine
Expand Down
2 changes: 1 addition & 1 deletion Examples/Python/src/Json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void addJson(Context& ctx) {
.def(py::init<>())
.def(py::init<std::unordered_map<Acts::GeometryIdentifier,
const Acts::Surface*>,
std::pair<Acts::ActsScalar, Acts::ActsScalar>>(),
std::pair<double, double>>(),
py::arg("refLayers"), py::arg("bins"));

ACTS_PYTHON_STRUCT_BEGIN(c, Config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(Exceptions) {
// Create parameters to accumulate
Acts::Vector4 pos{1, 2, 0, 4};
Acts::Vector3 dir{1, 0, 0};
Acts::ActsScalar P = 1;
double P = 1.;

auto hypothesis1 = Acts::ParticleHypothesis::electron();
auto hypothesis2 = Acts::ParticleHypothesis::muon();
Expand Down Expand Up @@ -143,15 +143,15 @@ BOOST_AUTO_TEST_CASE(Accumulation) {
std::array<Acts::Vector4, 4> fourPositions = {pos * (i + 1), pos * (i + 2),
pos * (i + 3), pos * (i + 4)};

std::array<Acts::ActsScalar, 4> thetas = {
std::array<double, 4> thetas = {
std::numbers::pi / (i + 1), std::numbers::pi / (i + 2),
std::numbers::pi / (i + 3), std::numbers::pi / (i + 4)};

std::array<Acts::ActsScalar, 4> phis = {
std::array<double, 4> phis = {
2 * std::numbers::pi / (i + 1), 2 * std::numbers::pi / (i + 2),
2 * std::numbers::pi / (i + 3), 2 * std::numbers::pi / (i + 4)};

Acts::ActsScalar P = 1.5 * (i + 1);
double P = 1.5 * (i + 1);

// Get the point of the grid
auto bin = gridBound.localBinsFromGlobalBin(i);
Expand Down Expand Up @@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(Accumulation) {

Acts::Vector3 avgMom = avgMoms.at(i);
Acts::Vector3 avgDir = avgMom.normalized();
Acts::ActsScalar avgP = avgMom.norm();
double avgP = avgMom.norm();

CHECK_CLOSE_ABS(ipBound->fourPosition(gctx), avgPos, 1e-3);
CHECK_CLOSE_ABS(ipBound->direction(), avgDir, 1e-3);
Expand Down

0 comments on commit 38ef2dd

Please sign in to comment.