Belle II Software release-09-00-00
SPTC2GFTCConverterModule.h
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#pragma once
10
11#include <framework/core/FrameworkExceptions.h>
12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <genfit/TrackCand.h>
15
16#include <tracking/spacePointCreation/SpacePoint.h>
17#include <tracking/spacePointCreation/SpacePointTrackCand.h>
18
19namespace Belle2 {
32
33 public:
34
37 void initialize() override;
39 void event() override;
41 void terminate() override;
43 protected:
44
45 std::string m_SPTCName;
47 std::string m_genfitTCName;
49 std::string m_PXDClustersName;
51 std::string m_SVDClustersName;
53 // some counters for summary output
54 unsigned int m_SpacePointTCCtr;
56 unsigned int m_genfitTCCtr;
58 unsigned int m_skippedSPsCtr;
60 void initializeCounters();
69 template<typename ClusterType>
70 std::vector<int> getRelatedClusters(const Belle2::SpacePoint* spacePoint, const std::string& clusterNames = "ALL");
71
72 BELLE2_DEFINE_EXCEPTION(ClusterNotFound,
73 "No related Cluster to a SpacePoint was found.");
74 };
76}
Base class for Modules.
Definition: Module.h:72
Module for converting SpacePointTrackCands to genfit::SpacePointTrackCands.
unsigned int m_skippedSPsCtr
Counter for SpacePoints that were not converted.
void initialize() override
initialize module
StoreArray< SpacePointTrackCand > m_SpacePointTrackCands
SpacePointTrackCands StoreArray.
std::string m_SVDClustersName
SVD Clusters collection name.
void event() override
event: convert SpacePointTrackCand to genfit::TrackCand
void terminate() override
terminate: some summary information on the processed events
unsigned int m_genfitTCCtr
Counter for genfit::TrackCands that were actually created by the module.
std::vector< int > getRelatedClusters(const Belle2::SpacePoint *spacePoint, const std::string &clusterNames="ALL")
get all related Clusters to a SpacePoint
std::string m_genfitTCName
genfit::TrackCand collection name
StoreArray< genfit::TrackCand > m_GenfitTrackCands
genfit::TrackCands StoreArray
std::string m_PXDClustersName
PXD Clusters collection name.
std::string m_SPTCName
SpacePointTrackCand collection name.
unsigned int m_SpacePointTCCtr
Counter for SpacePointTrackCands presented to the module.
BELLE2_DEFINE_EXCEPTION(ClusterNotFound, "No related Cluster to a SpacePoint was found.")
Exception thrown, when no related Cluster can be found for a SpacePoint.
void initializeCounters()
reset counters to 0 to avoid indeterministic behaviour
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.