Belle II Software  release-05-02-19
SimpleSegmentTripleFilter Class Reference

Filter for the constuction of segment triples based on simple criterions. More...

#include <SimpleSegmentTripleFilter.h>

Inheritance diagram for SimpleSegmentTripleFilter:
Collaboration diagram for SimpleSegmentTripleFilter:

Public Types

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

Public Member Functions

Weight operator() (const CDCSegmentTriple &segmentTriple) final
 Checks if a triple of axial, stereo and axial segments is a good combination to be stored. More...
 
virtual void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix)
 Expose the set of parameters of the filter to the module parameter list. More...
 
virtual bool needsTruthInformation ()
 Indicates if the filter requires Monte Carlo information.
 
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 = Filter< CDCSegmentTriple >
 Type of the base class.
 

Private Member Functions

const CDCRiemannFittergetFitter2D () const
 Returns the xy fitter instance that is used by this filter.
 
const CDCSZFittergetSZFitter () const
 Returns the sz fitter instance that is used by this filter.
 

Private Attributes

CDCSZFitter m_szFitter
 Memory of the SZ fitter fitting sz lines to the stereo segments.
 
CDCRiemannFitter m_riemannFitter
 Memory of the Riemann fitter for the circle fits.
 
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 segment triples based on simple criterions.

Definition at line 32 of file SimpleSegmentTripleFilter.h.

Member Function Documentation

◆ exposeParameters()

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
virtualinherited

Expose the set of parameters of the filter to the module parameter list.

Note that not all filters have yet exposed their parameters in this way.

This method is deprecated as the exposeParams below uses a less compile heavy equivalent.

Reimplemented in MCSymmetric< BaseSegmentTripleFilter >, and MCSegmentTripleFilter.

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

◆ operator()() [1/2]

Weight operator() ( const CDCSegmentTriple segmentTriple)
finalvirtual

Checks if a triple of axial, stereo and axial segments is a good combination to be stored.

Checks the proper alignement and the quality of connection between all three segments. Returns NAN if the connection shall not be made or a finit value be used as the cell weight of the cell to constructed.

Reimplemented from Filter< CDCSegmentTriple >.

Definition at line 25 of file SimpleSegmentTripleFilter.cc.

26 {
27  const CDCAxialSegment2D* ptrStartSegment = segmentTriple.getStartSegment();
28  const CDCStereoSegment2D* ptrMiddleSegment = segmentTriple.getMiddleSegment();
29  const CDCAxialSegment2D* ptrEndSegment = segmentTriple.getEndSegment();
30 
31  assert(ptrStartSegment);
32  assert(ptrMiddleSegment);
33  assert(ptrEndSegment);
34 
35  const CDCAxialSegment2D& startSegment = *ptrStartSegment;
36  const CDCStereoSegment2D& middleSegment = *ptrMiddleSegment;
37  const CDCAxialSegment2D& endSegment = *ptrEndSegment;
38 
39  const double toleranceFraction = 0.0;
40 
41  // Check if the middle segment lies within the acceptable bounds in angular deviation
42  {
43  //get the remembered fits
44  const CDCTrajectory2D& startFit = startSegment.getTrajectory2D();
45  const CDCTrajectory2D& endFit = endSegment.getTrajectory2D();
46 
47  //use only the first and last hit for this check
48  const CDCRecoHit2D& firstHit = middleSegment.front();
49  const CDCRecoHit2D& lastHit = middleSegment.back();
50 
51  Vector3D firstRecoPos = firstHit.reconstruct3D(startFit);
52  Vector3D lastRecoPos = lastHit.reconstruct3D(endFit);
53 
54  const CDCWire& firstWire = firstHit.getWire();
55  const CDCWire& lastWire = lastHit.getWire();
56 
57  const bool agrees =
58  firstWire.isInCellZBounds(firstRecoPos, toleranceFraction) and
59  lastWire.isInCellZBounds(lastRecoPos, toleranceFraction);
60 
61  if (not agrees) return NAN;
62  }
63 
64  // make more complex judgement on fitness
65 
66  // Get the combined fit of start and end axial segment
67  CDCTrajectory2D trajectory2D = getFitter2D().fit(*(segmentTriple.getStartSegment()),
68  *(segmentTriple.getEndSegment()));
69 
70  // Check if the middle segment is actually coaligned with the trajectory
71  EForwardBackward fbInfo = trajectory2D.isForwardOrBackwardTo(middleSegment);
72  if (fbInfo != EForwardBackward::c_Forward) return NAN;
73 
74  // Reconstruct the middle stereo segment
75  CDCSegment3D reconstructedMiddle;
76  for (const CDCRecoHit2D& recoHit2D : middleSegment) {
77  reconstructedMiddle.push_back(CDCRecoHit3D::reconstruct(recoHit2D, trajectory2D));
78  if (not reconstructedMiddle.back().isInCellZBounds(toleranceFraction)) {
79  B2DEBUG(100, " RecoHit out of CDC");
80  return NAN;
81  }
82  }
83 
84  // Fit the sz slope and intercept
85  CDCTrajectorySZ trajectorySZ;
86  getSZFitter().update(trajectorySZ, middleSegment, trajectory2D);
87  segmentTriple.setTrajectory3D(CDCTrajectory3D(trajectory2D, trajectorySZ));
88 
89  Weight result = startSegment.size() + middleSegment.size() + endSegment.size();
90 
91  return result;
92 }

◆ operator()() [2/2]

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 60 of file Filter.icc.h.


The documentation for this class was generated from the following files:
Belle2::Vector3D
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:35
Belle2::TrackFindingCDC::SimpleSegmentTripleFilter::getFitter2D
const CDCRiemannFitter & getFitter2D() const
Returns the xy fitter instance that is used by this filter.
Definition: SimpleSegmentTripleFilter.h:49
Belle2::TrackFindingCDC::NForwardBackward::EForwardBackward
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.
Definition: EForwardBackward.h:35
Belle2::TrackFindingCDC::SimpleSegmentTripleFilter::getSZFitter
const CDCSZFitter & getSZFitter() const
Returns the sz fitter instance that is used by this filter.
Definition: SimpleSegmentTripleFilter.h:53
Belle2::TrackFindingCDC::CDCSegment::getTrajectory2D
CDCTrajectory2D & getTrajectory2D() const
Getter for the two dimensional trajectory fitted to the segment.
Definition: CDCSegment.h:79
Belle2::TrackFindingCDC::CDCSZFitter::update
void update(const CDCSegmentPair &segmentPair) const
Updates the trajectory of the axial stereo segment pair inplace.
Definition: CDCSZFitter.cc:165
Belle2::TrackFindingCDC::CDCTrajectory2D::reconstruct3D
Vector3D reconstruct3D(const WireLine &wireLine, double distance=0.0, double z=0) const
Gives the one three dimensional postions within the CDC closest to the given z where the given drift ...
Definition: CDCTrajectory2D.cc:164
Belle2::TrackFindingCDC::CDCFitter2D::fit
CDCTrajectory2D fit(const CDCObservations2D &observations2D) const
Fits a collection of observation drift circles.
Definition: CDCFitter2D.icc.h:48
Belle2::TrackFindingCDC::CDCRecoHit3D::reconstruct
static CDCRecoHit3D reconstruct(const CDCRecoHit2D &recoHit2D, const CDCTrajectory2D &trajectory2D)
Reconstructs the three dimensional hit from the two dimensional and the two dimensional trajectory.
Definition: CDCRecoHit3D.cc:58