9 #include <tracking/modules/svdROIFinder/SVDShaperDigitFilterModule.h>
27 setDescription(
"The module produce a StoreArray of SVDShaperDigit inside the ROIs.");
30 addParam(
"SVDShaperDigitsName", m_SVDShaperDigitsName,
"The name of the StoreArray of SVDShaperDigits to be filtered",
32 addParam(
"SVDShaperDigitsInsideROIName", m_SVDShaperDigitsInsideROIName,
"The name of the StoreArray of Filtered SVDShaperDigits",
33 std::string(
"SVDShaperDigitsIN"));
34 addParam(
"SVDShaperDigitsOutsideROIName", m_SVDShaperDigitsOutsideROIName,
"The name of the StoreArray of Filtered SVDShaperDigits",
35 std::string(
"SVDShaperDigitsOUT"));
36 addParam(
"ROIidsName", m_ROIidsName,
"The name of the StoreArray of ROIs", std::string(
""));
37 addParam(
"CreateOutside", m_CreateOutside,
"Create the StoreArray of PXD pixel outside the ROIs",
false);
48 m_SVDShaperDigits.isRequired(m_SVDShaperDigitsName);
49 m_ROIs.isRequired(m_ROIidsName);
53 m_selectorIN.registerSubset(SVDShaperDigits, m_SVDShaperDigitsInsideROIName);
56 if (m_CreateOutside) {
57 m_selectorOUT.registerSubset(SVDShaperDigits, m_SVDShaperDigitsOutsideROIName);
66 multimap< VxdID, ROIid > ROIids;
68 for (
auto ROI : m_ROIs)
69 ROIids.insert(pair<VxdID, ROIid> (ROI.getSensorID() , ROI));
71 m_selectorIN.select([ROIids](
const SVDShaperDigit * theSVDShaper) {
72 auto ROIidsRange = ROIids.equal_range(theSVDShaper->
getSensorID()) ;
73 for (
auto theROI = ROIidsRange.first ; theROI != ROIidsRange.second; theROI ++)
74 if (theROI->second.Contains(*theSVDShaper))
80 if (m_CreateOutside) {
81 m_selectorOUT.select([ROIids](
const SVDShaperDigit * theSVDShaper) {
82 auto ROIidsRange = ROIids.equal_range(theSVDShaper->
getSensorID()) ;
83 for (
auto theROI = ROIidsRange.first ; theROI != ROIidsRange.second; theROI ++)
84 if (theROI->second.Contains(*theSVDShaper))
The module produce a StoreArray of SVDShaperDigit inside the ROIs.
void initialize() override
register new SVDSShaperDigits store arrays (inside/ouside ROIs)
void event() override
Filtering of digits inside/outside ROIs.
~SVDShaperDigitFilterModule()
Destructor.
The SVD ShaperDigit class.
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.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.