Belle II Software development
CDCRLWireHitTriple Class Reference

Class representing a triple of neighboring wire hits. More...

#include <CDCRLWireHitTriple.h>

Inheritance diagram for CDCRLWireHitTriple:
CDCFacet

Classes

class  Shape
 Type for the different shapes of a triple of neighboring wire hits. More...
 

Public Member Functions

 CDCRLWireHitTriple ()=default
 Default constructor for ROOT.
 
 CDCRLWireHitTriple (const CDCRLWireHit &startRLWireHit, const CDCRLWireHit &middleRLWireHit, const CDCRLWireHit &endRLWireHit, int iCluster=0)
 Constructor taking three oriented wire hits.
 
CDCRLWireHitTriple reversed () const
 Constructs the reverse triple from this one.
 
void reverse ()
 Reverses the triple inplace.
 
CDCRLWireHitTriple getAlias () const
 Returns the aliased version of this oriented wire hit triple.
 
bool operator== (const CDCRLWireHitTriple &other) const
 Equality comparison considering all three oriented wire hits.
 
bool operator< (const CDCRLWireHitTriple &other) const
 Establish a total ordering based on the three oriented wire hits.
 
Shape getShape () const
 Getter for the shape of this triple if all three oriented wire hits are neighbors. Else ILLSHAPE.
 
ISuperLayer getISuperLayer () const
 Getter for the common superlayer id of the pair.
 
EStereoKind getStereoKind () const
 Getter for the common stereo type of the superlayer of the pair.
 
bool isAxial () const
 Indicator if the underlying wires are axial.
 
const CDCWiregetStartWire () const
 Getter for the wire the first oriented wire hit is based on.
 
const CDCWiregetMiddleWire () const
 Getter for the wire the second oriented wire hit is based on.
 
const CDCWiregetEndWire () const
 Getter for the wire the third oriented wire hit is based on.
 
bool hasWire (const CDCWire &wire) const
 Indicator if any of the three oriented wire hits is based on the given wire.
 
ERightLeft getStartRLInfo () const
 Getter for the right left passage information of the first oriented wire hit.
 
ERightLeft getMiddleRLInfo () const
 Getter for the right left passage information of the second oriented wire hit.
 
ERightLeft getEndRLInfo () const
 Getter for the right left passage information of the third oriented wire hit.
 
const CDCWireHitgetStartWireHit () const
 Getter for the hit wire of the first oriented wire hit.
 
const CDCWireHitgetMiddleWireHit () const
 Getter for the hit wire of the second oriented wire hit.
 
const CDCWireHitgetEndWireHit () const
 Getter for the hit wire of the third oriented wire hit.
 
bool hasWireHit (const CDCWireHit &wirehit) const
 Indicator if any of the three oriented wire hits is based on the given wire hit.
 
CDCRLWireHitgetStartRLWireHit ()
 Getter for the first oriented wire hit.
 
CDCRLWireHitgetMiddleRLWireHit ()
 Getter for the second oriented wire hit.
 
CDCRLWireHitgetEndRLWireHit ()
 Getter for the third oriented wire hit.
 
const CDCRLWireHitgetStartRLWireHit () const
 Constant getter for the first oriented wire hit.
 
const CDCRLWireHitgetMiddleRLWireHit () const
 Constant getter for the second oriented wire hit.
 
const CDCRLWireHitgetEndRLWireHit () const
 Constant getter for the third oriented wire hit.
 
CDCRLWireHitPairgetRearRLWireHitPair ()
 Getter for the pair of second and third oriented wire hit.
 
const CDCRLWireHitPairgetRearRLWireHitPair () const
 Constant getter for the pair of second and third oriented wire hit.
 
void setStartRLWireHit (const CDCRLWireHit &startRLWireHit)
 Setter for the first oriented wire hit.
 
void setMiddleRLWireHit (const CDCRLWireHit &middleRLWireHit)
 Setter for the second oriented wire hit.
 
void setEndRLWireHit (const CDCRLWireHit &endRLWireHit)
 Setter for the third oriented wire hit.
 
void setStartRLInfo (const ERightLeft startRLInfo)
 Setter for the right left passage information of the first oriented wire hit.
 
void setMiddleRLInfo (const ERightLeft middleRLInfo)
 Setter for the right left passage information of the second oriented wire hit.
 
void setEndRLInfo (const ERightLeft endRLInfo)
 Setter for the right left passage information of the third oriented wire hit.
 
int getICluster () const
 Getter for the cluster id.
 
void setICluster (int iCluster)
 Setter for the cluster id.
 

Protected Attributes

CDCRLWireHit m_startRLWireHit
 Memory for the start oriented wire hit.
 
CDCRLWireHitPair m_rearRLWireHitPair
 Memory for the second and third wire hits.
 

Friends

bool operator< (const CDCRLWireHitTriple &rlWireHitTriple, const CDCRLWireHitPair &rlWireHitPair)
 Define oriented wire hit pairs to be coaligned with oriented wire hit triples on the first two oriented wire hits.
 
bool operator< (const CDCRLWireHitPair &rlWireHitPair, const CDCRLWireHitTriple &rlWireHitTriple)
 Define oriented wire hit pairs to be coaligned with orient wire hit triples on the first two oriented wire hits.
 

Detailed Description

Class representing a triple of neighboring wire hits.

The first is taken as a single, while the second and the third are grouped into a pair. In this way we can save some object creations during lookups of a triple following this one, since the projection to the last pair can be done by reference.

Definition at line 35 of file CDCRLWireHitTriple.h.

Constructor & Destructor Documentation

◆ CDCRLWireHitTriple()

CDCRLWireHitTriple ( const CDCRLWireHit startRLWireHit,
const CDCRLWireHit middleRLWireHit,
const CDCRLWireHit endRLWireHit,
int  iCluster = 0 
)

Constructor taking three oriented wire hits.

Definition at line 62 of file CDCRLWireHitTriple.cc.

66 : m_startRLWireHit(startRLWireHit)
67 , m_rearRLWireHitPair(middleRLWireHit, endRLWireHit, iCluster)
68{
69}
CDCRLWireHitPair m_rearRLWireHitPair
Memory for the second and third wire hits.
CDCRLWireHit m_startRLWireHit
Memory for the start oriented wire hit.

Member Function Documentation

◆ getAlias()

CDCRLWireHitTriple getAlias ( ) const

Returns the aliased version of this oriented wire hit triple.

Definition at line 87 of file CDCRLWireHitTriple.cc.

88{
92 getICluster());
93}
CDCRLWireHitTriple()=default
Default constructor for ROOT.
CDCRLWireHit & getStartRLWireHit()
Getter for the first oriented wire hit.
int getICluster() const
Getter for the cluster id.
CDCRLWireHit & getEndRLWireHit()
Getter for the third oriented wire hit.
CDCRLWireHit & getMiddleRLWireHit()
Getter for the second oriented wire hit.
CDCRLWireHitTriple getAlias() const
Returns the aliased version of this oriented wire hit triple.

◆ getEndRLInfo()

ERightLeft getEndRLInfo ( ) const
inline

Getter for the right left passage information of the third oriented wire hit.

Definition at line 196 of file CDCRLWireHitTriple.h.

197 {
198 return getEndRLWireHit().getRLInfo();
199 }
ERightLeft getRLInfo() const
Getter for the right left passage information.
Definition: CDCRLWireHit.h:234

◆ getEndRLWireHit() [1/2]

CDCRLWireHit & getEndRLWireHit ( )
inline

Getter for the third oriented wire hit.

Definition at line 239 of file CDCRLWireHitTriple.h.

240 {
242 }
CDCRLWireHit & getToRLWireHit()
Getter for the second oriented wire hit.
CDCRLWireHitPair & getRearRLWireHitPair()
Getter for the pair of second and third oriented wire hit.

◆ getEndRLWireHit() [2/2]

const CDCRLWireHit & getEndRLWireHit ( ) const
inline

Constant getter for the third oriented wire hit.

Definition at line 257 of file CDCRLWireHitTriple.h.

258 {
260 }

◆ getEndWire()

const CDCWire & getEndWire ( ) const
inline

Getter for the wire the third oriented wire hit is based on.

Definition at line 172 of file CDCRLWireHitTriple.h.

173 {
174 return getEndRLWireHit().getWire();
175 }
const CDCWire & getWire() const
Getter for the wire the oriented hit associated to.

◆ getEndWireHit()

const CDCWireHit & getEndWireHit ( ) const
inline

Getter for the hit wire of the third oriented wire hit.

Definition at line 214 of file CDCRLWireHitTriple.h.

215 {
216 return getEndRLWireHit().getWireHit();
217 }
const CDCWireHit & getWireHit() const
Getter for the wire hit associated with the oriented hit.
Definition: CDCRLWireHit.h:192

◆ getICluster()

int getICluster ( ) const
inline

Getter for the cluster id.

Definition at line 311 of file CDCRLWireHitTriple.h.

312 {
314 }
int getICluster() const
Getter for the cluster id.

◆ getISuperLayer()

ISuperLayer getISuperLayer ( ) const
inline

Getter for the common superlayer id of the pair.

Definition at line 141 of file CDCRLWireHitTriple.h.

142 {
145 }
ISuperLayer getISuperLayer() const
Getter for the common superlayer id of the pair.
ISuperLayer getISuperLayer() const
Getter for the superlayer id.

◆ getMiddleRLInfo()

ERightLeft getMiddleRLInfo ( ) const
inline

Getter for the right left passage information of the second oriented wire hit.

Definition at line 190 of file CDCRLWireHitTriple.h.

191 {
192 return getMiddleRLWireHit().getRLInfo();
193 }

◆ getMiddleRLWireHit() [1/2]

CDCRLWireHit & getMiddleRLWireHit ( )
inline

Getter for the second oriented wire hit.

Definition at line 233 of file CDCRLWireHitTriple.h.

234 {
236 }
CDCRLWireHit & getFromRLWireHit()
Getter for the first oriented wire hit.

◆ getMiddleRLWireHit() [2/2]

const CDCRLWireHit & getMiddleRLWireHit ( ) const
inline

Constant getter for the second oriented wire hit.

Definition at line 251 of file CDCRLWireHitTriple.h.

252 {
254 }

◆ getMiddleWire()

const CDCWire & getMiddleWire ( ) const
inline

Getter for the wire the second oriented wire hit is based on.

Definition at line 166 of file CDCRLWireHitTriple.h.

167 {
168 return getMiddleRLWireHit().getWire();
169 }

◆ getMiddleWireHit()

const CDCWireHit & getMiddleWireHit ( ) const
inline

Getter for the hit wire of the second oriented wire hit.

Definition at line 208 of file CDCRLWireHitTriple.h.

209 {
211 }

◆ getRearRLWireHitPair() [1/2]

CDCRLWireHitPair & getRearRLWireHitPair ( )
inline

Getter for the pair of second and third oriented wire hit.

Definition at line 263 of file CDCRLWireHitTriple.h.

264 {
265 return m_rearRLWireHitPair;
266 }

◆ getRearRLWireHitPair() [2/2]

const CDCRLWireHitPair & getRearRLWireHitPair ( ) const
inline

Constant getter for the pair of second and third oriented wire hit.

Definition at line 269 of file CDCRLWireHitTriple.h.

270 {
271 return m_rearRLWireHitPair;
272 }

◆ getShape()

CDCRLWireHitTriple::Shape getShape ( ) const

Getter for the shape of this triple if all three oriented wire hits are neighbors. Else ILLSHAPE.

Definition at line 95 of file CDCRLWireHitTriple.cc.

