IAP GITLAB

Skip to content
Snippets Groups Projects
Commit de5bfbc5 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

return references in CoMBoost::getXYCS()

parent 459849b2
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ namespace corsika {
HEPMassType const massTarget)
: originalCS_{P4projectile.getSpaceLikeComponents().getCoordinateSystem()}
, rotatedCS_{make_rotationToZ(originalCS_, P4projectile.getSpaceLikeComponents())} {
auto const pProjectile = P4projectile.getSpaceLikeComponents();
auto const& pProjectile = P4projectile.getSpaceLikeComponents();
auto const pProjNormSquared = pProjectile.getSquaredNorm();
auto const pProjNorm = sqrt(pProjNormSquared);
......@@ -82,7 +82,7 @@ namespace corsika {
template <typename FourVector>
inline FourVector COMBoost::toCoM(FourVector const& p4) const {
auto pComponents = p4.getSpaceLikeComponents().getComponents(rotatedCS_);
auto const pComponents = p4.getSpaceLikeComponents().getComponents(rotatedCS_);
Eigen::Vector3d eVecRotated = pComponents.getEigenVector();
Eigen::Vector2d lab;
......@@ -102,7 +102,7 @@ namespace corsika {
template <typename FourVector>
inline FourVector COMBoost::fromCoM(FourVector const& p4) const {
auto pCM = p4.getSpaceLikeComponents().getComponents(rotatedCS_);
auto const pCM = p4.getSpaceLikeComponents().getComponents(rotatedCS_);
auto const Ecm = p4.getTimeLikeComponent();
Eigen::Vector2d com;
......@@ -134,8 +134,10 @@ namespace corsika {
inverseBoost_ << coshEta, -sinhEta, -sinhEta, coshEta;
}
inline CoordinateSystemPtr COMBoost::getRotatedCS() const { return rotatedCS_; }
inline CoordinateSystemPtr const& COMBoost::getRotatedCS() const { return rotatedCS_; }
inline CoordinateSystemPtr COMBoost::getOriginalCS() const { return originalCS_; }
inline CoordinateSystemPtr const& COMBoost::getOriginalCS() const {
return originalCS_;
}
} // namespace corsika
......@@ -76,10 +76,10 @@ namespace corsika {
FourVector fromCoM(FourVector const& p4) const;
//! returns the rotated coordinate system: +z is projectile direction
CoordinateSystemPtr getRotatedCS() const;
CoordinateSystemPtr const& getRotatedCS() const;
//! returns the original coordinate system of the projectile (lab)
CoordinateSystemPtr getOriginalCS() const;
CoordinateSystemPtr const& getOriginalCS() const;
protected:
//! internal method
......@@ -88,7 +88,7 @@ namespace corsika {
private:
Eigen::Matrix2d boost_;
Eigen::Matrix2d inverseBoost_;
CoordinateSystemPtr originalCS_;
CoordinateSystemPtr const originalCS_;
CoordinateSystemPtr rotatedCS_;
};
} // namespace corsika
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment