Belle II Software  release-08-01-10
CDCSegmentTriple.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include <tracking/trackFindingCDC/eventdata/tracks/CDCSegmentTriple.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/tracks/CDCAxialSegmentPair.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
13 #include <tracking/trackFindingCDC/eventdata/segments/CDCAxialSegment2D.h>
14 #include <tracking/trackFindingCDC/eventdata/segments/CDCStereoSegment2D.h>
15 
16 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectorySZ.h>
17 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory2D.h>
18 #include <tracking/trackFindingCDC/eventdata/trajectories/CDCTrajectory3D.h>
19 
20 #include <tracking/trackFindingCDC/topology/ISuperLayer.h>
21 
22 #include <tracking/trackFindingCDC/ca/AutomatonCell.h>
23 
24 #include <framework/logging/Logger.h>
25 
26 using namespace Belle2;
27 using namespace TrackFindingCDC;
28 
30  : m_startSegment(nullptr)
31  , m_middleSegment(nullptr)
32  , m_endSegment(nullptr)
33 {
34 }
35 
37  const CDCAxialSegment2D* endSegment)
38  : m_startSegment(startSegment)
39  , m_middleSegment(nullptr)
40  , m_endSegment(endSegment)
41 {
42 }
43 
45  : m_startSegment(segmentPair.getStartSegment())
46  , m_middleSegment(nullptr)
47  , m_endSegment(segmentPair.getEndSegment())
48 {
49 }
50 
52  const CDCStereoSegment2D* middleSegment,
53  const CDCAxialSegment2D* endSegment)
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 }
62 
64  const CDCStereoSegment2D* middleSegment,
65  const CDCAxialSegment2D* endSegment,
66  const CDCTrajectory3D& trajectory3D)
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 }
76 
78 {
80 }
81 
83 {
85 }
86 
88 {
90 }
91 
93 {
95 }
96 
98 {
100 }
101 
103 {
105  const bool toHits = true;
106  getStartSegment()->unsetAndForwardMaskedFlag(toHits);
107  getMiddleSegment()->unsetAndForwardMaskedFlag(toHits);
108  getEndSegment()->unsetAndForwardMaskedFlag(toHits);
109 }
110 
112 {
114  const bool toHits = true;
115  getStartSegment()->setAndForwardMaskedFlag(toHits);
116  getMiddleSegment()->setAndForwardMaskedFlag(toHits);
117  getEndSegment()->setAndForwardMaskedFlag(toHits);
118 }
119 
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.
void unsetMaskedFlag()
Resets the masked flag to false.
Class representing a pair of reconstructed axial segements in adjacent superlayer.
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
const CDCAxialSegment2D * getStartSegment() const
Getter for the start axial segment.
ISuperLayer getMiddleISuperLayer() const
Getter for the superlayer id of the middle segment.
ISuperLayer getStartISuperLayer() const
Getter for the superlayer id of the start segment.
CDCTrajectory2D getTrajectory2D() const
Getter for the circular trajectory in the xy direction.
CDCSegmentTriple()
Default constructor for ROOT compatability.
void setAndForwardMaskedFlag() const
Sets the masked flag of the segment triple's automaton cell. Also forward the masked to the contained...
const CDCTrajectory3D & getTrajectory3D() const
Getter for 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 c...
const CDCAxialSegment2D * getEndSegment() const
Getter for the end axial segment.
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
CDCTrajectorySZ getTrajectorySZ() const
Getter for the linear trajectory in the sz direction.
const CDCStereoSegment2D * getMiddleSegment() const
Getter for the middle stereo segment.
ISuperLayer getEndISuperLayer() const
Getter for the superlayer id of the end segment.
void receiveMaskedFlag() const
If one of the contained segments is marked as masked this segment triple is set be masked as well.
Particle trajectory as it is seen in xy projection represented as a circle.
Particle full three dimensional trajectory.
CDCTrajectory2D getTrajectory2D() const
Getter for the two dimensional trajectory.
CDCTrajectorySZ getTrajectorySZ() const
Getter for the sz trajectory.
Linear trajectory in sz space.
Abstract base class for different kinds of events.
static ISuperLayer getFrom(const T &t)
Returns the superlayer of an object.
Definition: ISuperLayer.h:102