Replaced the `FourVector::point3d()`
This change is related to the migration of Athena to HepMC3 and general cleanup of HePMC related codes.
The whole MR implements changes that are simple replacements:
FourVector::point3d().x()
with FourVector::position().x()
FourVector::point3d().y()
with FourVector::position().y()
FourVector::point3d().z()
with FourVector::position().z()
FourVector::point3d().perp()
with FourVector::position().perp()
FourVector::point3d().phi()
with FourVector::position().phi()
The reasons:
-
point3d()
is obsolete in and does not exist in HepMC3, so the code should be updated for the migration. -
actually the
FourVector::point3d()
from HepMC2 involves a lot of boilerplate code:
//from GenVertex.h of HepMC2
....
inline GenVertex::operator HepMC::FourVector() const { return position(); }
inline GenVertex::operator HepMC::ThreeVector() const { return point3d(); }
inline const FourVector & GenVertex::position() const { return m_position; }
inline GenEvent* GenVertex::parent_event() const { return m_event; }
inline ThreeVector GenVertex::point3d() const {
return ThreeVector(m_position.x(),m_position.y(),m_position.z());
}
....
i.e. calls to a constructor of ThreeVector
are not needed and are senseless. Even if these would be optimized by the compiler.
In the end, only a couple of non-commented occurrences of point3d().r()
were left in the codes.