Belle II Software  release-08-01-10
SimpleFacetFilter Class Reference

Filter for the constuction of good facets based on simple criterions. More...

#include <SimpleFacetFilter.h>

Inheritance diagram for SimpleFacetFilter:
Collaboration diagram for SimpleFacetFilter:

Public Types

using Object = AObject
 Type of the object to be analysed.
 
using Interface = Filter< AObject >
 Mark this class as the basic interface.
 

Public Member Functions

 SimpleFacetFilter ()
 Constructor using default direction of flight deviation cut off.
 
 SimpleFacetFilter (double deviationCosCut)
 Constructor using given direction of flight deviation cut off.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) final
 Expose the set of parameters of the filter to the module parameter list.
 
Weight operator() (const CDCFacet &facet) final
 Main filter method returning the weight of the facet. More...
 
virtual bool needsTruthInformation ()
 Indicates if the filter requires Monte Carlo information.
 
virtual Weight operator() (const Object &obj)
 Function to evaluate the object. More...
 
Weight operator() (const Object *obj)
 Function to evaluate the object. More...
 
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 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 = BaseFacetFilter
 Type of the super class.
 

Private Attributes

double m_param_deviationCosCut
 Memory for the used direction of flight deviation.
 
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

Filter for the constuction of good facets based on simple criterions.

Definition at line 25 of file SimpleFacetFilter.h.

Member Function Documentation

◆ operator()() [1/3]

Weight operator() ( const CDCFacet facet)
final

Main filter method returning the weight of the facet.

Returns NAN if the cell shall be rejected.

Definition at line 42 of file SimpleFacetFilter.cc.

43 {
44  facet.adjustFitLine();
45 
46  const ParameterLine2D& startToMiddle = facet.getStartToMiddleLine();
47  const ParameterLine2D& startToEnd = facet.getStartToEndLine();
48  const ParameterLine2D& middleToEnd = facet.getMiddleToEndLine();
49 
50  const double startCos = startToMiddle.tangential().cosWith(startToEnd.tangential());
51  // const double middleCos = startToMiddle.tangential().cosWith(middleToEnd.tangential());
52  const double endCos = startToEnd.tangential().cosWith(middleToEnd.tangential());
53 
54  // cut on the angle of
55  if (startCos > m_param_deviationCosCut and endCos > m_param_deviationCosCut) {
56  // Good facet contains three points of the track
57  // the amount carried by this facet can the adjusted more realistically
58  return 3;
59  } else {
60  return NAN;
61  }
62 }
void adjustFitLine() const
Adjusts the contained fit line to touch such that it touches the first and third hit.
Definition: CDCFacet.cc:61
ParameterLine2D getStartToEndLine() const
Getter for the tangential line from the first to the third hit.
Definition: CDCFacet.cc:94
ParameterLine2D getStartToMiddleLine() const
Getter for the tangential line from the first to the second hit.
Definition: CDCFacet.cc:86
ParameterLine2D getMiddleToEndLine() const
Getter for the tangential line from the second to the third hit.
Definition: CDCFacet.cc:102
A line with a support point and tangential vector.
const Vector2D & tangential() const
Gives the tangential vector of the line.
double m_param_deviationCosCut
Memory for the used direction of flight deviation.
double cosWith(const Vector2D &rhs) const
Definition: Vector2D.h:199

◆ operator()() [2/3]

◆ operator()() [3/3]

Weight operator() ( const Object obj)
inherited

Function to evaluate the object.

Base implementation accepts all objects, except nullptr.

Parameters
objThe object to be accepted or rejected.
Returns
A finit float value if the object is accepted. NAN if the object is rejected. Nullptr is always rejected.

Definition at line 58 of file Filter.icc.h.


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