9#include <framework/logging/Logger.h>
10#include <framework/geometry/BFieldManager.h>
12#include <tracking/modules/vxdtfRedesign/TrackFinderVXDCellOMatModule.h>
13#include <tracking/trackFindingVXD/algorithms/NetworkPathConversion.h>
14#include <tracking/trackFindingVXD/segmentNetwork/NodeNetworkHelperFunctions.h>
26 "\n It uses the output produced by the SegmentNetworkProducerModule to create"
27 "SpacePointTrackCands using a Cellular Automaton algorithm implementation.");
33 "name for StoreObjPtr< DirectedNodeNetwork> which contains the networks needed.",
36 addParam(
"SpacePointTrackCandArrayName",
38 "name for StoreArray< SpacePointTrackCand> to be filled.",
41 addParam(
"EventLevelTrackingInfoName",
43 "Name of the EventLevelTrackingInfo that should be used (different one for ROI-finding).",
44 std::string(
"EventLevelTrackingInfo"));
48 "If true for each event and each network created a file with a graph is created.",
bool(
false));
52 "Regulates if every node with enough notes below it is used as a seed or only the outermost nodes.",
57 "Regulates if every subset of sufficient length of a path shall be collected as separate path or not.",
62 "Additionally assign a common family identifier to all Tracks that are share a node.",
67 "Select only the best track candidate for each family.",
72 "Number of best track candidates to be created per family.",
77 "Maximal number of families allowed in an event; if exceeded, the event execution will be skipped.",
82 "Maximal number of paths per an event; if exceeded, the event execution will be skipped.",
119 B2ERROR(
"Cellular Automaton failed, skipping event!");
125 DNN::printCANetwork<Segment< Belle2::TrackNode>>(segmentNetwork, fileName);
136 unsigned short nFamilies =
m_familyDefiner.defineFamilies(segmentNetwork);
138 B2WARNING(
"Maximal number of track candidates per event was exceeded: Number of Families = " << nFamilies);
148 B2WARNING(
"Received signal to skip the event and not processing it.");
164 std::vector<const SpacePoint*> path = sptc.
getHits();
171 std::vector<SpacePointTrackCand> bestPaths =
m_sptcSelector->returnSelection();
172 for (
unsigned short iCand = 0; iCand < bestPaths.size(); iCand++) {
174 std::vector<const SpacePoint*> path = cand.
getHits();
static ROOT::Math::XYZVector getFieldInTesla(const ROOT::Math::XYZVector &pos)
return the magnetic field at a given position in Tesla.
The CACell class This Class stores all relevant information one wants to have stored in a cell for a ...
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
DirectedNodeNetwork< Belle2::Segment< Belle2::TrackNode >, Belle2::CACell > & accessSegmentNetwork()
Returns reference to the SegmentNetwork stored in this container, intended for read and write access.
void set_collectedPaths(int in)
Sets number of paths found.
Network of directed nodes of the type EntryType.
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...
Storage for (VXD) SpacePoint-based track candidates.
short getFamily() const
return family identifier
const std::vector< const Belle2::SpacePoint * > & getHits() const
get hits (space points) of track candidate
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
SpacePointTrackCandCreator< StoreArray< Belle2::SpacePointTrackCand > > m_sptcCreator
Tool for creating SPTCs, which fills storeArray directly.
bool m_PARAMprintNetworks
If true for each event and each network created a file with a graph is created.
unsigned int m_eventCounter
Event number counter.
void initialize() override
initialize
std::unique_ptr< SPTCSelectorXBestPerFamily > m_sptcSelector
Pointer to SPTC selector class which performs the x best candidate selection.
StoreObjPtr< EventLevelTrackingInfo > m_eventLevelTrackingInfo
Access to the EventLevelTrackingInfo object in the datastore.
void event() override
event
std::string m_PARAMEventLevelTrackingInfoName
Name of the EventLevelTrackingInfo that should be used (different one for ROI-finding)
CellularAutomaton< NodeNetworkType, Belle2::CAValidator< Belle2::CACell > > m_cellularAutomaton
member variables
StoreArray< Belle2::SpacePointTrackCand > m_TCs
output containers
StoreObjPtr< Belle2::DirectedNodeNetworkContainer > m_network
input containers
unsigned short m_PARAMmaxFamilies
Maximal number of families in event; if exceeded, the execution of the trackfinder will be stopped.
NodeFamilyDefiner< NodeNetworkType, NodeType, Path > m_familyDefiner
Class to evaluate connected nodes, in this case for the directed node network, and assigns a family t...
void beginRun() override
beginRun
bool m_PARAMsetFamilies
If true additionally assign a common family identifier to all Tracks that are share a node.
std::vector< Path > m_collectedPaths
Path collection obtained from evaluation of the provided segment network.
bool m_PARAMstoreSubsets
Regulates if every subset of sufficient length of a path shall be collected as separate path or not.
TrackFinderVXDCellOMatModule()
Constructor.
unsigned int m_PARAMmaxPaths
Maximal number of paths per event; if exceeded, the execution of the trackfinder will be stopped.
std::string m_PARAMNetworkName
name for StoreObjPtr< DirectedNodeNetwork> which contains the networks needed
bool m_PARAMselectBestPerFamily
If true create track candidate only for the best candidate of a family.
std::string m_PARAMSpacePointTrackCandArrayName
module parameters
bool m_PARAMstrictSeeding
Regulates if every node with enough notes below it is used as a seed or only the outermost nodes.
PathCollectorRecursive< NodeNetworkType, NodeType, Path, Belle2::NodeCompatibilityCheckerPathCollector< NodeType > > m_pathCollector
Algorithm for finding paths of segments.
unsigned short m_PARAMxBestPerFamily
Maximal number of best candidates to be created per family.
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.
SpacePointTrackCand convertNetworkPath(NetworkPath networkPath)
Create new SPTC from network path.
Abstract base class for different kinds of events.