Belle II Software  release-05-02-19
PXDclusterFilterModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: bjoern.spruck@belle2.org *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <framework/datastore/SelectSubset.h>
15 #include <pxd/dataobjects/PXDCluster.h>
16 #include <tracking/dataobjects/ROIid.h>
17 #include <framework/database/DBObjPtr.h>
18 #include <simulation/dbobjects/ROIParameters.h>
19 
20 namespace Belle2 {
34  class PXDclusterFilterModule : public Module {
35 
36  public:
37 
42 
43  private:
44 
46  void initialize() override;
47 
49  void beginRun() override final;
50 
52  void event() override;
53 
55  void filterClusters();
56 
58  void copyClusters();
59 
60  bool m_CreateOutside = false;
61  std::string m_PXDClustersName;
62  std::string m_PXDClustersInsideROIName;
63  std::string m_PXDClustersOutsideROIName;
64  std::string m_ROIidsName;
65  bool m_overrideDB = false;
66  bool m_enableFiltering = false;
69  int m_countNthEvent = 0;
71  int m_skipEveryNth = -1;
76  bool Overlaps(const ROIid& theROI, const PXDCluster& thePXDCluster);
78 
79  };
81 }
Belle2::PXDclusterFilterModule::m_selectorOUT
SelectSubset< PXDCluster > m_selectorOUT
selector of the subset of PXDClusters NOT contained in the ROIs
Definition: PXDclusterFilterModule.h:82
Belle2::PXDclusterFilterModule::event
void event() override
This method is the core of the module.
Definition: PXDclusterFilterModule.cc:96
Belle2::SelectSubset
Class to create a subset of a given StoreArray together with the relations with other StoreArrays.
Definition: SelectSubset.h:203
Belle2::PXDclusterFilterModule::PXDclusterFilterModule
PXDclusterFilterModule()
Constructor: Sets the description, the properties and the parameters of the module.
Definition: PXDclusterFilterModule.cc:26
Belle2::PXDclusterFilterModule::m_selectorIN
SelectSubset< PXDCluster > m_selectorIN
selector of the subset of PXDClusters contained in the ROIs
Definition: PXDclusterFilterModule.h:81
Belle2::PXDclusterFilterModule::initialize
void initialize() override
Initialize the Module.
Definition: PXDclusterFilterModule.cc:45
Belle2::PXDclusterFilterModule::m_roiParameters
DBObjPtr< ROIParameters > m_roiParameters
Configuration parameters for ROIs.
Definition: PXDclusterFilterModule.h:78
Belle2::PXDclusterFilterModule::m_CreateOutside
bool m_CreateOutside
if set, create list of outside pixels, too
Definition: PXDclusterFilterModule.h:68
Belle2::PXDclusterFilterModule::m_countNthEvent
int m_countNthEvent
Event counter to be able to disable data reduction for every Nth event.
Definition: PXDclusterFilterModule.h:77
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::PXDclusterFilterModule::beginRun
void beginRun() override final
Called when entering a new run.
Definition: PXDclusterFilterModule.cc:64
Belle2::PXDclusterFilterModule::filterClusters
void filterClusters()
all the actual work is done here
Definition: PXDclusterFilterModule.cc:132
Belle2::ROIid
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
Definition: ROIid.h:35
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXDclusterFilterModule::m_ROIidsName
std::string m_ROIidsName
The name of the StoreArray of ROIs.
Definition: PXDclusterFilterModule.h:72
Belle2::PXDclusterFilterModule::m_skipEveryNth
int m_skipEveryNth
Parameter from DB for how many events to skip data reduction.
Definition: PXDclusterFilterModule.h:79
Belle2::PXDclusterFilterModule::m_PXDClustersName
std::string m_PXDClustersName
The name of the StoreArray of PXDClusters to be filtered.
Definition: PXDclusterFilterModule.h:69
Belle2::PXDCluster
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:41
Belle2::PXDclusterFilterModule::m_PXDClustersOutsideROIName
std::string m_PXDClustersOutsideROIName
The name of the StoreArray of Filtered PXDClusters.
Definition: PXDclusterFilterModule.h:71
Belle2::ROIParameters
The payload containing all PXD ROI parameters.
Definition: ROIParameters.h:32
Belle2::PXDclusterFilterModule::m_overrideDB
bool m_overrideDB
if set, overwrites ROI-finding settings in DB
Definition: PXDclusterFilterModule.h:73
Belle2::PXDclusterFilterModule::Overlaps
bool Overlaps(const ROIid &theROI, const PXDCluster &thePXDCluster)
Check for cluster overlaps - a pixel shared with two or more clusters.
Definition: PXDclusterFilterModule.cc:76
Belle2::PXDclusterFilterModule::copyClusters
void copyClusters()
all the actual work is done here
Definition: PXDclusterFilterModule.cc:164
Belle2::PXDclusterFilterModule::m_PXDClustersInsideROIName
std::string m_PXDClustersInsideROIName
The name of the StoreArray of Filtered PXDClusters.
Definition: PXDclusterFilterModule.h:70
Belle2::PXDclusterFilterModule::m_enableFiltering
bool m_enableFiltering
enables/disables ROI-finding if overwriteDB=True
Definition: PXDclusterFilterModule.h:74