Belle II Software development
CDCSegmentTriple Class Reference

Class representing a triple of reconstructed segments in adjacent superlayer. More...

#include <CDCSegmentTriple.h>

Public Member Functions

 CDCSegmentTriple ()
 Default constructor for ROOT compatibility.
 
 CDCSegmentTriple (const CDCAxialSegment2D *startSegment, const CDCAxialSegment2D *endSegment)
 Constructor taking two axial segments leaving the middle stereo segment set to null pointer.
 
 CDCSegmentTriple (const CDCAxialSegmentPair &segmentPair)
 Constructor taking two axial segments leaving the middle stereo segment set to null pointer.
 
 CDCSegmentTriple (const CDCAxialSegment2D *startSegment, const CDCStereoSegment2D *middleSegment, const CDCAxialSegment2D *endSegment)
 Constructor taking the three segments the triple shall be made of.
 
 CDCSegmentTriple (const CDCAxialSegment2D *startSegment, const CDCStereoSegment2D *middleSegment, const CDCAxialSegment2D *endSegment, const CDCTrajectory3D &trajectory3D)
 Constructor taking the three segments the triple shall be made of and the two dimensional and sz trajectory.
 
bool operator== (CDCSegmentTriple const &rhs) const
 Equality comparison based on the pointers to the stored segments.
 
bool operator< (CDCSegmentTriple const &rhs) const
 Total ordering scheme based on the two axial segments first and the stereo segments second.
 
bool checkSegments () const
 Checks the references to the contained three segment for nullptrs.
 
CDC::ISuperLayer getStartISuperLayer () const
 Getter for the superlayer id of the start segment.
 
CDC::ISuperLayer getMiddleISuperLayer () const
 Getter for the superlayer id of the middle segment.
 
CDC::ISuperLayer getEndISuperLayer () const
 Getter for the superlayer id of the end segment.
 
const CDCAxialSegment2D * getStartSegment () const
 Getter for the start axial segment.
 
void setStartSegment (const CDCAxialSegment2D *startSegment)
 Setter for the start axial segment.
 
const CDCStereoSegment2DgetMiddleSegment () const
 Getter for the middle stereo segment.
 
void setMiddleSegment (const CDCStereoSegment2D *middleSegment)
 Setter for the middle stereo segment.
 
const CDCAxialSegment2D * getEndSegment () const
 Getter for the end axial segment.
 
void setEndSegment (const CDCAxialSegment2D *endSegment)
 Setter for the end axial segment.
 
CDCTrajectorySZ getTrajectorySZ () const
 Getter for the linear trajectory in the sz direction.
 
CDCTrajectory2D getTrajectory2D () const
 Getter for the circular trajectory in the xy direction.
 
const CDCTrajectory3DgetTrajectory3D () const
 Getter for the three dimensional helix trajectory.
 
void setTrajectory3D (const CDCTrajectory3D &trajectory3D) const
 Setter for the three dimensional helix trajectory.
 
void clearTrajectory3D () const
 Clears the three dimensional helix trajectory.
 
void unsetAndForwardMaskedFlag () const
 Unsets the masked flag of the segment triple's automaton cell, of the contained segments and of the contained wire hits.
 
void setAndForwardMaskedFlag () const
 Sets the masked flag of the segment triple's automaton cell. Also forward the masked to the contained segments and the contained wire hits.
 
void receiveMaskedFlag () const
 If one of the contained segments is marked as masked this segment triple is set be masked as well.
 
AutomatonCellgetAutomatonCell () const
 Mutable getter for the automaton cell.
 

Private Attributes

const CDCAxialSegment2D * m_startSegment
 Reference to the axial segment in the start of the triple.
 
const CDCStereoSegment2Dm_middleSegment
 Reference to the stereo segment in the middle of the triple.
 
const CDCAxialSegment2D * m_endSegment
 Reference to the axial segment in the start of the triple.
 
CDCTrajectory3D m_trajectory3D
 Memory of the linear trajectory in the sz direction associated with the triple.
 
AutomatonCell m_automatonCell
 Automaton cell associated with the pair of segments.
 

Friends

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

Detailed Description

Class representing a triple of reconstructed segments in adjacent superlayer.

Definition at line 32 of file CDCSegmentTriple.h.

Constructor & Destructor Documentation

◆ CDCSegmentTriple() [1/5]

Default constructor for ROOT compatibility.

Definition at line 30 of file CDCSegmentTriple.cc.

31 : m_startSegment(nullptr)
32 , m_middleSegment(nullptr)
33 , m_endSegment(nullptr)
34{
35}
const CDCAxialSegment2D * m_startSegment
Reference to the axial segment in the start of the triple.
const CDCStereoSegment2D * m_middleSegment
Reference to the stereo segment in the middle of the triple.
const CDCAxialSegment2D * m_endSegment
Reference to the axial segment in the start of the triple.

◆ CDCSegmentTriple() [2/5]

CDCSegmentTriple ( const CDCAxialSegment2D * startSegment,
const CDCAxialSegment2D * endSegment )

Constructor taking two axial segments leaving the middle stereo segment set to null pointer.

Definition at line 37 of file CDCSegmentTriple.cc.

39 : m_startSegment(startSegment)
40 , m_middleSegment(nullptr)
41 , m_endSegment(endSegment)
42{
43}

◆ CDCSegmentTriple() [3/5]

CDCSegmentTriple ( const CDCAxialSegmentPair & segmentPair)
explicit

Constructor taking two axial segments leaving the middle stereo segment set to null pointer.

Definition at line 45 of file CDCSegmentTriple.cc.

46 : m_startSegment(segmentPair.getStartSegment())
47 , m_middleSegment(nullptr)
48 , m_endSegment(segmentPair.getEndSegment())
49{
50}
const CDCAxialSegment2D * getEndSegment() const
Getter for the end segment.
const CDCAxialSegment2D * getStartSegment() const
Getter for the start segment.

◆ CDCSegmentTriple() [4/5]

CDCSegmentTriple ( const CDCAxialSegment2D * startSegment,
const CDCStereoSegment2D * middleSegment,
const CDCAxialSegment2D * endSegment )

Constructor taking the three segments the triple shall be made of.

Definition at line 52 of file CDCSegmentTriple.cc.

55 : m_startSegment(startSegment)
56 , m_middleSegment(middleSegment)
57 , m_endSegment(endSegment)
58{
59 B2ASSERT("CDCSegmentTriple initialized with nullptr as start segment", startSegment);
60 B2ASSERT("CDCSegmentTriple initialized with nullptr as middle segment", middleSegment);
61 B2ASSERT("CDCSegmentTriple initialized with nullptr as end segment", endSegment);
62}

◆ CDCSegmentTriple() [5/5]

CDCSegmentTriple ( const CDCAxialSegment2D * startSegment,
const CDCStereoSegment2D * middleSegment,
const CDCAxialSegment2D * endSegment,
const CDCTrajectory3D & trajectory3D )

Constructor taking the three segments the triple shall be made of and the two dimensional and sz trajectory.

Definition at line 64 of file CDCSegmentTriple.cc.

68 : m_startSegment(startSegment)
69 , m_middleSegment(middleSegment)
70 , m_endSegment(endSegment)
71 , m_trajectory3D(trajectory3D)
72{
73 B2ASSERT("CDCSegmentTriple initialized with nullptr as start segment", startSegment);
74 B2ASSERT("CDCSegmentTriple initialized with nullptr as middle segment", middleSegment);
75 B2ASSERT("CDCSegmentTriple initialized with nullptr as end segment", endSegment);
76}
CDCTrajectory3D m_trajectory3D
Memory of the linear trajectory in the sz direction associated with the triple.

Member Function Documentation

◆ checkSegments()

bool checkSegments ( ) const
inline

Checks the references to the contained three segment for nullptrs.

Definition at line 85 of file CDCSegmentTriple.h.

86 {
87 return not(getStartSegment() == nullptr) and not(m_middleSegment == nullptr) and
88 not(m_endSegment == nullptr);
89 }

◆ clearTrajectory3D()

void clearTrajectory3D ( ) const
inline

Clears the three dimensional helix trajectory.

Definition at line 155 of file CDCSegmentTriple.h.

156 {
157 m_trajectory3D.clear();
158 }

◆ getAutomatonCell()

AutomatonCell & getAutomatonCell ( ) const
inline

Mutable getter for the automaton cell.

