14#include <framework/datastore/StoreArray.h>
15#include <framework/datastore/StoreObjPtr.h>
16#include <framework/core/Module.h>
17#include <framework/logging/Logger.h>
18#include <framework/geometry/B2Vector3.h>
20#include <mdst/dataobjects/EventLevelTrackingInfo.h>
22#include <tracking/trackFindingVXD/segmentNetwork/DirectedNodeNetworkContainer.h>
23#include <tracking/trackFindingVXD/segmentNetwork/TrackNode.h>
24#include <tracking/spacePointCreation/SpacePoint.h>
25#include <tracking/dataobjects/FullSecID.h>
26#include <tracking/trackFindingVXD/filterMap/map/FiltersContainer.h>
61 std::vector<Belle2::TrackNode*>
hits;
75 B2FATAL(
"Requested secMapName '" <<
m_PARAMsecMapName <<
"' does not exist! Can not continue...");
85 void event()
override;
114 template <
class ObserverType>
121 template <
class ObserverType>
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
Class to identify a sector inside of the VXD.
bool m_PARAMprintNetworks
If true for each event and each network a file with a graph of the network is created.
unsigned int m_eventCounter
Counters.
void buildSegmentNetwork()
Use connected SpacePoints to form segments which will stored and linked in a DirectedNodeNetwork<Segm...
unsigned short m_PARAMmaxNetworkSize
Maximal size of SegmentNetwork; if exceeded, filling of SegmentNetwork will be stopped and the event ...
std::string m_PARAMNetworkOutputName
Name for network container data store object created by this module.
void initialize() override
Module initialization: performing checks on input parameter and registration of network container in ...
unsigned int m_PARAMmaxSegmentConnections
Maximal number of Segment connections; if exceeded, filling of SegmentNetwork will be stopped and the...
StoreObjPtr< EventLevelTrackingInfo > m_eventLevelTrackingInfo
Access to the EventLevelTrackingInfo object in the datastore.
void buildActiveSectorNetwork(std::vector< RawSectorData > &collectedData)
Builds a DirectedNodeNetwork<ActiveSector>, containing ActiveSectors which have SpacePoints and compa...
void event() override
Event function.
std::vector< double > m_PARAMVirtualIPCoordinates
Coordinates for virtual interaction point SpacePoint.
std::string m_PARAMEventLevelTrackingInfoName
Name of the EventLevelTrackingInfo that should be used (different one for ROI-finding)
StoreObjPtr< DirectedNodeNetworkContainer > m_network
Access to the DirectedNodeNetwork, which will be produced by this module.
unsigned int m_PARAMmaxTrackNodeAddedConnections
Maximal number of added hit connections; if exceeded, filling of HitNetwork will be stopped and the e...
std::vector< StoreArray< Belle2::SpacePoint > > m_spacePoints
Contains all SPacePoint storeArrays to be evaluated.
SegmentNetworkProducerModule()
Constructor of the module.
unsigned int m_PARAMmaxSegmentAddedConnections
Maximal number of added Segment connections; if exceeded, filling of SegmentNetwork will be stopped a...
std::vector< RawSectorData > matchSpacePointToSectors()
Create TrackNodes from SpacePoints and collect fullSecIDs of 'active' sectors with SpacePoints for th...
VXDTFFilters< SpacePoint > * m_vxdtfFilters
Pointer to the current filters, contains all sectorCombinations and Filters including cuts.
std::vector< double > m_PARAMVirtualIPErrors
Errors on coordinates for virtual interaction point SpacePoint.
void beginRun() override
Begin Run which load the filters from the provided SectorMap and checks if this was successful.
std::string m_PARAMsecMapName
Name of SectorMap used for this instance.
VXDTFFilters< SpacePoint >::staticSector_t StaticSectorType
Definition of the static sector type.
FiltersContainer< SpacePoint > & m_filtersContainer
Reference to container which contains all the sector to filter maps and with it the VXDTFFilters.
bool m_PARAMallFiltersOff
If true, all filters are deactivated for all hit-combinations and therefore all combinations are acce...
const StaticSectorType * findSectorForSpacePoint(const SpacePoint &aSP)
Returns pointer to static sector of a provided SpacePoint; returns nullptr if no sector could be foun...
B2Vector3D m_virtualIPCoordinates
Member Variables.
unsigned short m_PARAMmaxTrackNodeConnections
Maximal number of hit connections; if exceeded, filling of HitNetwork will be stopped and the event s...
bool m_PARAMprintToMathematica
If true a file containing Mathematica code to generate a graph of the segment network is created.
bool buildTrackNodeNetwork()
Evaluate TrackNodes in the ActiveSectors and link them if they fulfill the filter criteria of the Sec...
std::vector< std::string > m_PARAMSpacePointsArrayNames
Module Parameters.
B2Vector3D m_virtualIPErrors
Vector for errors on coordinates of virtual IP.
bool m_PARAMAddVirtualIP
Boolean to set whether to add an additional SpacePoint as a virtual interaction point.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
double getNormalizedLocalV() const
Return normalized local coordinates of the cluster in v (0 <= posV <= 1).
VxdID getVxdID() const
Return the VxdID of the sensor on which the the cluster of the SpacePoint lives.
double getNormalizedLocalU() const
Return normalized local coordinates of the cluster in u (0 <= posU <= 1).
Type-safe access to single objects in the data store.
Class that contains all the static sectors to which the filters are attached.
StaticSector< point_t, twoHitFilter_t, threeHitFilter_t, int > staticSector_t
typedef to make a static sector type more readable.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Abstract base class for different kinds of events.
Simple struct for collecting raw data for a single sector.
bool wasCreated
Whether the sector was already added to the network.
ActiveSector< StaticSectorType, TrackNode > * sector
Stores a sector if one is found, nullptr else.
FullSecID secID
secID of rawSector
const StaticSectorType * staticSector
Stores a static sector.
std::vector< Belle2::TrackNode * > hits
collects the hits found on this sector