Add hardcoded Jungfrau config structures

This commit is contained in:
2026-03-09 17:00:17 +01:00
parent 5cc2b9f501
commit e00b1d24fa
3 changed files with 128 additions and 15 deletions
+125 -12
View File
@@ -1,12 +1,122 @@
#include "aare/InclusiveROI.hpp" // IMPORTANT: Uses InclusiveROI!!!
#include "aare/RemapDefs.hpp"
namespace aare::remap::defs {
namespace aare::remap::config::jungfrau {
/************************************
* Default strixel geometries
************************************/
constexpr defs::SensorStrixelGeometry StrxP25{.multiplicity = 3,
.pitch_um = 25.0};
constexpr defs::SensorStrixelGeometry StrxP15{.multiplicity = 5,
.pitch_um = 15.0};
constexpr defs::SensorStrixelGeometry StrxP18{.multiplicity = 4,
.pitch_um = 18.75};
constexpr defs::SensorStrixelGeometry StrxP37{.multiplicity = 2,
.pitch_um = 37.5};
/************************************
* Default sensor placements
************************************/
constexpr defs::SensorPlacement Chip1{.placement_on_module{256, 511, 0, 255},
.rotation = defs::Rotation::Normal};
constexpr defs::SensorPlacement Chip6{.placement_on_module{512, 767, 256, 511},
.rotation = defs::Rotation::Inverse};
constexpr defs::SensorPlacement Quad{.placement_on_module{256, 767, 0, 511},
.rotation = defs::Rotation::Normal};
/************************************
* Single chip, multi-pitch, iLGAD
************************************/
constexpr defs::SensorPixelGeometry SingelChipMP_iLGAD_pix{
.num_pix_x = 256, .num_pix_y = 256, .guardring = {.x = 9, .y = 9}};
constexpr defs::SensorGroupConfig SingleChipMP_iLGAD_P25{
.pixel = SingelChipMP_iLGAD_pix,
.strixel = StrxP25,
.placement_on_sensor = {SingelChipMP_iLGAD_pix.guardring.x + 1,
SingelChipMP_iLGAD_pix.num_pix_x -
SingelChipMP_iLGAD_pix.guardring.x - 1,
SingelChipMP_iLGAD_pix.guardring.y,
(SingelChipMP_iLGAD_pix.num_pix_y / 4) - 1}};
constexpr defs::SensorGroupConfig SingleChipMP_iLGAD_P15{
.pixel = SingelChipMP_iLGAD_pix,
.strixel = StrxP15,
.placement_on_sensor = {SingelChipMP_iLGAD_pix.guardring.x + 3,
SingelChipMP_iLGAD_pix.num_pix_x -
SingelChipMP_iLGAD_pix.guardring.x - 1,
SingelChipMP_iLGAD_pix.num_pix_y / 4,
(SingelChipMP_iLGAD_pix.num_pix_y / 4) * 2 - 1}};
constexpr defs::SensorGroupConfig SingleChipMP_iLGAD_P18{
.pixel = SingelChipMP_iLGAD_pix,
.strixel = StrxP18,
.placement_on_sensor = {SingelChipMP_iLGAD_pix.guardring.x + 2,
SingelChipMP_iLGAD_pix.num_pix_x -
SingelChipMP_iLGAD_pix.guardring.x - 1,
(SingelChipMP_iLGAD_pix.num_pix_y / 4) * 2,
SingelChipMP_iLGAD_pix.num_pix_y -
SingelChipMP_iLGAD_pix.guardring.y - 1}};
/************************************
* Single chip, multi-pitch, TEW
************************************/
constexpr defs::SensorPixelGeometry SingelChipMP_TEW_pix{
.num_pix_x = 256, .num_pix_y = 256, .guardring = {.x = 0, .y = 0}};
constexpr defs::SensorGroupConfig SingleChipMP_TEW_P25{
.pixel = SingelChipMP_TEW_pix,
.strixel = StrxP25,
.placement_on_sensor = {SingelChipMP_TEW_pix.guardring.x + 1,
SingelChipMP_TEW_pix.num_pix_x -
SingelChipMP_TEW_pix.guardring.x - 1,
SingelChipMP_TEW_pix.guardring.y,
(SingelChipMP_TEW_pix.num_pix_y / 4) - 1}};
constexpr defs::SensorGroupConfig SingleChipMP_TEW_P15{
.pixel = SingelChipMP_TEW_pix,
.strixel = StrxP15,
.placement_on_sensor = {SingelChipMP_TEW_pix.guardring.x + 1,
SingelChipMP_TEW_pix.num_pix_x -
SingelChipMP_TEW_pix.guardring.x - 1,
SingelChipMP_TEW_pix.num_pix_y / 4,
(SingelChipMP_TEW_pix.num_pix_y / 4) * 2 - 1}};
constexpr defs::SensorGroupConfig SingleChipMP_TEW_P18{
.pixel = SingelChipMP_TEW_pix,
.strixel = StrxP18,
.placement_on_sensor = {
SingelChipMP_TEW_pix.guardring.x,
SingelChipMP_TEW_pix.num_pix_x - SingelChipMP_TEW_pix.guardring.x - 1,
(SingelChipMP_TEW_pix.num_pix_y / 4) * 2,
SingelChipMP_TEW_pix.num_pix_y - SingelChipMP_TEW_pix.guardring.y - 1}};
/************************************
* Quad, 25 um, iLGAD
************************************/
constexpr defs::SensorPixelGeometry Quad_iLGAD_pix{
.num_pix_x = 512, .num_pix_y = 512, .guardring = {.x = 9, .y = 9}};
constexpr defs::SensorGroupConfig Quad_iLGAD_half{
.pixel = Quad_iLGAD_pix,
.strixel = StrxP25,
.placement_on_sensor = {
Quad_iLGAD_pix.guardring.x + 2,
Quad_iLGAD_pix.num_pix_x - Quad_iLGAD_pix.guardring.x - 1,
Quad_iLGAD_pix.guardring.y, (Quad_iLGAD_pix.num_pix_y / 2) - 1}};
} // namespace aare::remap::config::jungfrau
/**************************************
* Legacy for reference, to be deleted
**************************************/
namespace aare::remap::legacy {
enum class SensorTech : int { iLGAD, TEW };
// This is dummy for now because it is not yet decided how best to depict the
// differences in batches R&D, production and year in a scalable way with
// unified naming conventions
// This is dummy for now because it is not yet decided how best to depict
// the differences in batches R&D, production and year in a scalable way
// with unified naming conventions
enum class SensorRevision : int { RevA, RevB, RevC };
enum class SensorLayout : int {
@@ -20,7 +130,8 @@ enum class SensorLayout : int {
};
// Orientation of the sensor with respect to the ASICs / the HDI
// Normal means lower part of sensor (as in GDS) aligns with lower part of HDI
// Normal means lower part of sensor (as in GDS) aligns with lower part of
// HDI
enum class Rotation : int { Normal = 0, Inverse = 1 };
struct SensorKey {
@@ -87,8 +198,9 @@ struct SingleChipMP_iLGAD {
.ncols_remap = (chip.cols - (2 * chip.guardring) - 3) / 5,
.pitch_um = 15.0};
// Group 3: 18.75um pitch, groups of 4, 2 columns of square pixels (double
// the size of the other groups, differe in design of metal layer)
// Group 3: 18.75um pitch, groups of 4, 2 columns of square pixels
// (double the size of the other groups, differe in design of metal
// layer)
static inline const StrixelGeometry P18 = {
.multiplicator = 4,
.x_shift = 2,
@@ -130,8 +242,9 @@ struct SingleChipMP_TEW {
.ncols_remap = chip.cols / 5, // 51
.pitch_um = 15.0};
// Group 3: 18.75um pitch, groups of 4, 2 columns of square pixels (double
// the size of the other groups, differe in design of metal layer)
// Group 3: 18.75um pitch, groups of 4, 2 columns of square pixels
// (double the size of the other groups, differe in design of metal
// layer)
static inline const StrixelGeometry P18 = {
.multiplicator = 4,
.x_shift = 0,
@@ -159,11 +272,11 @@ struct Quad_iLGAD {
.multiplicator = 3,
.x_shift = 2,
.strixel_roi =
InclusiveROI{chip.guardring + 1, chip.cols - chip.guardring - 1,
chip.guardring, chip.rows - 2},
InclusiveROI{chip.guardring + 2, chip.cols - chip.guardring - 1,
chip.guardring, chip.rows / 2},
.nrows_remap = (chip.rows - 1 - chip.guardring) * 3,
.ncols_remap = (chip.cols - 2 - 2 * chip.guardring) / 3,
.pitch_um = 25.0};
};
} // namespace aare::remap::defs
} // namespace aare::remap::legacy
+2 -2
View File
@@ -23,8 +23,8 @@ struct BondShift {
// Define the native pixel grid of the sensor (as connected to ASIC)
struct SensorPixelGeometry {
int cols;
int rows;
int num_pix_x;
int num_pix_y;
Guardring guardring;
};
+1 -1
View File
@@ -11,7 +11,7 @@ static inline std::string toString(defs::SensorPixelGeometry const &g) {
std::ostringstream os;
os << "SensorPixelGeometry\n"
<< " cols x rows: " << g.cols << " x " << g.rows << "\n"
<< " cols x rows: " << g.num_pix_x << " x " << g.num_pix_y << "\n"
<< " guardring :\n"
<< " x = " << g.guardring.x << "\n"
<< " y = " << g.guardring.y << "\n";