hps-java/src/main/java/org/lcsim/hps/util
diff -u -r1.1 -r1.2
--- DumpLHEEventsToASCII.java 15 Mar 2013 22:47:46 -0000 1.1
+++ DumpLHEEventsToASCII.java 9 Apr 2013 22:03:53 -0000 1.2
@@ -74,6 +74,7 @@
options.addOption(new Option("y", true, "Beam sigma in y"));
options.addOption(new Option("s", false, "Filter Events"));
options.addOption(new Option("u", false, "Is muonic decay?"));
+ options.addOption(new Option("t", false, "Is Trident?"));
return options;
}
@@ -106,7 +107,9 @@
String sigxString = String.valueOf(sigx);
String sigyString = String.valueOf(sigy);
eptString = convertDecimal(eptString);
- // LCIO output file.
+ if (cl.hasOption("t")) {
+ trident=true;
+ }
if (cl.hasOption("m")) {
massString = cl.getOptionValue("m");
if (!trident)
@@ -472,7 +475,7 @@
throw new RuntimeException("Unexpected entry for number of particles");
}
int nhep = nums.get(0).intValue();
-// System.out.println("Number of particles for event " + nevhep + ": " + nhep);
+ // System.out.println("Number of particles for event " + nevhep + ": " + nhep);
double decLen = 0;
double maxWght = 0;
@@ -500,23 +503,28 @@
if (vals.size() != 13) {
throw new RuntimeException("Unexpected entry for a particle");
}
- if (vals.get(1).intValue() != 1) {//ignore initial & intermediate state particles
+ idhepTmp = vals.get(0).intValue();
+ System.out.println(idhepTmp);
+ if (vals.get(1).intValue() == 9) {//apparently, vertices aren't counted in nhep
+ nhep++;
+ }
+
+ if (vals.get(1).intValue() == 1) {//ignore initial & intermediate state particles
+ // System.out.println("Ok...good"+idhepTmp);
- idhepTmp = vals.get(0).intValue();
-// System.out.println(idhepTmp);
for (int j = 0; j < 5; j++) {
- if (idhepTmp == 611) {
- phepEle[j] = vals.get(j + 6);
- }
+ if (idhepTmp == 611)
+ phepEle[j] = vals.get(j + 6);
if (idhepTmp == -611)
phepPos[j] = vals.get(j + 6);
if (idhepTmp == 11)
phepRec[j] = vals.get(j + 6);
- if (idhepTmp == -623)
+ if (idhepTmp == -623){
phepNuc[j] = vals.get(j + 6);
-
+ // System.out.println("Found the recoil nucleus");
+ }
}
@@ -531,10 +539,10 @@
//StdhepEvent ev = new StdhepEvent(nevhep, nhep, isthep, idhep, jmohep, jdahep, phep, vhep);
pw.format("%d ", nevhep);
- pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", phepEle[0], phepEle[1], phepEle[2], phepEle[3], phepEle[4]);
- pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", phepPos[0], phepPos[1], phepPos[2], phepPos[3], phepPos[4]);
- pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", phepRec[0], phepRec[1], phepRec[2], phepRec[3], phepRec[4]);
- pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f %5.5f ", phepNuc[0], phepNuc[1], phepNuc[2], phepNuc[3], phepNuc[4]);
+ pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f ", phepEle[0], phepEle[1], phepEle[2], phepEle[3], phepEle[4]);
+ pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f ", phepPos[0], phepPos[1], phepPos[2], phepPos[3], phepPos[4]);
+ pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f ", phepRec[0], phepRec[1], phepRec[2], phepRec[3], phepRec[4]);
+ pw.format("%5.5f %5.5f %5.5f %5.5f %5.5f ", phepNuc[0], phepNuc[1], phepNuc[2], phepNuc[3], phepNuc[4]);
pw.println();
hps-java/src/main/java/org/lcsim/hps/util
diff -u -r1.9 -r1.10
--- ConvertToStdhep.java 27 Feb 2013 18:50:10 -0000 1.9
+++ ConvertToStdhep.java 9 Apr 2013 22:03:53 -0000 1.10
@@ -7,7 +7,7 @@
/**
*
* @author Mathew Thomas Graham <[log in to unmask]>
- * $Id: ConvertToStdhep.java,v 1.9 2013/02/27 18:50:10 mgraham Exp $
+ * $Id: ConvertToStdhep.java,v 1.10 2013/04/09 22:03:53 mgraham Exp $
*/
import java.io.FileReader;
import java.io.IOException;
@@ -77,6 +77,7 @@
options.addOption(new Option("y", true, "Beam sigma in y"));
options.addOption(new Option("s", false, "Filter Events"));
options.addOption(new Option("u", false, "Is muonic decay?"));
+ options.addOption(new Option("t", false, "Is trident decay?"));
return options;
}
@@ -109,6 +110,10 @@
String sigxString = String.valueOf(sigx);
String sigyString = String.valueOf(sigy);
eptString = convertDecimal(eptString);
+ if (cl.hasOption("t")) {
+ trident = true;
+ System.out.println("Is a trident decay");
+ }
// LCIO output file.
if (cl.hasOption("m")) {
massString = cl.getOptionValue("m");
@@ -152,9 +157,11 @@
}
if (cl.hasOption("u")) {
_isMuon = true;
+ System.out.println("Is a muonic decay");
}
- sigxString=convertMicron(sigx);
- sigyString=convertMicron(sigy);
+
+ sigxString=convertMicron(sigx);
+ sigyString=convertMicron(sigy);
// String postfix = "_20ux200u_beamspot_gammactau_0cm.stdhep";
// String postfix = "_"+sigxString+"x"+sigyString+"_beamspot_gammactau_0cm.stdhep";
@@ -174,7 +181,7 @@
String inLabel = "W" + eptString + "GeV_Ap" + massString + "MeV_";
if(trident){
fDir = "/nfs/slac/g/hps/mgraham/DarkPhoton/MadGraph/Events" + eptString + massString + "/";
- fileLabel = "ap" + ecmString + massString + filter;
+ fileLabel = "ap" + ecmString + "gev"+ massString + filter;
inLabel = "W" + eptString + "GeV_" + massString + "_";
}
if(_isMuon){