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.
 
CDC::ISuperLayer getISuperLayer () const
 Getter for the common superlayer id of the pair.
 
CDC::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 CDC::CDCWiregetStartWire () const
 Getter for the wire the first oriented wire hit is based on.
 
const CDC::CDCWiregetMiddleWire () const
 Getter for the wire the second oriented wire hit is based on.
 
const CDC::CDCWiregetEndWire () const
 Getter for the wire the third oriented wire hit is based on.
 
bool hasWire (const CDC::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 37 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 63 of file CDCRLWireHitTriple.cc.

67 : m_startRLWireHit(startRLWireHit)
68 , m_rearRLWireHitPair(middleRLWireHit, endRLWireHit, iCluster)
69{
70}
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 88 of file CDCRLWireHitTriple.cc.

89{
93 getICluster());
94}
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 198 of file CDCRLWireHitTriple.h.

199 {
200 return getEndRLWireHit().getRLInfo();
201 }

◆ getEndRLWireHit() [1/2]

CDCRLWireHit & getEndRLWireHit ( )
inline

Getter for the third oriented wire hit.

Definition at line 241 of file CDCRLWireHitTriple.h.

242 {
243 return getRearRLWireHitPair().getToRLWireHit();
244 }

◆ getEndRLWireHit() [2/2]

const CDCRLWireHit & getEndRLWireHit ( ) const
inline

Constant getter for the third oriented wire hit.

Definition at line 259 of file CDCRLWireHitTriple.h.

260 {
261 return getRearRLWireHitPair().getToRLWireHit();
262 }

◆ getEndWire()

const CDC::CDCWire & getEndWire ( ) const
inline

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

Definition at line 174 of file CDCRLWireHitTriple.h.

175 {
176 return getEndRLWireHit().getWire();
177 }

◆ getEndWireHit()

const CDCWireHit & getEndWireHit ( ) const
inline

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

Definition at line 216 of file CDCRLWireHitTriple.h.

217 {
218 return getEndRLWireHit().getWireHit();
219 }

◆ getICluster()

int getICluster ( ) const
inline

Getter for the cluster id.

Definition at line 313 of file CDCRLWireHitTriple.h.

314 {
315 return m_rearRLWireHitPair.getICluster();
316 }

◆ getISuperLayer()

CDC::ISuperLayer getISuperLayer ( ) const
inline

Getter for the common superlayer id of the pair.

Definition at line 143 of file CDCRLWireHitTriple.h.

144 {
145 assert(getStartRLWireHit().getISuperLayer() == getRearRLWireHitPair().getISuperLayer());
146 return getStartRLWireHit().getISuperLayer();
147 }

◆ getMiddleRLInfo()

ERightLeft getMiddleRLInfo ( ) const
inline

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

Definition at line 192 of file CDCRLWireHitTriple.h.

193 {
194 return getMiddleRLWireHit().getRLInfo();
195 }

◆ getMiddleRLWireHit() [1/2]

CDCRLWireHit & getMiddleRLWireHit ( )
inline

Getter for the second oriented wire hit.

Definition at line 235 of file CDCRLWireHitTriple.h.

236 {
237 return getRearRLWireHitPair().getFromRLWireHit();
238 }

◆ getMiddleRLWireHit() [2/2]

const CDCRLWireHit & getMiddleRLWireHit ( ) const
inline

Constant getter for the second oriented wire hit.

Definition at line 253 of file CDCRLWireHitTriple.h.

254 {
255 return getRearRLWireHitPair().getFromRLWireHit();
256 }

◆ getMiddleWire()

const CDC::CDCWire & getMiddleWire ( ) const
inline

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

Definition at line 168 of file CDCRLWireHitTriple.h.

169 {
170 return getMiddleRLWireHit().getWire();
171 }

◆ getMiddleWireHit()

const CDCWireHit & getMiddleWireHit ( ) const
inline

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

Definition at line 210 of file CDCRLWireHitTriple.h.

211 {
212 return getMiddleRLWireHit().getWireHit();
213 }

◆ getRearRLWireHitPair() [1/2]

