Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify ODD Strip Module Handling, main branch (2024.08.20.) #686

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ TRACCC_HOST_DEVICE inline void fill_measurement(
if (mod.pixel.dimension == 1) {
m.meas_dim = 1;
m.local[1] = 0.f;
m.variance[1] = mod.pixel.variance_y;
}
}

Expand Down
1 change: 0 additions & 1 deletion core/include/traccc/geometry/pixel_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ struct pixel_data {
scalar pitch_x = 1.f;
scalar pitch_y = 1.f;
char dimension = 2;
scalar variance_y = 0.f;

TRACCC_HOST_DEVICE
vector2 get_pitch() const { return {pitch_x, pitch_y}; };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ inline void aggregate_cluster(
if (this_module.pixel.dimension == 1) {
out.meas_dim = 1;
out.local[1] = 0.f;
out.variance[1] = this_module.pixel.variance_y;
} else {
out.meas_dim = 2;
}
Expand Down
1 change: 0 additions & 1 deletion io/include/traccc/io/digitization_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace traccc {
struct module_digitization_config {
Acts::BinUtility segmentation;
char dimensions = 2;
float variance_y = 0.f;
};

/// Type describing the digitization configuration for the whole detector
Expand Down
1 change: 0 additions & 1 deletion io/src/csv/read_cells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ traccc::cell_module get_module(const std::uint64_t geometry_id,
result.pixel.pitch_y = binning_data[1].step;
}
result.pixel.dimension = geo_it->dimensions;
result.pixel.variance_y = geo_it->variance_y;
}

return result;
Expand Down
25 changes: 8 additions & 17 deletions io/src/read_digitization_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,21 @@ void from_json(const nlohmann::json& json, module_digitization_config& cfg) {
// Names/keywords used in the JSON file.
static const char* geometric = "geometric";
static const char* segmentation = "segmentation";
static const char* variances = "variances";
static const char* binningdata = "binningdata";
static const char* bins = "bins";

// Read the binning information, if possible.
if (json.find(geometric) != json.end()) {
const auto& json_geom = json[geometric];
if (json_geom.find(segmentation) != json_geom.end()) {
Acts::from_json(json_geom[segmentation], cfg.segmentation);
}
if (json_geom.find(variances) != json_geom.end()) {
for (const auto& jdata : json_geom[variances]) {
const int index = jdata["index"];
if (index != 1) {
continue;
}
for (const auto& rms : jdata["rms"]) {
// A large RMS value associated to the second index happens
// to mean that this is a strip detector...
const float frms = rms.get<float>();
if (frms > 1.0f) {
cfg.dimensions = 1;
cfg.variance_y = std::max(frms, cfg.variance_y);
}
// If we only have 1 bins along any axis, then this is a 1D module.
const auto& json_segm = json_geom[segmentation];
for (const auto& bindata : json_segm[binningdata]) {
if (bindata[bins].get<int>() == 1) {
cfg.dimensions = 1;
break;
}
break;
}
}
}
Expand Down
Loading