hps-java/src/main/java/org/lcsim/hps/users/phansson
diff -u -r1.2 -r1.3
--- trigRate.java 12 Jul 2012 21:32:39 -0000 1.2
+++ trigRate.java 17 Jul 2012 20:13:12 -0000 1.3
@@ -173,7 +173,7 @@
try {
ITree tree = analysisFactory.createTreeFactory().create("plots/20120618_trig_rate_gainfix_noFirstRow/trigratedriver_hps_001351_withtracking.evio.0.aida");
//printObjectsInTree(tree);
- ana.getGainCalibration(tree,side);
+ //ana.getGainCalibration(tree,side);
} catch (IOException e) {
@@ -199,21 +199,22 @@
//String path = "plots/20120615_trig_rate_gainfix/";
//String path = "plots/20120618_trig_rate_gainfix_noFirstRow/";
String path = "plots/20120618_trig_rate_gainfix/";
- //path = "";
+ path = "";
List<String> trees = new ArrayList<String>();
- trees.add(path + "trigratedriver_hps_001351.evio.0.aida");
- trees.add(path + "trigratedriver_hps_001354.evio.0.aida");
- trees.add(path + "trigratedriver_hps_001359.evio.0.aida");
- trees.add(path + "trigratedriver_hps_001362.evio.0.aida");
- trees.add(path + "trigratedriver_hps_001353.evio.0.aida");
- trees.add(path + "trigratedriver_hps_001354.evio.1.aida");
- trees.add(path + "trigratedriver_hps_001360.evio.0.aida");
- trees.add(path + "trigratedriver_hps_001362.evio.1.aida");
- trees.add(path + "trigratedriver_hps_001353.evio.1.aida");
- trees.add(path + "trigratedriver_hps_001358.evio.0.aida");
- trees.add(path + "trigratedriver_hps_001360.evio.1.aida");
- trees.add(path + "trigratedriver_hps_001362.evio.2.aida");
+ trees.add(path + "trigratefile_001351.aida");//driver_hps_001351.evio.0.aida");
+ //trees.add(path + "trigratedriver_hps_001354.evio.0.aida");
+ //trees.add(path + "trigratedriver_hps_001359.evio.0.aida");
+ //trees.add(path + "trigratedriver_hps_001362.evio.0.aida");
+ //trees.add(path + "trigratedriver_hps_001353.evio.0.aida");
+ //trees.add(path + "trigratedriver_hps_001354.evio.1.aida");
+ //trees.add(path + "trigratedriver_hps_001360.evio.0.aida");
+ //trees.add(path + "trigratedriver_hps_001362.evio.1.aida");
+ //trees.add(path + "trigratedriver_hps_001353.evio.1.aida");
+ trees.add(path + "trigratefile_001358.aida");
+ //trees.add(path + "trigratedriver_hps_001358.evio.0.aida");
+ //trees.add(path + "trigratedriver_hps_001360.evio.1.aida");
+ //trees.add(path + "trigratedriver_hps_001362.evio.2.aida");
/*
hps-java/src/main/java/org/lcsim/hps/users/phansson
diff -u -r1.2 -r1.3
--- TrigRateDriver.java 12 Jul 2012 21:32:39 -0000 1.2
+++ TrigRateDriver.java 17 Jul 2012 20:13:12 -0000 1.3
@@ -263,7 +263,7 @@
boolean clusterGoodRegion = false;
- if(crystalPair[0]<0) clusterGoodRegion = true;
+ //if(crystalPair[0]<0 && crystalPair[1]>0) clusterGoodRegion = true;
if(crystalPair[0]<0) clusterGoodRegion = true;
// if(crystalPair[0]<0 && crystalPair[1]>1) clusterGoodRegion = true;
// if(crystalPair[0]<0 && crystalPair[1]<-1) clusterGoodRegion = true;
hps-java/src/main/java/org/lcsim/hps/users/phansson
diff -u -r1.2 -r1.3
--- ecalPlots.java 12 Jul 2012 21:32:39 -0000 1.2
+++ ecalPlots.java 17 Jul 2012 20:13:12 -0000 1.3
@@ -60,6 +60,12 @@
Options opts = createCommandLineOptions();
+ if (args.length == 0) {
+ System.out.println("ecalPlots [options]");
+ HelpFormatter help = new HelpFormatter();
+ help.printHelp(" ", opts);
+ System.exit(1);
+ }
CommandLineParser parser = new PosixParser();
CommandLine cmd=null;
try {
@@ -67,6 +73,9 @@
} catch (ParseException ex) {
Logger.getLogger(ecalPlots.class.getName()).log(Level.SEVERE, null, ex);
}
+
+
+
int type=0;
String strType = cmd.getOptionValue("t");
if(strType==null) {
@@ -216,7 +225,7 @@
try {
String path = "";//plots/20120710_ecal_dataMC/../../";
- String file_mc = "trigratefile_egs5_160rl.aida";
+ String file_mc = "trigratefile_egs5_500mb_90na_01.aida";//trigratefile_egs5_160rl.aida";
String file_data = "trigratefile_run1351.aida";
String file_bkg = "trigratefile_run1358.aida";
@@ -230,8 +239,8 @@
- SimpleHPSConditions cond = new SimpleHPSConditions("runConditions.txt");
-
+ SimpleHPSConditions cond = new SimpleHPSConditions("/Users/phansson/work/HPS/software/reco/hps-java/src/main/java/org/lcsim/hps/users/phansson/runConditions.txt");
+
int idx = file_data.indexOf("run");
int run_data = Integer.parseInt(file_data.substring(idx+3,idx+7));
idx = file_bkg.indexOf("run");
@@ -260,14 +269,14 @@
for(int ix=-23;ix<=23;++ix) {
for(int iy=-5;iy<=5;++iy) {
- //if(ix<=0) continue;
+ if(ix<=0) continue;
if(iy<=0) continue;
histNames.add("Cluster energy x="+ix+" y="+iy);
}
}
- System.out.println("Histogram names: "+histNames.toString());
+ //System.out.println("Histogram names: "+histNames.toString());
int iadded=0;
IHistogram1D h_obs=null;
@@ -275,7 +284,7 @@
IHistogram1D h_mc=null;
- boolean dataToMCNorm = true;
+ boolean dataToMCNorm = false;
for(String hname : histNames) {
IHistogram1D h_obs_tmp = (IHistogram1D)tree_data.find(hname);
IHistogram1D h_bkg_tmp = (IHistogram1D)tree_bkg.find(hname);
@@ -305,8 +314,8 @@
} else {
h_mc.scale(k_Q);
}
- System.out.println("mc " + h_mc.entries() + "(" + h_mc.allEntries() + ")" + " obs " + h_obs.entries()+ "(" + h_obs.allEntries() + ")" + " bkg " + h_bkg.entries()+ "(" + h_bkg.allEntries() + ")" + " obs " + h_data.entries()+ "(" + h_data.allEntries() + ")");
- System.out.println("mc " + h_mc.sumBinHeights() + " obs " + h_obs.sumBinHeights() + " bkg " + h_bkg.sumBinHeights() + " obs " + h_data.sumBinHeights());
+ //System.out.println("mc " + h_mc.entries() + "(" + h_mc.allEntries() + ")" + " obs " + h_obs.entries()+ "(" + h_obs.allEntries() + ")" + " bkg " + h_bkg.entries()+ "(" + h_bkg.allEntries() + ")" + " obs " + h_data.entries()+ "(" + h_data.allEntries() + ")");
+ //System.out.println("mc " + h_mc.sumBinHeights() + " obs " + h_obs.sumBinHeights() + " bkg " + h_bkg.sumBinHeights() + " obs " + h_data.sumBinHeights());
System.out.printf("Run %d: obs %.1f bkg %.1f\t=>\tdata %.1f MC %.1f\t->\tdata/MC=%.2f\n",run_data,h_obs.sumBinHeights(),h_bkg.sumBinHeights(),h_data.sumBinHeights(),h_mc.sumBinHeights(),h_data.sumBinHeights()/h_mc.sumBinHeights());
ecalhtplots.plotBasic1D(h_data,h_mc,name+"_"+h_obs.title(), "","","data","MC",savePlots);