File indexing completed on 2026-08-11 09:47:18
0001 #pragma once
0002
0003 #include "Beam.h"
0004 #include "Boost.h"
0005
0006 #include <Math/LorentzVector.h>
0007 using ROOT::Math::PxPyPzEVector;
0008
0009 #include <Math/LorentzRotation.h>
0010 using ROOT::Math::LorentzRotation;
0011
0012 LorentzRotation getBoost(double eE, double eN, double mE, double mN) {
0013
0014 TVector3 ve(0,0,-sqrt(eE*eE-mE*mE));
0015 TVector3 vn(0,0,sqrt(eN*eN-mN*mN));
0016
0017 const PxPyPzEVector ei(
0018 eicrecon::round_beam_four_momentum(
0019 ve,
0020 mE,
0021 {-1*eE},
0022 0.0)
0023 );
0024
0025 const PxPyPzEVector ni(
0026 eicrecon::round_beam_four_momentum(
0027 vn,
0028 mN,
0029 {eN},
0030 -0.025)
0031 );
0032
0033
0034
0035
0036
0037 LorentzRotation boost = eicrecon::determine_boost(ei, ni);
0038
0039 PxPyPzEVector boosted_e = boost(ei);
0040 PxPyPzEVector boosted_n = boost(ni);
0041
0042
0043
0044
0045
0046 return boost;
0047 }