Belle II Software prerelease-11-00-00a
TrackQETrainingDataCollectorModule.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#include <tracking/trackFindingVXD/variableExtractors/SimpleVariableRecorder.h>
11#include <tracking/spacePointCreation/SpacePointTrackCand.h>
12#include <tracking/trackFindingVXD/trackQualityEstimators/QualityEstimatorBase.h>
13
14#include <tracking/trackFitting/trackQualityEstimator/variableExtractors/EventInfoExtractor.h>
15#include <tracking/trackFitting/trackQualityEstimator/variableExtractors/RecoTrackExtractor.h>
16#include <tracking/trackFitting/trackQualityEstimator/variableExtractors/SubRecoTrackExtractor.h>
17#include <tracking/trackFitting/trackQualityEstimator/variableExtractors/HitInfoExtractor.h>
18#include <tracking/trackFindingVXD/variableExtractors/ClusterInfoExtractor.h>
19#include <tracking/trackFindingVXD/variableExtractors/QEResultsExtractor.h>
20
21#include <framework/datastore/StoreArray.h>
22#include <framework/core/Module.h>
23
24#include <memory>
25
26
27namespace Belle2 {
32
40
41 public:
44
46 void initialize() override;
47
49 void beginRun() override;
50
52 void event() override;
53
55 void terminate() override;
56
57
58 protected:
59
61 std::string m_recoTracksStoreArrayName = "RecoTracks";
63 std::string m_cdcRecoTracksStoreArrayName = "CDCRecoTracks";
65 std::string m_svdRecoTracksStoreArrayName = "SVDRecoTracks";
67 std::string m_pxdRecoTracksStoreArrayName = "PXDRecoTracks";
68
70 std::string m_TrainingDataOutputName = "QETrainingOutput.root";
71
74
77
79 std::unique_ptr<EventInfoExtractor> m_eventInfoExtractor;
81 std::unique_ptr<RecoTrackExtractor> m_recoTrackExtractor;
83 std::unique_ptr<SubRecoTrackExtractor> m_subRecoTrackExtractor;
85 std::unique_ptr<HitInfoExtractor> m_hitInfoExtractor;
86
88 std::unique_ptr<SimpleVariableRecorder> m_recorder;
89
91 std::vector<TrackingUtilities::Named<float*>> m_variableSet;
92
95 std::unique_ptr<QEResultsExtractor> m_qeResultsExtractor;
96
98 std::unique_ptr<ClusterInfoExtractor> m_clusterInfoExtractor;
99
103 std::unique_ptr<QEResultsExtractor> m_qeResultsExtractorBefore;
104
107 std::unique_ptr<ClusterInfoExtractor> m_clusterInfoExtractorBefore;
108
110 std::unique_ptr<QualityEstimatorBase> m_estimator;
111
114 float m_nSpacePoints = NAN;
117
123 std::string m_SVDEstimationMethod = "tripletFit";
124
128 float m_matched = NAN;
129 float m_background = NAN;
130 float m_ghost = NAN;
131 float m_fake = NAN;
132 float m_clone = NAN;
133 };
134
135}
Module()
Constructor.
Definition Module.cc:30
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
std::unique_ptr< SimpleVariableRecorder > m_recorder
pointer to the object that writes out the collected data into a root file
std::unique_ptr< HitInfoExtractor > m_hitInfoExtractor
pointer to object that extracts info from the hits within the RecoTrack
std::unique_ptr< EventInfoExtractor > m_eventInfoExtractor
pointer to object that extracts info from the whole event
void event() override
applies the selected quality estimation method for a given set of TCs
std::vector< TrackingUtilities::Named< float * > > m_variableSet
set of named variables to be collected
std::string m_svdRecoTracksStoreArrayName
Name of the SVD StoreArray.
float m_nSpacePoints
number of SpacePoints in SPTC as additional info for MVA, type is float to be consistent with m_varia...
bool m_collectEventFeatures
Parameter to enable event-wise features.
std::string m_pxdRecoTracksStoreArrayName
Name of the PXD StoreArray.
void terminate() override
write out data from m_recorder
std::unique_ptr< QEResultsExtractor > m_qeResultsExtractor
pointer to object that extracts the results from the estimation method (including QI,...
std::unique_ptr< ClusterInfoExtractor > m_clusterInfoExtractorBefore
pointer to object that extracts info from the clusters of a SPTC For the SVD track before CDC.
void beginRun() override
sets magnetic field strength
std::unique_ptr< ClusterInfoExtractor > m_clusterInfoExtractor
pointer to object that extracts info from the clusters of a SPTC
std::string m_cdcRecoTracksStoreArrayName
Name of the CDC StoreArray.
float m_matched
truth information collected with m_estimatorMC type is float to be consistent with m_variableSet (and...
std::unique_ptr< QualityEstimatorBase > m_estimator
pointer to the selected QualityEstimator
float m_background
1 if track is background track, 0 else
StoreArray< RecoTrack > m_recoTracks
Store Array of the recoTracks.
std::unique_ptr< RecoTrackExtractor > m_recoTrackExtractor
pointer to object that extracts info from the root RecoTrack
std::string m_SVDEstimationMethod
Identifier which estimation method to use for SVD.
std::string m_recoTracksStoreArrayName
Name of the recoTrack StoreArray.
std::unique_ptr< SubRecoTrackExtractor > m_subRecoTrackExtractor
pointer to object that extracts info from the related sub RecoTracks
std::string m_TrainingDataOutputName
name of the output rootfile
std::unique_ptr< QEResultsExtractor > m_qeResultsExtractorBefore
pointer to object that extracts the results from the estimation method (including QI,...
Abstract base class for different kinds of events.