Belle II Software development
CDCFacetSegment Class Reference

A segment consisting of adjacent facets. More...

#include <CDCFacetSegment.h>

Inheritance diagram for CDCFacetSegment:
CDCSegment< CDCFacet >

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< CDCFacet > & 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 CDCFacetSegment create (const CDCRLWireHitSegment &rlWireHitSegment)
 Construct a train of facets from the given oriented wire hits.
 

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 facets.

Definition at line 22 of file CDCFacetSegment.h.

Member Function Documentation

◆ create()

CDCFacetSegment create ( const CDCRLWireHitSegment rlWireHitSegment)
static

Construct a train of facets from the given oriented wire hits.

Definition at line 35 of file CDCFacetSegment.cc.

36{
37 CDCFacetSegment facetSegment;
38 size_t nRLWireHits = rlWireHitSegment.size();
39 if (nRLWireHits < 3) return facetSegment;
40
41 facetSegment.reserve(nRLWireHits - 2);
42
43 // Make tangents from pairs of hits along the segment.
44 transform_adjacent_triples(rlWireHitSegment.begin(),
45 rlWireHitSegment.end(),
46 back_inserter(facetSegment),
47 [](const CDCRLWireHit & firstRLWireHit,
48 const CDCRLWireHit & secondRLWireHit,
49 const CDCRLWireHit & thirdRLWireHit) {
50 return CDCFacet(firstRLWireHit, secondRLWireHit, thirdRLWireHit);
51 });
52
53 if (facetSegment.size() + 2 != rlWireHitSegment.size()) {
54 B2ERROR("Wrong number of facets created.");
55 }
56
57 facetSegment.setAliasScore(rlWireHitSegment.getAliasScore());
58 facetSegment.setTrajectory2D(rlWireHitSegment.getTrajectory2D());
59 return facetSegment;
60}
A segment consisting of adjacent facets.
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition: CDCFacet.h:32
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Definition: CDCRLWireHit.h:41
void setTrajectory2D(const CDCTrajectory2D &trajectory2D) const
Setter for the two dimensional trajectory fitted to the segment.
Definition: CDCSegment.h:75
CDCTrajectory2D & getTrajectory2D() const
Getter for the two dimensional trajectory fitted to the segment.
Definition: CDCSegment.h:69
void setAliasScore(double aliasScore)
Setter for the flag that this segment may have an aliased version.
Definition: CDCSegment.h:96
double getAliasScore() const
Getter for the flag that this segment may have an aliased version.
Definition: CDCSegment.h:90

◆ 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< CDCFacet > & 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: