Belle II Software development
CDCSegment3D Class Reference

A segment consisting of three dimensional reconstructed hits. More...

#include <CDCSegment3D.h>

Inheritance diagram for CDCSegment3D:
CDCSegment< CDCRecoHit3D >

Public Member Functions

CDCSegment2D stereoProjectToRef () const
 Constructs a two dimensional segment by carrying out the stereo ! projection to the wire reference postion.
 
AutomatonCellgetAutomatonCell () const
 Mutable getter for the automaton cell.
 
AutomatonCelloperator-> () const
 Indirection to the automaton cell for easier access to the flags.
 
void unsetAndForwardMaskedFlag (bool toHits=true) const
 Unset the masked flag of the automaton cell of this segment and of all contained wire hits.
 
void setAndForwardMaskedFlag (bool toHits=true) const
 Set the masked flag of the automaton cell of this segment and forward the masked flag to all contained wire hits.
 
void receiveMaskedFlag (bool fromHits=true) const
 Check all contained wire hits if one has the masked flag.
 
CDCTrajectory3DgetTrajectory3D () const
 Getter for the two dimensional trajectory fitted to the segment.
 
void setTrajectory3D (const CDCTrajectory3D &trajectory3D) const
 Setter for the two dimensional trajectory fitted to the segment.
 
EStereoKind getStereoKind () const
 Returns the common stereo type of all hits.
 
bool isAxial () const
 Indicator if the underlying wires are axial.
 
ISuperLayer getISuperLayer () const
 Returns the common super layer id of all stored tracking hits.
 
const std::vector< CDCRecoHit3D > & items () const
 Legacy accessor for the items of the segments, still used in some corners.
 
CDCTrajectory2DgetTrajectory2D () const
 Getter for the two dimensional trajectory fitted to the segment.
 
void setTrajectory2D (const CDCTrajectory2D &trajectory2D) const
 Setter for the two dimensional trajectory fitted to the segment.
 
void sortByArcLength2D ()
 Sort the recoHits according to their perpS information.
 
double getAliasScore () const
 Getter for the flag that this segment may have an aliased version.
 
void setAliasScore (double aliasScore)
 Setter for the flag that this segment may have an aliased version.
 

Static Public Member Functions

static CDCSegment3D reconstruct (const CDCSegment2D &segment2D, const CDCTrajectory2D &trajectory2D)
 Reconstructs a two dimensional stereo segment by shifting each hit onto the given two dimensional trajectory.
 

Public Attributes

elements
 STL member.
 

Private Attributes

AutomatonCell m_automatonCell
 Memory for the automaton cell.
 
CDCTrajectory3D m_trajectory3D
 Memory for the three dimensional trajectory fitted to this segment.
 
CDCTrajectory2D m_trajectory2D
 Memory for the two dimensional trajectory fitted to this segment.
 
double m_aliasScore
 Boolean flag to indicate that this segment has a valid alias version.
 

Detailed Description

A segment consisting of three dimensional reconstructed hits.

Definition at line 26 of file CDCSegment3D.h.

Member Function Documentation

◆ getAliasScore()

double getAliasScore ( ) const
inlineinherited

Getter for the flag that this segment may have an aliased version.

Definition at line 90 of file CDCSegment.h.

91 {
92 return m_aliasScore;
93 }
double m_aliasScore
Boolean flag to indicate that this segment has a valid alias version.
Definition: CDCSegment.h:106

◆ getAutomatonCell()

AutomatonCell & getAutomatonCell ( ) const
inline

Mutable getter for the automaton cell.

Definition at line 40 of file CDCSegment3D.h.

41 {
42 return m_automatonCell;
43 }
AutomatonCell m_automatonCell
Memory for the automaton cell.
Definition: CDCSegment3D.h:88

◆ getISuperLayer()

ISuperLayer getISuperLayer ( ) const
inlineinherited

Returns the common super layer id of all stored tracking hits.

This checks if all items are located in the same superlayer and returns the superlayer id of the later. Returns ISuperLayerUtil::c_Invalid, if the superlayer is not shared among the hits.

Definition at line 57 of file CDCSegment.h.

58 {
59 return ISuperLayerUtil::getFrom(this->front());
60 }

◆ getStereoKind()

EStereoKind getStereoKind ( ) const
inlineinherited

Returns the common stereo type of all hits.

