Skip to content
Draft
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 @@ -60,7 +60,11 @@ private static HashMap<Integer, PDGParticle> initDatabase() {
particleMap.put(12, new PDGParticle("nue-", 14, 4, 0.320e-6, 0));
particleMap.put(-12, new PDGParticle("nue+", -14, 4, 0.320e-6, 0));
particleMap.put(22, new PDGParticle("gamma", 22, 1, 0.000, 0));
particleMap.put(45, new PDGParticle("d", 45, 45,1.87705, 1)); // This is not a PDG code.
particleMap.put(45, new PDGParticle("d", 45, 45,1.87705, 1));
// geant3 codes used by gemc in MC::Particle for light ions (not PDG codes; PDG entries below)
particleMap.put(46, new PDGParticle("TRITON", 46, 46, 2.80943, 1));
particleMap.put(47, new PDGParticle("ALPHA", 47, 47, 3.7284, 2));
particleMap.put(49, new PDGParticle("HE3", 49, 49, 2.80941, 2));

//Light mesons
particleMap.put(211, new PDGParticle("pi+", 211, 8, 0.13957018, 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.jlab.io.base.DataBank;
import org.jlab.io.base.DataEvent;
import org.jlab.clas.pdg.PDGDatabase;
import org.jlab.clas.pdg.PDGParticle;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -2018,7 +2019,12 @@ void CalculateMatchCuality(DataEvent event, List<MCRecMatch> mcp, List<MCRecMatc
for (int j = 0; j < mcp.size(); j++) {
MCRecMatch mcMatch = mcp.get(j);
Integer pid = mcPartBank.getInt("pid", j);
Integer charge = PDGDatabase.getParticleById(pid).charge();
PDGParticle part = PDGDatabase.getParticleById(pid);
if (part == null) { // unknown species get quality = 0
mcMatch.quality = 0.F;
continue;
}
Integer charge = part.charge();
//System.out.println("pid = " + mcPartBank.getInt("pid", j) + " Charge = " + charge);
Float quality = 0.F;

Expand Down
Loading