From 35c6334b4173d3291d4b98a80a64c10091dbd96f Mon Sep 17 00:00:00 2001
From: "Pyry Runko (Puck)" <pyjorunk@student.jyu.fi>
Date: Mon, 24 Mar 2025 14:58:07 +0200
Subject: [PATCH] vector Delta is now defined with length * cos and
 sin(theta_lDelta)

---
 src/diffractivecrosssection.cpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/diffractivecrosssection.cpp b/src/diffractivecrosssection.cpp
index adc4978..9590eae 100644
--- a/src/diffractivecrosssection.cpp
+++ b/src/diffractivecrosssection.cpp
@@ -114,14 +114,10 @@ std::complex<double> DiffractiveCrossSection::SumAmplitudes()
 
     //TODO: loop over all values
     double length_l = 1./(100*lattice_spacing); //[GeV] This is the magnitude of the vector ... whose direction is chosen to be in the x direction (1,0) For starters << a (lattice const)
-    double vector_l[2] = {length_l, 0.}; //this is the vector l 
+    double vector_l[2] = {length_l, 0.}; 
     double theta_lDelta = M_PI;
     double length_Delta = 0.5; //[GeV] This is the magnitude of the vector ... For starters <1 Gev
-    // given the first vector's (l) components and the inner product, find the second vector's (Delta) components
-    // sign of y component unknown, choose +
-    // TODO: this is nonsense, fix!
-    double vector_Delta[2] = {length_Delta*length_l*cos(theta_lDelta), pow(length_Delta,2) - pow(length_Delta*length_l*cos(theta_lDelta),2)};
-
+    double vector_Delta[2] = {length_Delta*cos(theta_lDelta), length_Delta*sin(theta_lDelta)};
 
     // quark flavors
     const double elementary_charge = sqrt(4.*M_PI/137.036); 
-- 
GitLab