8#include <mdst/dataobjects/ECLCluster.h>
9#include <gtest/gtest.h>
36 EXPECT_EQ(0, myECLCluster.
getTheta());
37 EXPECT_EQ(0, myECLCluster.
getPhi());
38 EXPECT_EQ(0, myECLCluster.
getR());
39 EXPECT_EQ(0, myECLCluster.
getTime());
43 EXPECT_EQ(0, myECLCluster.
getLAT());
47 EXPECT_EQ(0, myECLCluster.
getE1oE9());
54 EXPECT_FALSE(myECLCluster.
isTrack());
65 EXPECT_EQ(0, error3x3(0, 0));
66 EXPECT_EQ(0, error3x3(0, 1));
67 EXPECT_EQ(0, error3x3(0, 2));
68 EXPECT_EQ(0, error3x3(1, 0));
69 EXPECT_EQ(0, error3x3(1, 1));
70 EXPECT_EQ(0, error3x3(1, 2));
71 EXPECT_EQ(0, error3x3(2, 0));
72 EXPECT_EQ(0, error3x3(2, 1));
73 EXPECT_EQ(0, error3x3(2, 2));
82 const bool isTrack =
true;
83 const double energy = 1.165;
84 const float theta = 1.2;
85 const float phi = 1.2;
87 const double energyDepSum = 12.3;
88 const double time = 17.2;
89 const double deltaTime99 = 1.1;
90 const double E9oE21 = 0.1;
91 const double highestEnergy = 32.1;
92 const double lat = 0.5;
93 const double nOfCrystals = 4;
96 double error[6] = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6};
103 myECLCluster.
setR(r);
115 EXPECT_FLOAT_EQ(E9oE21, myECLCluster.
getE9oE21());
116 EXPECT_FLOAT_EQ(energyDepSum, myECLCluster.
getEnergyRaw());
117 EXPECT_FLOAT_EQ(theta, myECLCluster.
getTheta());
118 EXPECT_FLOAT_EQ(phi, myECLCluster.
getPhi());
119 EXPECT_FLOAT_EQ(r, myECLCluster.
getR());
120 EXPECT_FLOAT_EQ(time, myECLCluster.
getTime());
123 EXPECT_TRUE(myECLCluster.
hasStatus(status));
125 EXPECT_FLOAT_EQ(lat, myECLCluster.
getLAT());
131 EXPECT_TRUE(myECLCluster.
isTrack());
135 EXPECT_FLOAT_EQ(error[0], error3x3(0, 0));
136 EXPECT_FLOAT_EQ(error[1], error3x3(0, 1));
137 EXPECT_FLOAT_EQ(error[3], error3x3(0, 2));
138 EXPECT_FLOAT_EQ(error[1], error3x3(1, 0));
139 EXPECT_FLOAT_EQ(error[2], error3x3(1, 1));
140 EXPECT_FLOAT_EQ(error[4], error3x3(1, 2));
141 EXPECT_FLOAT_EQ(error[3], error3x3(2, 0));
142 EXPECT_FLOAT_EQ(error[4], error3x3(2, 1));
143 EXPECT_FLOAT_EQ(error[5], error3x3(2, 2));
Test class for the Track object.
void setE9oE21(double E9oE21)
Set E9/E21 energy ratio.
bool isTrack() const
Return true if the cluster matches with track.
void setTheta(double theta)
Set Theta of Shower (radian).
EStatusBit
The status information for the ECLCluster.
@ c_PulseShapeDiscrimination
bit 2: ECLCluster has pulse shape discrimination variables.
void setPhi(double phi)
Set Phi of Shower (radian).
TMatrixDSym getCovarianceMatrix3x3() const
Return TMatrixDsym 3x3 covariance matrix for E, Phi and Theta.
double getPhi() const
Return Corrected Phi of Shower (radian).
void setEnergyHighestCrystal(double energyhighestcrystal)
Set energy of highest energetic crystal (GeV).
void setEnergyRaw(double energyraw)
Set Uncorrect Energy deposited (GeV).
double getE1oE9() const
Return E1/E9 (shower shape variable).
void setTime(double time)
Set time information.
void setCovarianceMatrix(double covArray[6])
Set covariance matrix (3x3), i.e.
double getR() const
Return R.
double getEnergyRaw() const
Return Uncorrected Energy deposited (GeV)
double getUncertaintyTheta() const
Return Uncertainty on Theta of Shower.
double getLAT() const
Return LAT (shower shape variable).
bool hasStatus(EStatusBit bitmask) const
Return if specific status bit is set.
double getE9oE21() const
Return E9/E21 (shower shape variable).
void setDeltaTime99(double dtime99)
Set 99% time containment range.
void setStatus(EStatusBit status)
Set status.
unsigned short getStatus() const
Return status.
void setLAT(double LAT)
Set Lateral distribution parameter.
double getEnergy(EHypothesisBit hypothesis) const
Return Energy (GeV).
void setHypothesis(EHypothesisBit hypothesis)
Set hypotheses.
double getUncertaintyEnergy() const
Return Uncertainty on Energy of Shower.
void setNumberOfCrystals(double noc)
Set number of crystals (sum of weights).
void setEnergy(double energy)
Set Corrected Energy (GeV).
double getNumberOfCrystals() const
Return number of a crystals in a shower (sum of weights).
double getEnergyHighestCrystal() const
Return energy of highest energetic crystal in cluster (GeV)
double getZernikeMVA() const
Return MVA based hadron/photon value based on Zernike moments (shower shape variable).
ROOT::Math::XYZVector getClusterPosition() const
Return ROOT::Math::XYZVector on cluster position (x,y,z)
double getUncertaintyPhi() const
Return Uncertainty on Phi of Shower.
double getAbsZernike40() const
Return Zernike moment 40 (shower shape variable).
bool isNeutral() const
Return true if cluster has no match with track.
double getTheta() const
Return Corrected Theta of Shower (radian).
double getDeltaTime99() const
Return cluster delta time 99.
void setIsTrack(bool istrack)
Set m_isTrack true if the cluster matches with a track.
double getTime() const
Return cluster time.
@ c_nPhotons
CR is split into n photons (N1)
void setR(double r)
Set R (in cm).
double getAbsZernike51() const
Return Zernike moment 51 (shower shape variable).
Abstract base class for different kinds of events.