Belle II Software  release-05-02-19
CDCSegmentTriple.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2012 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/eventdata/segments/CDCStereoSegment2D.h>
13 #include <tracking/trackFindingCDC/eventdata/segments/CDCAxialSegment2D.h>
14 
15 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory3D.h>
16 
17 #include <tracking/trackFindingCDC/topology/ISuperLayer.h>
18 
19 #include <tracking/trackFindingCDC/ca/AutomatonCell.h>
20 
21 #include <tuple>
22 
23 namespace Belle2 {
28  namespace TrackFindingCDC {
29  class CDCAxialSegmentPair;
30  class CDCTrajectorySZ;
31  class CDCTrajectory2D;
32 
34  class CDCSegmentTriple {
35  public:
36 
39 
41  CDCSegmentTriple(const CDCAxialSegment2D* startSegment,
42  const CDCAxialSegment2D* endSegment);
43 
45  explicit CDCSegmentTriple(const CDCAxialSegmentPair& segmentPair);
46 
48  CDCSegmentTriple(const CDCAxialSegment2D* startSegment,
49  const CDCStereoSegment2D* middleSegment,
50  const CDCAxialSegment2D* endSegment);
51 
53  CDCSegmentTriple(const CDCAxialSegment2D* startSegment,
54  const CDCStereoSegment2D* middleSegment,
55  const CDCAxialSegment2D* endSegment,
56  const CDCTrajectory3D& trajectory3D);
57 
59  bool operator==(CDCSegmentTriple const& rhs) const
60  {
61  return
63  std::tie(rhs.m_startSegment, rhs.m_middleSegment, rhs.m_endSegment);
64  }
65 
67  bool operator<(CDCSegmentTriple const& rhs) const
68  {
69  return
71  std::tie(rhs.m_startSegment, rhs.m_middleSegment, rhs.m_endSegment);
72  }
73 
75  friend bool operator<(CDCSegmentTriple const& segmentTriple, const CDCAxialSegment2D* axialSegment)
76  {
77  return segmentTriple.getStartSegment() < axialSegment;
78  }
79 
81  friend bool operator<(const CDCAxialSegment2D* axialSegment, CDCSegmentTriple const& segmentTriple)
82  {
83  return axialSegment < segmentTriple.getStartSegment();
84  }
85 
87  bool checkSegments() const
88  {
89  return not(getStartSegment() == nullptr) and not(m_middleSegment == nullptr) and
90  not(m_endSegment == nullptr);
91  }
92 
94  ISuperLayer getStartISuperLayer() const;
95 
97  ISuperLayer getMiddleISuperLayer() const;
98 
100  ISuperLayer getEndISuperLayer() const;
101 
103  const CDCAxialSegment2D* getStartSegment() const
104  {
105  return m_startSegment;
106  }
107 
109  void setStartSegment(const CDCAxialSegment2D* startSegment)
110  {
111  m_startSegment = startSegment;
112  }
113 
115  const CDCStereoSegment2D* getMiddleSegment() const
116  {
118  }
119 
121  void setMiddleSegment(const CDCStereoSegment2D* middleSegment)
122  {
123  m_middleSegment = middleSegment;
124  }
125 
127  const CDCAxialSegment2D* getEndSegment() const
128  {
129  return m_endSegment;
130  }
131 
133  void setEndSegment(const CDCAxialSegment2D* endSegment)
134  {
135  m_endSegment = endSegment;
136  }
137 
140 
143 
145  const CDCTrajectory3D& getTrajectory3D() const
146  {
147  return m_trajectory3D;
148  }
149 
151  void setTrajectory3D(const CDCTrajectory3D& trajectory3D) const
152  {
153  m_trajectory3D = trajectory3D;
154  }
155 
157  void clearTrajectory3D() const
158  {
160  }
161 
163  void unsetAndForwardMaskedFlag() const;
164 
166  void setAndForwardMaskedFlag() const;
167 
169  void receiveMaskedFlag() const;
170 
173  {
174  return m_automatonCell;
175  }
176 
177  private:
179  const CDCAxialSegment2D* m_startSegment;
180 
183 
186 
189 
192  };
193  }
195 }
Belle2::TrackFindingCDC::CDCSegmentTriple::receiveMaskedFlag
void receiveMaskedFlag() const
If one of the contained segments is marked as masked this segment triple is set be masked as well.
Definition: CDCSegmentTriple.cc:122
Belle2::TrackFindingCDC::CDCSegmentTriple::getStartSegment
const CDCAxialSegment2D * getStartSegment() const
Getter for the start axial segment.
Definition: CDCSegmentTriple.h:111
Belle2::TrackFindingCDC::CDCSegmentTriple::setEndSegment
void setEndSegment(const CDCAxialSegment2D *endSegment)
Setter for the end axial segment.
Definition: CDCSegmentTriple.h:141
Belle2::TrackFindingCDC::CDCSegmentTriple::m_endSegment
const CDCAxialSegment2D * m_endSegment
Reference to the axial segment in the start of the triple.
Definition: CDCSegmentTriple.h:193
Belle2::TrackFindingCDC::CDCSegmentTriple::m_startSegment
const CDCAxialSegment2D * m_startSegment
Reference to the axial segment in the start of the triple.
Definition: CDCSegmentTriple.h:187
Belle2::TrackFindingCDC::CDCSegmentTriple::getMiddleSegment
const CDCStereoSegment2D * getMiddleSegment() const
Getter for the middle stereo segment.
Definition: CDCSegmentTriple.h:123
Belle2::TrackFindingCDC::CDCSegmentTriple::setStartSegment
void setStartSegment(const CDCAxialSegment2D *startSegment)
Setter for the start axial segment.
Definition: CDCSegmentTriple.h:117
Belle2::TrackFindingCDC::CDCSegmentTriple::CDCSegmentTriple
CDCSegmentTriple()
Default constructor for ROOT compatability.
Definition: CDCSegmentTriple.cc:31
Belle2::TrackFindingCDC::CDCSegmentTriple::getEndISuperLayer
ISuperLayer getEndISuperLayer() const
Getter for the superlayer id of the end segment.
Definition: CDCSegmentTriple.cc:89
Belle2::TrackFindingCDC::CDCSegmentTriple::setTrajectory3D
void setTrajectory3D(const CDCTrajectory3D &trajectory3D) const
Setter for the three dimensional helix trajectory.
Definition: CDCSegmentTriple.h:159
Belle2::TrackFindingCDC::CDCSegmentTriple::getTrajectory3D
const CDCTrajectory3D & getTrajectory3D() const
Getter for the three dimensional helix trajectory.
Definition: CDCSegmentTriple.h:153
Belle2::TrackFindingCDC::CDCTrajectorySZ
Linear trajectory in sz space.
Definition: CDCTrajectorySZ.h:41
Belle2::TrackFindingCDC::CDCSegmentTriple::getEndSegment
const CDCAxialSegment2D * getEndSegment() const
Getter for the end axial segment.
Definition: CDCSegmentTriple.h:135
Belle2::TrackFindingCDC::CDCTrajectory2D
Particle trajectory as it is seen in xy projection represented as a circle.
Definition: CDCTrajectory2D.h:46
Belle2::TrackFindingCDC::CDCSegmentTriple::operator<
bool operator<(CDCSegmentTriple const &rhs) const
Total ordering sheme based on the two axial segments first and the stereo segments second.
Definition: CDCSegmentTriple.h:75
Belle2::TrackFindingCDC::CDCSegmentTriple::clearTrajectory3D
void clearTrajectory3D() const
Clears the three dimensional helix trajectory.
Definition: CDCSegmentTriple.h:165
Belle2::TrackFindingCDC::CDCSegmentTriple::unsetAndForwardMaskedFlag
void unsetAndForwardMaskedFlag() const
Unsets the masked flag of the segment triple's automaton cell, of the contained segments and of the c...
Definition: CDCSegmentTriple.cc:104
Belle2::TrackFindingCDC::CDCTrajectory3D::clear
void clear()
Clears all information from this trajectoy.
Definition: CDCTrajectory3D.h:132
Belle2::TrackFindingCDC::CDCAxialSegmentPair
Class representing a pair of reconstructed axial segements in adjacent superlayer.
Definition: CDCAxialSegmentPair.h:41
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::AutomatonCell
Cell used by the cellular automata.
Definition: AutomatonCell.h:39
Belle2::TrackFindingCDC::CDCSegmentTriple::setMiddleSegment
void setMiddleSegment(const CDCStereoSegment2D *middleSegment)
Setter for the middle stereo segment.
Definition: CDCSegmentTriple.h:129
Belle2::TrackFindingCDC::CDCSegmentTriple::operator==
bool operator==(CDCSegmentTriple const &rhs) const
Equality comparision based on the pointers to the stored segments.
Definition: CDCSegmentTriple.h:67
Belle2::TrackFindingCDC::CDCSegmentTriple::getStartISuperLayer
ISuperLayer getStartISuperLayer() const
Getter for the superlayer id of the start segment.
Definition: CDCSegmentTriple.cc:79
Belle2::TrackFindingCDC::CDCSegmentTriple::checkSegments
bool checkSegments() const
Checks the references to the contained three segment for nullptrs.
Definition: CDCSegmentTriple.h:95
Belle2::TrackFindingCDC::CDCSegmentTriple::getMiddleISuperLayer
ISuperLayer getMiddleISuperLayer() const
Getter for the superlayer id of the middle segment.
Definition: CDCSegmentTriple.cc:84
Belle2::TrackFindingCDC::CDCSegmentTriple::m_trajectory3D
CDCTrajectory3D m_trajectory3D
Memory of the linear trajectory in the sz direction assoziated with the triple.
Definition: CDCSegmentTriple.h:196
Belle2::TrackFindingCDC::CDCSegmentTriple::m_automatonCell
AutomatonCell m_automatonCell
Automaton cell assoziated with the pair of segments.
Definition: CDCSegmentTriple.h:199
Belle2::TrackFindingCDC::CDCSegmentTriple::setAndForwardMaskedFlag
void setAndForwardMaskedFlag() const
Sets the masked flag of the segment triple's automaton cell. Also forward the masked to the contained...
Definition: CDCSegmentTriple.cc:113
Belle2::TrackFindingCDC::CDCSegment2D
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:40
Belle2::TrackFindingCDC::CDCSegmentTriple::getAutomatonCell
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCSegmentTriple.h:180
Belle2::TrackFindingCDC::CDCSegmentTriple::m_middleSegment
const CDCStereoSegment2D * m_middleSegment
Reference to the stereo segment in the middle of the triple.
Definition: CDCSegmentTriple.h:190
Belle2::TrackFindingCDC::CDCSegmentTriple::getTrajectorySZ
CDCTrajectorySZ getTrajectorySZ() const
Getter for the linear trajectory in the sz direction.
Definition: CDCSegmentTriple.cc:94
Belle2::TrackFindingCDC::CDCTrajectory3D
Particle full three dimensional trajectory.
Definition: CDCTrajectory3D.h:47
Belle2::TrackFindingCDC::CDCSegmentTriple
Class representing a triple of reconstructed segements in adjacent superlayer.
Definition: CDCSegmentTriple.h:42
Belle2::TrackFindingCDC::CDCSegmentTriple::getTrajectory2D
CDCTrajectory2D getTrajectory2D() const
Getter for the circular trajectory in the xy direction.
Definition: CDCSegmentTriple.cc:99