Definition at line 170 of file CDCSegmentTriple.h.

171 {
172 return m_automatonCell;
173 }

◆ getEndISuperLayer()

ISuperLayer getEndISuperLayer ( ) const

Getter for the superlayer id of the end segment.

Definition at line 88 of file CDCSegmentTriple.cc.

89{
91}
const CDCAxialSegment2D * getEndSegment() const
Getter for the end axial segment.
static ISuperLayer getFrom(const T &t)
Returns the superlayer of an object.

◆ getEndSegment()

const CDCAxialSegment2D * getEndSegment ( ) const
inline

Getter for the end axial segment.

Definition at line 125 of file CDCSegmentTriple.h.

126 {
127 return m_endSegment;
128 }

◆ getMiddleISuperLayer()

ISuperLayer getMiddleISuperLayer ( ) const

Getter for the superlayer id of the middle segment.

Definition at line 83 of file CDCSegmentTriple.cc.

84{
86}
const CDCStereoSegment2D * getMiddleSegment() const
Getter for the middle stereo segment.

◆ getMiddleSegment()

const CDCStereoSegment2D * getMiddleSegment ( ) const
inline

Getter for the middle stereo segment.

Definition at line 113 of file CDCSegmentTriple.h.

114 {
115 return m_middleSegment;
116 }

◆ getStartISuperLayer()

ISuperLayer getStartISuperLayer ( ) const

Getter for the superlayer id of the start segment.

Definition at line 78 of file CDCSegmentTriple.cc.

79{
81}
const CDCAxialSegment2D * getStartSegment() const
Getter for the start axial segment.

◆ getStartSegment()

const CDCAxialSegment2D * getStartSegment ( ) const
inline

Getter for the start axial segment.

Definition at line 101 of file CDCSegmentTriple.h.

102 {
103 return m_startSegment;
104 }

◆ getTrajectory2D()

CDCTrajectory2D getTrajectory2D ( ) const

Getter for the circular trajectory in the xy direction.

Definition at line 98 of file CDCSegmentTriple.cc.

99{
101}
const CDCTrajectory3D & getTrajectory3D() const
Getter for the three dimensional helix trajectory.
CDCTrajectory2D getTrajectory2D() const
Getter for the two dimensional trajectory.

◆ getTrajectory3D()

const CDCTrajectory3D & getTrajectory3D ( ) const
inline

Getter for the three dimensional helix trajectory.

Definition at line 143 of file CDCSegmentTriple.h.

144 {
145 return m_trajectory3D;
146 }

◆ getTrajectorySZ()

CDCTrajectorySZ getTrajectorySZ ( ) const

Getter for the linear trajectory in the sz direction.

Definition at line 93 of file CDCSegmentTriple.cc.

94{
96}
CDCTrajectorySZ getTrajectorySZ() const
Getter for the sz trajectory.

◆ operator<()

bool operator< ( CDCSegmentTriple const & rhs) const
inline

Total ordering scheme based on the two axial segments first and the stereo segments second.

Definition at line 65 of file CDCSegmentTriple.h.

66 {
67 return
68 std::tie(m_startSegment, m_middleSegment, m_endSegment) <
69 std::tie(rhs.m_startSegment, rhs.m_middleSegment, rhs.m_endSegment);
70 }

◆ operator==()

bool operator== ( CDCSegmentTriple const & rhs) const
inline

Equality comparison based on the pointers to the stored segments.

Definition at line 57 of file CDCSegmentTriple.h.

58 {
59 return
60 std::tie(m_startSegment, m_middleSegment, m_endSegment) ==
61 std::tie(rhs.m_startSegment, rhs.m_middleSegment, rhs.m_endSegment);
62 }

◆ receiveMaskedFlag()

void receiveMaskedFlag ( ) const

If one of the contained segments is marked as masked this segment triple is set be masked as well.

Definition at line 121 of file CDCSegmentTriple.cc.

122{
123 const bool fromHits = true;
124 getStartSegment()->receiveMaskedFlag(fromHits);
125 getMiddleSegment()->receiveMaskedFlag(fromHits);
126 getEndSegment()->receiveMaskedFlag(fromHits);
127
128 if (getStartSegment()->getAutomatonCell().hasMaskedFlag() or
129 getMiddleSegment()->getAutomatonCell().hasMaskedFlag() or
130 getEndSegment()->getAutomatonCell().hasMaskedFlag()) {
131
133 }
134}
void setMaskedFlag(bool setTo=true)
Sets the masked flag to the given value. Default value true.
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.

