Belle II Software development
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 {
29
30 public:
31
34 void initialize() override;
36 void event() override;
38 void terminate() override;
40 protected:
41
42 std::string m_SPTCName;
44 std::string m_genfitTCName;
46 std::string m_PXDClustersName;
48 std::string m_SVDClustersName;
50 // some counters for summary output
51 unsigned int m_SpacePointTCCtr;
53 unsigned int m_genfitTCCtr;
55 unsigned int m_skippedSPsCtr;
57 void initializeCounters();
66 template<typename ClusterType>
67 std::vector<int> getRelatedClusters(const Belle2::SpacePoint* spacePoint, const std::string& clusterNames = "ALL");
68
69 BELLE2_DEFINE_EXCEPTION(ClusterNotFound,
70 "No related Cluster to a SpacePoint was found.");
71 };
73}
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.