29 lines
921 B
C++
29 lines
921 B
C++
// Copyright (2019-2022) Paul Scherrer Institute
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#ifndef JUNGFRAUJOCH_DETECTORGEOMETRY_H
|
|
#define JUNGFRAUJOCH_DETECTORGEOMETRY_H
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
#include <jfjoch.pb.h>
|
|
#include "DetectorModuleGeometry.h"
|
|
|
|
class DetectorGeometry {
|
|
int64_t width;
|
|
int64_t height;
|
|
std::vector<DetectorModuleGeometry> modules;
|
|
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
|
|
operator JFJochProtoBuf::DetectorGeometry() const;
|
|
int64_t GetModulesNum() const;
|
|
};
|
|
|
|
#endif //JUNGFRAUJOCH_DETECTORGEOMETRY_H
|