31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
// Copyright (2019-2023) Paul Scherrer Institute
|
|
|
|
#ifndef JUNGFRAUJOCH_DETECTORGEOMETRY_H
|
|
#define JUNGFRAUJOCH_DETECTORGEOMETRY_H
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
#include "DetectorModuleGeometry.h"
|
|
|
|
class DetectorGeometry {
|
|
int64_t width;
|
|
int64_t height;
|
|
std::vector<DetectorModuleGeometry> modules;
|
|
[[nodiscard]] int64_t GetDirectionStep(DetectorModuleGeometry::Direction direction) const;
|
|
public:
|
|
DetectorGeometry(const std::vector<DetectorModuleGeometry> &pixel_0);
|
|
DetectorGeometry(int32_t nmodules,
|
|
int32_t horizontal_stacking = 1,
|
|
int32_t gap_x = 0,
|
|
int32_t gap_y = 0,
|
|
bool mirror_y = true); // regular geometry
|
|
[[nodiscard]] int64_t GetModulesNum() const;
|
|
[[nodiscard]] int64_t GetWidth() const;
|
|
[[nodiscard]] int64_t GetHeight() const;
|
|
[[nodiscard]] int64_t GetPixel0(int64_t module_number) const;
|
|
[[nodiscard]] int64_t GetFastDirectionStep(int64_t module_number) const;
|
|
[[nodiscard]] int64_t GetSlowDirectionStep(int64_t module_number) const;
|
|
};
|
|
|
|
#endif //JUNGFRAUJOCH_DETECTORGEOMETRY_H
|