Belle II Software  release-08-01-10
FacetCreator Class Referenceabstract

Class providing construction combinatorics for the facets. More...

#include <FacetCreator.h>

Inheritance diagram for FacetCreator:
Collaboration diagram for FacetCreator:

Public Types

using IOTypes = std::tuple< AIOTypes... >
 Types that should be served to apply on invokation.
 
using IOVectors = std::tuple< std::vector< AIOTypes >... >
 Vector types that should be served to apply on invokation.
 

Public Member Functions

 FacetCreator ()
 Constructor adding the filter as a subordinary processing signal listener.
 
std::string getDescription () final
 Short description of the findlet.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the parameters to a module.
 
void apply (const std::vector< CDCWireHitCluster > &inputClusters, std::vector< CDCFacet > &facets) final
 Central function creating the hit triplets from the clusters. More...
 
virtual void apply (ToVector< AIOTypes > &... ioVectors)=0
 Main function executing the algorithm.
 
void initialize () override
 Receive and dispatch signal before the start of the event processing.
 
void beginRun () override
 Receive and dispatch signal for the beginning of a new run.
 
void beginEvent () override
 Receive and dispatch signal for the start of a new event.
 
void endRun () override
 Receive and dispatch signal for the end of the run.
 
void terminate () override
 Receive and dispatch Signal for termination of the event processing.
 

Protected Types

using ToVector = typename ToVectorImpl< T >::Type
 Short hand for ToRangeImpl.
 

Protected Member Functions

void addProcessingSignalListener (ProcessingSignalListener *psl)
 Register a processing signal listener to be notified.
 
int getNProcessingSignalListener ()
 Get the number of currently registered listeners.
 

Private Types

using Super = Findlet< const CDCWireHitCluster, CDCFacet >
 Type of the base class.
 

Private Member Functions

void createFacets (const std::vector< CDCWireHit * > &wireHits, const std::vector< WeightedRelation< CDCWireHit > > &wireHitRelations, std::vector< CDCFacet > &facets)
 Generates facets on the given wire hits generating neighboring triples of hits. More...
 
void createFacetsForHitTriple (const CDCWireHit &startWireHit, const CDCWireHit &middleWireHit, const CDCWireHit &endWireHit, std::vector< CDCFacet > &facets)
 Generates reconstruted facets on the three given wire hits by hypothesizing over the 8 left right passage combinations. More...
 

Private Attributes

bool m_param_feasibleRLOnly = true
 Parameter : Switch to apply the rl feasibility cut.
 
bool m_param_updateDriftLength = true
 Parameter : Switch to reestimate the drift length.
 
bool m_param_leastSquareFit = false
 Parameter : Switch to fit the facet with least square method for the drift length update.
 
BridgingWireHitRelationFilter m_wireHitRelationFilter
 The filter for the hit neighborhood.
 
FeasibleRLFacetFilter m_feasibleRLFacetFilter
 The feasibility filter for the right left passage information.
 
ChooseableFacetFilter m_facetFilter
 The filter to be used for the facet generation.
 
DriftLengthEstimator m_driftLengthEstimator
 Instance of the drift length estimator to be used.
 
std::vector< WeightedRelation< CDCWireHit > > m_wireHitRelations
 Memory for the wire hit neighborhood in within a cluster.
 
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
 References to subordinary signal processing listener contained in this findlet.
 
bool m_initialized = false
 Flag to keep track whether initialization happend before.
 
bool m_terminated = false
 Flag to keep track whether termination happend before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

Class providing construction combinatorics for the facets.

Definition at line 35 of file FacetCreator.h.

Member Function Documentation

◆ apply()

void apply ( const std::vector< CDCWireHitCluster > &  inputClusters,
std::vector< CDCFacet > &  facets 
)
final

Central function creating the hit triplets from the clusters.

Hit triplets are always contained within one cluster and the output hit triplets follow the order of the input clusters such that the triplets of the same cluster remain close to each other.

Definition at line 58 of file FacetCreator.cc.

59 {
60  int iCluster = -1;
61  for (const CDCWireHitCluster& cluster : inputClusters) {
62  ++iCluster;
63  // Skip clusters that have been detected as background
64  if (cluster.getBackgroundFlag()) {
65  continue;
66  }
67  B2ASSERT("Expect the clusters to be sorted", std::is_sorted(cluster.begin(), cluster.end()));
68 
69  // Obtain the set of wire hits as references
70  const std::vector<CDCWireHit*>& wireHits = cluster;
71 
72  // Create the neighborhood of wire hits on the cluster
73  m_wireHitRelations.clear();
75 
76  B2ASSERT("Wire neighborhood is not symmetric. Check the geometry.",
78 
79  // Create the facets
80  std::size_t nBefore = facets.size();
81  createFacets(cluster, m_wireHitRelations, facets);
82  std::size_t nAfter = facets.size();
83 
84  VectorRange<CDCFacet> facetsInCluster(facets.begin() + nBefore, facets.begin() + nAfter);
85  // Sort the facets in their cluster
86  std::sort(facetsInCluster.begin(), facetsInCluster.end());
87 
88  B2ASSERT("Expected all facets to be different",
89  std::adjacent_find(facetsInCluster.begin(), facetsInCluster.end()) ==
90  facetsInCluster.end());
91 
92  for (CDCFacet& facet : facetsInCluster) {
93  facet.setICluster(iCluster);
94  }
95  }
96 }
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition: CDCFacet.h:32
BridgingWireHitRelationFilter m_wireHitRelationFilter
The filter for the hit neighborhood.
Definition: FacetCreator.h:90
std::vector< WeightedRelation< CDCWireHit > > m_wireHitRelations
Memory for the wire hit neighborhood in within a cluster.
Definition: FacetCreator.h:103
void createFacets(const std::vector< CDCWireHit * > &wireHits, const std::vector< WeightedRelation< CDCWireHit > > &wireHitRelations, std::vector< CDCFacet > &facets)
Generates facets on the given wire hits generating neighboring triples of hits.
Definition: FacetCreator.cc:98
A pair of iterators usable with the range base for loop.
Definition: Range.h:25
static void appendUsing(ARelationFilter &relationFilter, const std::vector< AObject * > &froms, const std::vector< AObject * > &tos, std::vector< WeightedRelation< AObject >> &weightedRelations, unsigned int maximumNumberOfRelations=std::numeric_limits< unsigned int >::max())
Appends relations between elements in the given AItems using the ARelationFilter.
Utility structure with functions related to weighted relations.

◆ createFacets()

void createFacets ( const std::vector< CDCWireHit * > &  wireHits,
const std::vector< WeightedRelation< CDCWireHit > > &  wireHitRelations,
std::vector< CDCFacet > &  facets 
)
private

Generates facets on the given wire hits generating neighboring triples of hits.

Inserts the result to the end of the GenericFacetCollection.

Definition at line 98 of file FacetCreator.cc.

◆ createFacetsForHitTriple()

void createFacetsForHitTriple ( const CDCWireHit startWireHit,
const CDCWireHit middleWireHit,
const CDCWireHit endWireHit,
std::vector< CDCFacet > &  facets 
)
private

Generates reconstruted facets on the three given wire hits by hypothesizing over the 8 left right passage combinations.

Inserts the result to the end of the GenericFacetCollection.

Prepare a facet - without fitted tangent lines.

Definition at line 133 of file FacetCreator.cc.


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