2021-08-27 16:41:27 -04:00
|
|
|
#ifndef DETECTOREFFICIENCY_H
|
|
|
|
#define DETECTOREFFICIENCY_H
|
|
|
|
|
|
|
|
#include <string>
|
2021-09-03 17:03:41 -04:00
|
|
|
#include <cmath>
|
2021-08-27 16:41:27 -04:00
|
|
|
|
|
|
|
class DetectorEfficiency {
|
|
|
|
public:
|
2021-09-03 17:03:41 -04:00
|
|
|
DetectorEfficiency() {};
|
2021-08-27 16:41:27 -04:00
|
|
|
virtual ~DetectorEfficiency() {};
|
|
|
|
|
2021-09-03 17:03:41 -04:00
|
|
|
virtual void CalculateEfficiency(const std::string& inputname, const std::string& outputname, const std::string& statsname) = 0;
|
2021-08-27 16:41:27 -04:00
|
|
|
virtual void DrawDetectorSystem(const std::string& filename) = 0;
|
|
|
|
virtual double RunConsistencyCheck() = 0;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
inline bool IsDoubleEqual(double x, double y) { return std::fabs(x-y) < epsilon ? true : false; };
|
|
|
|
|
|
|
|
static constexpr double epsilon = 1.0e-6;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|