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.
 
ISuperLayer getStartISuperLayer () const
 Getter for the superlayer id of the start segment.
 
ISuperLayer getMiddleISuperLayer () const
 Getter for the superlayer id of the middle segment.
 
ISuperLayer getEndISuperLayer () const
 Getter for the superlayer id of the end segment.
 
const CDCAxialSegment2DgetStartSegment () 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 CDCAxialSegment2DgetEndSegment () 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 CDCAxialSegment2Dm_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 CDCAxialSegment2Dm_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 29 of file CDCSegmentTriple.cc.

30 : m_startSegment(nullptr)
31 , m_middleSegment(nullptr)
32 , m_endSegment(nullptr)
33{
34}
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 36 of file CDCSegmentTriple.cc.

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

◆ 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 44 of file CDCSegmentTriple.cc.

45 : m_startSegment(segmentPair.getStartSegment())
46 , m_middleSegment(nullptr)
47 , m_endSegment(segmentPair.getEndSegment())
48{
49}
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 51 of file CDCSegmentTriple.cc.

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

◆ 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 63 of file CDCSegmentTriple.cc.

67 : m_startSegment(startSegment)
68 , m_middleSegment(middleSegment)
69 , m_endSegment(endSegment)
70 , m_trajectory3D(trajectory3D)
71{
72 B2ASSERT("CDCSegmentTriple initialized with nullptr as start segment", startSegment);
73 B2ASSERT("CDCSegmentTriple initialized with nullptr as middle segment", middleSegment);
74 B2ASSERT("CDCSegmentTriple initialized with nullptr as end segment", endSegment);
75}
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 }
const CDCAxialSegment2D * getStartSegment() const
Getter for the start axial segment.

◆ clearTrajectory3D()

void clearTrajectory3D ( ) const
inline

Clears the three dimensional helix trajectory.

Definition at line 155 of file CDCSegmentTriple.h.

156 {
158 }
void clear()
Clears all information from this trajectoy.

◆ 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 }
AutomatonCell m_automatonCell
Automaton cell associated with the pair of segments.

◆ getEndISuperLayer()

ISuperLayer getEndISuperLayer ( ) const

Getter for the superlayer id of the end segment.

Definition at line 87 of file CDCSegmentTriple.cc.

88{
90}
const CDCAxialSegment2D * getEndSegment() const
Getter for the end axial segment.
static ISuperLayer getFrom(const T &t)
Returns the superlayer of an object.
Definition: ISuperLayer.h:102

◆ 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 82 of file CDCSegmentTriple.cc.

83{
85}
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 77 of file CDCSegmentTriple.cc.

◆ 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 97 of file CDCSegmentTriple.cc.

98{
100}
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 92 of file CDCSegmentTriple.cc.

93{
95}
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
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
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 120 of file CDCSegmentTriple.cc.

121{
122 const bool fromHits = true;
123 getStartSegment()->receiveMaskedFlag(fromHits);
124 getMiddleSegment()->receiveMaskedFlag(fromHits);
125 getEndSegment()->receiveMaskedFlag(fromHits);
126
127 if (getStartSegment()->getAutomatonCell().hasMaskedFlag() or
128 getMiddleSegment()->getAutomatonCell().hasMaskedFlag() or
129 getEndSegment()->getAutomatonCell().hasMaskedFlag()) {
130
132 }
133}
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 111 of file CDCSegmentTriple.cc.

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

◆ 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 102 of file CDCSegmentTriple.cc.

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

Friends And Related Function 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: