Belle II Software  release-08-01-10
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 
9 #pragma once
10 
11 #include <framework/core/Module.h>
12 #include <framework/datastore/SelectSubset.h>
13 #include <pxd/dataobjects/PXDCluster.h>
14 #include <tracking/dataobjects/ROIid.h>
15 #include <framework/database/DBObjPtr.h>
16 #include <simulation/dbobjects/ROISimulationParameters.h>
17 
18 namespace Belle2 {
32  class PXDclusterFilterModule : public Module {
33 
34  public:
35 
40 
41  private:
42 
46  void initialize() override;
47 
51  void beginRun() override final;
52 
56  void event() override;
57 
59  void filterClusters();
60 
62  void copyClusters();
63 
69  int m_countNthEvent = 0;
70  int m_skipEveryNth = -1;
72  std::string m_PXDClustersName;
75  std::string m_ROIidsName;
77  bool m_CreateOutside = false;
78  bool m_overrideDB = false;
79  bool m_enableFiltering = false;
82  bool Overlaps(const ROIid& theROI, const PXDCluster& thePXDCluster);
83 
84  };
86 }
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.