96{
97 const CDCWire& startWire = getStartWire();
98 const CDCWire& middleWire = getMiddleWire();
99 const CDCWire& endWire = getEndWire();
100
101 WireNeighborKind startToMiddleNeighborKind = startWire.getNeighborKind(middleWire);
102 WireNeighborKind middleToEndNeighborKind = middleWire.getNeighborKind(endWire);
103
104 if (not startToMiddleNeighborKind.isValid() or
105 not middleToEndNeighborKind.isValid()) {
106 return Shape();
107 }
108
109 // Neighbor types are marked on the clock. Difference is so to say an angular value apart from a 12 / (2 * pi) factor
110 const short oClockDelta = middleToEndNeighborKind.getOClockDirection() - startToMiddleNeighborKind.getOClockDirection();
111 const short startToMiddleCellDistance = startToMiddleNeighborKind.getCellDistance();
112 const short middleToEndCellDistance = middleToEndNeighborKind.getCellDistance();
113 return Shape(startToMiddleCellDistance,
114 middleToEndCellDistance,
115 symmetricModuloFast(oClockDelta, 12));
116}
const CDCWire & getStartWire() const
Getter for the wire the first oriented wire hit is based on.
const CDCWire & getMiddleWire() const
Getter for the wire the second oriented wire hit is based on.
const CDCWire & getEndWire() const
Getter for the wire the third oriented wire hit is based on.
Class representing a sense wire in the central drift chamber.
Definition: CDCWire.h:58
WireNeighborKind getNeighborKind(const CDCWire &wire) const
Returns gives the kind of neighborhood relation from this wire to the given wire.
Definition: CDCWire.cc:139
Type for the neighbor relationship from one wire to another.
bool isValid() const
Check if the neighbor kind is in principle valid.
short getOClockDirection() const
Get the direction on the clock to follow to reach the neighbor.
short getCellDistance() const
Get the distance to the wire neighbor counted in number of cells.

◆ getStartRLInfo()

ERightLeft getStartRLInfo ( ) const
inline

Getter for the right left passage information of the first oriented wire hit.

Definition at line 184 of file CDCRLWireHitTriple.h.

185 {
186 return getStartRLWireHit().getRLInfo();
187 }

◆ getStartRLWireHit() [1/2]

CDCRLWireHit & getStartRLWireHit ( )
inline

Getter for the first oriented wire hit.

Definition at line 227 of file CDCRLWireHitTriple.h.

228 {
229 return m_startRLWireHit;
230 }

◆ getStartRLWireHit() [2/2]

const CDCRLWireHit & getStartRLWireHit ( ) const
inline

Constant getter for the first oriented wire hit.

Definition at line 245 of file CDCRLWireHitTriple.h.

246 {
247 return m_startRLWireHit;
248 }

◆ getStartWire()

const CDCWire & getStartWire ( ) const
inline

Getter for the wire the first oriented wire hit is based on.

Definition at line 160 of file CDCRLWireHitTriple.h.

161 {
162 return getStartRLWireHit().getWire();
163 }

◆ getStartWireHit()

const CDCWireHit & getStartWireHit ( ) const
inline

Getter for the hit wire of the first oriented wire hit.

Definition at line 202 of file CDCRLWireHitTriple.h.

203 {
204 return getStartRLWireHit().getWireHit();
205 }

◆ getStereoKind()

EStereoKind getStereoKind ( ) const
inline

Getter for the common stereo type of the superlayer of the pair.

Definition at line 148 of file CDCRLWireHitTriple.h.

149 {
151 }
static EStereoKind getStereoKind(ISuperLayer iSuperLayer)
Returns the stereo kind of the super layer.
Definition: ISuperLayer.cc:26

◆ hasWire()

bool hasWire ( const CDCWire wire) const
inline

Indicator if any of the three oriented wire hits is based on the given wire.

Definition at line 178 of file CDCRLWireHitTriple.h.