CDCRLWireHitPair & getRearRLWireHitPair ( )
inline

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

Definition at line 265 of file CDCRLWireHitTriple.h.

266 {
267 return m_rearRLWireHitPair;
268 }

◆ getRearRLWireHitPair() [2/2]

const CDCRLWireHitPair & getRearRLWireHitPair ( ) const
inline

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

Definition at line 271 of file CDCRLWireHitTriple.h.

272 {
273 return m_rearRLWireHitPair;
274 }

◆ 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 96 of file CDCRLWireHitTriple.cc.

97{
98 const CDCWire& startWire = getStartWire();
99 const CDCWire& middleWire = getMiddleWire();
100 const CDCWire& endWire = getEndWire();
101
102 WireNeighborKind startToMiddleNeighborKind = startWire.getNeighborKind(middleWire);
103 WireNeighborKind middleToEndNeighborKind = middleWire.getNeighborKind(endWire);
104
105 if (not startToMiddleNeighborKind.isValid() or
106 not middleToEndNeighborKind.isValid()) {
107 return Shape();
108 }
109
110 // Neighbor types are marked on the clock. Difference is so to say an angular value apart from a 12 / (2 * pi) factor
111 const short oClockDelta = middleToEndNeighborKind.getOClockDirection() - startToMiddleNeighborKind.getOClockDirection();
112 const short startToMiddleCellDistance = startToMiddleNeighborKind.getCellDistance();
113 const short middleToEndCellDistance = middleToEndNeighborKind.getCellDistance();
114 return Shape(startToMiddleCellDistance,
115 middleToEndCellDistance,
116 symmetricModuloFast(oClockDelta, 12));
117}
WireNeighborKind getNeighborKind(const CDCWire &wire) const
Returns gives the kind of neighborhood relation from this wire to the given wire.
Definition CDCWire.cc:139
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.
Type for the different shapes of a triple of neighboring wire hits.
const CDC::CDCWire & getStartWire() const
Getter for the wire the first oriented wire hit is based on.
const CDC::CDCWire & getMiddleWire() const
Getter for the wire the second oriented wire hit is based on.
const CDC::CDCWire & getEndWire() const
Getter for the wire the third oriented wire hit is based on.

◆ getStartRLInfo()

ERightLeft getStartRLInfo ( ) const
inline

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

Definition at line 186 of file CDCRLWireHitTriple.h.

187 {
188 return getStartRLWireHit().getRLInfo();
189 }

◆ getStartRLWireHit() [1/2]

CDCRLWireHit & getStartRLWireHit ( )
inline

Getter for the first oriented wire hit.

Definition at line 229 of file CDCRLWireHitTriple.h.

230 {
231 return m_startRLWireHit;
232 }

◆ getStartRLWireHit() [2/2]

const CDCRLWireHit & getStartRLWireHit ( ) const
inline

Constant getter for the first oriented wire hit.

Definition at line 247 of file CDCRLWireHitTriple.h.

248 {
249 return m_startRLWireHit;
250 }

◆ getStartWire()

const CDC::CDCWire & getStartWire ( ) const
inline

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

Definition at line 162 of file CDCRLWireHitTriple.h.

163 {
164 return getStartRLWireHit().getWire();
165 }

◆ getStartWireHit()

const CDCWireHit & getStartWireHit ( ) const
inline

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

Definition at line 204 of file CDCRLWireHitTriple.h.

205 {
206 return getStartRLWireHit().getWireHit();
207 }

◆ getStereoKind()

CDC::EStereoKind getStereoKind ( ) const
inline

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

Definition at line 150 of file CDCRLWireHitTriple.h.

151 {
152 return CDC::ISuperLayerUtil::getStereoKind(getISuperLayer());
153 }

◆ hasWire()

bool hasWire ( const CDC::CDCWire & wire) const
inline

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

Definition at line 180 of file CDCRLWireHitTriple.h.

181 {
182 return getStartRLWireHit().isOnWire(wire) or getRearRLWireHitPair().hasWire(wire);
183 }

