Belle II Software development
SegmentNetworkProducerModule Class Reference

The Segment Network Producer Module. More...

#include <SegmentNetworkProducerModule.h>

Inheritance diagram for SegmentNetworkProducerModule:
Module PathElement

Classes

struct  RawSectorData
 Simple struct for collecting raw data for a single sector. More...
 

Public Types

using StaticSectorType = VXDTFFilters< SpacePoint >::staticSector_t
 Definition of the static sector type.
 
enum  EModulePropFlags {
  c_Input = 1 ,
  c_Output = 2 ,
  c_ParallelProcessingCertified = 4 ,
  c_HistogramManager = 8 ,
  c_InternalSerializer = 16 ,
  c_TerminateInAllProcesses = 32 ,
  c_DontCollectStatistics = 64
}
 Each module can be tagged with property flags, which indicate certain features of the module. More...
 
typedef ModuleCondition::EAfterConditionPath EAfterConditionPath
 Forward the EAfterConditionPath definition from the ModuleCondition.
 

Public Member Functions

 SegmentNetworkProducerModule ()
 Constructor of the module.
 
void initialize () override
 Module initialization: performing checks on input parameter and registration of network container in data store.
 
void beginRun () override
 Begin Run which load the filters from the provided SectorMap and checks if this was successful.
 
void event () override
 Event function.
 
std::vector< RawSectorDatamatchSpacePointToSectors ()
 Create TrackNodes from SpacePoints and collect fullSecIDs of 'active' sectors with SpacePoints for the event.
 
const StaticSectorTypefindSectorForSpacePoint (const SpacePoint &aSP)
 Returns pointer to static sector of a provided SpacePoint; returns nullptr if no sector could be found.
 
void buildActiveSectorNetwork (std::vector< RawSectorData > &collectedData)
 Builds a DirectedNodeNetwork<ActiveSector>, containing ActiveSectors which have SpacePoints and compatible inner- or outer neighbours.
 
template<class ObserverType >
bool buildTrackNodeNetwork ()
 Evaluate TrackNodes in the ActiveSectors and link them if they fulfill the filter criteria of the SectorMap.
 
template<class ObserverType >
void buildSegmentNetwork ()
 Use connected SpacePoints to form segments which will stored and linked in a DirectedNodeNetwork<Segment> The template class is the type of the observer which is used to monitor the Filters, use VoidObserver for deactivating observation.
 
virtual std::vector< std::string > getFileNames (bool outputFiles)
 Return a list of output filenames for this modules.
 
virtual void endRun ()
 This method is called if the current run ends.
 
virtual void terminate ()
 This method is called at the end of the event processing.
 
const std::string & getName () const
 Returns the name of the module.
 
