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.");
24 "Name of the recoTrack StoreArray.",
27 addParam(
"SVDCDCRecoTracksStoreArrayName",
29 "Name of the SVD-CDC StoreArray.",
32 addParam(
"SVDPlusCDCStandaloneRecoTracksStoreArrayName",
34 "Name of the combined CDC-SVD StoreArray with tracks added from the CDC to SVD CKF.",
37 addParam(
"CDCRecoTracksStoreArrayName",
39 "Name of the CDC StoreArray.",
42 addParam(
"SVDRecoTracksStoreArrayName",
44 "Name of the SVD StoreArray.",
47 addParam(
"PXDRecoTracksStoreArrayName",
49 "Name of the PXD StoreArray.",
54 "Name of the output rootfile.",
59 "Whether to use eventwise features.",
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;
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
@ c_TerminateInAllProcesses
When using parallel processing, call this module's terminate() function in all processes().
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.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
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
TrackQETrainingDataCollectorModule()
Constructor of the module.
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 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
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
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.