9 #include <tracking/modules/trackQualityEstimator/TrackQETrainingDataCollectorModule.h>
19 setDescription(
"Module to collect training data for a specified qualityEstimator and store it in a root file.");
20 setPropertyFlags(c_ParallelProcessingCertified | c_TerminateInAllProcesses);
22 addParam(
"recoTracksStoreArrayName",
23 m_recoTracksStoreArrayName,
24 "Name of the recoTrack StoreArray.",
25 m_recoTracksStoreArrayName);
27 addParam(
"SVDCDCRecoTracksStoreArrayName",
28 m_svdCDCRecoTracksStoreArrayName,
29 "Name of the SVD-CDC StoreArray.",
30 m_svdCDCRecoTracksStoreArrayName);
32 addParam(
"SVDPlusCDCStandaloneRecoTracksStoreArrayName",
33 m_svdPlusCDCStandaloneRecoTracksStoreArrayName,
34 "Name of the combined CDC-SVD StoreArray with tracks added from the CDC to SVD CKF.",
35 m_svdPlusCDCStandaloneRecoTracksStoreArrayName);
37 addParam(
"CDCRecoTracksStoreArrayName",
38 m_cdcRecoTracksStoreArrayName,
39 "Name of the CDC StoreArray.",
40 m_cdcRecoTracksStoreArrayName);
42 addParam(
"SVDRecoTracksStoreArrayName",
43 m_svdRecoTracksStoreArrayName,
44 "Name of the SVD StoreArray.",
45 m_svdRecoTracksStoreArrayName);
47 addParam(
"PXDRecoTracksStoreArrayName",
48 m_pxdRecoTracksStoreArrayName,
49 "Name of the PXD StoreArray.",
50 m_pxdRecoTracksStoreArrayName);
52 addParam(
"TrainingDataOutputName",
53 m_TrainingDataOutputName,
54 "Name of the output rootfile.",
55 m_TrainingDataOutputName);
57 addParam(
"collectEventFeatures",
58 m_collectEventFeatures,
59 "Whether to use eventwise features.",
60 m_collectEventFeatures);
90 m_matched = float(recoTrack.getMatchingStatus() == RecoTrack::MatchingStatus::c_matched);
91 m_background = float(recoTrack.getMatchingStatus() == RecoTrack::MatchingStatus::c_background);
92 m_ghost = float(recoTrack.getMatchingStatus() == RecoTrack::MatchingStatus::c_ghost);
93 m_fake = float((recoTrack.getMatchingStatus() == RecoTrack::MatchingStatus::c_background)
94 || (recoTrack.getMatchingStatus() == RecoTrack::MatchingStatus::c_ghost));
95 m_clone = float(recoTrack.getMatchingStatus() == RecoTrack::MatchingStatus::c_clone);
101 RecoTrack* svdPlusCDCStandaloneRecoTrackPtr =
nullptr;
107 if (svdCDCRecoTrackPtr) {
112 if (not svdPlusCDCStandaloneRecoTrackPtr) {
115 svdPlusCDCStandaloneRecoTrackPtr = svdCDCRecoTrackPtr;
This is the Reconstruction Event-Data Model Track.
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
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
float m_ghost
1 if track is ghost track, 0 else
std::unique_ptr< EventInfoExtractor > m_eventInfoExtractor
pointer to object that extracts info from the whole event
void initialize() override
Initializes the Module.
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
float m_clone
1 if track is clone track, 0 else
std::string m_cdcRecoTracksStoreArrayName
Name of the CDC StoreArray.
float m_matched
truth information collected with m_estimatorMC type is float to be consistend 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
float m_fake
1 if track is fake track, 0 else
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
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.