179 {
180 return getStartRLWireHit().isOnWire(wire) or getRearRLWireHitPair().hasWire(wire);
181 }
bool hasWire(const CDCWire &wire) const
Indicator if any of the two oriented wire hits is based on the given wire.
bool isOnWire(const CDCWire &wire) const
Checks if the oriented hit is associated with the give wire.
Definition: CDCRLWireHit.h:168

◆ hasWireHit()

bool hasWireHit ( const CDCWireHit wirehit) const
inline

Indicator if any of the three oriented wire hits is based on the given wire hit.

Definition at line 220 of file CDCRLWireHitTriple.h.

221 {
222 return getStartRLWireHit().hasWireHit(wirehit) or
224 }
bool hasWireHit(const CDCWireHit &wirehit) const
Indicator if any of the two oriented wire hits is based on the given wire hit.
bool hasWireHit(const CDCWireHit &wirehit) const
Checks if the oriented hit is associated with the give wire hit.
Definition: CDCRLWireHit.h:198

◆ isAxial()

bool isAxial ( ) const
inline

Indicator if the underlying wires are axial.

Definition at line 154 of file CDCRLWireHitTriple.h.

155 {
156 return getStereoKind() == EStereoKind::c_Axial;
157 }
EStereoKind getStereoKind() const
Getter for the common stereo type of the superlayer of the pair.

◆ operator<()

bool operator< ( const CDCRLWireHitTriple other) const
inline

Establish a total ordering based on the three oriented wire hits.

Definition at line 102 of file CDCRLWireHitTriple.h.

103 {
104 return getICluster() < other.getICluster() or
105 (getICluster() == other.getICluster() and
106 (getStartRLWireHit() < other.getStartRLWireHit() or
107 (getStartRLWireHit() == other.getStartRLWireHit() and
108 getRearRLWireHitPair() < other.getRearRLWireHitPair())));
109 }

◆ operator==()

bool operator== ( const CDCRLWireHitTriple other) const
inline

Equality comparison considering all three oriented wire hits.

Definition at line 94 of file CDCRLWireHitTriple.h.

95 {
96 return getStartRLWireHit() == other.getStartRLWireHit() and
97 getRearRLWireHitPair() == other.getRearRLWireHitPair();
98 }

◆ reverse()

void reverse ( )

Reverses the triple inplace.

Definition at line 79 of file CDCRLWireHitTriple.cc.

80{
81 CDCRLWireHit newEndRLWireHit = getStartRLWireHit().reversed();
84 setEndRLWireHit(newEndRLWireHit);
85}
void setEndRLWireHit(const CDCRLWireHit &endRLWireHit)
Setter for the third oriented wire hit.
void setMiddleRLWireHit(const CDCRLWireHit &middleRLWireHit)
Setter for the second oriented wire hit.
CDCRLWireHitTriple reversed() const
Constructs the reverse triple from this one.
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Definition: CDCRLWireHit.h:41
CDCRLWireHit reversed() const
Returns the oriented wire hit with the opposite right left information.
Definition: CDCRLWireHit.h:89

◆ reversed()

CDCRLWireHitTriple reversed ( ) const

Constructs the reverse triple from this one.

Definition at line 71 of file CDCRLWireHitTriple.cc.

◆ setEndRLInfo()

void setEndRLInfo ( const ERightLeft  endRLInfo)
inline

Setter for the right left passage information of the third oriented wire hit.

Definition at line 305 of file CDCRLWireHitTriple.h.

306 {
308 }
void setToRLInfo(ERightLeft toRLInfo)
Setter for the right left passage information of the second oriented wire hit.

◆ setEndRLWireHit()

void setEndRLWireHit ( const CDCRLWireHit endRLWireHit)
inline

Setter for the third oriented wire hit.

Definition at line 287 of file CDCRLWireHitTriple.h.

288 {
290 }
void setToRLWireHit(const CDCRLWireHit &toRLWireHit)
Setter for the second oriented wire hit.

◆ setICluster()

void setICluster ( int  iCluster)
inline

Setter for the cluster id.

Definition at line 317 of file CDCRLWireHitTriple.h.

