8#include <ecl/dataobjects/ECLSimHit.h>
10#include <gtest/gtest.h>
34 EXPECT_EQ(momentum.x(), 0);
35 EXPECT_EQ(momentum.y(), 0);
36 EXPECT_EQ(momentum.z(), 0);
38 EXPECT_EQ(position.x(), 0);
39 EXPECT_EQ(position.y(), 0);
40 EXPECT_EQ(position.z(), 0);
43 const int trackId = 2;
45 const float flightTime = 4.1;
46 const float edep = 4.2;
47 const G4ThreeVector init_momentum(1, 2, 3);
48 const G4ThreeVector init_position(4, 5, 6);
49 ECLSimHit myECLSimHit2(cellId, trackId, pdg, flightTime, edep, init_momentum, init_position, 0);
50 EXPECT_EQ(myECLSimHit2.
getCellId(), cellId);
56 EXPECT_EQ(momentum2.x(), init_momentum.x());
57 EXPECT_EQ(momentum2.y(), init_momentum.y());
58 EXPECT_EQ(momentum2.z(), init_momentum.z());
60 EXPECT_EQ(position2.x(), init_position.x());
61 EXPECT_EQ(position2.y(), init_position.y());
62 EXPECT_EQ(position2.z(), init_position.z());
71 const int trackId = 2;
73 const float flightTime = 4.1;
74 const float edep = 4.2;
75 const G4ThreeVector init_momentum(1, 2, 3);
76 const G4ThreeVector init_position(4, 5, 6);
86 EXPECT_EQ(myECLSimHit.
getCellId(), cellId);
92 EXPECT_EQ(momentum.x(), init_momentum.x());
93 EXPECT_EQ(momentum.y(), init_momentum.y());
94 EXPECT_EQ(momentum.z(), init_momentum.z());
96 EXPECT_EQ(position.x(), init_position.x());
97 EXPECT_EQ(position.y(), init_position.y());
98 EXPECT_EQ(position.z(), init_position.z());
Set up a few arrays and objects in the datastore.
ClassECLSimHit - Geant4 simulated hit for the ECL.
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
void setEnergyDep(double Edep)
Set Deposit energy.
int getTrackId() const
Get Track ID.
void setMomentum(const G4ThreeVector &Momentum)
Set Momentum.
int getCellId() const
Get Cell ID.
double getFlightTime() const
Get Flight time from IP.
void setPDGCode(int Pdg)
Set Particle PDG (can be one of secondaries)
void setCellId(int CellId)
Set Cell ID.
double getEnergyDep() const
Get Deposit energy.
G4ThreeVector getPosition() const
Get Position.
G4ThreeVector getMomentum() const
Get Momentum.
void setTrackId(int TrackId)
Set Track ID.
void setFlightTime(double FlightTime)
Set Flight time from IP.
void setPosition(const G4ThreeVector &Position)
Set Position.
Abstract base class for different kinds of events.