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

Class representing a pair of reconstructed axial segements in adjacent superlayer. More...

#include <CDCAxialSegmentPair.h>

Collaboration diagram for CDCAxialSegmentPair:

Public Member Functions

 CDCAxialSegmentPair ()
 Default constructor setting the contained segmetns to nullptr.
 
 CDCAxialSegmentPair (const CDCAxialSegment2D *startSegment, const CDCAxialSegment2D *endSegment)
 Constructor from two segments.
 
 CDCAxialSegmentPair (const CDCAxialSegment2D *startSegment, const CDCAxialSegment2D *endSegment, const CDCTrajectory2D &trajectory2D)
 Constructor from two segments and an assoziated trajectory.
 
bool operator== (CDCAxialSegmentPair const &rhs) const
 Equality comparision based on the pointers to the stored segments.
 
bool operator< (CDCAxialSegmentPair const &rhs) const
 Total ordering sheme comparing the segment pointers.
 
bool checkSegments () const
 Checks the references to the contained three segment for nullptrs.
 
ISuperLayer getStartISuperLayer () const
 Getter for the superlayer id of the start segment.
 
ISuperLayer getEndISuperLayer () const
 Getter for the superlayer id of the end segment.
 
const CDCAxialSegment2DgetStartSegment () const
 Getter for the start segment.
 
void setStartSegment (const CDCAxialSegment2D *startSegment)
 Setter for the start segment.
 
const CDCAxialSegment2DgetEndSegment () const
 Getter for the end segment.
 
void setEndSegment (const CDCAxialSegment2D *endSegment)
 Setter for the end segment.
 
void setSegments (const CDCSegment2D *startSegment, const CDCSegment2D *endSegment)
 Setter for both segments simultaniously.
 
CDCTrajectory2DgetTrajectory2D () const
 Getter for the trajectory of the two dimensional trajectory.
 
void setTrajectory2D (const CDCTrajectory2D &trajectory2D) const
 Setter for the trajectory of the two dimensional trajectory.
 
void clearTrajectory2D () const
 Invalides the currently stored trajectory information.
 
void unsetAndForwardMaskedFlag () const
 Unsets the masked flag of the segment pair's automaton cell, of the contained segments and of the contained wire hits.
 
void setAndForwardMaskedFlag () const
 Sets the masked flag of the segment pair's automaton cell. Also forward the masked flag to the contained segments and the contained wire hits.
 
void receiveMaskedFlag () const
 If one of the contained segments is marked as masked this segment pair is set be masked as well.
 
EForwardBackward isCoaligned (const CDCTrajectory2D &trajectory2D) const
 Checks if the last entity in the vector lies greater or lower travel distance than the last entity. More...
 
AutomatonCellgetAutomatonCell () const
 Mutable getter for the automaton cell.
 

Private Attributes

const CDCAxialSegment2Dm_startSegment
 Reference to the start segment.
 
const CDCAxialSegment2Dm_endSegment
 Reference to the end segment.
 
CDCTrajectory2D m_trajectory2D
 Reference to the common trajectory.
 
AutomatonCell m_automatonCell
 Automaton cell assoziated with the pair of segments.
 

Friends

bool operator< (CDCAxialSegmentPair const &segmentPair, const CDCAxialSegment2D *axialSegment)
 Define reconstructed segments and segment triples as coaligned on the start segment.
 
bool operator< (const CDCAxialSegment2D *axialSegment, CDCAxialSegmentPair const &segmentPair)
 Define reconstructed segments and segment pairs as coaligned on the start segment.
 

Detailed Description

Class representing a pair of reconstructed axial segements in adjacent superlayer.

Definition at line 31 of file CDCAxialSegmentPair.h.

Member Function Documentation

◆ isCoaligned()

EForwardBackward isCoaligned ( const CDCTrajectory2D trajectory2D) const

Checks if the last entity in the vector lies greater or lower travel distance than the last entity.

Returns:

  • EForwardBackward::c_Forward if the last entity lies behind the first.
  • EForwardBackward::c_Backward if the last entity lies before the first.

Definition at line 90 of file CDCAxialSegmentPair.cc.

91 {
92  EForwardBackward startIsCoaligned = trajectory2D.isForwardOrBackwardTo(*(getStartSegment()));
93  EForwardBackward endIsCoaligned = trajectory2D.isForwardOrBackwardTo(*(getEndSegment()));
94  if (startIsCoaligned == EForwardBackward::c_Forward and
95  endIsCoaligned == EForwardBackward::c_Forward) {
96  return EForwardBackward::c_Forward;
97  } else if (startIsCoaligned == EForwardBackward::c_Backward and
98  endIsCoaligned == EForwardBackward::c_Backward) {
99  return EForwardBackward::c_Backward;
100  } else {
101  return EForwardBackward::c_Invalid;
102  }
103 }
const CDCAxialSegment2D * getStartSegment() const
Getter for the start segment.
const CDCAxialSegment2D * getEndSegment() const
Getter for the end segment.
EForwardBackward isForwardOrBackwardTo(const AHits &hits) const
Calculates if this trajectory and the hits are coaligned Returns:
EForwardBackward
Enumeration to represent the distinct possibilities of the right left passage information.

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