Author: [log in to unmask]
Date: Thu Dec 8 07:46:08 2016
New Revision: 4613
Log:
updated to include monte carlo option
Modified:
java/branches/branch-1116Fixes/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java
Modified: java/branches/branch-1116Fixes/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java
=============================================================================
--- java/branches/branch-1116Fixes/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java (original)
+++ java/branches/branch-1116Fixes/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java Thu Dec 8 07:46:08 2016
@@ -54,6 +54,20 @@
HPSEcal3 ecal;
+
+ protected boolean isMC = false;
+
+ /**
+ * Sets the condition of whether the data is Monte Carlo or not.
+ * This is used to smear the cluster energy corrections so that
+ * the energy resolution is consistent with data. False by default.
+ * @param isMC
+ */
+ public void setIsMC(boolean state) {
+ isMC = state;
+ }
+
+
/**
* Sets the name of the LCIO collection for beam spot constrained V0
* candidate particles.
@@ -362,10 +376,10 @@
if (clusterToTrack.containsKey(cluster)){
Track matchedT = clusterToTrack.get(cluster);
double ypos = TrackUtils.getTrackStateAtECal(matchedT).getReferencePoint()[2];
- ClusterUtilities.applyCorrections(ecal, cluster, ypos);
+ ClusterUtilities.applyCorrections(ecal, cluster, ypos,isMC);
}
else {
- ClusterUtilities.applyCorrections(ecal, cluster);
+ ClusterUtilities.applyCorrections(ecal, cluster,isMC);
}
}
}
@@ -576,6 +590,11 @@
protected boolean debug = false;
/**
+ * Indicates whether this is Monte Carlo or data
+ */
+ public boolean isMonteCarlo = false;
+
+ /**
* The simple name of the class used for debug print statements.
*/
private final String simpleName = getClass().getSimpleName();
|