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
33
34 void initialize() override;
35
36 void event() override;
37
38 void terminate() override;
39
40 protected:
41
42 std::string m_SPTCName;
43
44 std::string m_genfitTCName;
45
46 std::string m_PXDClustersName;
47
48 std::string m_SVDClustersName;
49
50 // some counters for summary output
51 unsigned int m_SpacePointTCCtr;
52
53 unsigned int m_genfitTCCtr;
54
55 unsigned int m_skippedSPsCtr;
56
57 void initializeCounters();
58
61
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 };
72
73}
Module()
Constructor.
Definition Module.cc:30
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.