9#include <svd/modules/svdPerformance/SVDClusterFilterModule.h>
10#include <vxd/geometry/GeoCache.h>
11#include <vxd/geometry/SensorInfoBase.h>
13#include <framework/datastore/StoreArray.h>
29 B2DEBUG(1,
"Constructor");
31 setDescription(
"generates a new StoreArray from the input StoreArray which has all specified Clusters removed");
38 addParam(
"XShell",
m_xShell,
"X-Shell ID (+1 -> +X, -1 -> -X, 0 -> both)",
int(0));
39 addParam(
"YShell",
m_yShell,
"Y-Shell ID (+1 -> +Y, -1 -> -Y, 0 -> both)",
int(0));
46 B2DEBUG(1,
"Destructor");
78 B2DEBUG(1, std::endl <<
"NEW EVENT: " <<
m_layerNum << std::endl);
93 B2DEBUG(10,
"below SNR (OUT):" << aCluster->
getSNR());
95 if (aboveSNR && inVxdID)
99 return (inVxdID && aboveSNR);
114 B2DEBUG(10,
"above SNR (IN):" << aCluster->
getSNR());
116 if (!(aboveSNR && inVxdID))
118 " SNR = " << aCluster->
getSNR());
120 return (!(inVxdID && aboveSNR));
132 int currentLayer = layer.getLayerNumber();
134 bool layer_IN =
true;
139 for (
auto ladder : geoCache.getLadders(layer))
142 bool xShell_IN =
true;
143 bool yShell_IN =
true;
146 const ROOT::Math::XYZVector globPos = theSensorInfo.
pointToGlobal(ROOT::Math::XYZVector(0, 0, 0));
153 if (!(layer_IN && xShell_IN && yShell_IN))
159 B2DEBUG(10,
"list of VxdID OUT:");
161 B2DEBUG(10, it->getLayerNumber() <<
"." << it->getLadderNumber() <<
"." << it->getSensorNumber());
void setDescription(const std::string &description)
Sets the description of the module.
std::string m_outputOUTArrayName
StoreArray with the NOT selected output clusters.
std::string m_outputINArrayName
StoreArray with the selected output clusters.
SVDClusterFilterModule()
Constructor: Sets the description, the properties and the parameters of the module.
virtual void initialize() override
init the module
virtual ~SVDClusterFilterModule() override
if required
virtual void event() override
processes the event
std::set< VxdID > m_outVxdID
set containing the VxdID of the DUT sensors
int m_xShell
X shell identificator: +1(+X), -1 (-X), 0(both)
int m_layerNum
the layer number from which the clusters should be excluded m_sensorID
SelectSubset< SVDCluster > m_notSelectedClusters
all clusters on the layer with m_layerNum
SelectSubset< SVDCluster > m_selectedClusters
all clusters NOT on the layer with m_layerNum
int m_yShell
Y shell identificator: +1(+Y), -1 (-Y), 0(both)
std::string m_inputArrayName
StoreArray with the input clusters.
float m_minClSNR
minimum cluster SNR
void create_outVxdID_set()
creates the set containing the VxdID of the DUT sensors
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
float getSNR() const
Get cluster SNR.
VxdID getSensorID() const
Get the sensor ID.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Class to facilitate easy access to sensor information of the VXD like coordinate transformations or p...
static GeoCache & getInstance()
Return a reference to the singleton instance.
Base class to provide Sensor Information for PXD and SVD.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.
Class to uniquely identify a any structure of the PXD and SVD.
baseType getLadderNumber() const
Get the ladder id.
baseType getLayerNumber() const
Get the layer id.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.