Author: [log in to unmask]
Date: Sat Dec 17 10:56:30 2016
New Revision: 4637
Log:
Add flag that allows disabling of cluster PID through the steering file.
Modified:
java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java
Modified: java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java
=============================================================================
--- java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java (original)
+++ java/trunk/recon/src/main/java/org/hps/recon/particle/ReconParticleDriver.java Sat Dec 17 10:56:30 2016
@@ -29,10 +29,10 @@
/**
- * Driver framework for generating reconstructed particles and matching clusters
+ * Driver used to create reconstructed particles and matching clusters
* and tracks.
*
- * @author Omar Moreno <[log in to unmask]>
+ * @author <a href="mailto:[log in to unmask]">Omar Moreno</a>
* @author Mathew Graham <[log in to unmask]>
*/
public abstract class ReconParticleDriver extends Driver {
@@ -54,8 +54,8 @@
HPSEcal3 ecal;
-
protected boolean isMC = false;
+ private boolean disablePID = false;
/**
* Sets the condition of whether the data is Monte Carlo or not.
@@ -205,7 +205,10 @@
MAXNSIGMAPOSITIONMATCH=nsigma;
}
-
+ /** Disable setting the PID of an Ecal cluster. */
+ public void setDisablePID(boolean disablePID) {
+ this.disablePID = disablePID;
+ }
/**
* Updates the magnetic field parameters to match the appropriate values for
@@ -334,7 +337,7 @@
// propogate pid to the cluster:
final int pid = particle.getParticleIDUsed().getPDG();
if (Math.abs(pid) == 11) {
- ((BaseCluster) matchedCluster).setParticleId(pid);
+ if (!disablePID) ((BaseCluster) matchedCluster).setParticleId(pid);
}
// unmatched clusters will (later) be used to create photon particles:
@@ -357,7 +360,7 @@
int pid = particle.getParticleIDUsed().getPDG();
if (Math.abs(pid) != 11) {
- ((BaseCluster) unmatchedCluster).setParticleId(pid);
+ if (!disablePID) ((BaseCluster) unmatchedCluster).setParticleId(pid);
}
// Add the cluster to the particle.
|