Belle II Software development
PXDclusterFilterModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <framework/core/Module.h>
11#include <framework/datastore/SelectSubset.h>
12#include <pxd/dataobjects/PXDCluster.h>
13#include <framework/database/DBObjPtr.h>
14
15namespace Belle2 {
20 class ROIid;
21 class ROISimulationParameters;
22
27
28 public:
29
34
35 private:
36
40 void initialize() override;
41
45 void beginRun() override final;
46
50 void event() override;
51
53 void filterClusters();
54
56 void copyClusters();
57
64 int m_skipEveryNth = -1;
66 std::string m_PXDClustersName;
69 std::string m_ROIidsName;
71 bool m_CreateOutside = false;
72 bool m_overrideDB = false;
73 bool m_enableFiltering = false;
76 bool Overlaps(const ROIid& theROI, const PXDCluster& thePXDCluster);
77
78 };
80}
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Base class for Modules.
Definition: Module.h:72
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:30
The module produce a StoreArray of PXDCluster inside the ROIs.
SelectSubset< PXDCluster > m_selectorOUT
selector of the subset of PXDClusters NOT contained in the ROIs
bool Overlaps(const ROIid &theROI, const PXDCluster &thePXDCluster)
Check for cluster overlaps - a pixel shared with two or more clusters.
bool m_overrideDB
if set, overwrites ROI-finding settings in DB
void initialize() override
Initializer.
std::string m_PXDClustersOutsideROIName
The name of the StoreArray of Filtered PXDClusters.
void event() override
This method is called for each event.
int m_countNthEvent
Event counter to be able to disable data reduction for every Nth event.
int m_skipEveryNth
Parameter from DB for how many events to skip data reduction.
DBObjPtr< ROISimulationParameters > m_ROISimulationParameters
Configuration parameters for ROIs.
void filterClusters()
all the actual work is done here
std::string m_PXDClustersName
The name of the StoreArray of PXDClusters to be filtered.
StoreArray< PXDCluster > m_PXDClusters
StoreArray containing the input PXDClusters.
std::string m_PXDClustersInsideROIName
The name of the StoreArray of Filtered PXDClusters.
void copyClusters()
all the actual work is done here
std::string m_ROIidsName
The name of the StoreArray of ROIs.
void beginRun() override final
Called when entering a new run.
PXDclusterFilterModule()
Constructor: Sets the description, the properties and the parameters of the module.
bool m_enableFiltering
enables/disables ROI-finding if overwriteDB=True
bool m_CreateOutside
if set, create list of outside pixels, too
SelectSubset< PXDCluster > m_selectorIN
selector of the subset of PXDClusters contained in the ROIs
StoreArray< ROIid > m_ROIs
StoreArray containing the ROIs.
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition: ROIid.h:25
Class to create a subset of a given StoreArray together with the relations with other StoreArrays.
Definition: SelectSubset.h:193
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.