Skip to content

Commit c67ad71

Browse files
authored
Include the charge in the energy loss computation (#1138)
* include the charge in the energy loss computation * add java doc
1 parent 4a1f948 commit c67ad71

File tree

1 file changed

+19
-2
lines changed
  • common-tools/clas-tracking/src/main/java/org/jlab/clas/tracking/kalmanfilter

1 file changed

+19
-2
lines changed

common-tools/clas-tracking/src/main/java/org/jlab/clas/tracking/kalmanfilter/Material.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ public Material clone(double newThickness) {
5959
return new Material(this.name, newThickness, this.density, this.ZoverA, this.X0, this.IeV, this.units);
6060
}
6161
// RDV make units a property of the material
62-
public double getEloss(double p, double mass) {
62+
/**
63+
* Compute the energy loss.
64+
*
65+
* @param p momentum of the particle crossing the material volume
66+
* @param mass mass of the particle crossing the material volume
67+
* @param charge charge (in unit of e) of the particle crossing the material volume
68+
*/
69+
public double getEloss(double p, double mass, int charge) {
6370
if(mass==0) return 0;
6471
double beta = p / Math.sqrt(p * p + mass * mass);
6572
double s = PhysicsConstants.massElectron() / mass;
@@ -69,11 +76,21 @@ public double getEloss(double p, double mass) {
6976
double K = 0.000307075 * units.value() * units.value(); // GeV mol-1 cm2
7077
double I = this.IeV * 1E-9;
7178
double logterm = 2. * PhysicsConstants.massElectron() * beta * beta * gamma * gamma * Wmax / (I * I);
72-
double dE = this.thickness * this.density * K * this.ZoverA
79+
double dE = this.thickness * this.density * K * charge * charge *this.ZoverA
7380
* (0.5 * Math.log(logterm) - beta * beta) / beta / beta; //in GeV
7481
return dE;
7582
}
7683

84+
/**
85+
* Compute the energy loss assuming the charge is 1. See {@link Material#getEloss(double, double, int)}.
86+
*
87+
* @param p momentum of the particle crossing the material volume
88+
* @param mass mass of the particle crossing the material volume
89+
*/
90+
public double getEloss(double p, double mass) {
91+
return getEloss(p, mass, 1);
92+
}
93+
7794
@Override
7895
public String toString() {
7996
String s = "Material: ";

0 commit comments

Comments
 (0)