Belle II Software  release-05-02-19
SPTC2GFTCConverterModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Thomas Madlener *
7  * *
8  **************************************************************************/
9 
10 #pragma once
11 
12 #include <framework/core/FrameworkExceptions.h>
13 #include <framework/core/Module.h>
14 
15 #include <tracking/spacePointCreation/SpacePoint.h>
16 
17 namespace Belle2 {
29  class SPTC2GFTCConverterModule : public Module {
30 
31  public:
32 
35  void initialize() override;
37  void event() override;
39  void terminate() override;
41  protected:
42 
43  std::string m_SPTCName;
45  std::string m_genfitTCName;
47  std::string m_PXDClustersName;
49  std::string m_SVDClustersName;
51  // some counters for summary output
52  unsigned int m_SpacePointTCCtr;
54  unsigned int m_genfitTCCtr;
56  unsigned int m_skippedSPsCtr;
58  void initializeCounters();
63  template<typename ClusterType>
64  std::vector<int> getRelatedClusters(const Belle2::SpacePoint* spacePoint, const std::string& clusterNames = "ALL");
65 
66  BELLE2_DEFINE_EXCEPTION(ClusterNotFound,
67  "No related Cluster to a SpacePoint was found.");
68  };
70 }
Belle2::SPTC2GFTCConverterModule::m_SPTCName
std::string m_SPTCName
SpacePointTrackCand collection name.
Definition: SPTC2GFTCConverterModule.h:50
Belle2::SPTC2GFTCConverterModule::m_skippedSPsCtr
unsigned int m_skippedSPsCtr
Counter for SpacePoints that were not converted.
Definition: SPTC2GFTCConverterModule.h:63
Belle2::SPTC2GFTCConverterModule::initializeCounters
void initializeCounters()
reset counters to 0 to avoid indeterministic behaviour
Definition: SPTC2GFTCConverterModule.cc:159
Belle2::SPTC2GFTCConverterModule::m_SpacePointTCCtr
unsigned int m_SpacePointTCCtr
Counter for SpacePointTrackCands presented to the module.
Definition: SPTC2GFTCConverterModule.h:59
Belle2::SPTC2GFTCConverterModule::BELLE2_DEFINE_EXCEPTION
BELLE2_DEFINE_EXCEPTION(ClusterNotFound, "No related Cluster to a SpacePoint was found.")
Exception thrown, when no related Cluster can be found for a SpacePoint.
Belle2::SpacePoint
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:52
Belle2::SPTC2GFTCConverterModule::terminate
void terminate() override
terminate: some summary information on the processed events
Definition: SPTC2GFTCConverterModule.cc:128
Belle2::SPTC2GFTCConverterModule::event
void event() override
event: convert SpacePointTrackCand to genfit::TrackCand
Definition: SPTC2GFTCConverterModule.cc:60
Belle2::SPTC2GFTCConverterModule::initialize
void initialize() override
initialize module
Definition: SPTC2GFTCConverterModule.cc:40
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SPTC2GFTCConverterModule::getRelatedClusters
std::vector< int > getRelatedClusters(const Belle2::SpacePoint *spacePoint, const std::string &clusterNames="ALL")
get all related Clusters to a SpacePoint
Definition: SPTC2GFTCConverterModule.cc:139
Belle2::SPTC2GFTCConverterModule::m_genfitTCCtr
unsigned int m_genfitTCCtr
Counter for genfit::TrackCands that were actually created by the module.
Definition: SPTC2GFTCConverterModule.h:61
Belle2::SPTC2GFTCConverterModule::m_PXDClustersName
std::string m_PXDClustersName
PXD Clusters collection name.
Definition: SPTC2GFTCConverterModule.h:54
Belle2::SPTC2GFTCConverterModule::m_SVDClustersName
std::string m_SVDClustersName
SVD Clusters collection name.
Definition: SPTC2GFTCConverterModule.h:56
Belle2::SPTC2GFTCConverterModule::SPTC2GFTCConverterModule
SPTC2GFTCConverterModule()
Constructor.
Definition: SPTC2GFTCConverterModule.cc:26
Belle2::SPTC2GFTCConverterModule::m_genfitTCName
std::string m_genfitTCName
genfit::TrackCand collection name
Definition: SPTC2GFTCConverterModule.h:52