Belle II Software  release-05-02-19
FixECLClustersModule.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Anze Zupanc *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <analysis/modules/FixECLClusters/FixECLClustersModule.h>
12 
13 
14 using namespace Belle2;
15 
16 //-----------------------------------------------------------------
17 // Register the Module
18 //-----------------------------------------------------------------
19 REG_MODULE(FixECLClusters)
20 
21 //-----------------------------------------------------------------
22 // Implementation
23 //-----------------------------------------------------------------
24 
26 {
27  // Set module properties
28  setDescription("Sets ConnectedRegionID and ClusterID to ECLClusters on MC samples with old ECLCluster design.");
29 }
30 
32 {
33  B2INFO("FixECLClustersModule will overwrite ConnectedRegionID with cluster's StoreArray index+1 and ClusterID with 1.");
34  m_eclClusters.isRequired();
35 }
36 
38 {
39 
40  for (int i = 0; i < m_eclClusters.getEntries(); i++) {
41  ECLCluster* cluster = m_eclClusters[i];
42  cluster->setConnectedRegionId(i + 1);
43  cluster->setClusterId(1);
44  }
45 }
46 
47 
Belle2::FixECLClustersModule::initialize
virtual void initialize() override
Register input and output data.
Definition: FixECLClustersModule.cc:31
Belle2::FixECLClustersModule
Sets ConnectedRegionID and ClusterID to ECLClusters on MC samples with old ECLCluster design.
Definition: FixECLClustersModule.h:46
Belle2::ECLCluster
ECL cluster data.
Definition: ECLCluster.h:39
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::FixECLClustersModule::m_eclClusters
StoreArray< ECLCluster > m_eclClusters
Reconstructed ECLClusters.
Definition: FixECLClustersModule.h:64
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::FixECLClustersModule::event
virtual void event() override
Event function.
Definition: FixECLClustersModule.cc:37