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");
82 B2DEBUG(1, std::endl <<
"NEW EVENT: " <<
m_layerNum << std::endl);
97 B2DEBUG(10,
"below SNR (OUT):" << aCluster->
getSNR());
99 if (aboveSNR && inVxdID)
103 return (inVxdID && aboveSNR);
118 B2DEBUG(10,
"above SNR (IN):" << aCluster->
getSNR());
120 if (!(aboveSNR && inVxdID))
122 " SNR = " << aCluster->
getSNR());
124 return (!(inVxdID && aboveSNR));
136 int currentLayer = layer.getLayerNumber();
138 bool layer_IN =
true;
143 for (
auto ladder : geoCache.getLadders(layer))
146 bool xShell_IN =
true;
147 bool yShell_IN =
true;
150 const ROOT::Math::XYZVector globPos = theSensorInfo.
pointToGlobal(ROOT::Math::XYZVector(0, 0, 0));
157 if (!(layer_IN && xShell_IN && yShell_IN))
163 B2DEBUG(10,
"list of VxdID OUT:");
165 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 selectd output clusters.
SVDClusterFilterModule()
Constructor: Sets the description, the properties and the parameters of the module.
virtual void initialize() override
init the module
virtual void event() override
processes the event
std::set< VxdID > m_outVxdID
set containing the VxdID of the DUT sensors
virtual void endRun() override
end the run
virtual void terminate() override
terminates the module
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
virtual void beginRun() override
initializes the module
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
virtual ~SVDClusterFilterModule()
if required
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 faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
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.