This checks if all tracking hits are located in the same superlayer and
returns the stereo type of the later. Returns EStereoKind::c_Invalid if the superlayer
is not shared among the tracking hits.

Definition at line 39 of file CDCSegment.h.

40 {
41 return ISuperLayerUtil::getStereoKind(getISuperLayer());
42 }
ISuperLayer getISuperLayer() const
Returns the common super layer id of all stored tracking hits.
Definition: CDCSegment.h:57

◆ getTrajectory2D()

CDCTrajectory2D & getTrajectory2D ( ) const
inlineinherited

Getter for the two dimensional trajectory fitted to the segment.

Definition at line 69 of file CDCSegment.h.

70 {
71 return m_trajectory2D;
72 }
CDCTrajectory2D m_trajectory2D
Memory for the two dimensional trajectory fitted to this segment.
Definition: CDCSegment.h:103

◆ getTrajectory3D()

CDCTrajectory3D & getTrajectory3D ( ) const
inline

Getter for the two dimensional trajectory fitted to the segment.

Definition at line 71 of file CDCSegment3D.h.

72 {
73 return m_trajectory3D;
74 }
CDCTrajectory3D m_trajectory3D
Memory for the three dimensional trajectory fitted to this segment.
Definition: CDCSegment3D.h:91

◆ isAxial()

bool isAxial ( ) const
inlineinherited

Indicator if the underlying wires are axial.

Definition at line 45 of file CDCSegment.h.

46 {
47 return getStereoKind() == EStereoKind::c_Axial;
48 }
EStereoKind getStereoKind() const
Returns the common stereo type of all hits.
Definition: CDCSegment.h:39

◆ items()

const std::vector< CDCRecoHit3D > & items ( ) const
inlineinherited

Legacy accessor for the items of the segments, still used in some corners.

Definition at line 63 of file CDCSegment.h.

64 {
65 return *this;
66 }

◆ operator->()

AutomatonCell * operator-> ( ) const
inline

Indirection to the automaton cell for easier access to the flags.

Definition at line 46 of file CDCSegment3D.h.

47 {
48 return &m_automatonCell;
49 }

◆ receiveMaskedFlag()

void receiveMaskedFlag ( bool  fromHits = true) const

Check all contained wire hits if one has the masked flag.

Set the masked flag of this segment in case at least one of the contained wire hits is flagged as masked.

Definition at line 62 of file CDCSegment3D.cc.

63{
64 if (not fromHits) return;
65 int nMasked = 0 ;
66 int nNotMasked = 0;
67 for (const CDCRecoHit3D& recoHit3D : *this) {
68 const CDCWireHit& wireHit = recoHit3D.getWireHit();
69 if (wireHit.getAutomatonCell().hasMaskedFlag()) {
70 ++nMasked;
71 } else {
72 ++nNotMasked;
73 }
74 }
75
76 const int nTolerance = 2;
77 if (nMasked > nNotMasked or nMasked >= nTolerance) {
79 }
80}
void setMaskedFlag(bool setTo=true)
Sets the masked flag to the given value. Default value true.
bool hasMaskedFlag() const
Gets the current state of the masked marker flag.
Class representing a three dimensional reconstructed hit.
Definition: CDCRecoHit3D.h:52
const CDCWireHit & getWireHit() const
Getter for the wire hit.
Definition: CDCRecoHit3D.h:238
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCSegment3D.h:40
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
Definition: CDCWireHit.h:286

◆ reconstruct()

CDCSegment3D reconstruct ( const CDCSegment2D segment2D,
const CDCTrajectory2D trajectory2D 
)
static

Reconstructs a two dimensional stereo segment by shifting each hit onto the given two dimensional trajectory.

Definition at line 20 of file CDCSegment3D.cc.

22{
23 CDCSegment3D segment3D;
24 for (const CDCRecoHit2D& recoHit2D : segment2D) {
25 CDCRecoHit3D recoHit3D = CDCRecoHit3D::reconstruct(recoHit2D, trajectory2D);
26 segment3D.push_back(recoHit3D);
27 }
28 segment3D.setAliasScore(segment2D.getAliasScore());
29 return segment3D;
30}
Class representing a two dimensional reconstructed hit in the central drift chamber.
Definition: CDCRecoHit2D.h:47
static CDCRecoHit3D reconstruct(const CDCRecoHit2D &recoHit2D, const CDCTrajectory2D &trajectory2D)
Reconstructs the three dimensional hit from the two dimensional and the two dimensional trajectory.
Definition: CDCRecoHit3D.cc:56
A segment consisting of three dimensional reconstructed hits.
Definition: CDCSegment3D.h:26
void setAliasScore(double aliasScore)
Setter for the flag that this segment may have an aliased version.
Definition: CDCSegment.h:96

