5#ifndef LARG4GENSHOWERLIB_STEPINFO_H
6#define LARG4GENSHOWERLIB_STEPINFO_H
12#include "CLHEP/Vector/ThreeVector.h"
47 inline void setP(
const CLHEP::Hep3Vector& p) {
m_pos = p; }
64 inline double x()
const {
return m_pos.x(); }
66 inline double y()
const {
return m_pos.y(); }
68 inline double z()
const {
return m_pos.z(); }
98 double esum = first.m_dep + second.m_dep;
103 w1 = first.m_dep/esum;
104 w2 = second.m_dep/esum;
107 m_pos = w1*first.m_pos + w2*second.m_pos;
108 m_time = w1*first.m_time + w2*second.m_time;
120 double esum =
m_dep + other.m_dep;
126 w2 = other.m_dep/esum;
128 std::cout <<
"Error: hit combination: sum of deposited energy is zero!" << std::endl;
132 m_dep += other.m_dep;
Class to collect information about G4 steps.
CLHEP::Hep3Vector m_pos
spatial position
StepInfo & operator+=(const StepInfo &other)
energy weighted sum
void setTime(const double t)
set time
double diff2(const StepInfo &other) const
return spactial distance squared
void setY(const double y)
set y position
CLHEP::Hep3Vector position() const
return spacial position
double z() const
return z position
double y() const
return y position
void setZ(const double z)
set z position
void setP(const CLHEP::Hep3Vector &p)
set position
double m_dep
deposited energy
StepInfo()
empty default constructor
bool valid() const
return validity flag
double x() const
return x position
void setValid(const bool flag)
set validity
double time() const
return time of hit
double dep() const
return deposited energy
bool m_valid
flag, if hit is valid
void setE(const double t)
set depoisted energy
void setX(const double x)
set x position
Namespace for the ShowerLib related classes.