Belle II Software development
PXDTrackingEventLevelMdstInfoFillerModule.cc
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#include <pxd/modules/pxdMetadata/PXDTrackingEventLevelMdstInfoFillerModule.h>
10
11#include <pxd/dataobjects/PXDCluster.h>
12
13#include <mdst/dataobjects/EventLevelTrackingInfo.h>
14
15#include <vxd/dataobjects/VxdID.h>
16
17using namespace Belle2;
18
19REG_MODULE(PXDTrackingEventLevelMdstInfoFiller);
20
22{
23 setDescription("This module adds additional global event level information about PXD track finding to the MDST object 'EventLevelTrackingInfo'");
25}
26
27
33
34
36{
37
38 // use a simple array for the PXD layers (if geometry is changed then also EventLevelTrackingInfo doesn't work)
39 // index: layer number (shifted by 1)
40 int nClustersPerLayer[2] = {};
41 for (const auto& cluster : m_pxdClusters) {
42 nClustersPerLayer[((int)cluster.getSensorID().getLayerNumber()) - 1]++;
43 }
44
45 if (m_eventLevelTrackingInfo.isValid()) {
46 for (int layer = 0; layer <= 1; layer++) {
47 m_eventLevelTrackingInfo->setNVXDClustersInLayer(layer + 1, 0, nClustersPerLayer[layer]);
48 }
49 }
50}
51
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition Module.cc:208
Module()
Constructor.
Definition Module.cc:30
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition Module.h:80
StoreObjPtr< EventLevelTrackingInfo > m_eventLevelTrackingInfo
StoreObject to access the event level tracking information.
void event() override
Event processing, create store array.
StoreArray< PXDCluster > m_pxdClusters
StoreArray of PXDClusters.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition Module.h:649
Abstract base class for different kinds of events.