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
1 merge request!439Resolve "QGSJetII-04 interface broken"
...@@ -23,7 +23,7 @@ namespace corsika { ...@@ -23,7 +23,7 @@ namespace corsika {
HEPMassType const massTarget) HEPMassType const massTarget)
: originalCS_{P4projectile.getSpaceLikeComponents().getCoordinateSystem()} : originalCS_{P4projectile.getSpaceLikeComponents().getCoordinateSystem()}
, rotatedCS_{make_rotationToZ(originalCS_, P4projectile.getSpaceLikeComponents())} { , rotatedCS_{make_rotationToZ(originalCS_, P4projectile.getSpaceLikeComponents())} {
auto const pProjectile = P4projectile.getSpaceLikeComponents(); auto const& pProjectile = P4projectile.getSpaceLikeComponents();
auto const pProjNormSquared = pProjectile.getSquaredNorm(); auto const pProjNormSquared = pProjectile.getSquaredNorm();
auto const pProjNorm = sqrt(pProjNormSquared); auto const pProjNorm = sqrt(pProjNormSquared);
...@@ -82,7 +82,7 @@ namespace corsika { ...@@ -82,7 +82,7 @@ namespace corsika {
template <typename FourVector> template <typename FourVector>
inline FourVector COMBoost::toCoM(FourVector const& p4) const { 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::Vector3d eVecRotated = pComponents.getEigenVector();
Eigen::Vector2d lab; Eigen::Vector2d lab;
...@@ -102,7 +102,7 @@ namespace corsika { ...@@ -102,7 +102,7 @@ namespace corsika {
template <typename FourVector> template <typename FourVector>
inline FourVector COMBoost::fromCoM(FourVector const& p4) const { 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(); auto const Ecm = p4.getTimeLikeComponent();
Eigen::Vector2d com; Eigen::Vector2d com;
...@@ -134,8 +134,10 @@ namespace corsika { ...@@ -134,8 +134,10 @@ namespace corsika {
inverseBoost_ << coshEta, -sinhEta, -sinhEta, coshEta; 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 } // namespace corsika
...@@ -76,10 +76,10 @@ namespace corsika { ...@@ -76,10 +76,10 @@ namespace corsika {
FourVector fromCoM(FourVector const& p4) const; FourVector fromCoM(FourVector const& p4) const;
//! returns the rotated coordinate system: +z is projectile direction //! 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) //! returns the original coordinate system of the projectile (lab)
CoordinateSystemPtr getOriginalCS() const; CoordinateSystemPtr const& getOriginalCS() const;
protected: protected:
//! internal method //! internal method
...@@ -88,7 +88,7 @@ namespace corsika { ...@@ -88,7 +88,7 @@ namespace corsika {
private: private:
Eigen::Matrix2d boost_; Eigen::Matrix2d boost_;
Eigen::Matrix2d inverseBoost_; Eigen::Matrix2d inverseBoost_;
CoordinateSystemPtr originalCS_; CoordinateSystemPtr const originalCS_;
CoordinateSystemPtr rotatedCS_; CoordinateSystemPtr rotatedCS_;
}; };
} // namespace corsika } // 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