// Copyright (2019-2023) Paul Scherrer Institute #ifndef JUNGFRAUJOCH_DETECTORSETUP_H #define JUNGFRAUJOCH_DETECTORSETUP_H #include "DetectorGeometry.h" #include "../jungfrau/JFModuleGainCalibration.h" enum class DetectorType {EIGER, JUNGFRAU}; class DetectorSetup { std::string description; DetectorGeometry geometry; std::vector det_modules_hostname; std::vector gain_file_names; std::vector gain_calibration; int64_t udp_interface_count = 2; float pixel_size_um = 75.0f; std::string sensor_material = "Si"; float sensor_thickness_um = 320.0f; std::vector tx_delay; DetectorType detector_type; public: // This is implicit constructor from DetectorGeometry with JUNGFRAU! // TODO: Remove implicit constructor DetectorSetup(const DetectorGeometry& geom); DetectorSetup(const DetectorGeometry& geom, DetectorType detector_type); DetectorSetup(const DetectorGeometry& geom, DetectorType detector_type, const std::string &description, const std::vector &det_modules_hostname); void LoadGain(const std::vector &filenames); DetectorSetup& TxDelay(const std::vector &v); DetectorSetup& UDPInterfaceCount(int64_t input); DetectorSetup& SensorMaterial(const std::string &input); DetectorSetup& SensorThickness_um(float input); DetectorSetup& PixelSize_um(float input); [[nodiscard]] DetectorType GetDetectorType() const; [[nodiscard]] const DetectorGeometry& GetGeometry() const; [[nodiscard]] const std::vector& GetDetectorModuleHostname() const; [[nodiscard]] uint64_t GetModulesNum() const; [[nodiscard]] std::string GetDescription() const; [[nodiscard]] float GetPixelSize_mm() const; [[nodiscard]] float GetSensorThickness_um() const; [[nodiscard]] std::string GetSensorMaterial() const; [[nodiscard]] const std::vector &GetGainCalibration() const; [[nodiscard]] int64_t GetUDPInterfaceCount() const; [[nodiscard]] const std::vector &GetTxDelay() const; // can be empty for default [[nodiscard]] const std::vector &GetGainFileNames() const; }; #endif //JUNGFRAUJOCH_DETECTORSETUP_H