34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
// Copyright (2019-2022) Paul Scherrer Institute
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#ifndef JUNGFRAUJOCH_DIFFRACTIONSPOT_H
|
|
#define JUNGFRAUJOCH_DIFFRACTIONSPOT_H
|
|
|
|
#include "Coord.h"
|
|
#include "DiffractionExperiment.h"
|
|
#include "SpotToSave.h"
|
|
|
|
// Definition of Bragg spot
|
|
class DiffractionSpot {
|
|
float x;
|
|
float y;
|
|
int64_t pixel_count;
|
|
int64_t photons; // total photon count
|
|
int64_t max_photons; // maximum number of counts per pixel in the spot
|
|
public:
|
|
DiffractionSpot() = default;
|
|
DiffractionSpot(uint32_t col, uint32_t line, int64_t photons);
|
|
DiffractionSpot& operator+=(const DiffractionSpot& spot);
|
|
int64_t PixelCount() const;
|
|
int64_t Count() const;
|
|
int64_t MaxCount() const;
|
|
Coord RawCoord() const;
|
|
Coord LabCoord(const DiffractionExperiment &experiment) const;
|
|
double GetResolution(const DiffractionExperiment &experiment) const;
|
|
Coord ReciprocalCoord(const DiffractionExperiment &experiment) const;
|
|
operator SpotToSave() const;
|
|
void AddPixel(uint32_t col, uint32_t line, int64_t photons);
|
|
};
|
|
|
|
#endif //JUNGFRAUJOCH_DIFFRACTIONSPOT_H
|