File indexing completed on 2025-08-06 08:19:16
0001 #include "G4RootRawTower.h"
0002
0003 #include <cmath>
0004 #include <iostream>
0005 #include <limits>
0006
0007 G4RootRawTower::G4RootRawTower(const float ieta, const float iphi, const float e)
0008 : eta(ieta)
0009 , phi(iphi)
0010 , energy(e)
0011 {
0012 }
0013
0014 void G4RootRawTower::Reset()
0015 {
0016 eta = std::numeric_limits<float>::quiet_NaN();
0017 phi = std::numeric_limits<float>::quiet_NaN();
0018 energy = std::numeric_limits<float>::quiet_NaN();
0019 }
0020
0021 int G4RootRawTower::isValid() const
0022 {
0023 return std::isfinite(get_energy());
0024 }
0025
0026 void G4RootRawTower::identify(std::ostream& os) const
0027 {
0028 os << "G4RootRawTower: eta: " << eta << ", phi: " << phi
0029 << " energy=" << get_energy() << std::endl;
0030 }