Belle II Software  release-06-01-15
FixECLClustersModule.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 <analysis/modules/FixECLClusters/FixECLClustersModule.h>
10 
11 
12 using namespace Belle2;
13 
14 //-----------------------------------------------------------------
15 // Register the Module
16 //-----------------------------------------------------------------
17 REG_MODULE(FixECLClusters)
18 
19 //-----------------------------------------------------------------
20 // Implementation
21 //-----------------------------------------------------------------
22 
24 {
25  // Set module properties
26  setDescription("Sets ConnectedRegionID and ClusterID to ECLClusters on MC samples with old ECLCluster design.");
27 }
28 
30 {
31  B2INFO("FixECLClustersModule will overwrite ConnectedRegionID with cluster's StoreArray index+1 and ClusterID with 1.");
32  m_eclClusters.isRequired();
33 }
34 
36 {
37 
38  for (int i = 0; i < m_eclClusters.getEntries(); i++) {
39  ECLCluster* cluster = m_eclClusters[i];
40  cluster->setConnectedRegionId(i + 1);
41  cluster->setClusterId(1);
42  }
43 }
44 
45 
ECL cluster data.
Definition: ECLCluster.h:27
Sets ConnectedRegionID and ClusterID to ECLClusters on MC samples with old ECLCluster design.
virtual void initialize() override
Register input and output data.
virtual void event() override
Event function.
StoreArray< ECLCluster > m_eclClusters
Reconstructed ECLClusters.
Base class for Modules.
Definition: Module.h:72
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
Abstract base class for different kinds of events.