318 {
320 }
void setICluster(int iCluster)
Setter for the cluster id.

◆ setMiddleRLInfo()

void setMiddleRLInfo ( const ERightLeft  middleRLInfo)
inline

Setter for the right left passage information of the second oriented wire hit.

Definition at line 299 of file CDCRLWireHitTriple.h.

300 {
301 getRearRLWireHitPair().setFromRLInfo(middleRLInfo);
302 }
void setFromRLInfo(ERightLeft fromRLInfo)
Setter for the right left passage information of the first oriented wire hit.

◆ setMiddleRLWireHit()

void setMiddleRLWireHit ( const CDCRLWireHit middleRLWireHit)
inline

Setter for the second oriented wire hit.

Definition at line 281 of file CDCRLWireHitTriple.h.

282 {
283 m_rearRLWireHitPair.setFromRLWireHit(middleRLWireHit);
284 }
void setFromRLWireHit(const CDCRLWireHit &fromRLWireHit)
Setter for the first oriented wire hit.

◆ setStartRLInfo()

void setStartRLInfo ( const ERightLeft  startRLInfo)
inline

Setter for the right left passage information of the first oriented wire hit.

Definition at line 293 of file CDCRLWireHitTriple.h.

294 {
295 m_startRLWireHit.setRLInfo(startRLInfo);
296 }
void setRLInfo(const ERightLeft rlInfo)
Setter for the right left passage information.
Definition: CDCRLWireHit.h:240

◆ setStartRLWireHit()

void setStartRLWireHit ( const CDCRLWireHit startRLWireHit)
inline

Setter for the first oriented wire hit.

Definition at line 275 of file CDCRLWireHitTriple.h.

276 {
277 m_startRLWireHit = startRLWireHit;
278 }

Friends And Related Function Documentation

◆ operator< [1/2]

bool operator< ( const CDCRLWireHitPair rlWireHitPair,
const CDCRLWireHitTriple rlWireHitTriple 
)
friend

Define oriented wire hit pairs to be coaligned with orient wire hit triples on the first two oriented wire hits.

Definition at line 127 of file CDCRLWireHitTriple.h.

129 {
130 return rlWireHitPair.getICluster() < rlWireHitTriple.getICluster() or
131 (rlWireHitPair.getICluster() == rlWireHitTriple.getICluster() and
132 (rlWireHitPair.getFromRLWireHit() < rlWireHitTriple.getStartRLWireHit() or
133 (rlWireHitPair.getFromRLWireHit() == rlWireHitTriple.getStartRLWireHit() and
134 rlWireHitPair.getToRLWireHit() < rlWireHitTriple.getMiddleRLWireHit())));
135 }

◆ operator< [2/2]

bool operator< ( const CDCRLWireHitTriple rlWireHitTriple,
const CDCRLWireHitPair rlWireHitPair 
)
friend

Define oriented wire hit pairs to be coaligned with oriented wire hit triples on the first two oriented wire hits.

Definition at line 115 of file CDCRLWireHitTriple.h.

117 {
118 return rlWireHitTriple.getICluster() < rlWireHitPair.getICluster() or
119 (rlWireHitTriple.getICluster() == rlWireHitPair.getICluster() and
120 (rlWireHitTriple.getStartRLWireHit() < rlWireHitPair.getFromRLWireHit() or
121 (rlWireHitTriple.getStartRLWireHit() == rlWireHitPair.getFromRLWireHit() and
122 rlWireHitTriple.getMiddleRLWireHit() < rlWireHitPair.getToRLWireHit())));
123 }

Member Data Documentation

◆ m_rearRLWireHitPair

CDCRLWireHitPair m_rearRLWireHitPair
protected

Memory for the second and third wire hits.

Definition at line 327 of file CDCRLWireHitTriple.h.

◆ m_startRLWireHit

CDCRLWireHit m_startRLWireHit
protected

Memory for the start oriented wire hit.

Definition at line 324 of file CDCRLWireHitTriple.h.


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