From cef9fd4b1bcb88816917bb2b90419bb788957716 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Wed, 11 Nov 2026 10:59:15 -0500 Subject: [PATCH] fix: epsilon and gamma calculations in `KinematicsFactory` No one uses this, as far as I can tell, but might as well fix it anyway. This is a breaking change. - `getEpsilon` is wrong, rather it _almost_ returns $\gamma$ - the denominator of the $\gamma$ calculation should be $Q$, not $Q^2$ - the correct `getEpsilon` also needs an energy parameter (to calculate $y$) --- .../org/jlab/physics/process/DVCSProcess.java | 15 +++++------- .../physics/process/KinematicsFactory.java | 24 ++++++++++++------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/common-tools/clas-physics/src/main/java/org/jlab/physics/process/DVCSProcess.java b/common-tools/clas-physics/src/main/java/org/jlab/physics/process/DVCSProcess.java index 177a8417c8..440bcbe083 100644 --- a/common-tools/clas-physics/src/main/java/org/jlab/physics/process/DVCSProcess.java +++ b/common-tools/clas-physics/src/main/java/org/jlab/physics/process/DVCSProcess.java @@ -39,8 +39,8 @@ public PhysicsEvent getEvent(PhaseSpace kinematics) { double t = kinematics.getDimension("t").getValue(); double phi = kinematics.getDimension("phi").getValue(); - double min_t = this.t_min(q2, xb); - double max_t = this.t_max(q2, xb); + double min_t = this.t_min(E, q2, xb); + double max_t = this.t_max(E, q2, xb); double xmin = q2/(2.0*MP*E); /*System.out.println(" t = " + t + " t-min = " + this.t_min(q2, xb) + " t-max = " + this.t_max(q2, xb) + @@ -148,15 +148,15 @@ public double getProperty(String key, PhysicsEvent event){ return 0.0; } - public double t_min(double q2, double xb){ - double eps = KinematicsFactory.getEpsilon(q2, xb); + public double t_min(double e, double q2, double xb){ + double eps = KinematicsFactory.getEpsilon(e, q2, xb); double nomin = 2.0*(1.0-xb)*(1.0-Math.sqrt(1+eps*eps)) + eps*eps; double denom = 4.0*xb*(1.0-xb) + eps*eps; return q2*(nomin/denom); } - public double t_max(double q2, double xb){ - double eps = KinematicsFactory.getEpsilon(q2, xb); + public double t_max(double e, double q2, double xb){ + double eps = KinematicsFactory.getEpsilon(e, q2, xb); double nomin = 2.0*(1.0-xb)*(1.0+Math.sqrt(1+eps*eps)) + eps*eps; double denom = 4.0*xb*(1.0-xb) + eps*eps; return q2*(nomin/denom); @@ -167,9 +167,6 @@ public Particle getProton(PhysicsEvent event, double q2, double xb,double t){ LorentzVector cm = new LorentzVector(q2p.vector()); LorentzVector pr = new LorentzVector(0.0,0.0,0.0,0.938); cm.add(pr); - double min_t = this.t_min(q2, xb); - double max_t = this.t_max(q2, xb); - double scale = (max_t - min_t)/Math.PI; return new Particle(2212,0.0,0.0,0.0,0.0,0.0,0.0); //return 1.0; } diff --git a/common-tools/clas-physics/src/main/java/org/jlab/physics/process/KinematicsFactory.java b/common-tools/clas-physics/src/main/java/org/jlab/physics/process/KinematicsFactory.java index 10e9759156..217a52da0a 100644 --- a/common-tools/clas-physics/src/main/java/org/jlab/physics/process/KinematicsFactory.java +++ b/common-tools/clas-physics/src/main/java/org/jlab/physics/process/KinematicsFactory.java @@ -5,7 +5,6 @@ */ package org.jlab.physics.process; -import org.jlab.clas.pdg.PDGDatabase; import org.jlab.clas.physics.Particle; import org.jlab.clas.physics.Vector3; @@ -17,13 +16,12 @@ public class KinematicsFactory { public static double MP = 0.93827; /** - * returns mu for given kinematics variables + * returns nu for given kinematics variables * @param q2 transferred momentum * @param xb Bjorken x * @return */ - public static double getMu(double q2, double xb){ - //double pmass = PDGDatabase.getParticleMass(2212); + public static double getNu(double q2, double xb){ return q2/(2.0*0.93827*xb); } /** @@ -34,7 +32,7 @@ public static double getMu(double q2, double xb){ * @return */ public static double getEprime(double E, double q2, double xb){ - return E - KinematicsFactory.getMu(q2, xb); + return E - KinematicsFactory.getNu(q2, xb); } /** * returns scattered electron angle for given kinematics @@ -50,8 +48,17 @@ public static double getTheta(double E, double q2, double xb){ return 2.0*Math.asin(value); } - public static double getEpsilon(double q2, double xb){ - return 2.0*xb*0.93827/q2; + public static double getEpsilon(double e, double q2, double xb){ + double nu = KinematicsFactory.getNu(q2, xb); + double gamma = KinematicsFactory.getGamma(q2, xb); + double y = nu/e; + double epsilon_1 = 1 - y - 0.25*y*y*gamma*gamma; + double epsilon_2 = 1 - y + 0.5*y*y + 0.25*y*y*gamma*gamma; + return epsilon_1/epsilon_2; + } + + public static double getGamma(double q2, double xb){ + return 2.0*xb*0.93827/Math.sqrt(q2); } public static double getQ2(double E, double x, double y){ @@ -68,9 +75,10 @@ public static double getQ2(double E, double x, double y){ public static Particle getElectron(double E, double q2, double xb){ double eprime = KinematicsFactory.getEprime( E, q2, xb); double theta = KinematicsFactory.getTheta( E, q2, xb); + double pprime = Math.sqrt(eprime*eprime-0.0005*0.0005); //System.out.println("E-prime = " + eprime + " theta = " + Math.toDegrees(theta)); Vector3 vec = new Vector3(); - vec.setMagThetaPhi(eprime, theta, 0.0); + vec.setMagThetaPhi(pprime, theta, 0.0); return new Particle(11,vec.x(),vec.y(),vec.z(),0.0,0.0,0.0); } /**