2 #include <fwk/CentralConfig.h>
4 #include <fevt/FEvent.h>
6 #include <fevt/EyeRecData.h>
7 #include <fevt/Pixel.h>
8 #include <utl/Vector.h>
9 #include <utl/Reader.h>
10 #include <det/Detector.h>
11 #include <fdet/FDetector.h>
12 #include <fdet/Pixel.h>
13 #include <utl/MathConstants.h>
20 namespace PixelSelectorOG {
28 ERROR(
"Configuration for module PixelSelector not found.");
32 topB.GetChild(
"minAngle").GetData(fMinAngle);
35 std::ostringstream info;
37 " Version: " << GetVersionInfo(VModule::eRevisionNumber) <<
"\n"
39 " minimum angle: " << fMinAngle/
deg <<
"deg";
52 auto& fevent =
event.GetFEvent();
60 if (!eyeiter->HasRecData())
63 auto& eyerecdata = eyeiter->GetRecData();
65 for (
auto pix1 = eyerecdata.PulsedPixelsBegin();
66 pix1 != eyerecdata.PulsedPixelsEnd(); ) {
68 const auto& dir1 = det::Detector::GetInstance().GetFDetector().GetPixel(*pix1).GetDirection();
69 bool isisolated =
true;
70 for (
auto pix2 = eyerecdata.PulsedPixelsBegin();
71 pix2 != eyerecdata.PulsedPixelsEnd(); ++pix2) {
76 const auto& dir2 = det::Detector::GetInstance().GetFDetector().GetPixel(*pix2).GetDirection();
78 if (
Angle(dir1, dir2) < fMinAngle) {
85 pix1 = eyerecdata.RemovePulsedPixel(pix1);
#define INFO(message)
Macro for logging informational messages.
void Init()
Initialise the registry.
ResultFlag
Flag returned by module methods to the RunController.
static CentralConfig * GetInstance()
Use this the first time you get an instance of central configuration.
double Angle(const Vector &left, const Vector &right)
#define ERROR(message)
Macro for logging error messages.
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)