Author: [log in to unmask]
Date: Thu Mar 17 07:22:47 2016
New Revision: 4303
Log:
added tunable parameters to the FEE calibration plotter, defaults to 2015 run
Modified:
java/trunk/analysis/src/main/java/org/hps/analysis/ecal/FEEClusterPlotter.java
Modified: java/trunk/analysis/src/main/java/org/hps/analysis/ecal/FEEClusterPlotter.java
=============================================================================
--- java/trunk/analysis/src/main/java/org/hps/analysis/ecal/FEEClusterPlotter.java (original)
+++ java/trunk/analysis/src/main/java/org/hps/analysis/ecal/FEEClusterPlotter.java Thu Mar 17 07:22:47 2016
@@ -44,6 +44,28 @@
private String outputPlots = null;
+ //Set min energy in histo
+ private double minHistoE = 0.5;
+
+ //Set max energy in histo
+ private double maxHistoE = 1.3;
+
+ /**
+ * Set the minimum histogram energy
+ * @param minHistoE
+ */
+ void setMinHistoE(double minHistoE) {
+ this.minHistoE = minHistoE;
+ }
+
+ /**
+ * Set the maximum histogram energy
+ * @param maxHistoE
+ */
+ void setMaxHistoE(double maxHistoE) {
+ this.maxHistoE = maxHistoE;
+ }
+
@Override
protected void detectorChanged(Detector detector) {
@@ -52,14 +74,72 @@
aida.tree().cd("/");
for (EcalChannel cc : ecalConditions.getChannelCollection()) {
- //aida.histogram1D(getHistoName(cc),200,0.5,1.3);
- aida.histogram1D(getHistoName(cc),200,0.9,2.8);
+ aida.histogram1D(getHistoName(cc),200,minHistoE,maxHistoE);
}
}
private String getHistoName(EcalChannel cc) {
return String.format(histoNameFormat,cc.getChannelId());
+ }
+
+
+ //Set min seed energy value, default to 2015 run
+ private double seedCut = 0.4;
+
+ //set min cluster time in window, default to 2015 run
+ private double minTime = 30;
+
+ //set max cluster time in window, default to 2015 run
+ private double maxTime = 070;
+
+ //set min number of hits in a cluster in row 1, default to 2015 run
+ private int hitCut = 5;
+
+ //hit cut is only used in 2016 data, not 2015
+ boolean useHitCut = false;
+
+
+ /**
+ * Set the cut value for seed energy in GeV
+ * @param seedCut
+ */
+ void setSeedCut(double seedCut) {
+ this.seedCut = seedCut;
+ }
+
+ /**
+ * Set the min time in window to look for cluster
+ * @param minTime
+ */
+ void setMinTime(double minTime) {
+ this.minTime = minTime;
+ }
+
+ /**
+ * Set the max time in window to look for cluster
+ * @param maxTime
+ */
+ void setMaxTime(double maxTime) {
+ this.maxTime = maxTime;
+ }
+
+ /**
+ * Set the hit cut value for hits in cluster
+ * This cut is used in 2016 running (not 2015)
+ * @param hitCut
+ */
+ void setHitCut(int hitCut) {
+ this.hitCut = hitCut;
+ }
+
+ /**
+ * Set the hit cut value for hits in cluster
+ * This cut is used in 2016 running (not 2015)
+ * @param hitCut
+ */
+ void setUseHitCut(boolean useHitCut) {
+ this.useHitCut = useHitCut;
}
public void process(EventHeader event) {
@@ -90,12 +170,30 @@
double clusE = clus.getEnergy();
double time = seed.getTime();
- //if ((seedE/clusE > 0.6) && seedE >0.45 && time>30 && time <70){
- if ((seedE/clusE > 0.6) && seedE >0.65 && time>30 && time <70){
+ //in 2015, not hit count cut used at all
+ if (useHitCut){
+ if (Math.abs(seed.getIdentifierFieldValue("iy"))==1 && (seedE/clusE > 0.6) && seedE >seedCut
+ && time>minTime && time <maxTime && hits.size()>(hitCut+2) ){
- EcalChannel cc = findChannel(seed);
- aida.histogram1D(getHistoName(cc)).fill(clusE);
+ EcalChannel cc = findChannel(seed);
+ aida.histogram1D(getHistoName(cc)).fill(clusE);
+ }
+ else if (Math.abs(seed.getIdentifierFieldValue("iy"))==1 && (seedE/clusE > 0.6) && seedE >seedCut
+ && time>minTime && time <maxTime && hits.size()>(hitCut) ){
+
+ EcalChannel cc = findChannel(seed);
+ aida.histogram1D(getHistoName(cc)).fill(clusE);
+ }
}
+ else {
+ if ((seedE/clusE > 0.6) && seedE >seedCut
+ && time>minTime && time <maxTime ){
+
+ EcalChannel cc = findChannel(seed);
+ aida.histogram1D(getHistoName(cc)).fill(clusE);
+
+ }
+ }
}
}
}
|