Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) +
Expand Down Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
}
/**
Expand All @@ -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
Expand All @@ -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){
Expand All @@ -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);
}
/**
Expand Down
Loading