8#include <gtest/gtest.h>
9#include <mdst/dataobjects/HitPatternCDC.h>
25 unsigned long initValue = 66560;
27 EXPECT_EQ(initValue, hitPatternCDC.
getInteger());
30 EXPECT_EQ(0, hitPatternCDC2.
getNHits());
35 EXPECT_EQ(
true, hitPatternCDC2.
hasLayer(5));
45 EXPECT_FALSE(hitPatternCDC3.
hasSLayer(0));
59 EXPECT_EQ(0, hitPatternCDC3.
getNHits());
65 unsigned long long int initValue =
static_cast<unsigned long long int>(0xAAAAAAAAAAAAAAAAL);
67 EXPECT_EQ(170, myHitPatternCDC.
getNHits());
68 unsigned short int nHits1 = 255;
70 EXPECT_EQ(nHits1, myHitPatternCDC.
getNHits());
71 unsigned short int nHits2 = 0;
73 EXPECT_EQ(nHits2, myHitPatternCDC.
getNHits());
74 unsigned short int nHits3 = 93;
76 EXPECT_EQ(nHits3, myHitPatternCDC.
getNHits());
82 unsigned long long int initValue =
static_cast<unsigned long long int>(0xEEEEEEEEEEEEEEL);
102 unsigned short firstLayer = 5;
103 unsigned short lastLayer = 46;
104 myHitPatternCDC.
setLayer(firstLayer);
105 myHitPatternCDC.
setLayer(lastLayer);
Unit tests for the CDC hit Patterns.
Hit pattern of CDC hits within a track.
short getLastLayer() const
Returns the index of the last layer with a hit.
bool hasSLayer(const unsigned short sLayer) const
Getter for super-layer match.
bool hasAxialLayer() const
True, if at least one axial layer is true.
void setNHits(unsigned short nHits)
Sets the 8 MSBs to the total number of hits in the CDC.
void setLayer(const unsigned short layer)
Set bit corresponding to layer to true.
void resetPattern()
Reset the complete hit pattern.
ULong64_t getInteger() const
Getter for underlying integer type.
bool hasLayer(const unsigned short layer) const
Getter for single layer.
unsigned short getNHits() const
Get the total Number of CDC hits in the fit.
short getFirstLayer() const
Returns the index of the first layer with a hit.
void resetLayer(const unsigned short layer)
Set bit corresponding to layer to false.
void resetSLayer(const unsigned short sLayer)
Reset complete superLayer, e.g.
unsigned short getLongestContRunInSL(const unsigned short sLayer) const
Getter for longest run of consecutive layers with hits within the given Super-layer.
bool hasStereoLayer() const
True, if at least one axial layer is true.
Abstract base class for different kinds of events.