lcsim/src/org/lcsim/recon/cluster/util
diff -u -r1.1 -r1.2
--- BothCalorimetersDecision.java 4 Jul 2006 21:10:45 -0000 1.1
+++ BothCalorimetersDecision.java 25 May 2007 23:59:32 -0000 1.2
@@ -7,7 +7,7 @@
/**
* Require one cluster to be in the ECAL and one to be in the HCAL
*
- * @version $Id: BothCalorimetersDecision.java,v 1.1 2006/07/04 21:10:45 mcharles Exp $
+ * @version $Id: BothCalorimetersDecision.java,v 1.2 2007/05/25 23:59:32 mcharles Exp $
*/
public class BothCalorimetersDecision implements DecisionMakerPair<Cluster,Cluster>
{
@@ -37,7 +37,9 @@
boolean hitIsECAL = isECAL(hit);
boolean hitIsHCAL = isHCAL(hit);
if (hitIsECAL && hitIsHCAL) {
- throw new AssertionError("Hit ["+hit+"] is in ECAL and HCAL simultaneously!");
+ throw new AssertionError("Hit ["+hit+"] is in ECAL and HCAL simultaneously! subdet="+hit.getSubdetector().getName());
+ } else if (!hitIsECAL && !hitIsHCAL) {
+ throw new AssertionError("Hit ["+hit+"] is neither in ECAL nor in HCAL! subdet="+hit.getSubdetector().getName());
}
onlyECAL1 = onlyECAL1 && hitIsECAL;
onlyHCAL1 = onlyHCAL1 && hitIsHCAL;
@@ -50,7 +52,9 @@
boolean hitIsECAL = isECAL(hit);
boolean hitIsHCAL = isHCAL(hit);
if (hitIsECAL && hitIsHCAL) {
- throw new AssertionError("Hit ["+hit+"] is in ECAL and HCAL simultaneously!");
+ throw new AssertionError("Hit ["+hit+"] is in ECAL and HCAL simultaneously! subdet="+hit.getSubdetector().getName());
+ } else if (!hitIsECAL && !hitIsHCAL) {
+ throw new AssertionError("Hit ["+hit+"] is neither in ECAL nor in HCAL! subdet="+hit.getSubdetector().getName());
}
onlyECAL2 = onlyECAL2 && hitIsECAL;
onlyHCAL2 = onlyHCAL2 && hitIsHCAL;
@@ -70,6 +74,6 @@
private boolean isECAL(CalorimeterHit hit) {
org.lcsim.geometry.Subdetector subdet = hit.getSubdetector();
String name = subdet.getName();
- return (name.compareTo("EMBarrel") == 0 || name.compareTo("EMDEndcap") == 0);
+ return (name.compareTo("EMBarrel") == 0 || name.compareTo("EMEndcap") == 0);
}
}