◆ setAndForwardMaskedFlag()

void setAndForwardMaskedFlag ( ) const

Sets the masked flag of the segment triple's automaton cell. Also forward the masked to the contained segments and the contained wire hits.

Definition at line 112 of file CDCSegmentTriple.cc.

113{
115 const bool toHits = true;
116 getStartSegment()->setAndForwardMaskedFlag(toHits);
117 getMiddleSegment()->setAndForwardMaskedFlag(toHits);
118 getEndSegment()->setAndForwardMaskedFlag(toHits);
119}

◆ setEndSegment()

void setEndSegment ( const CDCAxialSegment2D * endSegment)
inline

Setter for the end axial segment.

Definition at line 131 of file CDCSegmentTriple.h.

132 {
133 m_endSegment = endSegment;
134 }

◆ setMiddleSegment()

void setMiddleSegment ( const CDCStereoSegment2D * middleSegment)
inline

Setter for the middle stereo segment.

Definition at line 119 of file CDCSegmentTriple.h.

120 {
121 m_middleSegment = middleSegment;
122 }

◆ setStartSegment()

void setStartSegment ( const CDCAxialSegment2D * startSegment)
inline

Setter for the start axial segment.

Definition at line 107 of file CDCSegmentTriple.h.

108 {
109 m_startSegment = startSegment;
110 }

◆ setTrajectory3D()

void setTrajectory3D ( const CDCTrajectory3D & trajectory3D) const
inline

Setter for the three dimensional helix trajectory.

Definition at line 149 of file CDCSegmentTriple.h.

150 {
151 m_trajectory3D = trajectory3D;
152 }

◆ unsetAndForwardMaskedFlag()

void unsetAndForwardMaskedFlag ( ) const

Unsets the masked flag of the segment triple's automaton cell, of the contained segments and of the contained wire hits.

Definition at line 103 of file CDCSegmentTriple.cc.

104{
106 const bool toHits = true;
107 getStartSegment()->unsetAndForwardMaskedFlag(toHits);
108 getMiddleSegment()->unsetAndForwardMaskedFlag(toHits);
109 getEndSegment()->unsetAndForwardMaskedFlag(toHits);
110}
void unsetMaskedFlag()
Resets the masked flag to false.

Friends And Related Symbol Documentation

◆ operator< [1/2]

bool operator< ( CDCSegmentTriple const & segmentTriple,
const CDCAxialSegment2D * axialSegment )
friend

Define reconstructed segments and segment triples as coaligned on the start segment.

Definition at line 73 of file CDCSegmentTriple.h.

74 {
75 return segmentTriple.getStartSegment() < axialSegment;
76 }

◆ operator< [2/2]

bool operator< ( const CDCAxialSegment2D * axialSegment,
CDCSegmentTriple const & segmentTriple )
friend

Define reconstructed segments and segment triples as coaligned on the start segment.

Definition at line 79 of file CDCSegmentTriple.h.

80 {
81 return axialSegment < segmentTriple.getStartSegment();
82 }

Member Data Documentation

◆ m_automatonCell

AutomatonCell m_automatonCell
mutableprivate

Automaton cell associated with the pair of segments.

Definition at line 189 of file CDCSegmentTriple.h.

◆ m_endSegment

const CDCAxialSegment2D* m_endSegment
private

Reference to the axial segment in the start of the triple.

Definition at line 183 of file CDCSegmentTriple.h.

◆ m_middleSegment

const CDCStereoSegment2D* m_middleSegment
private

Reference to the stereo segment in the middle of the triple.

Definition at line 180 of file CDCSegmentTriple.h.

◆ m_startSegment

const CDCAxialSegment2D* m_startSegment
private

Reference to the axial segment in the start of the triple.

Definition at line 177 of file CDCSegmentTriple.h.

◆ m_trajectory3D

CDCTrajectory3D m_trajectory3D
mutableprivate

Memory of the linear trajectory in the sz direction associated with the triple.

Definition at line 186 of file CDCSegmentTriple.h.


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