Skip to content

Commit 602b289

Browse files
committed
reassign electron momentum from sampling fraction
1 parent af9b7e1 commit 602b289

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

reconstruction/eb/src/main/java/org/jlab/service/eb/EBAnalyzer.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,18 @@ else if (p.hasHit(DetectorType.CND) || p.hasHit(DetectorType.CTOF) || p.hasHit(D
307307
}
308308
}
309309

310+
public void assignElectronMomenta(DetectorEvent de) {
311+
final int np = de.getParticles().size();
312+
for (int ii=0; ii<np; ii++) {
313+
if (de.getParticle(ii).getCharge() != 0) continue;
314+
DetectorParticle p = de.getParticle(ii);
315+
if (abs(p.getPid()) == 11) {
316+
p.vector().setMag(p.getEnergy(DetectorType.ECAL) /
317+
SamplingFractions.getMean(11,p,ccdb));
318+
}
319+
}
320+
}
321+
310322
public void assignBetas(DetectorEvent event,final boolean useStartTimeFromFT){
311323

312324
final double startTime = useStartTimeFromFT ?

0 commit comments

Comments
 (0)