Belle II Software development
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
12#include <tracking/trackFitting/trackQualityEstimator/variableExtractors/EventInfoExtractor.h>
13#include <tracking/trackFitting/trackQualityEstimator/variableExtractors/RecoTrackExtractor.h>
14#include <tracking/trackFitting/trackQualityEstimator/variableExtractors/SubRecoTrackExtractor.h>
15#include <tracking/trackFitting/trackQualityEstimator/variableExtractors/HitInfoExtractor.h>
16
17#include <framework/datastore/StoreArray.h>
18#include <framework/core/Module.h>
19
20#include <memory>
21
22
23namespace Belle2 {
33
34 public:
37
39 void initialize() override;
40
42 void beginRun() override;
43
45 void event() override;
46
48 void terminate() override;
49
50
51 protected:
52
54 std::string m_recoTracksStoreArrayName = "RecoTracks";
56 std::string m_svdCDCRecoTracksStoreArrayName = "SVDCDCRecoTracks";
58 std::string m_svdPlusCDCStandaloneRecoTracksStoreArrayName = "SVDPlusCDCStandaloneRecoTracks";
60 std::string m_cdcRecoTracksStoreArrayName = "CDCRecoTracks";
62 std::string m_svdRecoTracksStoreArrayName = "SVDRecoTracks";
64 std::string m_pxdRecoTracksStoreArrayName = "PXDRecoTracks";
65
67 std::string m_TrainingDataOutputName = "QETrainingOutput.root";
68
71
74
76 std::unique_ptr<EventInfoExtractor> m_eventInfoExtractor;
78 std::unique_ptr<RecoTrackExtractor> m_recoTrackExtractor;
80 std::unique_ptr<SubRecoTrackExtractor> m_subRecoTrackExtractor;
82 std::unique_ptr<HitInfoExtractor> m_hitInfoExtractor;
83
85 std::unique_ptr<SimpleVariableRecorder> m_recorder;
86
88 std::vector<Named<float*>> m_variableSet;
89
93 float m_matched = NAN;
94 float m_background = NAN;
95 float m_ghost = NAN;
96 float m_fake = NAN;
97 float m_clone = NAN;
98 };
100}
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Quality Estimator Data Collector Module to collect data for a MVA training using VXDQE_teacher....
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
std::string m_svdPlusCDCStandaloneRecoTracksStoreArrayName
Name of the StoreArray of SVD tracks combined with CDC-tracks from standalone CDC tracking.
std::string m_svdCDCRecoTracksStoreArrayName
Name of the SVD-CDC StoreArray.
void event() override
applies the selected quality estimation method for a given set of TCs
std::string m_svdRecoTracksStoreArrayName
Name of the SVD StoreArray.
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
void beginRun() override
sets magnetic field strength
std::vector< Named< float * > > m_variableSet
set of named variables to be collected
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...
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_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
Abstract base class for different kinds of events.