@@ -350,7 +350,7 @@ public void assignBetas(DetectorEvent event,final boolean useStartTimeFromFT){
350350 }
351351 public void assignPids (DetectorEvent event ,final boolean useStartTimeFromFT ) {
352352
353- PIDHypothesis pidHyp = new PIDHypothesis ();
353+ PIDHypothesis pidHyp = new PIDHypothesis (event . getEventHeader (). getTorus () );
354354 pidHyp .setEvent (event );
355355 pidHyp .setUseStartTimeFromFT (useStartTimeFromFT );
356356
@@ -382,12 +382,13 @@ else if (p.getCharge()<0) {
382382
383383 public class PIDHypothesis {
384384
385+ private float torus = 0 ;
385386 private int theoryPID = -1 ;
386387 private double PIDquality = 0.0 ;
387388 private DetectorEvent event ;
388389 private boolean useStartTimeFromFT = false ;
389390
390- public PIDHypothesis () {}
391+ public PIDHypothesis (float t ) {torus = t ; }
391392
392393 public void setEvent (DetectorEvent e ) {event = e ;}
393394
@@ -405,7 +406,9 @@ public void PIDMatch(DetectorParticle p, int pid) {
405406
406407 final boolean pidFromTimingCheck = pid ==pidFromTiming && p .getTheoryBeta (pid )>0 ;
407408
408- final boolean isElectron = EBUtil .isSimpleElectron (p ,ccdb );
409+ final boolean isElectron = Math .abs (torus )>1e-8 ?
410+ EBUtil .isSimpleElectron (p ,ccdb ) :
411+ EBUtil .isZeroFieldElectron (p , ccdb );
409412
410413 final boolean htccSignalCheck = p .getNphe (DetectorType .HTCC )>ccdb .getDouble (EBCCDBEnum .HTCC_NPHE_CUT );
411414 final boolean ltccSignalCheck = p .getNphe (DetectorType .LTCC )>ccdb .getDouble (EBCCDBEnum .LTCC_NPHE_CUT );
0 commit comments