Belle II Software development
CDCTangentSegment Class Reference

A segment consisting of adjacent tangents. More...

#include <CDCTangentSegment.h>

Inheritance diagram for CDCTangentSegment:
CDCSegment< CDCTangent >

Public Member Functions

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< CDCTangent > & 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 CDCTangentSegment condense (const std::vector< const CDCFacet * > &facetPath)
 Takes all distinct tangents from the facets in the path - Note! there is no particular order of the tangents in the segment.
 

Public Attributes

elements
 STL member.
 

Private Attributes

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 adjacent tangents.

Definition at line 24 of file CDCTangentSegment.h.

Member Function Documentation

◆ condense()

CDCTangentSegment condense ( const std::vector< const CDCFacet * > &  facetPath)
static

Takes all distinct tangents from the facets in the path - Note! there is no particular order of the tangents in the segment.

Definition at line 16 of file CDCTangentSegment.cc.

17{
18 CDCTangentSegment tangentSegment;
19
20 tangentSegment.reserve(facetPath.size() + 1);
21 if (not facetPath.empty()) {
22 for (const CDCFacet* ptrFacet : facetPath) {
23 if (not ptrFacet) continue;
24
25 const CDCFacet& facet = *ptrFacet;
26
27 tangentSegment.push_back(facet.getStartToMiddle());
28 //tangentSegment.push_back(facet.getStartToEnd());
29 //the alignement of the tangents does not play a major role here
30 }
31 tangentSegment.push_back(facetPath.back()->getMiddleToEnd());
32 }
33 return tangentSegment;
34
35}
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition: CDCFacet.h:32
CDCTangent getStartToMiddle() const
Getter for the tangential line including the hits from the first to the second hit.
Definition: CDCFacet.cc:125
A segment consisting of adjacent tangents.

◆ 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

◆ 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

◆ 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< CDCTangent > & 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 }

◆ 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 }

◆ 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 }

◆ 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 }

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_trajectory2D

CDCTrajectory2D m_trajectory2D
mutableprivateinherited

Memory for the two dimensional trajectory fitted to this segment.

Definition at line 103 of file CDCSegment.h.


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