9 #include <tracking/modules/pxdDataReduction/PXDRawHitFilterModule.h>
10 #include <tracking/dataobjects/ROIid.h>
28 setDescription(
"The module produce a StoreArray of PXDRawHit inside the ROIs.");
29 setPropertyFlags(c_ParallelProcessingCertified);
32 addParam(
"PXDRawHitsName", m_PXDRawHitsName,
"The name of the StoreArray of PXDRawHits to be filtered", std::string(
""));
33 addParam(
"PXDRawHitsInsideROIName", m_PXDRawHitsInsideROIName,
"The name of the StoreArray of Filtered PXDRawHits",
34 std::string(
"PXDRawHitsIN"));
35 addParam(
"PXDRawHitsOutsideROIName", m_PXDRawHitsOutsideROIName,
"The name of the StoreArray of Filtered PXDRawHits",
36 std::string(
"PXDRawHitsOUT"));
37 addParam(
"ROIidsName", m_ROIidsName,
"The name of the StoreArray of ROIs", std::string(
""));
38 addParam(
"CreateOutside", m_CreateOutside,
"Create the StoreArray of PXD pixel outside the ROIs",
false);
50 if (m_PXDRawHitsName == m_PXDRawHitsInsideROIName) {
51 m_selectorIN.registerSubset(PXDRawHits);
53 m_selectorIN.registerSubset(PXDRawHits, m_PXDRawHitsInsideROIName);
54 m_selectorIN.inheritAllRelations();
57 if (m_CreateOutside) {
58 if (m_PXDRawHitsName == m_PXDRawHitsOutsideROIName) {
59 m_selectorOUT.registerSubset(PXDRawHits);
61 m_selectorOUT.registerSubset(PXDRawHits, m_PXDRawHitsOutsideROIName);
62 m_selectorOUT.inheritAllRelations();
72 multimap< VxdID, ROIid > ROIids;
74 for (
auto ROI : ROIids_store_array)
75 ROIids.insert(pair<VxdID, ROIid> (ROI.getSensorID() , ROI));
77 m_selectorIN.select([ROIids](
const PXDRawHit * thePxdRawHit) {
78 auto ROIidsRange = ROIids.equal_range(thePxdRawHit->
getSensorID()) ;
79 for (
auto theROI = ROIidsRange.first ; theROI != ROIidsRange.second; theROI ++)
80 if (theROI->second.Contains(*thePxdRawHit))
86 if (m_CreateOutside) {
87 m_selectorOUT.select([ROIids](
const PXDRawHit * thePxdRawHit) {
88 auto ROIidsRange = ROIids.equal_range(thePxdRawHit->
getSensorID()) ;
89 for (
auto theROI = ROIidsRange.first ; theROI != ROIidsRange.second; theROI ++)
90 if (theROI->second.Contains(*thePxdRawHit))
The module produce a StoreArray of PXDRawHit inside the ROIs.
void initialize() override final
Initialize the Module.
void event() override final
This method is the core of the module.
The PXD Raw Hit class This class stores information about PXD Pixel hits and makes them available in ...
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.