◆ setAliasScore()

void setAliasScore ( double  aliasScore)
inlineinherited

Setter for the flag that this segment may have an aliased version.

Definition at line 96 of file CDCSegment.h.

97 {
98 m_aliasScore = aliasScore;
99 }

◆ setAndForwardMaskedFlag()

void setAndForwardMaskedFlag ( bool  toHits = true) const

Set the masked flag of the automaton cell of this segment and forward the masked flag to all contained wire hits.

Definition at line 52 of file CDCSegment3D.cc.

53{
55 if (not toHits) return;
56 for (const CDCRecoHit3D& recoHit3D : *this) {
57 const CDCWireHit& wireHit = recoHit3D.getWireHit();
59 }
60}

◆ setTrajectory2D()

void setTrajectory2D ( const CDCTrajectory2D trajectory2D) const
inlineinherited

Setter for the two dimensional trajectory fitted to the segment.

Definition at line 75 of file CDCSegment.h.

76 {
77 m_trajectory2D = trajectory2D;
78 }

◆ setTrajectory3D()

void setTrajectory3D ( const CDCTrajectory3D trajectory3D) const
inline

Setter for the two dimensional trajectory fitted to the segment.

Definition at line 77 of file CDCSegment3D.h.

78 {
79 m_trajectory3D = trajectory3D;
80 }

◆ sortByArcLength2D()

void sortByArcLength2D ( )
inlineinherited

Sort the recoHits according to their perpS information.

Definition at line 81 of file CDCSegment.h.

82 {
83 // cppcheck-suppress constParameter
84 std::stable_sort(this->begin(), this->end(), [](const T & recoHit, const T & otherRecoHit) {
85 return recoHit.getArcLength2D() < otherRecoHit.getArcLength2D();
86 });
87 }

◆ stereoProjectToRef()

CDCSegment2D stereoProjectToRef ( ) const

Constructs a two dimensional segment by carrying out the stereo ! projection to the wire reference postion.

Note : no fitting information is transported to the resulting segment.

Definition at line 32 of file CDCSegment3D.cc.

33{
34 CDCSegment2D result;
35 for (const CDCRecoHit3D& recoHit3D : *this) {
36 result.push_back(recoHit3D.stereoProjectToRef());
37 }
38 result.setAliasScore(getAliasScore());
39 return result;
40}
CDCRecoHit2D stereoProjectToRef() const
Constructs a two dimensional reconstructed hit by carrying out the stereo ! projection to the wire re...
A reconstructed sequence of two dimensional hits in one super layer.
Definition: CDCSegment2D.h:39
double getAliasScore() const
Getter for the flag that this segment may have an aliased version.
Definition: CDCSegment.h:90

◆ unsetAndForwardMaskedFlag()

void unsetAndForwardMaskedFlag ( bool  toHits = true) const

Unset the masked flag of the automaton cell of this segment and of all contained wire hits.

Definition at line 42 of file CDCSegment3D.cc.

43{
45 if (not toHits) return;
46 for (const CDCRecoHit3D& recoHit3D : *this) {
47 const CDCWireHit& wireHit = recoHit3D.getWireHit();
49 }
50}
void unsetMaskedFlag()
Resets the masked flag to false.

Member Data Documentation

◆ m_aliasScore

double m_aliasScore
privateinherited

Boolean flag to indicate that this segment has a valid alias version.

Definition at line 106 of file CDCSegment.h.

◆ m_automatonCell

AutomatonCell m_automatonCell
mutableprivate

Memory for the automaton cell.

It is declared mutable because it can vary rather freely despite of the hit content might be required fixed.

Definition at line 88 of file CDCSegment3D.h.

◆ m_trajectory2D

CDCTrajectory2D m_trajectory2D
mutableprivateinherited

Memory for the two dimensional trajectory fitted to this segment.

Definition at line 103 of file CDCSegment.h.

◆ m_trajectory3D

CDCTrajectory3D m_trajectory3D
mutableprivate

Memory for the three dimensional trajectory fitted to this segment.

Definition at line 91 of file CDCSegment3D.h.


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