Index: modules/Calorimeter.cc
===================================================================
--- modules/Calorimeter.cc	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
+++ modules/Calorimeter.cc	(revision 38bf1ae5e7b9478befba62f118fd970176d3ac06)
@@ -151,9 +151,9 @@
 
   // read min E value for towers to be saved
-  fECalEnergyMin = GetDouble("ECalMinEnergy", 0.0);
-  fHCalEnergyMin = GetDouble("HCalMinEnergy", 0.0);
-
-  fECalSigmaMin  = GetDouble("ECalMinSignificance", 0.0);
-  fHCalSigmaMin  = GetDouble("HCalMinSignificance", 0.0);
+  fECalEnergyMin = GetDouble("ECalEnergyMin", 0.0);
+  fHCalEnergyMin = GetDouble("HCalEnergyMin", 0.0);
+
+  fECalEnergySignificanceMin = GetDouble("ECalEnergySignificanceMin", 0.0);
+  fHCalEnergySignificanceMin = GetDouble("HCalEnergySignificanceMin", 0.0);
 
   // switch on or off the dithering of the center of calorimeter towers
@@ -178,5 +178,4 @@
   fEFlowPhotonOutputArray = ExportArray(GetString("EFlowPhotonOutputArray", "eflowPhotons"));
   fEFlowNeutralHadronOutputArray = ExportArray(GetString("EFlowNeutralHadronOutputArray", "eflowNeutralHadrons"));
-
 }
 
@@ -440,19 +439,17 @@
 
   ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
+  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy);
 
   ecalEnergy = LogNormal(fTowerECalEnergy, ecalSigma);
-  ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0 : fTowerECalTime/fTowerECalTimeWeight;
-
-  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy);
-
   hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
-  hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalTimeWeight;
-
+
+  ecalTime = (fTowerECalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerECalTime/fTowerECalTimeWeight;
+  hcalTime = (fTowerHCalTimeWeight < 1.0E-09 ) ? 0.0 : fTowerHCalTime/fTowerHCalTimeWeight;
 
   ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
   hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
 
-  ecalEnergy = (ecalEnergy < fECalEnergyMin || ecalEnergy < fECalSigmaMin*ecalSigma) ? 0 : ecalEnergy;
-  hcalEnergy = (hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalSigmaMin*hcalSigma) ? 0 : hcalEnergy;
+  if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0;
+  if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0;
 
   energy = ecalEnergy + hcalEnergy;
@@ -461,11 +458,11 @@
   if(fDitherTowerCenter)
   {
-     eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
-     phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
+    eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
+    phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
   }
   else
   {
-     eta = fTowerEta;
-     phi = fTowerPhi;
+    eta = fTowerEta;
+    phi = fTowerPhi;
   }
 
@@ -482,5 +479,5 @@
   fTower->Edges[3] = fTowerEdges[3];
 
-  if( energy > 0.0 )
+  if(energy > 0.0)
   {
     if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
@@ -502,8 +499,11 @@
 
   ecalEnergy -= fTrackECalEnergy;
-  if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
-
   hcalEnergy -= fTrackHCalEnergy;
-  if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
+
+  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
+  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
+
+  if(ecalEnergy < fECalEnergyMin || ecalEnergy < fECalEnergySignificanceMin*ecalSigma) ecalEnergy = 0.0;
+  if(hcalEnergy < fHCalEnergyMin || hcalEnergy < fHCalEnergySignificanceMin*hcalSigma) hcalEnergy = 0.0;
 
   energy = ecalEnergy + hcalEnergy;
@@ -518,5 +518,5 @@
     tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy);
     tower->Eem = ecalEnergy;
-    tower->Ehad = 0;
+    tower->Ehad = 0.0;
 
     fEFlowPhotonOutputArray->Add(tower);
@@ -530,5 +530,5 @@
 
     tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy);
-    tower->Eem = 0;
+    tower->Eem = 0.0;
     tower->Ehad = hcalEnergy;
 
@@ -548,5 +548,5 @@
     a = TMath::Log(mean) - 0.5*b*b;
 
-    return TMath::Exp(a + b*gRandom->Gaus(0, 1));
+    return TMath::Exp(a + b*gRandom->Gaus(0.0, 1.0));
   }
   else
Index: modules/Calorimeter.h
===================================================================
--- modules/Calorimeter.h	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
+++ modules/Calorimeter.h	(revision 38bf1ae5e7b9478befba62f118fd970176d3ac06)
@@ -71,6 +71,6 @@
   Double_t fHCalEnergyMin;
 
-  Double_t fECalSigmaMin;
-  Double_t fHCalSigmaMin;
+  Double_t fECalEnergySignificanceMin;
+  Double_t fHCalEnergySignificanceMin;
 
   Bool_t fDitherTowerCenter;