const std::string & getType () const
 Returns the type of the module (i.e.
 
const std::string & getPackage () const
 Returns the package this module is in.
 
const std::string & getDescription () const
 Returns the description of the module.
 
void setName (const std::string &name)
 Set the name of the module.
 
void setPropertyFlags (unsigned int propertyFlags)
 Sets the flags for the module properties.
 
LogConfiggetLogConfig ()
 Returns the log system configuration.
 
void setLogConfig (const LogConfig &logConfig)
 Set the log system configuration.
 
void setLogLevel (int logLevel)
 Configure the log level.
 
void setDebugLevel (int debugLevel)
 Configure the debug messaging level.
 
void setAbortLevel (int abortLevel)
 Configure the abort log level.
 
void setLogInfo (int logLevel, unsigned int logInfo)
 Configure the printed log information for the given level.
 
void if_value (const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 Add a condition to the module.
 
void if_false (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to add a condition to the module.
 
void if_true (const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
 A simplified version to set the condition of the module.
 
bool hasCondition () const
 Returns true if at least one condition was set for the module.
 
const ModuleConditiongetCondition () const
 Return a pointer to the first condition (or nullptr, if none was set)
 
const std::vector< ModuleCondition > & getAllConditions () const
 Return all set conditions for this module.
 
bool evalCondition () const
 If at least one condition was set, it is evaluated and true returned if at least one condition returns true.
 
std::shared_ptr< PathgetConditionPath () const
 Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).
 
Module::EAfterConditionPath getAfterConditionPath () const
 What to do after the conditional path is finished.
 
std::vector< std::shared_ptr< Path > > getAllConditionPaths () const
 Return all condition paths currently set (no matter if the condition is true or not).
 
bool hasProperties (unsigned int propertyFlags) const
 Returns true if all specified property flags are available in this module.
 
bool hasUnsetForcedParams () const
 Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.
 
const ModuleParamListgetParamList () const
 Return module param list.
 
template<typename T >
ModuleParam< T > & getParam (const std::string &name) const
 Returns a reference to a parameter.
 
bool hasReturnValue () const
 Return true if this module has a valid return value set.
 
int getReturnValue () const
 Return the return value set by this module.
 
std::shared_ptr< PathElementclone () const override
 Create an independent copy of this module.
 
std::shared_ptr< boost::python::list > getParamInfoListPython () const
 Returns a python list of all parameters.
 

Static Public Member Functions

static void exposePythonAPI ()
 Exposes methods of the Module class to Python.
 

Protected Member Functions

virtual void def_initialize ()
 Wrappers to make the methods without "def_" prefix callable from Python.
 
virtual void def_beginRun ()
 Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.
 
virtual void def_event ()
 Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.
 
virtual void def_endRun ()
 This method can receive that the current run ends as a call from the Python side.
 
virtual void def_terminate ()
 Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.
 
void setDescription (const std::string &description)
 Sets the description of the module.
 
void setType (const std::string &type)
 Set the module type.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
 Adds a new parameter to the module.
 
template<typename T >
void addParam (const std::string &name, T &paramVariable, const std::string &description)
 Adds a new enforced parameter to the module.
 
void setReturnValue (int value)
 Sets the return value for this module as integer.
 
void setReturnValue (bool value)
 Sets the return value for this module as bool.
 
void setParamList (const ModuleParamList &params)
 Replace existing parameter list.
 

Protected Attributes

std::vector< std::string > m_PARAMSpacePointsArrayNames = {"SVDSpacePoints", "PXDSpacePoints"}
 Module Parameters.
 
std::string m_PARAMNetworkOutputName
 Name for network container data store object created by this module.
 
std::string m_PARAMEventLevelTrackingInfoName
 Name of the EventLevelTrackingInfo that should be used (different one for ROI-finding)
 
bool m_PARAMAddVirtualIP = false
 Boolean to set whether to add an additional SpacePoint as a virtual interaction point.
 
std::vector< double > m_PARAMVirtualIPCoordinates = {0, 0, 0}
 Coordinates for virtual interaction point SpacePoint.
 
std::vector< double > m_PARAMVirtualIPErrors = {0.2, 0.2, 1.}
 Errors on coordinates for virtual interaction point SpacePoint.
 
std::string m_PARAMsecMapName = "testMap"
 Name of SectorMap used for this instance.
 
bool m_PARAMprintNetworks = false
 If true for each event and each network a file with a graph of the network is created.
 
bool m_PARAMprintToMathematica = false
 If true a file containing Mathematica code to generate a graph of the segment network is created.
 
bool m_PARAMallFiltersOff = false
 If true, all filters are deactivated for all hit-combinations and therefore all combinations are accepted.
 
unsigned short m_PARAMmaxNetworkSize = 40000
 Maximal size of SegmentNetwork; if exceeded, filling of SegmentNetwork will be stopped and the event skipped.
 
unsigned int m_PARAMmaxSegmentConnections = 30000
 Maximal number of Segment connections; if exceeded, filling of SegmentNetwork will be stopped and the event skipped.
 
unsigned int m_PARAMmaxSegmentAddedConnections = 300000
 Maximal number of added Segment connections; if exceeded, filling of SegmentNetwork will be stopped and the event skipped.
 
unsigned short m_PARAMmaxTrackNodeConnections = 8000
 Maximal number of hit connections; if exceeded, filling of HitNetwork will be stopped and the event skipped.
 
unsigned int m_PARAMmaxTrackNodeAddedConnections = 200000
 Maximal number of added hit connections; if exceeded, filling of HitNetwork will be stopped and the event skipped.
 
B2Vector3D m_virtualIPCoordinates
 Member Variables.
 
B2Vector3D m_virtualIPErrors
 Vector for errors on coordinates of virtual IP.
 
FiltersContainer< SpacePoint > & m_filtersContainer = FiltersContainer<SpacePoint>::getInstance()
 Reference to container which contains all the sector to filter maps and with it the VXDTFFilters.
 
VXDTFFilters< SpacePoint > * m_vxdtfFilters = nullptr
 Pointer to the current filters, contains all sectorCombinations and Filters including cuts.
 
std::vector< StoreArray< Belle2::SpacePoint > > m_spacePoints
 Contains all SPacePoint storeArrays to be evaluated.
 
StoreObjPtr< DirectedNodeNetworkContainerm_network
 Access to the DirectedNodeNetwork, which will be produced by this module.
 
StoreObjPtr< EventLevelTrackingInfom_eventLevelTrackingInfo
 Access to the EventLevelTrackingInfo object in the datastore.
 
unsigned int m_eventCounter = 0
 Counters.
 

Private Member Functions

std::list< ModulePtrgetModules () const override
 no submodules, return empty list
 
std::string getPathString () const override
 return the module name.
 
void setParamPython (const std::string &name, const boost::python::object &pyObj)
 Implements a method for setting boost::python objects.
 
void setParamPythonDict (const boost::python::dict &dictionary)
 Implements a method for reading the parameter values from a boost::python dictionary.
 

Private Attributes

std::string m_name
 The name of the module, saved as a string (user-modifiable)
 
std::string m_type
 The type of the module, saved as a string.
 
std::string m_package
 Package this module is found in (may be empty).
 
std::string m_description
 The description of the module.
 
unsigned int m_propertyFlags
 The properties of the module as bitwise or (with |) of EModulePropFlags.
 
LogConfig m_logConfig
 The log system configuration of the module.
 
ModuleParamList m_moduleParamList
 List storing and managing all parameter of the module.
 
bool m_hasReturnValue
 True, if the return value is set.
 
int m_returnValue
 The return value.
 
std::vector< ModuleConditionm_conditions
 Module condition, only non-null if set.
 

Detailed Description

The Segment Network Producer Module.

This module takes a provided sectorMap and StoreArrays of spacePoints and creates an activeSectorNetwork, a TrackNodeNetwork and a segmentNetwork by evaluating the given set of SpacePoints using the filters stored in the sectorMap to reduce the possible combinations. The output of the module is a StoreObjPtr to a DirectedNodeNetworkContainer which contains the three networks.

Definition at line 40 of file SegmentNetworkProducerModule.h.

Member Typedef Documentation

◆ EAfterConditionPath

Forward the EAfterConditionPath definition from the ModuleCondition.

Definition at line 88 of file Module.h.

◆ StaticSectorType

using StaticSectorType = VXDTFFilters<SpacePoint>::staticSector_t

Definition of the static sector type.

Definition at line 44 of file SegmentNetworkProducerModule.h.

Member Enumeration Documentation

◆ EModulePropFlags

enum EModulePropFlags
inherited

Each module can be tagged with property flags, which indicate certain features of the module.

Enumerator
c_Input 

This module is an input module (reads data).

c_Output 

This module is an output module (writes data).

c_ParallelProcessingCertified 

This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)

c_HistogramManager 

This module is used to manage histograms accumulated by other modules.

c_InternalSerializer 

This module is an internal serializer/deserializer for parallel processing.

c_TerminateInAllProcesses 

When using parallel processing, call this module's terminate() function in all processes().

This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.

c_DontCollectStatistics 

No statistics is collected for this module.

Definition at line 77 of file Module.h.

77 {
78 c_Input = 1,
79 c_Output = 2,
85 };
@ c_HistogramManager
This module is used to manage histograms accumulated by other modules.
Definition: Module.h:81
@ c_Input
This module is an input module (reads data).
Definition: Module.h:78
@ c_DontCollectStatistics
No statistics is collected for this module.
Definition: Module.h:84
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
@ c_InternalSerializer
This module is an internal serializer/deserializer for parallel processing.
Definition: Module.h:82
@ c_Output
This module is an output module (writes data).
Definition: Module.h:79
@ c_TerminateInAllProcesses
When using parallel processing, call this module's terminate() function in all processes().
Definition: Module.h:83

Constructor & Destructor Documentation

◆ SegmentNetworkProducerModule()

Constructor of the module.

Definition at line 20 of file SegmentNetworkProducerModule.cc.

20 : Module()
21{
22 //Set module properties
23 setDescription("The segment network producer module. "
24 "\n This module takes a given sectorMap and storeArrays of spacePoints and creates a "
25 "activeSectorNetwork, a trackNodeNetwork and a segmentNetwork."
26 "These are filled and stored in a StoreObjPtr of DirectedNodeNetworkContainer:\n");
28
29 addParam("SpacePointsArrayNames",
31 "List of SpacePoint StoreArray names to be evaluated.",
33
34 addParam("NetworkOutputName",
36 "Unique name for the DirectedNodeNetworkContainer Store Object Pointer created and filled by this module.",
37 std::string(""));
38
39 addParam("EventLevelTrackingInfoName",
41 "Name of the EventLevelTrackingInfo that should be used (different one for ROI-finding).",
42 std::string("EventLevelTrackingInfo"));
43
44 addParam("addVirtualIP",
46 "Whether to add a SpacePoint for a virtual interaction point to be considered by the network creation.",
48
49 addParam("virtualIPCoorindates",
51 "Coordinates as list [x,z,y] to be used for the virtual interaction point SpacePoint, if turned on.",
53
54 addParam("virtualIPErrors",
56 "Errors on coordinates as list [Ex,Ez,Ey] to be used for the virtual interaction point SpacePoint, if turned on.",
58
59 addParam("sectorMapName",
61 "Name of the SectorMap to be used by this instance.",
63
64 addParam("printNetworks",
66 "If true for each event and each network a file containing the networks as graphs is created.",
68
69 addParam("printNetworkToMathematica",
71 "If true a file containing Mathematica code to generate a graph of the segment network is created.",
73
74 addParam("allFiltersOff",
76 "For debugging purposes: if true, all filters are deactivated for all hit-combinations and therefore all combinations are accepted.",
78
79 addParam("maxNetworkSize",
81 "Maximal size of the SegmentNetwork; if exceeded, the event execution will be skipped.",
83
84 addParam("maxConnections",
86 "Maximal number of Segment connections; if exceeded, the event execution will be skipped.",
88
89 addParam("maxAddedConnections",
91 "Maximal number of added Segment connections; if exceeded, the event execution will be skipped.",
93
94 addParam("maxHitConnections",
96 "Maximal number of Hit connections; if exceeded, the event execution will be skipped.",
98
99 addParam("maxAddedHitConnections",
101 "Maximal number of added Hit connections; if exceeded, the event execution will be skipped.",
103}
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
Module()
Constructor.
Definition: Module.cc:30
bool m_PARAMprintNetworks
If true for each event and each network a file with a graph of the network is created.
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.
unsigned int m_PARAMmaxSegmentConnections
Maximal number of Segment connections; if exceeded, filling of SegmentNetwork will be stopped and the...
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)
unsigned int m_PARAMmaxTrackNodeAddedConnections
Maximal number of added hit connections; if exceeded, filling of HitNetwork will be stopped and the e...
unsigned int m_PARAMmaxSegmentAddedConnections
Maximal number of added Segment connections; if exceeded, filling of SegmentNetwork will be stopped a...
std::vector< double > m_PARAMVirtualIPErrors
Errors on coordinates for virtual interaction point SpacePoint.
std::string m_PARAMsecMapName
Name of SectorMap used for this instance.
bool m_PARAMallFiltersOff
If true, all filters are deactivated for all hit-combinations and therefore all combinations are acce...
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.
std::vector< std::string > m_PARAMSpacePointsArrayNames
Module Parameters.
bool m_PARAMAddVirtualIP
Boolean to set whether to add an additional SpacePoint as a virtual interaction point.
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560

Member Function Documentation

◆ beginRun()

void beginRun ( void  )
inlineoverridevirtual

Begin Run which load the filters from the provided SectorMap and checks if this was successful.

Reimplemented from Module.

Definition at line 71 of file SegmentNetworkProducerModule.h.

72 {
74 if (m_vxdtfFilters == nullptr) {
75 B2FATAL("Requested secMapName '" << m_PARAMsecMapName << "' does not exist! Can not continue...");
76 }
77 }
VXDTFFilters< SpacePoint > * m_vxdtfFilters
Pointer to the current filters, contains all sectorCombinations and Filters including cuts.
FiltersContainer< SpacePoint > & m_filtersContainer
Reference to container which contains all the sector to filter maps and with it the VXDTFFilters.

◆ buildActiveSectorNetwork()

void buildActiveSectorNetwork ( std::vector< RawSectorData > &  collectedData)

Builds a DirectedNodeNetwork<ActiveSector>, containing ActiveSectors which have SpacePoints and compatible inner- or outer neighbours.

Definition at line 229 of file SegmentNetworkProducerModule.cc.

231{
232 // access (yet) empty activeSectorNetwork:
234 m_network->accessActiveSectorNetwork();
235 // activeSectors are to be stored separately:
236 std::deque<ActiveSector<StaticSectorType, TrackNode>>& activeSectors = m_network->accessActiveSectors();
237 unsigned int nLinked = 0, nAdded = 0;
238
239 // loop over all raw sectors found so far:
240 for (RawSectorData& outerSectorData : collectedData) {
241 ActiveSector<StaticSectorType, TrackNode> outerSector(outerSectorData.staticSector);
242 std::int32_t outerEntryID = outerSector.getID();
243
244 // skip double-adding of nodes into the network after first time found -> speeding up the code:
245 bool wasAnythingFoundSoFar = false;
246 // find innerSectors of outerSector and add them to the network:
247 const std::vector<FullSecID>& innerSecIDs = outerSector.getInner2spSecIDs();
248
249 for (const FullSecID& innerSecID : innerSecIDs) {
250 std::int32_t innerEntryID = innerSecID;
251 std::vector<RawSectorData>::iterator innerRawSecPos =
252 std::find_if(collectedData.begin(), collectedData.end(),
253 [&](const RawSectorData & entry) -> bool { return (entry.secID == innerSecID); }
254 );
255
256 // current inner sector has no SpacePoints in this event:
257 if (innerRawSecPos == collectedData.end()) {
258 continue;
259 }
260
261 // take care of inner sector first:
262 if (!innerRawSecPos->wasCreated) { // was already there
263 activeSectors.emplace_back(innerRawSecPos->staticSector);
264 innerRawSecPos->wasCreated = true;
265 innerRawSecPos->sector = &activeSectors.back();
266 for (Belle2::TrackNode* hit : innerRawSecPos->hits) {
267 hit->m_sector = &activeSectors.back();
268 }
269 // add all SpacePoints of this sector to ActiveSector:
270 activeSectors.back().addHits(innerRawSecPos->hits);
271 activeSectorNetwork.addNode(innerEntryID, activeSectors.back());
272 }
273
274 // when accepting combination the first time, take care of outer sector:
275 if (!wasAnythingFoundSoFar) {
276 activeSectors.push_back(outerSector);
277 outerSectorData.wasCreated = true;
278 outerSectorData.sector = &activeSectors.back();
279 for (Belle2::TrackNode* hit : outerSectorData.hits) {
280 hit->m_sector = &activeSectors.back();
281 }
282 // add all SpacePoints of this sector to ActiveSector:
283 activeSectors.back().addHits(outerSectorData.hits);
284 activeSectorNetwork.addNode(outerEntryID, activeSectors.back());
285
286 if (activeSectorNetwork.linkNodes(outerEntryID, innerEntryID)) {
287 wasAnythingFoundSoFar = true;
288 nLinked++;
289 nAdded++;
290 }
291 } else {
292 if (activeSectorNetwork.addInnerToLastOuterNode(innerEntryID)) {
293 nAdded++;
294 }
295 }
296 }
297 }
298
299 m_network->set_activeSectorConnections(nLinked);
300 m_network->set_activeSectorAddedConnections(nAdded);
301
303 std::string fileName = m_vxdtfFilters->getConfig().secMapName + "_ActiveSector_Ev" + std::to_string(m_eventCounter);
304 DNN::printNetwork<ActiveSector<StaticSectorType, TrackNode>, VoidMetaInfo>(activeSectorNetwork, fileName);
305 }
306}
The ActiveSector Class.
Definition: ActiveSector.h:29
Network of directed nodes of the type EntryType.
bool addInnerToLastOuterNode(NodeID innerNodeID)
to the last outerNode added, another innerNode will be attached
bool linkNodes(NodeID outerNodeID, NodeID innerNodeID)
takes two entry IDs and weaves them into the network
bool addNode(NodeID nodeID, EntryType &newEntry)
************************* PUBLIC MEMBER FUNCTIONS *************************
Class to identify a sector inside of the VXD.
Definition: FullSecID.h:33
StoreObjPtr< DirectedNodeNetworkContainer > m_network
Access to the DirectedNodeNetwork, which will be produced by this module.
The most CPU efficient MetaInfo for the DirectedNode-requirements (even if useless).
Definition: VoidMetaInfo.h:17
Minimal class to store combination of sector and spacePoint, since SpacePoint can not carry sectorCon...
Definition: TrackNode.h:22

◆ buildSegmentNetwork()

void buildSegmentNetwork

Use connected SpacePoints to form segments which will stored and linked in a DirectedNodeNetwork<Segment> The template class is the type of the observer which is used to monitor the Filters, use VoidObserver for deactivating observation.

Definition at line 415 of file SegmentNetworkProducerModule.cc.

416{
417 DirectedNodeNetwork<Belle2::TrackNode, VoidMetaInfo>& hitNetwork = m_network->accessHitNetwork();
418 DirectedNodeNetwork<Segment<Belle2::TrackNode>, CACell>& segmentNetwork = m_network->accessSegmentNetwork();
419 std::deque<Belle2::Segment<Belle2::TrackNode>>& segments = m_network->accessSegments();
420 unsigned int nLinked = 0, nAdded = 0;
421
423 const std::vector<DirectedNode<TrackNode, VoidMetaInfo>*>& centerHits = outerHit->getInnerNodes();
424
425 if (centerHits.empty()) {
426 continue;
427 }
428
429 // get the point to the static sector
430 const StaticSectorType* outerStaticSector = outerHit->getEntry().m_sector->getAttachedStaticSector();
431 // should not happen, but just in case:
432 if (outerStaticSector == nullptr) {
433 B2WARNING("Static sector not found. This should not happen!");
434 continue;
435 }
436
437 for (DirectedNode<TrackNode, VoidMetaInfo>* centerHit : centerHits) {
438 const std::vector<DirectedNode<TrackNode, VoidMetaInfo>*>& innerHits = centerHit->getInnerNodes();
439 if (innerHits.empty()) {
440 continue;
441 }
442
443 // skip double-adding of nodes into the network after first time found -> speeding up the code:
444 bool wasAnythingFoundSoFar = false;
445 for (DirectedNode<TrackNode, VoidMetaInfo>* innerHit : innerHits) {
446
447 //retrieve the filter
448 const auto* filter3sp = outerStaticSector->getFilter3sp(centerHit->getEntry().m_sector->getFullSecID(),
449 innerHit->getEntry().m_sector->getFullSecID());
450 if (filter3sp == nullptr) {
451 continue;
452 }
453
454 // the filter accepts spacepoint combinations
455 // ->observe gives back an observed version of the filter
456 bool accepted = false;
457 // there is an uncaught exception thrown by the CircleCenterXY filter variable if the points are on a straight line
458 try {
459 accepted = (filter3sp->observe(ObserverType())).accept(outerHit->getEntry().getHit(),
460 centerHit->getEntry().getHit(),
461 innerHit->getEntry().getHit());
462 } catch (...) {
463 B2WARNING("SegmentNetworkProducerModule: exception caught thrown by one of the three hit filters");
464 }
465
466 if (m_PARAMallFiltersOff) accepted = true; // bypass all filters
467
468 if (!accepted) {
469 continue;
470 }
471
472 std::int64_t innerSegmentID = static_cast<std::int64_t>(centerHit->getEntry().getID()) << 32 | static_cast<std::int64_t>
473 (innerHit->getEntry().getID());
474
475 if (not segmentNetwork.isNodeInNetwork(innerSegmentID)) {
476 // create innerSegment first (order of storage in vector<segments> is irrelevant):
477 segments.emplace_back(centerHit->getEntry().m_sector->getFullSecID(),
478 innerHit->getEntry().m_sector->getFullSecID(),
479 &centerHit->getEntry(),
480 &innerHit->getEntry());
481 segmentNetwork.addNode(innerSegmentID, segments.back());
482 }
483
484 std::int64_t outerSegmentID = static_cast<std::int64_t>(outerHit->getEntry().getID()) << 32 | static_cast<std::int64_t>
485 (centerHit->getEntry().getID());
486 if (not segmentNetwork.isNodeInNetwork(outerSegmentID)) {
487 segments.emplace_back(outerHit->getEntry().m_sector->getFullSecID(),
488 centerHit->getEntry().m_sector->getFullSecID(),
489 &outerHit->getEntry(),
490 &centerHit->getEntry());
491 segmentNetwork.addNode(outerSegmentID, segments.back());
492 }
493
494 // store combination of hits in network:
495 if (!wasAnythingFoundSoFar) {
496 if (segmentNetwork.linkNodes(outerSegmentID, innerSegmentID)) {
497 nLinked++;
498 nAdded++;
499 wasAnythingFoundSoFar = true;
500 }
501 } else {
502 if (segmentNetwork.addInnerToLastOuterNode(innerSegmentID)) {
503 nAdded++;
504 }
505 }
506
507 if (nLinked > m_PARAMmaxSegmentConnections) {
508 B2WARNING("Number of SegmentConnections exceeds the limit of " << m_PARAMmaxSegmentConnections
509 << ". VXDTF2 will skip the event and the SegmentNetwork is cleared.");
510 m_eventLevelTrackingInfo->setVXDTF2AbortionFlag();
511 m_network->set_segmentConnections(nLinked);
512 m_network->set_segmentAddedConnections(nAdded);
513 m_network->clear();
514 return;
515 }
517 B2WARNING("Number of added SegmentConnections exceeds the limit of " << m_PARAMmaxSegmentAddedConnections
518 << ". VXDTF2 will skip the event and the SegmentNetwork is cleared.");
519 m_eventLevelTrackingInfo->setVXDTF2AbortionFlag();
520 m_network->set_segmentConnections(nLinked);
521 m_network->set_segmentAddedConnections(nAdded);
522 m_network->clear();
523 return;
524 }
525 if (segments.size() > m_PARAMmaxNetworkSize) {
526 B2WARNING("SegmentNetwork size exceeds the limit of " << m_PARAMmaxNetworkSize
527 << ". Network size is " << segmentNetwork.size()
528 << ". VXDTF2 will skip the event and the SegmentNetwork is cleared.");
529 m_eventLevelTrackingInfo->setVXDTF2AbortionFlag();
530 m_network->set_segmentConnections(nLinked);
531 m_network->set_segmentAddedConnections(nAdded);
532 m_network->clear();
533 return;
534 }
535 }
536 }
537 }
538 m_network->set_segmentConnections(nLinked);
539 m_network->set_segmentAddedConnections(nAdded);
540
542 std::string fileName = m_vxdtfFilters->getConfig().secMapName + "_Segment_Ev" + std::to_string(m_eventCounter);
543 DNN::printNetwork<Segment<Belle2::TrackNode>, CACell>(segmentNetwork, fileName);
544 DNN::printCANetwork<Segment<Belle2::TrackNode>>(segmentNetwork, "CA" + fileName);
545 }
546}
The CACell class This Class stores all relevant information one wants to have stored in a cell for a ...
Definition: CACell.h:20
std::vector< Node * > & getNodes()
Returns all nodes of the network.
unsigned int size() const
Returns number of nodes to be found in the network.
bool isNodeInNetwork(const NodeID nodeID) const
Check if a given entry is already in the network.
The Node-Class.
Definition: DirectedNode.h:31
StoreObjPtr< EventLevelTrackingInfo > m_eventLevelTrackingInfo
Access to the EventLevelTrackingInfo object in the datastore.
VXDTFFilters< SpacePoint >::staticSector_t StaticSectorType
Definition of the static sector type.
B2Vector3D outerHit(0, 0, 0)
testing out of range behavior

◆ buildTrackNodeNetwork()

bool buildTrackNodeNetwork

Evaluate TrackNodes in the ActiveSectors and link them if they fulfill the filter criteria of the SectorMap.

The linked TrackNodes are stored in the DirectedNodeNetwork<TrackNode>. The template class is the type of the observer which is used to monitor the Filters, use VoidObserver for deactivating observation

Returns
boolean whether the network creation is successful or aborted prematurely.

Definition at line 310 of file SegmentNetworkProducerModule.cc.

311{
313 m_network->accessActiveSectorNetwork();
314 DirectedNodeNetwork<Belle2::TrackNode, VoidMetaInfo>& hitNetwork = m_network->accessHitNetwork();
315
316 unsigned int nLinked = 0, nAdded = 0;
317
318 // loop over outer sectors to get their hits(->outerHits) and inner sectors
319 for (auto* outerSector : activeSectorNetwork.getNodes()) {
320 if (outerSector->getInnerNodes().empty()) {
321 continue;
322 }
323 const std::vector<TrackNode*>& outerHits = outerSector->getEntry().getHits();
324 if (outerHits.empty()) {
325 continue;
326 }
327
328 // get the point to the static sector
329 const StaticSectorType* outerStaticSector = outerSector->getEntry().getAttachedStaticSector();
330 // should not happen, but just in case:
331 if (outerStaticSector == nullptr) {
332 B2WARNING("Static sector not found. This should not happen!");
333 continue;
334 }
335
336 // loop over inner sectors to get their hits(->innerHits) and check their compatibility
337 for (auto* innerSector : outerSector->getInnerNodes()) {
338 const std::vector<TrackNode*>& innerHits = innerSector->getEntry().getHits();
339 if (innerHits.empty()) {
340 continue;
341 }
342
343 //retrieve the filter, a null pointer is returned if there is no filter
344 const auto* filter2sp = outerStaticSector->getFilter2sp(innerSector->getEntry().getFullSecID());
345 if (filter2sp == nullptr) {
346 continue;
347 }
348
349 for (TrackNode* outerHit : outerHits) {
350 // skip double-adding of nodes into the network after first time found -> speeding up the code:
351 bool wasAnythingFoundSoFar = false;
352
353 std::int32_t outerNodeID = outerHit->getID();
354 hitNetwork.addNode(outerNodeID, *outerHit);
355
356 for (TrackNode* innerHit : innerHits) {
357 // applying filters provided by the sectorMap:
358 // ->observe() gives back an observed version of the filter (the default filter has the VoidObserver)
359 bool accepted = (filter2sp->observe(ObserverType())).accept(outerHit->getHit(), innerHit->getHit());
360
361 if (m_PARAMallFiltersOff) accepted = true; // bypass all filters
362
363 if (!accepted) {
364 continue;
365 }
366
367 std::int32_t innerNodeID = innerHit->getID();
368 hitNetwork.addNode(innerNodeID, *innerHit);
369 // store combination of hits in network:
370 if (!wasAnythingFoundSoFar) {
371 if (hitNetwork.linkNodes(outerNodeID, innerNodeID)) {
372 nLinked++;
373 nAdded++;
374 wasAnythingFoundSoFar = true;
375 }
376 } else {
377 if (hitNetwork.addInnerToLastOuterNode(innerNodeID)) {
378 nAdded++;
379 }
380 }
381
382 if (nLinked > m_PARAMmaxTrackNodeConnections) {
383 B2WARNING("Number of TrackNodeConnections has exceeded maximal size limit of " << m_PARAMmaxTrackNodeConnections
384 << "! The event will be skipped and not be processed. The number of connections was = " << nLinked);
385 m_eventLevelTrackingInfo->setVXDTF2AbortionFlag();
386 m_network->set_trackNodeConnections(nLinked);
387 m_network->set_trackNodeAddedConnections(nAdded);
388 return false;
389 }
391 B2WARNING("Number of added TrackNodeConnections has exceeded maximal size limit of " << m_PARAMmaxTrackNodeAddedConnections
392 << "! The event will be skipped and not be processed. The number of connections was = " << nAdded);
393 m_eventLevelTrackingInfo->setVXDTF2AbortionFlag();
394 m_network->set_trackNodeConnections(nLinked);
395 m_network->set_trackNodeAddedConnections(nAdded);
396 return false;
397 }
398 }
399 }
400 }
401 }
402 m_network->set_trackNodeConnections(nLinked);
403 m_network->set_trackNodeAddedConnections(nAdded);
404
406 std::string fileName = m_vxdtfFilters->getConfig().secMapName + "_TrackNode_Ev" + std::to_string(m_eventCounter);
407 DNN::printNetwork<Belle2::TrackNode, VoidMetaInfo>(hitNetwork, fileName);
408 }
409
410 return true;
411}

◆ clone()

std::shared_ptr< PathElement > clone ( ) const
overridevirtualinherited

Create an independent copy of this module.

Note that parameters are shared, so changing them on a cloned module will also affect the original module.

Implements PathElement.

Definition at line 179 of file Module.cc.

180{
182 newModule->m_moduleParamList.setParameters(getParamList());
183 newModule->setName(getName());
184 newModule->m_package = m_package;
185 newModule->m_propertyFlags = m_propertyFlags;
186 newModule->m_logConfig = m_logConfig;
187 newModule->m_conditions = m_conditions;
188
189 return newModule;
190}
std::shared_ptr< Module > registerModule(const std::string &moduleName, std::string sharedLibPath="") noexcept(false)
Creates an instance of a module and registers it to the ModuleManager.
static ModuleManager & Instance()
Exception is thrown if the requested module could not be created by the ModuleManager.
const ModuleParamList & getParamList() const
Return module param list.
Definition: Module.h:363
const std::string & getName() const
Returns the name of the module.
Definition: Module.h:187
const std::string & getType() const
Returns the type of the module (i.e.
Definition: Module.cc:41
unsigned int m_propertyFlags
The properties of the module as bitwise or (with |) of EModulePropFlags.
Definition: Module.h:512
LogConfig m_logConfig
The log system configuration of the module.
Definition: Module.h:514
std::vector< ModuleCondition > m_conditions
Module condition, only non-null if set.
Definition: Module.h:521
std::string m_package
Package this module is found in (may be empty).
Definition: Module.h:510
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition: Module.h:43

◆ def_beginRun()

virtual void def_beginRun ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function beginRun() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 426 of file Module.h.

426{ beginRun(); }
virtual void beginRun()
Called when entering a new run.
Definition: Module.h:147

◆ def_endRun()

virtual void def_endRun ( )
inlineprotectedvirtualinherited

This method can receive that the current run ends as a call from the Python side.

For regular C++-Modules that forwards the call to the regular endRun() method.

Reimplemented in PyModule.

Definition at line 439 of file Module.h.

439{ endRun(); }
virtual void endRun()
This method is called if the current run ends.
Definition: Module.h:166

◆ def_event()

virtual void def_event ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function event() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 432 of file Module.h.

432{ event(); }
virtual void event()
This method is the core of the module.
Definition: Module.h:157

◆ def_initialize()

virtual void def_initialize ( )
inlineprotectedvirtualinherited

Wrappers to make the methods without "def_" prefix callable from Python.

Overridden in PyModule. Wrapper method for the virtual function initialize() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 420 of file Module.h.

420{ initialize(); }
virtual void initialize()
Initialize the Module.
Definition: Module.h:109

◆ def_terminate()

virtual void def_terminate ( )
inlineprotectedvirtualinherited

Wrapper method for the virtual function terminate() that has the implementation to be used in a call from Python.

Reimplemented in PyModule.

Definition at line 445 of file Module.h.

445{ terminate(); }
virtual void terminate()
This method is called at the end of the event processing.
Definition: Module.h:176

◆ endRun()

virtual void endRun ( void  )
inlinevirtualinherited

This method is called if the current run ends.

Use this method to store information, which should be aggregated over one run.

This method can be implemented by subclasses.

Reimplemented in BeamabortModule, BgoModule, CaveModule, ClawModule, CLAWSModule, DosiModule, FANGSModule, He3tubeModule, MicrotpcModule, Ph1bpipeModule, Ph1sustrModule, PindiodeModule, PlumeModule, QcsmonitorModule, SrsensorModule, GetEventFromSocketModule, CalibrationCollectorModule, AlignDQMModule, CosmicsAlignmentValidationModule, CurlTaggerModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, arichBtestModule, ARICHDQMModule, B2BIIMCParticlesMonitorModule, B2BIIConvertMdstModule, B2BIIMdstInputModule, BelleMCOutputModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BGOverlayInputModule, AnalysisPhase1StudyModule, NtuplePhase1_v6Module, ReprocessorModule, BeamabortStudyModule, BeamDigitizerModule, BgoDigitizerModule, BgoStudyModule, ClawDigitizerModule, ClawStudyModule, ClawsDigitizerModule, ClawsStudyModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, DosiDigitizerModule, DosiStudyModule, FANGSDigitizerModule, FANGSStudyModule, He3DigitizerModule, He3tubeStudyModule, MicrotpcStudyModule, TpcDigitizerModule, TPCStudyModule, PinDigitizerModule, PindiodeStudyModule, PlumeDigitizerModule, QcsmonitorDigitizerModule, QcsmonitorStudyModule, CDCCosmicAnalysisModule, CDCCRTestModule, cdcDQM7Module, CDCDQMModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, DAQPerfModule, RxSocketModule, TxSocketModule, DqmHistoManagerModule, MonitorDataModule, TrackAnaModule, Ds2SampleModule, ReceiveEventModule, HLTDQM2ZMQModule, HLTDs2ZMQModule, ElapsedTimeModule, DeSerializerPXDModule, GenRawSendModule, Root2RawModule, SerializerModule, CertifyParallelModule, Ds2RawModule, Ds2RbufModule, EvReductionModule, FastRbuf2DsModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, Ds2RawFileModule, PartialSeqRootReaderModule, SeqRootMergerModule, StorageDeserializerModule, StorageRootOutputModule, StorageSerializerModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, ECLBackgroundModule, ECLChargedPIDModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLClusterPSDModule, ECLCovarianceMatrixModule, ECLCRFinderModule, ECLDataAnalysisModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMModule, ECLDQMEXTENDEDModule, ECLDQMOutOfTimeDigitsModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLocalRunCalibratorModule, ECLLOMModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLUnpackerModule, ECLWaveformFitModule, HistoModule, SubEventModule, SwitchDataStoreModule, EventInfoPrinterModule, RandomBarrierModule, HistoManagerModule, StatisticsSummaryModule, SeqRootInputModule, SeqRootOutputModule, RxModule, TxModule, ZMQTxInputModule, ZMQTxWorkerModule, EvtGenDecayModule, OverrideGenerationFlagsModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, EKLMDataCheckerModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDQMModule, KLMDQM2Module, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMUnpackerModule, AWESOMEBasicModule, PXDBackgroundModule, PXDClustersFromTracksModule, PXDPerformanceModule, Convert2RawDetModule, PrintDataModule, PrintEventRateModule, Root2BinaryModule, CDCDedxDQMModule, CDCDedxValidationModule, EventT0ValidationModule, DataWriterModule, KlongValidationModule, KLMMuonIDDNNExpertModule, FullSimModule, SVDBackgroundModule, SVDClusterCalibrationsMonitorModule, SVDHotStripFinderModule, SVDLatencyCalibrationModule, SVDLocalCalibrationsMonitorModule, SVDPositionErrorScaleFactorImporterModule, SVDTimeCalibrationsMonitorModule, svdDumpModule, SVDPackerModule, SVDB4CommissioningPlotsModule, SVDClusterEvaluationModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDOccupancyAnalysisModule, SVDPerformanceModule, SVDShaperDigitsFromTracksModule, SVDClusterizerModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, SVDRecoDigitCreatorModule, SVD3SamplesEmulatorModule, SVDTriggerQualityGeneratorModule, SVDUnpackerModule, TOPBackgroundModule, TOPChannelT0MCModule, TOPTriggerDigitizerModule, TOPDoublePulseGeneratorModule, TOPGainEfficiencyCalculatorModule, TOPLaserHitSelectorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPMCTrackMakerModule, TOPNtupleModule, TOPPackerModule, TOPRawDigitConverterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPWaveformQualityPlotterModule, TOPXTalkChargeShareSetterModule, ExtModule, GenfitVisModule, MCV0MatcherModule, MCTrackCandClassifierModule, MuidModule, MCSlowPionPXDROICreatorModule, PXDROIFinderModule, SVDROIDQMModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, RT2SPTCConverterModule, SPTCmomentumSeedRetrieverModule, SPTCvirtualIPRemoverModule, TrackFinderMCTruthRecoTracksModule, EffPlotsModule, HitXPModule, TrackingPerformanceEvaluationModule, V0findingPerformanceEvaluationModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, TrackFinderVXDAnalizerModule, VXDSimpleClusterizerModule, NoKickCutsEvalModule, SectorMapBootstrapModule, VXDTFTrainingDataCollectorModule, FindletModule< AFindlet >, FindletModule< HitBasedT0Extractor >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFindlet >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< FacetCreator >, FindletModule< HitReclaimer >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinder >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerNDFinderModule, TRGCDCModule, TRGCDCETFUnpackerModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSFUnpackerModule, TRGCDCTSStreamModule, MCMatcherTRGECLModule, TRGECLFAMModule, TRGECLModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGGDLModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLSummaryModule, TRGGDLUnpackerModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLDQMModule, TRGGRLUnpackerModule, KLMTriggerModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TRGRAWDATAModule, DQMHistAnalysisARICHModule, DQMHistAnalysisARICHMonObjModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLOutOfTimeDigitsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisExampleModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisHLTMonObjModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLMModule, DQMHistAnalysisKLM2Module, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisMonObjModule, DQMHistAnalysisOutputFileModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisSVDDoseModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTRGECLModule, DQMHistAnalysisTRGGDLModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DQMHistReferenceModule, DQMHistSnapshotsModule, PyModule, SVDUnpackerDQMModule, TrackSetEvaluatorHopfieldNNDEVModule, vxdDigitMaskingModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisEpicsOutputModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisTRGModule, and DQMHistOutputToEPICSModule.

Definition at line 166 of file Module.h.

166{};

◆ evalCondition()

bool evalCondition ( ) const
inherited

If at least one condition was set, it is evaluated and true returned if at least one condition returns true.

If no condition or result value was defined, the method returns false. Otherwise, the condition is evaluated and true returned, if at least one condition returns true. To speed up the evaluation, the condition strings were already parsed in the method if_value().

Returns
True if at least one condition and return value exists and at least one condition expression was evaluated to true.

Definition at line 96 of file Module.cc.

97{
98 if (m_conditions.empty()) return false;
99
100 //okay, a condition was set for this Module...
101 if (!m_hasReturnValue) {
102 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
103 }
104
105 for (const auto& condition : m_conditions) {
106 if (condition.evaluate(m_returnValue)) {
107 return true;
108 }
109 }
110 return false;
111}
int m_returnValue
The return value.
Definition: Module.h:519
bool m_hasReturnValue
True, if the return value is set.
Definition: Module.h:518

◆ event()

void event ( void  )
overridevirtual

Event function.

  • Creation of TrackNodes form SpacePoints
  • Filling the activeSectorNetwork with all sectors with hits in the current event
  • Filling the trackNodeNetwork by building combinations of 2 TrackNodes (= 2 SpacePoints)
  • Filling the segmentNetwork by building combinations of segments (= 3 SpacePoints)

Reimplemented from Module.

Definition at line 141 of file SegmentNetworkProducerModule.cc.

142{
144
145 if (m_vxdtfFilters == nullptr) {
146 B2FATAL("Requested secMapName '" << m_PARAMsecMapName << "' does not exist! Can not continue...");
147 }
148
149 // make sure that network exists:
150 if (!m_network) {
151 m_network.create();
152 }
153
154 std::vector<RawSectorData> collectedData = matchSpacePointToSectors();
155
156 m_network->set_trackNodeConnections(0);
157 m_network->set_activeSectorConnections(0);
158 m_network->set_segmentConnections(0);
159 m_network->set_trackNodeAddedConnections(0);
160 m_network->set_activeSectorAddedConnections(0);
161 m_network->set_segmentAddedConnections(0);
162 m_network->set_collectedPaths(0);
163
164
165 buildActiveSectorNetwork(collectedData);
166
167 if (not buildTrackNodeNetwork<VoidObserver>()) {
168 return;
169 }
170
171 buildSegmentNetwork<VoidObserver>();
172}
void buildActiveSectorNetwork(std::vector< RawSectorData > &collectedData)
Builds a DirectedNodeNetwork<ActiveSector>, containing ActiveSectors which have SpacePoints and compa...
std::vector< RawSectorData > matchSpacePointToSectors()
Create TrackNodes from SpacePoints and collect fullSecIDs of 'active' sectors with SpacePoints for th...

◆ exposePythonAPI()

void exposePythonAPI ( )
staticinherited

Exposes methods of the Module class to Python.

Definition at line 325 of file Module.cc.

326{
327 // to avoid confusion between std::arg and boost::python::arg we want a shorthand namespace as well
328 namespace bp = boost::python;
329
330 docstring_options options(true, true, false); //userdef, py sigs, c++ sigs
331
332 void (Module::*setReturnValueInt)(int) = &Module::setReturnValue;
333
334 enum_<Module::EAfterConditionPath>("AfterConditionPath",
335 R"(Determines execution behaviour after a conditional path has been executed:
336
337.. attribute:: END
338
339 End processing of this path after the conditional path. (this is the default for if_value() etc.)
340
341.. attribute:: CONTINUE
342
343 After the conditional path, resume execution after this module.)")
344 .value("END", Module::EAfterConditionPath::c_End)
345 .value("CONTINUE", Module::EAfterConditionPath::c_Continue)
346 ;
347
348 /* Do not change the names of >, <, ... we use them to serialize conditional pathes */
349 enum_<Belle2::ModuleCondition::EConditionOperators>("ConditionOperator")
356 ;
357
358 enum_<Module::EModulePropFlags>("ModulePropFlags",
359 R"(Flags to indicate certain low-level features of modules, see :func:`Module.set_property_flags()`, :func:`Module.has_properties()`. Most useful flags are:
360
361.. attribute:: PARALLELPROCESSINGCERTIFIED
362
363 This module can be run in parallel processing mode safely (All I/O must be done through the data store, in particular, the module must not write any files.)
364
365.. attribute:: HISTOGRAMMANAGER
366
367 This module is used to manage histograms accumulated by other modules
368
369.. attribute:: TERMINATEINALLPROCESSES
370
371 When using parallel processing, call this module's terminate() function in all processes. This will also ensure that there is exactly one process (single-core if no parallel modules found) or at least one input, one main and one output process.
372)")
373 .value("INPUT", Module::EModulePropFlags::c_Input)
374 .value("OUTPUT", Module::EModulePropFlags::c_Output)
375 .value("PARALLELPROCESSINGCERTIFIED", Module::EModulePropFlags::c_ParallelProcessingCertified)
376 .value("HISTOGRAMMANAGER", Module::EModulePropFlags::c_HistogramManager)
377 .value("INTERNALSERIALIZER", Module::EModulePropFlags::c_InternalSerializer)
378 .value("TERMINATEINALLPROCESSES", Module::EModulePropFlags::c_TerminateInAllProcesses)
379 ;
380
381 //Python class definition
382 class_<Module, PyModule> module("Module", R"(
383Base class for Modules.
384
385A module is the smallest building block of the framework.
386A typical event processing chain consists of a Path containing
387modules. By inheriting from this base class, various types of
388modules can be created. To use a module, please refer to
389:func:`Path.add_module()`. A list of modules is available by running
390``basf2 -m`` or ``basf2 -m package``, detailed information on parameters is
391given by e.g. ``basf2 -m RootInput``.
392
393The 'Module Development' section in the manual provides detailed information
394on how to create modules, setting parameters, or using return values/conditions:
395https://confluence.desy.de/display/BI/Software+Basf2manual#Module_Development
396
397)");
398 module
399 .def("__str__", &Module::getPathString)
400 .def("name", &Module::getName, return_value_policy<copy_const_reference>(),
401 "Returns the name of the module. Can be changed via :func:`set_name() <Module.set_name()>`, use :func:`type() <Module.type()>` for identifying a particular module class.")
402 .def("type", &Module::getType, return_value_policy<copy_const_reference>(),
403 "Returns the type of the module (i.e. class name minus 'Module')")
404 .def("set_name", &Module::setName, args("name"), R"(
405Set custom name, e.g. to distinguish multiple modules of the same type.
406
407>>> path.add_module('EventInfoSetter')
408>>> ro = path.add_module('RootOutput', branchNames=['EventMetaData'])
409>>> ro.set_name('RootOutput_metadata_only')
410>>> print(path)
411[EventInfoSetter -> RootOutput_metadata_only]
412
413)")
414 .def("description", &Module::getDescription, return_value_policy<copy_const_reference>(),
415 "Returns the description of this module.")
416 .def("package", &Module::getPackage, return_value_policy<copy_const_reference>(),
417 "Returns the package this module belongs to.")
418 .def("available_params", &_getParamInfoListPython,
419 "Return list of all module parameters as `ModuleParamInfo` instances")
420 .def("has_properties", &Module::hasProperties, (bp::arg("properties")),
421 R"DOCSTRING(Allows to check if the module has the given properties out of `ModulePropFlags` set.
422
423>>> if module.has_properties(ModulePropFlags.PARALLELPROCESSINGCERTIFIED):
424>>> ...
425
426Parameters:
427 properties (int): bitmask of `ModulePropFlags` to check for.
428)DOCSTRING")
429 .def("set_property_flags", &Module::setPropertyFlags, args("property_mask"),
430 "Set module properties in the form of an OR combination of `ModulePropFlags`.");
431 {
432 // python signature is too crowded, make ourselves
433 docstring_options subOptions(true, false, false); //userdef, py sigs, c++ sigs
434 module
435 .def("if_value", &Module::if_value,
436 (bp::arg("expression"), bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
437 R"DOCSTRING(if_value(expression, condition_path, after_condition_path=AfterConditionPath.END)
438
439Sets a conditional sub path which will be executed after this
440module if the return value set in the module passes the given ``expression``.
441
442Modules can define a return value (int or bool) using ``setReturnValue()``,
443which can be used in the steering file to split the Path based on this value, for example
444
445>>> module_with_condition.if_value("<1", another_path)
446
447In case the return value of the ``module_with_condition`` for a given event is
448less than 1, the execution will be diverted into ``another_path`` for this event.
449
450You could for example set a special return value if an error occurs, and divert
451the execution into a path containing :b2:mod:`RootOutput` if it is found;
452saving only the data producing/produced by the error.
453
454After a conditional path has executed, basf2 will by default stop processing
455the path for this event. This behaviour can be changed by setting the
456``after_condition_path`` argument.
457
458Parameters:
459 expression (str): Expression to determine if the conditional path should be executed.
460 This should be one of the comparison operators ``<``, ``>``, ``<=``,
461 ``>=``, ``==``, or ``!=`` followed by a numerical value for the return value
462 condition_path (Path): path to execute in case the expression is fulfilled
463 after_condition_path (AfterConditionPath): What to do once the ``condition_path`` has been executed.
464)DOCSTRING")
465 .def("if_false", &Module::if_false,
466 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
467 R"DOC(if_false(condition_path, after_condition_path=AfterConditionPath.END)
468
469Sets a conditional sub path which will be executed after this module if
470the return value of the module evaluates to False. This is equivalent to
471calling `if_value` with ``expression=\"<1\"``)DOC")
472 .def("if_true", &Module::if_true,
473 (bp::arg("condition_path"), bp::arg("after_condition_path")= Module::EAfterConditionPath::c_End),
474 R"DOC(if_true(condition_path, after_condition_path=AfterConditionPath.END)
475
476Sets a conditional sub path which will be executed after this module if
477the return value of the module evaluates to True. It is equivalent to
478calling `if_value` with ``expression=\">=1\"``)DOC");
479 }
480 module
481 .def("has_condition", &Module::hasCondition,
482 "Return true if a conditional path has been set for this module "
483 "using `if_value`, `if_true` or `if_false`")
484 .def("get_all_condition_paths", &_getAllConditionPathsPython,
485 "Return a list of all conditional paths set for this module using "
486 "`if_value`, `if_true` or `if_false`")
487 .def("get_all_conditions", &_getAllConditionsPython,
488 "Return a list of all conditional path expressions set for this module using "
489 "`if_value`, `if_true` or `if_false`")
490 .add_property("logging", make_function(&Module::getLogConfig, return_value_policy<reference_existing_object>()),
@ c_GE
Greater or equal than: ">=".
@ c_SE
Smaller or equal than: "<=".
@ c_GT
Greater than: ">"
@ c_NE
Not equal: "!=".
@ c_EQ
Equal: "=" or "=="
@ c_ST
Smaller than: "<"
Base class for Modules.
Definition: Module.h:72
LogConfig & getLogConfig()
Returns the log system configuration.
Definition: Module.h:225
void if_value(const std::string &expression, const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
Add a condition to the module.
Definition: Module.cc:79
void if_true(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to set the condition of the module.
Definition: Module.cc:90
void setReturnValue(int value)
Sets the return value for this module as integer.
Definition: Module.cc:220
void setLogConfig(const LogConfig &logConfig)
Set the log system configuration.
Definition: Module.h:230
const std::string & getDescription() const
Returns the description of the module.
Definition: Module.h:202
void if_false(const std::shared_ptr< Path > &path, EAfterConditionPath afterConditionPath=EAfterConditionPath::c_End)
A simplified version to add a condition to the module.
Definition: Module.cc:85
bool hasCondition() const
Returns true if at least one condition was set for the module.
Definition: Module.h:311
const std::string & getPackage() const
Returns the package this module is in.
Definition: Module.h:197
void setName(const std::string &name)
Set the name of the module.
Definition: Module.h:214
bool hasProperties(unsigned int propertyFlags) const
Returns true if all specified property flags are available in this module.
Definition: Module.cc:160
std::string getPathString() const override
return the module name.
Definition: Module.cc:192

◆ findSectorForSpacePoint()

const StaticSectorType * findSectorForSpacePoint ( const SpacePoint aSP)
inline

Returns pointer to static sector of a provided SpacePoint; returns nullptr if no sector could be found.

Definition at line 93 of file SegmentNetworkProducerModule.h.

94 {
95 if (not m_vxdtfFilters->areCoordinatesValid(aSP.getVxdID(), aSP.getNormalizedLocalU(), aSP.getNormalizedLocalV())) {
96 return nullptr;
97 }
98
99 FullSecID spSecID = m_vxdtfFilters->getFullID(aSP.getVxdID(), aSP.getNormalizedLocalU(), aSP.getNormalizedLocalV());
100 return m_vxdtfFilters->getStaticSector(spSecID);
101 }

◆ getAfterConditionPath()

Module::EAfterConditionPath getAfterConditionPath ( ) const
inherited

What to do after the conditional path is finished.

(defaults to c_End if no condition is set)

Definition at line 133 of file Module.cc.

134{
135 if (m_conditions.empty()) return EAfterConditionPath::c_End;
136
137 //okay, a condition was set for this Module...
138 if (!m_hasReturnValue) {
139 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
140 }
141
142 for (const auto& condition : m_conditions) {
143 if (condition.evaluate(m_returnValue)) {
144 return condition.getAfterConditionPath();
145 }
146 }
147
148 return EAfterConditionPath::c_End;
149}

◆ getAllConditionPaths()

std::vector< std::shared_ptr< Path > > getAllConditionPaths ( ) const
inherited

Return all condition paths currently set (no matter if the condition is true or not).

Definition at line 150 of file Module.cc.

151{
152 std::vector<std::shared_ptr<Path>> allConditionPaths;
153 for (const auto& condition : m_conditions) {
154 allConditionPaths.push_back(condition.getPath());
155 }
156
157 return allConditionPaths;
158}

◆ getAllConditions()

const std::vector< ModuleCondition > & getAllConditions ( ) const
inlineinherited

Return all set conditions for this module.

Definition at line 324 of file Module.h.

325 {
326 return m_conditions;
327 }

◆ getCondition()

const ModuleCondition * getCondition ( ) const
inlineinherited

Return a pointer to the first condition (or nullptr, if none was set)

Definition at line 314 of file Module.h.

315 {
316 if (m_conditions.empty()) {
317 return nullptr;
318 } else {
319 return &m_conditions.front();
320 }
321 }

◆ getConditionPath()

std::shared_ptr< Path > getConditionPath ( ) const
inherited

Returns the path of the last true condition (if there is at least one, else reaturn a null pointer).


Definition at line 113 of file Module.cc.

114{
115 PathPtr p;
116 if (m_conditions.empty()) return p;
117
118 //okay, a condition was set for this Module...
119 if (!m_hasReturnValue) {
120 B2FATAL("A condition was set for '" << getName() << "', but the module did not set a return value!");
121 }
122
123 for (const auto& condition : m_conditions) {
124 if (condition.evaluate(m_returnValue)) {
125 return condition.getPath();
126 }
127 }
128
129 // if none of the conditions were true, return a null pointer.
130 return p;
131}
std::shared_ptr< Path > PathPtr
Defines a pointer to a path object as a boost shared pointer.
Definition: Path.h:35

◆ getDescription()

const std::string & getDescription ( ) const
inlineinherited

Returns the description of the module.

Definition at line 202 of file Module.h.

202{return m_description;}
std::string m_description
The description of the module.
Definition: Module.h:511

◆ getFileNames()

virtual std::vector< std::string > getFileNames ( bool  outputFiles)
inlinevirtualinherited

Return a list of output filenames for this modules.

This will be called when basf2 is run with "--dry-run" if the module has set either the c_Input or c_Output properties.

If the parameter outputFiles is false (for modules with c_Input) the list of input filenames should be returned (if any). If outputFiles is true (for modules with c_Output) the list of output files should be returned (if any).

If a module has sat both properties this member is called twice, once for each property.

The module should return the actual list of requested input or produced output filenames (including handling of input/output overrides) so that the grid system can handle input/output files correctly.

This function should return the same value when called multiple times. This is especially important when taking the input/output overrides from Environment as they get consumed when obtained so the finalized list of output files should be stored for subsequent calls.

Reimplemented in RootInputModule, StorageRootOutputModule, and RootOutputModule.

Definition at line 134 of file Module.h.

135 {
136 return std::vector<std::string>();
137 }

◆ getLogConfig()

LogConfig & getLogConfig ( )
inlineinherited

Returns the log system configuration.

Definition at line 225 of file Module.h.

225{return m_logConfig;}

◆ getModules()

std::list< ModulePtr > getModules ( ) const
inlineoverrideprivatevirtualinherited

no submodules, return empty list

Implements PathElement.

Definition at line 506 of file Module.h.

506{ return std::list<ModulePtr>(); }

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns the name of the module.

This can be changed via e.g. set_name() in the steering file to give more useful names if there is more than one module of the same type.

For identifying the type of a module, using getType() (or type() in Python) is recommended.

Definition at line 187 of file Module.h.

187{return m_name;}
std::string m_name
The name of the module, saved as a string (user-modifiable)
Definition: Module.h:508

◆ getPackage()

const std::string & getPackage ( ) const
inlineinherited

Returns the package this module is in.

Definition at line 197 of file Module.h.

197{return m_package;}

◆ getParamInfoListPython()

std::shared_ptr< boost::python::list > getParamInfoListPython ( ) const
inherited

Returns a python list of all parameters.

Each item in the list consists of the name of the parameter, a string describing its type, a python list of all default values and the description of the parameter.

Returns
A python list containing the parameters of this parameter list.

Definition at line 279 of file Module.cc.

280{
282}
std::shared_ptr< boost::python::list > getParamInfoListPython() const
Returns a python list of all parameters.
ModuleParamList m_moduleParamList
List storing and managing all parameter of the module.
Definition: Module.h:516

◆ getParamList()

const ModuleParamList & getParamList ( ) const
inlineinherited

Return module param list.

Definition at line 363 of file Module.h.

363{ return m_moduleParamList; }

◆ getPathString()

std::string getPathString ( ) const
overrideprivatevirtualinherited

return the module name.

Implements PathElement.

Definition at line 192 of file Module.cc.

193{
194
195 std::string output = getName();
196
197 for (const auto& condition : m_conditions) {
198 output += condition.getString();
199 }
200
201 return output;
202}

◆ getReturnValue()

int getReturnValue ( ) const
inlineinherited

Return the return value set by this module.

This value is only meaningful if hasReturnValue() is true

Definition at line 381 of file Module.h.

381{ return m_returnValue; }

◆ getType()

const std::string & getType ( ) const
inherited

Returns the type of the module (i.e.

class name minus 'Module')

Definition at line 41 of file Module.cc.

42{
43 if (m_type.empty())
44 B2FATAL("Module type not set for " << getName());
45 return m_type;
46}
std::string m_type
The type of the module, saved as a string.
Definition: Module.h:509

◆ hasCondition()

bool hasCondition ( ) const
inlineinherited

Returns true if at least one condition was set for the module.

Definition at line 311 of file Module.h.

311{ return not m_conditions.empty(); };

◆ hasProperties()

bool hasProperties ( unsigned int  propertyFlags) const
inherited

Returns true if all specified property flags are available in this module.

Parameters
propertyFlagsOred EModulePropFlags which should be compared with the module flags.

Definition at line 160 of file Module.cc.

161{
162 return (propertyFlags & m_propertyFlags) == propertyFlags;
163}

◆ hasReturnValue()

bool hasReturnValue ( ) const
inlineinherited

Return true if this module has a valid return value set.

Definition at line 378 of file Module.h.

378{ return m_hasReturnValue; }

◆ hasUnsetForcedParams()

bool hasUnsetForcedParams ( ) const
inherited

Returns true and prints error message if the module has unset parameters which the user has to set in the steering file.

Definition at line 166 of file Module.cc.

167{
169 std::string allMissing = "";
170 for (const auto& s : missing)
171 allMissing += s + " ";
172 if (!missing.empty())
173 B2ERROR("The following required parameters of Module '" << getName() << "' were not specified: " << allMissing <<
174 "\nPlease add them to your steering file.");
175 return !missing.empty();
176}
std::vector< std::string > getUnsetForcedParams() const
Returns list of unset parameters (if they are required to have a value.

◆ if_false()

void if_false ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression "<1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is false.
afterConditionPathWhat to do after executing 'path'.

Definition at line 85 of file Module.cc.

86{
87 if_value("<1", path, afterConditionPath);
88}

◆ if_true()

void if_true ( const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

A simplified version to set the condition of the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

It is equivalent to the if_value() method, using the expression ">=1". This method is meant to be used together with the setReturnValue(bool value) method.

Parameters
pathShared pointer to the Path which will be executed if the return value is true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 90 of file Module.cc.

91{
92 if_value(">=1", path, afterConditionPath);
93}

◆ if_value()

void if_value ( const std::string &  expression,
const std::shared_ptr< Path > &  path,
EAfterConditionPath  afterConditionPath = EAfterConditionPath::c_End 
)
inherited

Add a condition to the module.

Please note that successive calls of this function will add more than one condition to the module. If more than one condition results in true, only the last of them will be used.

See https://confluence.desy.de/display/BI/Software+ModCondTut or ModuleCondition for a description of the syntax.

Please be careful: Avoid creating cyclic paths, e.g. by linking a condition to a path which is processed before the path where this module is located in.

Parameters
expressionThe expression of the condition.
pathShared pointer to the Path which will be executed if the condition is evaluated to true.
afterConditionPathWhat to do after executing 'path'.

Definition at line 79 of file Module.cc.

80{
81 m_conditions.emplace_back(expression, path, afterConditionPath);
82}

◆ initialize()

void initialize ( void  )
overridevirtual

Module initialization: performing checks on input parameter and registration of network container in data store.

Reimplemented from Module.

Definition at line 105 of file SegmentNetworkProducerModule.cc.

106{
107 if (m_PARAMVirtualIPCoordinates.size() != 3 or m_PARAMVirtualIPErrors.size() != 3) {
108 B2FATAL("Parameters for virtualIP are wrong!");
109 }
110
111 // Get pointer to current filters to check if they exist. They must be reloaded for every run,
112 // as the pointer will change if the DB object changes (see SectorMapBootStrapModule).
113 auto filters = m_filtersContainer.getFilters(m_PARAMsecMapName);
114 if (filters == nullptr) {
115 B2FATAL("Requested secMapName '" << m_PARAMsecMapName << "' does not exist! Can not continue...");
116 }
117
124
126 SecMapHelper::printStaticSectorRelations(*filters, filters->getConfig().secMapName + "segNetProducer", 2, m_PARAMprintToMathematica,
127 true);
128 }
129
130 for (std::string& anArrayName : m_PARAMSpacePointsArrayNames) {
131 m_spacePoints.push_back(StoreArray<SpacePoint>(anArrayName));
132 m_spacePoints.back().isRequired();
133 }
134
136
138}
@ c_DontWriteOut
Object/array should be NOT saved by output modules.
Definition: DataStore.h:71
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition: DataStore.h:72
std::vector< StoreArray< Belle2::SpacePoint > > m_spacePoints
Contains all SPacePoint storeArrays to be evaluated.
B2Vector3D m_virtualIPErrors
Vector for errors on coordinates of virtual IP.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516
void printStaticSectorRelations(const VXDTFFilters< HitType > &filters, const std::string &configName, unsigned int nHitCombinations=2, bool print2File=true, bool suppressDeadSectors=true)
TODO dot-compatible version of printStaticSectorRelations:

◆ matchSpacePointToSectors()

std::vector< SegmentNetworkProducerModule::RawSectorData > matchSpacePointToSectors ( )

Create TrackNodes from SpacePoints and collect fullSecIDs of 'active' sectors with SpacePoints for the event.

Definition at line 175 of file SegmentNetworkProducerModule.cc.

176{
177 std::vector<RawSectorData> collectedData; // contains the raw sectors to be activated
178 std::deque<TrackNode>& trackNodes = m_network->accessTrackNodes(); // collects trackNodes
179 int nCollected = 0;
180
181 for (StoreArray<SpacePoint>& storeArray : m_spacePoints) {
182 // match all SpacePoints with the sectors:
183 for (SpacePoint& aSP : storeArray) {
184 if (aSP.getAssignmentState()) {
185 continue;
186 }
187
188 const StaticSectorType* sectorFound = findSectorForSpacePoint(aSP);
189
190 if (sectorFound == nullptr) {
191 B2WARNING("SpacePoint in sensor " << aSP.getVxdID() << " no sector found, SpacePoint discarded!");
192 continue;
193 }
194
195 trackNodes.emplace_back(&aSP);
196
197 // sector for SpacePoint exists:
198 FullSecID foundSecID = sectorFound->getFullSecID();
199
200 std::vector<RawSectorData>::iterator iter =
201 std::find_if(collectedData.begin(), collectedData.end(),
202 [&](const RawSectorData & entry) -> bool { return entry.secID == foundSecID; }
203 );
204
205 // if secID not in collectedData:
206 if (iter == collectedData.end()) {
207 collectedData.push_back({ foundSecID, false, nullptr, sectorFound, { & (trackNodes.back())}});
208 nCollected++;
209 } else {
210 iter->hits.push_back(&(trackNodes.back()));
211 nCollected++;
212 }
213 }
214 }
215
216 // store IP-coordinates
218 m_network->setVirtualInteractionPoint(m_virtualIPCoordinates, m_virtualIPErrors);
219 TrackNode* vIP = m_network->getVirtualInteractionPoint();
220 const StaticSectorType* sectorFound = findSectorForSpacePoint((vIP->getHit()));
221 collectedData.push_back({FullSecID(), false, nullptr, sectorFound, {vIP}}); // TODO: which FullSecID for the vIP?
222 }
223
224 m_network->set_trackNodesCollected(nCollected);
225 return collectedData;
226}
unsigned int getFullSecID() const
returns the FullSecID coded as integer for further use (can be reconverted to FullSecID by using Full...
Definition: FullSecID.h:150
const StaticSectorType * findSectorForSpacePoint(const SpacePoint &aSP)
Returns pointer to static sector of a provided SpacePoint; returns nullptr if no sector could be foun...
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
const SpacePoint & getHit() const
returns reference to hit.
Definition: TrackNode.h:92

◆ setAbortLevel()

void setAbortLevel ( int  abortLevel)
inherited

Configure the abort log level.

Definition at line 67 of file Module.cc.

68{
69 m_logConfig.setAbortLevel(static_cast<LogConfig::ELogLevel>(abortLevel));
70}
ELogLevel
Definition of the supported log levels.
Definition: LogConfig.h:26
void setAbortLevel(ELogLevel abortLevel)
Configure the abort level.
Definition: LogConfig.h:112

◆ setDebugLevel()

void setDebugLevel ( int  debugLevel)
inherited

Configure the debug messaging level.

Definition at line 61 of file Module.cc.

62{
63 m_logConfig.setDebugLevel(debugLevel);
64}
void setDebugLevel(int debugLevel)
Configure the debug messaging level.
Definition: LogConfig.h:98

◆ setDescription()

void setDescription ( const std::string &  description)
protectedinherited

Sets the description of the module.

Parameters
descriptionA description of the module.

Definition at line 214 of file Module.cc.

215{
216 m_description = description;
217}

◆ setLogConfig()

void setLogConfig ( const LogConfig logConfig)
inlineinherited

Set the log system configuration.

Definition at line 230 of file Module.h.

230{m_logConfig = logConfig;}

◆ setLogInfo()

void setLogInfo ( int  logLevel,
unsigned int  logInfo 
)
inherited

Configure the printed log information for the given level.

Parameters
logLevelThe log level (one of LogConfig::ELogLevel)
logInfoWhat kind of info should be printed? ORed combination of LogConfig::ELogInfo flags.

Definition at line 73 of file Module.cc.

74{
75 m_logConfig.setLogInfo(static_cast<LogConfig::ELogLevel>(logLevel), logInfo);
76}
void setLogInfo(ELogLevel logLevel, unsigned int logInfo)
Configure the printed log information for the given level.
Definition: LogConfig.h:127

◆ setLogLevel()

void setLogLevel ( int  logLevel)
inherited

Configure the log level.

Definition at line 55 of file Module.cc.

56{
57 m_logConfig.setLogLevel(static_cast<LogConfig::ELogLevel>(logLevel));
58}
void setLogLevel(ELogLevel logLevel)
Configure the log level.
Definition: LogConfig.cc:25

◆ setName()

void setName ( const std::string &  name)
inlineinherited

Set the name of the module.

Note
The module name is set when using the REG_MODULE macro, but the module can be renamed before calling process() using the set_name() function in your steering file.
Parameters
nameThe name of the module

Definition at line 214 of file Module.h.

214{ m_name = name; };

◆ setParamList()

void setParamList ( const ModuleParamList params)
inlineprotectedinherited

Replace existing parameter list.

Definition at line 501 of file Module.h.

501{ m_moduleParamList = params; }

◆ setParamPython()

void setParamPython ( const std::string &  name,
const boost::python::object &  pyObj 
)
privateinherited

Implements a method for setting boost::python objects.

The method supports the following types: list, dict, int, double, string, bool The conversion of the python object to the C++ type and the final storage of the parameter value is done in the ModuleParam class.

Parameters
nameThe unique name of the parameter.
pyObjThe object which should be converted and stored as the parameter value.

Definition at line 234 of file Module.cc.

235{
236 LogSystem& logSystem = LogSystem::Instance();
237 logSystem.updateModule(&(getLogConfig()), getName());
238 try {
240 } catch (std::runtime_error& e) {
241 throw std::runtime_error("Cannot set parameter '" + name + "' for module '"
242 + m_name + "': " + e.what());
243 }
244
245 logSystem.updateModule(nullptr);
246}
Class for logging debug, info and error messages.
Definition: LogSystem.h:46
void updateModule(const LogConfig *moduleLogConfig=nullptr, const std::string &moduleName="")
Sets the log configuration to the given module log configuration and sets the module name This method...
Definition: LogSystem.h:191
static LogSystem & Instance()
Static method to get a reference to the LogSystem instance.
Definition: LogSystem.cc:31
void setParamPython(const std::string &name, const PythonObject &pyObj)
Implements a method for setting boost::python objects.

◆ setParamPythonDict()

void setParamPythonDict ( const boost::python::dict &  dictionary)
privateinherited

Implements a method for reading the parameter values from a boost::python dictionary.

The key of the dictionary has to be the name of the parameter and the value has to be of one of the supported parameter types.

Parameters
dictionaryThe python dictionary from which the parameter values are read.

Definition at line 249 of file Module.cc.

250{
251
252 LogSystem& logSystem = LogSystem::Instance();
253 logSystem.updateModule(&(getLogConfig()), getName());
254
255 boost::python::list dictKeys = dictionary.keys();
256 int nKey = boost::python::len(dictKeys);
257
258 //Loop over all keys in the dictionary
259 for (int iKey = 0; iKey < nKey; ++iKey) {
260 boost::python::object currKey = dictKeys[iKey];
261 boost::python::extract<std::string> keyProxy(currKey);
262
263 if (keyProxy.check()) {
264 const boost::python::object& currValue = dictionary[currKey];
265 setParamPython(keyProxy, currValue);
266 } else {
267 B2ERROR("Setting the module parameters from a python dictionary: invalid key in dictionary!");
268 }
269 }
270
271 logSystem.updateModule(nullptr);
272}
void setParamPython(const std::string &name, const boost::python::object &pyObj)
Implements a method for setting boost::python objects.
Definition: Module.cc:234

◆ setPropertyFlags()

void setPropertyFlags ( unsigned int  propertyFlags)
inherited

Sets the flags for the module properties.

Parameters
propertyFlagsbitwise OR of EModulePropFlags

Definition at line 208 of file Module.cc.

209{
210 m_propertyFlags = propertyFlags;
211}

◆ setReturnValue() [1/2]

void setReturnValue ( bool  value)
protectedinherited

Sets the return value for this module as bool.

The bool value is saved as an integer with the convention 1 meaning true and 0 meaning false. The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 227 of file Module.cc.

228{
229 m_hasReturnValue = true;
230 m_returnValue = value;
231}

◆ setReturnValue() [2/2]

void setReturnValue ( int  value)
protectedinherited

Sets the return value for this module as integer.

The value can be used in the steering file to divide the analysis chain into several paths.

Parameters
valueThe value of the return value.

Definition at line 220 of file Module.cc.

221{
222 m_hasReturnValue = true;
223 m_returnValue = value;
224}

◆ setType()

void setType ( const std::string &  type)
protectedinherited

Set the module type.

Only for use by internal modules (which don't use the normal REG_MODULE mechanism).

Definition at line 48 of file Module.cc.

49{
50 if (!m_type.empty())
51 B2FATAL("Trying to change module type from " << m_type << " is not allowed, the value is assumed to be fixed.");
52 m_type = type;
53}

◆ terminate()

virtual void terminate ( void  )
inlinevirtualinherited

This method is called at the end of the event processing.

This method is called only once after the event processing finished. Use this method for cleaning up, closing files, etc.

This method can be implemented by subclasses.

Reimplemented in ARICHBackgroundModule, BeamabortModule, BgoModule, CaveModule, ClawModule, CLAWSModule, DosiModule, FANGSModule, He3tubeModule, MicrotpcModule, Ph1bpipeModule, Ph1sustrModule, PindiodeModule, PlumeModule, QcsmonitorModule, SrsensorModule, GetEventFromSocketModule, CalibrationCollectorModule, CosmicsAlignmentValidationModule, CurlTaggerModule, EventKinematicsModule, FlavorTaggerInfoFillerModule, LowEnergyPi0IdentificationExpertModule, LowEnergyPi0VetoExpertModule, ParticleKinematicFitterModule, ParticleLoaderModule, ParticleMassHypothesesUpdaterModule, ParticleMassUpdaterModule, ParticleMCDecayStringModule, ParticleMomentumUpdaterModule, ParticleStatsModule, ParticleWeightingLookUpCreatorModule, RemoveParticlesNotInListsModule, SkimFilterModule, TreeFitterModule, VariablesToEventBasedTreeModule, VariablesToHistogramModule, VariablesToNtupleModule, arichBtestModule, ARICHNtupleModule, arichToNtupleModule, B2BIIMCParticlesMonitorModule, B2BIIConvertMdstModule, B2BIIFixMdstModule, B2BIIMdstInputModule, BelleMCOutputModule, BeamBkgGeneratorModule, BeamBkgHitRateMonitorModule, BeamBkgMixerModule, BeamBkgTagSetterModule, BGOverlayInputModule, AnalysisPhase1StudyModule, NtuplePhase1_v6Module, ReprocessorModule, BeamabortStudyModule, BeamDigitizerModule, BgoDigitizerModule, BgoStudyModule, ClawDigitizerModule, ClawStudyModule, ClawsDigitizerModule, ClawsStudyModule, CsiDigitizer_v2Module, CsIDigitizerModule, CsiModule, CsiStudy_v2Module, CsIStudyModule, DosiDigitizerModule, DosiStudyModule, FANGSDigitizerModule, FANGSStudyModule, He3DigitizerModule, He3tubeStudyModule, MicrotpcStudyModule, TpcDigitizerModule, PinDigitizerModule, PindiodeStudyModule, PlumeDigitizerModule, QcsmonitorDigitizerModule, QcsmonitorStudyModule, CDCCosmicAnalysisModule, CDCCrossTalkAdderModule, CDCCRTestModule, CDCDigitizerModule, cdcDQM7Module, CDCDQMModule, ScanCDCGeoModule, CDCInitialT0DeterminationModule, CDCPackerModule, CDCRecoTrackFilterModule, CDCUnpackerModule, DAQPerfModule, RxSocketModule, TxSocketModule, DqmHistoManagerModule, MonitorDataModule, TrackAnaModule, Ds2SampleModule, ReceiveEventModule, HLTDQM2ZMQModule, HLTDs2ZMQModule, ElapsedTimeModule, DeSerializerModule, DeSerializerPXDModule, GenRawSendModule, Root2RawModule, SerializerModule, CertifyParallelModule, Ds2RawModule, Ds2RbufModule, EvReductionModule, FastRbuf2DsModule, Raw2DsModule, RawInputModule, Rbuf2DsModule, Rbuf2RbufModule, Ds2RawFileModule, PartialSeqRootReaderModule, SeqRootMergerModule, StorageDeserializerModule, StorageRootOutputModule, StorageSerializerModule, DisplayModule, PhysicsObjectsDQMModule, PhysicsObjectsMiraBelleBhabhaModule, PhysicsObjectsMiraBelleDst2Module, PhysicsObjectsMiraBelleDstModule, PhysicsObjectsMiraBelleHadronModule, PhysicsObjectsMiraBelleModule, ECLBackgroundModule, ECLChargedPIDModule, ECLChargedPIDDataAnalysisModule, ECLChargedPIDDataAnalysisValidationModule, ECLClusterPSDModule, ECLCompressBGOverlayModule, ECLCovarianceMatrixModule, ECLCRFinderModule, EclCovMatrixNtupleModule, ECLDataAnalysisModule, ECLDigiStudyModule, ECLDigitCalibratorModule, ECLDigitizerModule, ECLDigitizerPureCsIModule, EclDisplayModule, ECLDQMModule, ECLDQMEXTENDEDModule, ECLDQMOutOfTimeDigitsModule, ECLFillCellIdMappingModule, ECLFinalizerModule, ECLHitDebugModule, ECLLocalMaximumFinderModule, ECLLOMModule, ECLMatchingPerformanceExpertModule, ECLPackerModule, ECLShowerCorrectorModule, ECLShowerShapeModule, ECLSplitterN1Module, ECLSplitterN2Module, ECLTrackClusterMatchingModule, ECLTrackClusterMatchingParametrizationExpertModule, ECLTrackClusterMatchingPerformanceModule, ECLTRGInformationModule, ECLTrimShowersAndDigitsModule, ECLUnpackerModule, eclWaveformCalibCollectorModule, ECLWaveformFitModule, HistoModule, MergeDataStoreModule, SubEventModule, SwitchDataStoreModule, ProgressBarModule, RandomBarrierModule, HistoManagerModule, ProfileModule, RootInputModule, RootOutputModule, SeqRootInputModule, SeqRootOutputModule, AsyncWrapper, RxModule, TxModule, ZMQRxOutputModule, ZMQRxWorkerModule, ZMQTxInputModule, ZMQTxWorkerModule, AafhInputModule, BabayagaNLOInputModule, BBBremInputModule, BHWideInputModule, CRYInputModule, EvtGenDecayModule, FragmentationModule, HepMCInputModule, HepMCOutputModule, GeneratedVertexDisplacerModule, GeneratorPreselectionModule, HepevtOutputModule, OverrideGenerationFlagsModule, RemoveMCParticlesModule, KKGenInputModule, KoralWInputModule, PhokharaInputModule, TeeggInputModule, TrepsInputModule, GeometryModule, SoftwareTriggerModule, SoftwareTriggerResultPrinterModule, BKLMAnaModule, BKLMDigitAnalyzerModule, BKLMSimHistogrammerModule, BKLMTrackingModule, EKLMDataCheckerModule, KLMClusterEfficiencyModule, KLMClustersReconstructorModule, KLMDigitizerModule, KLMDQMModule, KLMDQM2Module, KLMPackerModule, KLMReconstructorModule, KLMScintillatorSimulatorModule, KLMUnpackerModule, MasterClassModule, MVAExpertModule, MVAMultipleExpertsModule, AWESOMEBasicModule, PXDBackgroundModule, PXDClustersFromTracksModule, PXDPerformanceModule, PXDSpacePointCreatorModule, CheckErrorEventModule, Convert2RawDetModule, Root2BinaryModule, CDCDedxCorrectionModule, CDCDedxDQMModule, CDCDedxPIDModule, CDCDedxScanModule, CDCDedxSkimModule, CDCDedxSkimCDSTModule, CDCDedxValidationModule, HitLevelInfoWriterModule, DataWriterModule, ECLExpertModule, KLMExpertModule, KlongValidationModule, KLMMuonIDDNNExpertModule, PIDNtupleModule, VXDDedxPIDModule, FullSimModule, FullSimTimingModule, SVDBackgroundModule, SVDChannelMappingModule, SVDHotStripFinderModule, SVDChargeSharingAnalysisModule, SVDClusterQualityEstimatorCalibrationModule, SVDClusterQualityEstimatorModule, SVDCrossTalkFinderModule, svdDumpModule, SVDPackerModule, SVDClusterEvaluationTrueInfoModule, SVDClusterFilterModule, SVDEventT0PerformanceTTreeModule, SVDMaxStripTTreeModule, SVDPerformanceTTreeModule, SVDShaperDigitsFromTracksModule, SVDCoGTimeEstimatorModule, SVDDataFormatCheckModule, SVD3SamplesEmulatorModule, SVDDigitizerModule, SVDTriggerQualityGeneratorModule, SVDSpacePointCreatorModule, SVDSpacePointQICalibrationModule, TOPAlignerModule, TOPBackgroundModule, TOPBunchFinderModule, TOPChannelT0CalibratorModule, TOPChannelT0MCModule, TOPCommonT0CalibratorModule, TOPCosmicT0FinderModule, TOPTriggerDigitizerModule, TOPDoublePulseGeneratorModule, TOPGainEfficiencyCalculatorModule, TOPLaserHitSelectorModule, TOPInterimFENtupleModule, TOPLaserCalibratorModule, TOPLLScannerModule, TOPMCTrackMakerModule, TOPModuleT0CalibratorModule, TOPNtupleModule, TOPPackerModule, TOPPDFCheckerModule, TOPRawDigitConverterModule, TOPRingPlotterModule, TOPTBCComparatorModule, TOPTimeBaseCalibratorModule, TOPUnpackerModule, TOPWaveformFeatureExtractorModule, TOPXTalkChargeShareSetterModule, ExtModule, GenfitVisModule, BeamSpotMonitorModule, KinkFinderModule, Chi2MCTrackMatcherModule, MCV0MatcherModule, MCTrackCandClassifierModule, MuidModule, ROIReadTestModule, SVDROIFinderAnalysisDataModule, SVDROIFinderAnalysisModule, SVDROIFinderModule, CurlingTrackCandSplitterModule, GFTC2SPTCConverterModule, PhaseSpaceAnalysisModule, RT2SPTCConverterModule, SpacePoint2TrueHitConnectorModule, SpacePointCreatorTestModule, SPTC2GFTCConverterModule, SPTCRefereeModule, TCConvertersTestModule, StandardTrackingPerformanceModule, TrackFilterModule, CollectorTestModule, StudyMaterialEffectsModule, EffPlotsModule, FillTrackFitNtupleModule, HitXPModule, TrackingPerformanceEvaluationModule, V0findingPerformanceEvaluationModule, TrackQETrainingDataCollectorModule, V0FinderModule, SecMapTrainerBaseModule, SecMapTrainerVXDTFModule, TrackFinderVXDAnalizerModule, VXDQETrainingDataCollectorModule, FastBDTClassifierAnalyzerModule, FastBDTClassifierTrainingModule, MLSegmentNetworkProducerModule, NoKickCutsEvalModule, SegmentNetworkAnalyzerModule, SPTC2RTConverterModule, VXDTFTrainingDataCollectorModule, FindletModule< AFindlet >, FindletModule< HitBasedT0Extractor >, FindletModule< CKFToSVDSeedFindlet >, FindletModule< CKFToSVDFindlet >, FindletModule< CosmicsTrackMergerFindlet >, FindletModule< DATCONFPGAFindlet >, FindletModule< MCVXDCDCTrackMergerFindlet >, FindletModule< vxdHoughTracking::SVDHoughTracking >, FindletModule< CKFToCDCFindlet >, FindletModule< CKFToCDCFromEclFindlet >, FindletModule< CKFToPXDFindlet >, FindletModule< AsicBackgroundLibraryCreator >, FindletModule< CDCTrackingEventLevelMdstInfoFillerFindlet >, FindletModule< AxialSegmentPairCreator >, FindletModule< AxialStraightTrackFinder >, FindletModule< AxialTrackCreatorMCTruth >, FindletModule< AxialTrackCreatorSegmentHough >, FindletModule< AxialTrackFinderHough >, FindletModule< AxialTrackFinderLegendre >, FindletModule< ClusterBackgroundDetector >, FindletModule< ClusterPreparer >, FindletModule< ClusterRefiner< BridgingWireHitRelationFilter > >, FindletModule< FacetCreator >, FindletModule< HitReclaimer >, FindletModule< MonopoleAxialTrackFinderLegendre >, FindletModule< MonopoleStereoHitFinder >, FindletModule< MonopoleStereoHitFinderQuadratic >, FindletModule< SegmentCreatorFacetAutomaton >, FindletModule< SegmentCreatorMCTruth >, FindletModule< SegmentFinderFacetAutomaton >, FindletModule< SegmentFitter >, FindletModule< SegmentLinker >, FindletModule< SegmentOrienter >, FindletModule< SegmentPairCreator >, FindletModule< SegmentRejecter >, FindletModule< SegmentTrackCombiner >, FindletModule< SegmentTripleCreator >, FindletModule< StereoHitFinder >, FindletModule< SuperClusterCreator >, FindletModule< TrackCombiner >, FindletModule< TrackCreatorSegmentPairAutomaton >, FindletModule< TrackCreatorSegmentTripleAutomaton >, FindletModule< TrackCreatorSingleSegments >, FindletModule< TrackExporter >, FindletModule< TrackFinderAutomaton >, FindletModule< TrackFinderCosmics >, FindletModule< TrackFinder >, FindletModule< TrackFinderSegmentPairAutomaton >, FindletModule< TrackFinderSegmentTripleAutomaton >, FindletModule< TrackFlightTimeAdjuster >, FindletModule< TrackLinker >, FindletModule< TrackOrienter >, FindletModule< TrackQualityAsserter >, FindletModule< TrackQualityEstimator >, FindletModule< TrackRejecter >, FindletModule< WireHitBackgroundDetector >, FindletModule< WireHitCreator >, FindletModule< WireHitPreparer >, CDCTriggerNeuroDQMModule, CDCTriggerNeuroDQMOnlineModule, CDCTriggerHoughETFModule, CDCTrigger2DFinderModule, CDCTriggerNDFinderModule, CDCTriggerNeuroDataModule, CDCTriggerNeuroIDHistModule, CDCTriggerTSFFirmwareModule, CDCTriggerTSFModule, TRGCDCModule, TRGCDCETFUnpackerModule, TRGCDCT2DDQMModule, TRGCDCT3DConverterModule, TRGCDCT3DDQMModule, TRGCDCT3DUnpackerModule, TRGCDCTSFDQMModule, TRGCDCTSFUnpackerModule, TRGCDCTSStreamModule, CDCTriggerUnpackerModule, MCMatcherTRGECLModule, TRGECLFAMModule, TRGECLModule, TRGECLBGTCHitModule, TRGECLDQMModule, TRGECLQAMModule, TRGECLRawdataAnalysisModule, TRGECLTimingCalModule, TRGECLUnpackerModule, TRGGDLModule, TRGGDLDQMModule, TRGGDLDSTModule, TRGGDLSummaryModule, TRGGDLUnpackerModule, TRGGRLMatchModule, TRGGRLModule, TRGGRLProjectsModule, TRGGRLDQMModule, GRLNeuroModule, GRLNeuroTrainerModule, TRGGRLUnpackerModule, KLMTriggerModule, TRGTOPDQMModule, TRGTOPTRD2TTSConverterModule, TRGTOPUnpackerModule, TRGTOPUnpackerWaveformModule, TRGTOPWaveformPlotterModule, TRGRAWDATAModule, VXDMisalignmentModule, DQMHistAnalysisARICHModule, DQMHistAnalysisARICHMonObjModule, DQMHistAnalysisCDCDedxModule, DQMHistAnalysisCDCEpicsModule, DQMHistAnalysisCDCMonObjModule, DQMHistAnalysisECLModule, DQMHistAnalysisECLConnectedRegionsModule, DQMHistAnalysisECLOutOfTimeDigitsModule, DQMHistAnalysisECLShapersModule, DQMHistAnalysisECLSummaryModule, DQMHistAnalysisEpicsExampleModule, DQMHistAnalysisEventT0EfficiencyModule, DQMHistAnalysisEventT0TriggerJitterModule, DQMHistAnalysisExampleModule, DQMHistAnalysisExampleFlagsModule, DQMHistAnalysisHLTModule, DQMHistAnalysisHLTMonObjModule, DQMHistAnalysisInput2Module, DQMHistAnalysisInputPVSrvModule, DQMHistAnalysisInputTestModule, DQMHistAnalysisKLMModule, DQMHistAnalysisMiraBelleModule, DQMHistAnalysisMonObjModule, DQMHistAnalysisOutputFileModule, DQMHistAnalysisOutputMonObjModule, DQMHistAnalysisOutputRelayMsgModule, DQMHistAnalysisPeakModule, DQMHistAnalysisPXDFitsModule, DQMHistAnalysisSVDEfficiencyModule, DQMHistAnalysisSVDGeneralModule, DQMHistAnalysisSVDOnMiraBelleModule, DQMHistAnalysisTOPModule, DQMHistAnalysisTrackingAbortModule, DQMHistAnalysisTRGECLModule, DQMHistAnalysisTRGGDLModule, DQMHistAutoCanvasModule, DQMHistComparitorModule, DQMHistDeltaHistoModule, DQMHistReferenceModule, DQMHistSnapshotsModule, PyModule, PXDBgTupleProducerModule, PXDMCBgTupleProducerModule, PXDDQMEfficiencyNtupleModule, PXDDQMEfficiencyNtupleSelftrackModule, PXDDQMTrackRawNtupleModule, PXDPackerErrModule, PXDPackerModule, PXDReadRawBonnDAQModule, PXDReadRawBonnDAQMatchedModule, PXDReadRawONSENModule, PXDUnpackerModule, PXDUnpackerOldModule, PXDUnpackerOTModule, SVDDQMClustersOnTrackModule, SVDDQMExpressRecoModule, PXDROIFinderAnalysisModule, ROISenderModule, DQMHistAnalysisDeltaEpicsMonObjExampleModule, DQMHistAnalysisDeltaTestModule, DQMHistAnalysisPhysicsModule, DQMHistAnalysisPXDChargeModule, DQMHistAnalysisPXDCMModule, DQMHistAnalysisPXDDAQModule, DQMHistAnalysisPXDEffModule, DQMHistAnalysisPXDERModule, DQMHistAnalysisPXDInjectionModule, DQMHistAnalysisPXDReductionModule, DQMHistAnalysisPXDTrackChargeModule, DQMHistAnalysisRooFitExampleModule, DQMHistAnalysisRunNrModule, DQMHistAnalysisTRGModule, DQMHistOutputToEPICSModule, and ROIDQMModule.

Definition at line 176 of file Module.h.

176{};

Member Data Documentation

◆ m_conditions

std::vector<ModuleCondition> m_conditions
privateinherited

Module condition, only non-null if set.

Definition at line 521 of file Module.h.

◆ m_description

std::string m_description
privateinherited

The description of the module.

Definition at line 511 of file Module.h.

◆ m_eventCounter

unsigned int m_eventCounter = 0
protected

Counters.

Current event number.

Definition at line 198 of file SegmentNetworkProducerModule.h.

◆ m_eventLevelTrackingInfo

StoreObjPtr<EventLevelTrackingInfo> m_eventLevelTrackingInfo
protected

Access to the EventLevelTrackingInfo object in the datastore.

Definition at line 193 of file SegmentNetworkProducerModule.h.

◆ m_filtersContainer

FiltersContainer<SpacePoint>& m_filtersContainer = FiltersContainer<SpacePoint>::getInstance()
protected

Reference to container which contains all the sector to filter maps and with it the VXDTFFilters.

Definition at line 181 of file SegmentNetworkProducerModule.h.

◆ m_hasReturnValue

bool m_hasReturnValue
privateinherited

True, if the return value is set.

Definition at line 518 of file Module.h.

◆ m_logConfig

LogConfig m_logConfig
privateinherited

The log system configuration of the module.

Definition at line 514 of file Module.h.

◆ m_moduleParamList

ModuleParamList m_moduleParamList
privateinherited

List storing and managing all parameter of the module.

Definition at line 516 of file Module.h.

◆ m_name

std::string m_name
privateinherited

The name of the module, saved as a string (user-modifiable)

Definition at line 508 of file Module.h.

◆ m_network

Access to the DirectedNodeNetwork, which will be produced by this module.

Definition at line 190 of file SegmentNetworkProducerModule.h.

◆ m_package

std::string m_package
privateinherited

Package this module is found in (may be empty).

Definition at line 510 of file Module.h.

◆ m_PARAMAddVirtualIP

bool m_PARAMAddVirtualIP = false
protected

Boolean to set whether to add an additional SpacePoint as a virtual interaction point.

Definition at line 137 of file SegmentNetworkProducerModule.h.

◆ m_PARAMallFiltersOff

bool m_PARAMallFiltersOff = false
protected

If true, all filters are deactivated for all hit-combinations and therefore all combinations are accepted.

Definition at line 155 of file SegmentNetworkProducerModule.h.

◆ m_PARAMEventLevelTrackingInfoName

std::string m_PARAMEventLevelTrackingInfoName
protected

Name of the EventLevelTrackingInfo that should be used (different one for ROI-finding)

Definition at line 134 of file SegmentNetworkProducerModule.h.

◆ m_PARAMmaxNetworkSize

unsigned short m_PARAMmaxNetworkSize = 40000
protected

Maximal size of SegmentNetwork; if exceeded, filling of SegmentNetwork will be stopped and the event skipped.

Definition at line 158 of file SegmentNetworkProducerModule.h.

◆ m_PARAMmaxSegmentAddedConnections

unsigned int m_PARAMmaxSegmentAddedConnections = 300000
protected

Maximal number of added Segment connections; if exceeded, filling of SegmentNetwork will be stopped and the event skipped.

Definition at line 164 of file SegmentNetworkProducerModule.h.

◆ m_PARAMmaxSegmentConnections

unsigned int m_PARAMmaxSegmentConnections = 30000
protected

Maximal number of Segment connections; if exceeded, filling of SegmentNetwork will be stopped and the event skipped.

Definition at line 161 of file SegmentNetworkProducerModule.h.

◆ m_PARAMmaxTrackNodeAddedConnections

unsigned int m_PARAMmaxTrackNodeAddedConnections = 200000
protected

Maximal number of added hit connections; if exceeded, filling of HitNetwork will be stopped and the event skipped.

Definition at line 170 of file SegmentNetworkProducerModule.h.

◆ m_PARAMmaxTrackNodeConnections

unsigned short m_PARAMmaxTrackNodeConnections = 8000
protected

Maximal number of hit connections; if exceeded, filling of HitNetwork will be stopped and the event skipped.

Definition at line 167 of file SegmentNetworkProducerModule.h.

◆ m_PARAMNetworkOutputName

std::string m_PARAMNetworkOutputName
protected

Name for network container data store object created by this module.

Definition at line 131 of file SegmentNetworkProducerModule.h.

◆ m_PARAMprintNetworks

bool m_PARAMprintNetworks = false
protected

If true for each event and each network a file with a graph of the network is created.

Definition at line 149 of file SegmentNetworkProducerModule.h.

◆ m_PARAMprintToMathematica

bool m_PARAMprintToMathematica = false
protected

If true a file containing Mathematica code to generate a graph of the segment network is created.

Definition at line 152 of file SegmentNetworkProducerModule.h.

◆ m_PARAMsecMapName

std::string m_PARAMsecMapName = "testMap"
protected

Name of SectorMap used for this instance.

Definition at line 146 of file SegmentNetworkProducerModule.h.

◆ m_PARAMSpacePointsArrayNames

std::vector<std::string> m_PARAMSpacePointsArrayNames = {"SVDSpacePoints", "PXDSpacePoints"}
protected

Module Parameters.

Vector with SpacePoint storeArray names.

Definition at line 128 of file SegmentNetworkProducerModule.h.

◆ m_PARAMVirtualIPCoordinates

std::vector<double> m_PARAMVirtualIPCoordinates = {0, 0, 0}
protected

Coordinates for virtual interaction point SpacePoint.

Definition at line 140 of file SegmentNetworkProducerModule.h.

◆ m_PARAMVirtualIPErrors

std::vector<double> m_PARAMVirtualIPErrors = {0.2, 0.2, 1.}
protected

Errors on coordinates for virtual interaction point SpacePoint.

Definition at line 143 of file SegmentNetworkProducerModule.h.

◆ m_propertyFlags

unsigned int m_propertyFlags
privateinherited

The properties of the module as bitwise or (with |) of EModulePropFlags.

Definition at line 512 of file Module.h.

◆ m_returnValue

int m_returnValue
privateinherited

The return value.

Definition at line 519 of file Module.h.

◆ m_spacePoints

std::vector<StoreArray<Belle2::SpacePoint> > m_spacePoints
protected

Contains all SPacePoint storeArrays to be evaluated.

Definition at line 187 of file SegmentNetworkProducerModule.h.

◆ m_type

std::string m_type
privateinherited

The type of the module, saved as a string.

Definition at line 509 of file Module.h.

◆ m_virtualIPCoordinates

B2Vector3D m_virtualIPCoordinates
protected

Member Variables.

Vector for coordinates of virtual IP.

Definition at line 175 of file SegmentNetworkProducerModule.h.

◆ m_virtualIPErrors

B2Vector3D m_virtualIPErrors
protected

Vector for errors on coordinates of virtual IP.

Definition at line 178 of file SegmentNetworkProducerModule.h.

◆ m_vxdtfFilters

VXDTFFilters<SpacePoint>* m_vxdtfFilters = nullptr
protected

Pointer to the current filters, contains all sectorCombinations and Filters including cuts.

Definition at line 184 of file SegmentNetworkProducerModule.h.


The documentation for this class was generated from the following files: