Belle II Software development
SegmentNetworkProducerModule.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <tracking/modules/vxdtfRedesign/SegmentNetworkProducerModule.h>
10#include <tracking/trackFindingVXD/segmentNetwork/NodeNetworkHelperFunctions.h>
11#include <tracking/trackFindingVXD/environment/VXDTFFilters.h>
12#include <tracking/trackFindingVXD/environment/VXDTFFiltersHelperFunctions.h>
13
14#include <tracking/trackFindingVXD/filterMap/filterFramework/VoidObserver.h>
15
16using namespace Belle2;
17
18REG_MODULE(SegmentNetworkProducer);
19
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}
104
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}
139
140
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}
173
174
175std::vector<SegmentNetworkProducerModule::RawSectorData> SegmentNetworkProducerModule::matchSpacePointToSectors()
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}
227
228
229void SegmentNetworkProducerModule::buildActiveSectorNetwork(std::vector<SegmentNetworkProducerModule::RawSectorData>&
230 collectedData)
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}
307
308
309template <class ObserverType>
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}
412
413
414template <class ObserverType>
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 ActiveSector Class.
Definition: ActiveSector.h:29
std::int32_t getID() const
************************* PUBLIC MEMBER FUNCTIONS *************************
Definition: ActiveSector.h:82
const std::vector< FullSecID > & getInner2spSecIDs() const
returns all IDs for inner sectors of two-sector-combinations stored in the static SectorMap
Definition: ActiveSector.h:98
The CACell class This Class stores all relevant information one wants to have stored in a cell for a ...
Definition: CACell.h:20
@ 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
Network of directed nodes of the type EntryType.
std::vector< Node * > & getNodes()
Returns all nodes of the network.
bool addInnerToLastOuterNode(NodeID innerNodeID)
to the last outerNode added, another innerNode will be attached
unsigned int size() const
Returns number of nodes to be found in the network.
bool linkNodes(NodeID outerNodeID, NodeID innerNodeID)
takes two entry IDs and weaves them into the network
bool isNodeInNetwork(const NodeID nodeID) const
Check if a given entry is already in the network.
bool addNode(NodeID nodeID, EntryType &newEntry)
************************* PUBLIC MEMBER FUNCTIONS *************************
The Node-Class.
Definition: DirectedNode.h:31
Class to identify a sector inside of the VXD.
Definition: FullSecID.h:33
Base class for Modules.
Definition: Module.h:72
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
@ 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
bool m_PARAMprintNetworks
If true for each event and each network a file with a graph of the network is created.
void buildSegmentNetwork()
Use connected SpacePoints to form segments which will stored and linked in a DirectedNodeNetwork<Segm...
unsigned short m_PARAMmaxNetworkSize
Maximal size of SegmentNetwork; if exceeded, filling of SegmentNetwork will be stopped and the event ...
std::string m_PARAMNetworkOutputName
Name for network container data store object created by this module.
void initialize() override
Module initialization: performing checks on input parameter and registration of network container in ...
unsigned int m_PARAMmaxSegmentConnections
Maximal number of Segment connections; if exceeded, filling of SegmentNetwork will be stopped and the...
StoreObjPtr< EventLevelTrackingInfo > m_eventLevelTrackingInfo
Access to the EventLevelTrackingInfo object in the datastore.
void buildActiveSectorNetwork(std::vector< RawSectorData > &collectedData)
Builds a DirectedNodeNetwork<ActiveSector>, containing ActiveSectors which have SpacePoints and compa...
std::vector< double > m_PARAMVirtualIPCoordinates
Coordinates for virtual interaction point SpacePoint.
std::string m_PARAMEventLevelTrackingInfoName
Name of the EventLevelTrackingInfo that should be used (different one for ROI-finding)
StoreObjPtr< DirectedNodeNetworkContainer > m_network
Access to the DirectedNodeNetwork, which will be produced by this module.
unsigned int m_PARAMmaxTrackNodeAddedConnections
Maximal number of added hit connections; if exceeded, filling of HitNetwork will be stopped and the e...
std::vector< StoreArray< Belle2::SpacePoint > > m_spacePoints
Contains all SPacePoint storeArrays to be evaluated.
SegmentNetworkProducerModule()
Constructor of the module.
unsigned int m_PARAMmaxSegmentAddedConnections
Maximal number of added Segment connections; if exceeded, filling of SegmentNetwork will be stopped a...
std::vector< RawSectorData > matchSpacePointToSectors()
Create TrackNodes from SpacePoints and collect fullSecIDs of 'active' sectors with SpacePoints for th...
VXDTFFilters< SpacePoint > * m_vxdtfFilters
Pointer to the current filters, contains all sectorCombinations and Filters including cuts.
std::vector< double > m_PARAMVirtualIPErrors
Errors on coordinates for virtual interaction point SpacePoint.
std::string m_PARAMsecMapName
Name of SectorMap used for this instance.
FiltersContainer< SpacePoint > & m_filtersContainer
Reference to container which contains all the sector to filter maps and with it the VXDTFFilters.
bool m_PARAMallFiltersOff
If true, all filters are deactivated for all hit-combinations and therefore all combinations are acce...
const StaticSectorType * findSectorForSpacePoint(const SpacePoint &aSP)
Returns pointer to static sector of a provided SpacePoint; returns nullptr if no sector could be foun...
unsigned short m_PARAMmaxTrackNodeConnections
Maximal number of hit connections; if exceeded, filling of HitNetwork will be stopped and the event s...
bool m_PARAMprintToMathematica
If true a file containing Mathematica code to generate a graph of the segment network is created.
bool buildTrackNodeNetwork()
Evaluate TrackNodes in the ActiveSectors and link them if they fulfill the filter criteria of the Sec...
std::vector< std::string > m_PARAMSpacePointsArrayNames
Module Parameters.
B2Vector3D m_virtualIPErrors
Vector for errors on coordinates of virtual IP.
bool m_PARAMAddVirtualIP
Boolean to set whether to add an additional SpacePoint as a virtual interaction point.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
Definition: SpacePoint.h:42
class to describe a static sector of the sector map.
Definition: StaticSector.h:29
const Filter3sp * getFilter3sp(const FullSecID &centerID, const FullSecID &innerID) const
Get the pointer to the 3 Space Point filter assigned to the friendship relation among this sector; wi...
Definition: StaticSector.h:69
FullSecID getFullSecID() const
returns FullSecID of this sector
Definition: StaticSector.h:173
const Filter2sp * getFilter2sp(FullSecID innerSector) const
Get the pointer to the 2 Space Point filter assigned to the friendship relation among this sector; wi...
Definition: StaticSector.h:56
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
The most CPU efficient MetaInfo for the DirectedNode-requirements (even if useless).
Definition: VoidMetaInfo.h:17
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
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
B2Vector3< double > B2Vector3D
typedef for common usage with double
Definition: B2Vector3.h:516
B2Vector3D outerHit(0, 0, 0)
testing out of range behavior
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:
Abstract base class for different kinds of events.
Simple struct for collecting raw data for a single sector.
Minimal class to store combination of sector and spacePoint, since SpacePoint can not carry sectorCon...
Definition: TrackNode.h:22
const SpacePoint & getHit() const
returns reference to hit.
Definition: TrackNode.h:92