Belle II Software  release-05-01-25
TrackQualityEstimatorMVAModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Sebastian Racs *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #include <tracking/trackFindingVXD/mva/MVAExpert.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 
19 #include <framework/core/Module.h>
20 #include <framework/datastore/StoreArray.h>
21 #include <tracking/dataobjects/RecoTrack.h>
22 
23 namespace Belle2 {
37  class TrackQualityEstimatorMVAModule : public Module {
38 
39  public:
40 
43 
45  void initialize() override;
46 
48  void beginRun() override;
49 
51  void event() override;
52 
53 
54  private:
56  std::string m_recoTracksStoreArrayName = "RecoTracks";
58  std::string m_svdcdcRecoTracksStoreArrayName = "SVDCDCRecoTracks";
60  std::string m_cdcRecoTracksStoreArrayName = "CDCRecoTracks";
62  std::string m_svdRecoTracksStoreArrayName = "SVDRecoTracks";
64  std::string m_pxdRecoTracksStoreArrayName = "PXDRecoTracks";
66  std::string m_tracksStoreArrayName = "Tracks";
67 
69  std::string m_weightFileIdentifier = "trackfitting_MVATrackQualityIndicator";
70 
72  bool m_collectEventFeatures = false;
73 
76 
78  std::unique_ptr<MVAExpert> m_mvaExpert;
79 
81  std::unique_ptr<EventInfoExtractor> m_eventInfoExtractor;
83  std::unique_ptr<RecoTrackExtractor> m_recoTrackExtractor;
85  std::unique_ptr<SubRecoTrackExtractor> m_subRecoTrackExtractor;
87  std::unique_ptr<HitInfoExtractor> m_hitInfoExtractor;
88 
90  std::vector<Named<float*>> m_variableSet;
91  };
93 }
Belle2::TrackQualityEstimatorMVAModule::initialize
void initialize() override
Initializes the Module.
Definition: TrackQualityEstimatorMVAModule.cc:65
Belle2::TrackQualityEstimatorMVAModule::m_recoTrackExtractor
std::unique_ptr< RecoTrackExtractor > m_recoTrackExtractor
pointer to object that extracts info from the root RecoTrack
Definition: TrackQualityEstimatorMVAModule.h:91
Belle2::TrackQualityEstimatorMVAModule::m_eventInfoExtractor
std::unique_ptr< EventInfoExtractor > m_eventInfoExtractor
pointer to object that extracts info from the whole event
Definition: TrackQualityEstimatorMVAModule.h:89
Belle2::TrackQualityEstimatorMVAModule::beginRun
void beginRun() override
Launches mvaExpert and sets the magnetic field strength.
Definition: TrackQualityEstimatorMVAModule.cc:80
Belle2::TrackQualityEstimatorMVAModule::m_hitInfoExtractor
std::unique_ptr< HitInfoExtractor > m_hitInfoExtractor
pointer to object that extracts info from the hits within the RecoTrack
Definition: TrackQualityEstimatorMVAModule.h:95
Belle2::TrackQualityEstimatorMVAModule::m_weightFileIdentifier
std::string m_weightFileIdentifier
identifier of weightfile in Database or local root/xml file
Definition: TrackQualityEstimatorMVAModule.h:77
Belle2::TrackQualityEstimatorMVAModule::m_tracksStoreArrayName
std::string m_tracksStoreArrayName
Name of the StoreArray with mdst Tracks from track fit.
Definition: TrackQualityEstimatorMVAModule.h:74
Belle2::TrackQualityEstimatorMVAModule::m_variableSet
std::vector< Named< float * > > m_variableSet
set of named variables to be used in MVA
Definition: TrackQualityEstimatorMVAModule.h:98
Belle2::TrackQualityEstimatorMVAModule::m_svdRecoTracksStoreArrayName
std::string m_svdRecoTracksStoreArrayName
Name of the SVD StoreArray.
Definition: TrackQualityEstimatorMVAModule.h:70
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackQualityEstimatorMVAModule::m_collectEventFeatures
bool m_collectEventFeatures
Parameter to enable event-wise features.
Definition: TrackQualityEstimatorMVAModule.h:80
Belle2::TrackQualityEstimatorMVAModule::m_cdcRecoTracksStoreArrayName
std::string m_cdcRecoTracksStoreArrayName
Name of the CDC StoreArray.
Definition: TrackQualityEstimatorMVAModule.h:68
Belle2::TrackQualityEstimatorMVAModule::m_subRecoTrackExtractor
std::unique_ptr< SubRecoTrackExtractor > m_subRecoTrackExtractor
pointer to object that extracts info from the related sub RecoTracks
Definition: TrackQualityEstimatorMVAModule.h:93
Belle2::TrackQualityEstimatorMVAModule::m_svdcdcRecoTracksStoreArrayName
std::string m_svdcdcRecoTracksStoreArrayName
Name of the SVD-CDC StoreArray.
Definition: TrackQualityEstimatorMVAModule.h:66
Belle2::TrackQualityEstimatorMVAModule::m_recoTracks
StoreArray< RecoTrack > m_recoTracks
Store Array of the recoTracks.
Definition: TrackQualityEstimatorMVAModule.h:83
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::TrackQualityEstimatorMVAModule::m_pxdRecoTracksStoreArrayName
std::string m_pxdRecoTracksStoreArrayName
Name of the PXD StoreArray.
Definition: TrackQualityEstimatorMVAModule.h:72
Belle2::TrackQualityEstimatorMVAModule::m_recoTracksStoreArrayName
std::string m_recoTracksStoreArrayName
Name of the recoTrack StoreArray.
Definition: TrackQualityEstimatorMVAModule.h:64
Belle2::TrackQualityEstimatorMVAModule::event
void event() override
Applies the selected quality estimation method for a given set of TCs.
Definition: TrackQualityEstimatorMVAModule.cc:85
Belle2::TrackQualityEstimatorMVAModule::TrackQualityEstimatorMVAModule
TrackQualityEstimatorMVAModule()
Constructor of the module.
Definition: TrackQualityEstimatorMVAModule.cc:18
Belle2::TrackQualityEstimatorMVAModule::m_mvaExpert
std::unique_ptr< MVAExpert > m_mvaExpert
pointer to the object to interact with the MVA package
Definition: TrackQualityEstimatorMVAModule.h:86