◆ 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 222 of file CDCRLWireHitTriple.h.

223 {
224 return getStartRLWireHit().hasWireHit(wirehit) or
225 getRearRLWireHitPair().hasWireHit(wirehit);
226 }

◆ isAxial()

bool isAxial ( ) const
inline

Indicator if the underlying wires are axial.

Definition at line 156 of file CDCRLWireHitTriple.h.

157 {
158 return getStereoKind() == CDC::EStereoKind::c_Axial;
159 }

◆ operator<()

bool operator< ( const CDCRLWireHitTriple & other) const
inline

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

Definition at line 104 of file CDCRLWireHitTriple.h.

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

◆ operator==()

bool operator== ( const CDCRLWireHitTriple & other) const
inline

Equality comparison considering all three oriented wire hits.

Definition at line 96 of file CDCRLWireHitTriple.h.

97 {
98 return getStartRLWireHit() == other.getStartRLWireHit() and
99 getRearRLWireHitPair() == other.getRearRLWireHitPair();
100 }

◆ reverse()

void reverse ( )

Reverses the triple inplace.

Definition at line 80 of file CDCRLWireHitTriple.cc.

81{
82 CDCRLWireHit newEndRLWireHit = getStartRLWireHit().reversed();
85 setEndRLWireHit(newEndRLWireHit);
86}
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.
CDCRLWireHit reversed() const
Returns the oriented wire hit with the opposite right left information.

◆ reversed()

CDCRLWireHitTriple reversed ( ) const

Constructs the reverse triple from this one.

Definition at line 72 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 307 of file CDCRLWireHitTriple.h.

308 {
309 getRearRLWireHitPair().setToRLInfo(endRLInfo);
310 }

◆ setEndRLWireHit()

void setEndRLWireHit ( const CDCRLWireHit & endRLWireHit)
inline

Setter for the third oriented wire hit.

Definition at line 289 of file CDCRLWireHitTriple.h.

290 {
291 m_rearRLWireHitPair.setToRLWireHit(endRLWireHit);
292 }

◆ setICluster()

void setICluster ( int iCluster)
inline

Setter for the cluster id.

Definition at line 319 of file CDCRLWireHitTriple.h.

320 {
321 m_rearRLWireHitPair.setICluster(iCluster);
322 }

◆ setMiddleRLInfo()

void setMiddleRLInfo ( const ERightLeft middleRLInfo)
inline

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

Definition at line 301 of file CDCRLWireHitTriple.h.

302 {
303 getRearRLWireHitPair().setFromRLInfo(middleRLInfo);
304 }

◆ setMiddleRLWireHit()

void setMiddleRLWireHit ( const CDCRLWireHit & middleRLWireHit)
inline

Setter for the second oriented wire hit.

Definition at line 283 of file CDCRLWireHitTriple.h.

284 {
285 m_rearRLWireHitPair.setFromRLWireHit(middleRLWireHit);
286 }

◆ setStartRLInfo()

void setStartRLInfo ( const ERightLeft startRLInfo)
inline

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

Definition at line 295 of file CDCRLWireHitTriple.h.

296 {
297 m_startRLWireHit.setRLInfo(startRLInfo);
298 }

◆ setStartRLWireHit()

void setStartRLWireHit ( const CDCRLWireHit & startRLWireHit)
inline

Setter for the first oriented wire hit.

Definition at line 277 of file CDCRLWireHitTriple.h.

278 {
279 m_startRLWireHit = startRLWireHit;
280 }

Friends And Related Symbol 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 129 of file CDCRLWireHitTriple.h.

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

◆ 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 117 of file CDCRLWireHitTriple.h.

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

Member Data Documentation

◆ m_rearRLWireHitPair

CDCRLWireHitPair m_rearRLWireHitPair
protected

Memory for the second and third wire hits.

Definition at line 329 of file CDCRLWireHitTriple.h.

◆ m_startRLWireHit

CDCRLWireHit m_startRLWireHit
protected

Memory for the start oriented wire hit.

Definition at line 326 of file CDCRLWireHitTriple.h.


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