9#include <tracking/trackFindingVXD/filterMap/map/FiltersContainer.h>
10#include <tracking/trackFindingVXD/sectorMapTools/SecMapTrainer.h>
12#include <tracking/modules/vxdtfRedesign/VXDTFTrainingDataCollectorModule.h>
14#include <framework/logging/Logger.h>
15#include <framework/datastore/StoreObjPtr.h>
29 m_eventData(
"EventMetaData",
DataStore::c_Event)
33 setDescription(
"This module collect the data needed to train the VXDTF sector map. The data are saved on a root file that eventually will be chained and used by the training module.");
38 "the name of the storeArray containing the SpacePointTrackCands used for extracting and collecting the training data.",
41 addParam(
"NameTag",
m_PARAMNameTag,
"A name tag that will be attached to the name of the output file. If left empty (\"\") a "
42 "random number will be attached!", std::string(
""));
45 "Name of the output directory. The output file created by this module will be written into that directory.",
m_PARAMoutputDir);
60 auto config = setup.second->getConfig();
64 if (nameAppendix == std::string(
"")) {
65 int randomInt = gRandom->Integer(std::numeric_limits<int>::max());
66 nameAppendix = std::to_string(randomInt);
93 collector.initializeEvent(thisExperiment, thisRun, thisEvent);
102 for (
unsigned iTC = 0; iTC < nSPTCs; ++ iTC) {
105 dataCollector.storeTC(*currentTC, iTC);
110 unsigned nTCsProcessed = dataCollector.processTracks();
113 "VXDTFTrainingDataCollectorModule, event " << thisEvent <<
114 " with mapTrainer " << dataCollector.getConfig().secMapName <<
115 ": number of TCs processed: " << nTCsProcessed <<
116 ", calculations done!");
126 dataCollector.terminate();
In the store you can park objects that have to be accessed by various modules.
This class contains everything needed by the VXDTF that is not going to change during a RUN,...
static FiltersContainer & getInstance()
one and only way to access the singleton object
const setupNameToFilters_t & getAllSetups(void)
returns all the available setups.
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 class contains all relevant tools for training a VXDTFFilters.
Storage for (VXD) SpacePoint-based track candidates.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
int getEntries() const
Get the number of objects in the array.
VXDTFTrainingDataCollectorModule()
VXDTFTrainingDataCollectorModule constructor.
void initialize() override
initialize.
void event() override
event.
std::string m_PARAMSpacePointTrackCandsName
Name of storeArray containing the spacePointTrackCands.
std::string m_PARAMNameTag
Name tag that will be attached to the output file.
void terminate() override
terminate.
std::string m_PARAMoutputDir
output directory
StoreObjPtr< EventMetaData > m_eventData
Event meta data of the event.
StoreArray< SpacePointTrackCand > m_spacePointTrackCands
spacePointTrackCands to be digested.
std::vector< SecMapTrainer< SelectionVariableFactory< SecMapTrainerHit > > > m_secMapTrainers
Names of the variables to be produced and collected.
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.