Index: modules/Calorimeter.cc
===================================================================
--- modules/Calorimeter.cc	(revision f3c4047f6fda56fc2789ec19ed133e7e52c94aae)
+++ modules/Calorimeter.cc	(revision 9343566b3b1349fd361002e0f5dcd11fe413e9e4)
@@ -517,57 +517,73 @@
   if(energy > 0.0)
   {
-    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
-    {
-      fPhotonOutputArray->Add(fTower);
-    }
-
-    fTowerOutputArray->Add(fTower);
-  }
-
-  // fill energy flow candidates
-
-  // save all the tracks as energy flow tracks
-  fItTowerTrackArray->Reset();
-  while((track = static_cast<Candidate*>(fItTowerTrackArray->Next())))
-  {
-    fEFlowTrackOutputArray->Add(track);
-  }
-
-  ecalEnergy -= fTrackECalEnergy;
-  hcalEnergy -= fTrackHCalEnergy;
-
-  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;
-
-  if(ecalEnergy > 0.0)
-  {
-    // create new photon tower
-    tower = static_cast<Candidate*>(fTower->Clone());
-
-    pt = ecalEnergy / TMath::CosH(eta);
-
-    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy);
-    tower->Eem = ecalEnergy;
-    tower->Ehad = 0.0;
-
-    fEFlowPhotonOutputArray->Add(tower);
-  }
-  if(hcalEnergy > 0.0)
-  {
-    // create new neutral hadron tower
-    tower = static_cast<Candidate*>(fTower->Clone());
-
-    pt = hcalEnergy / TMath::CosH(eta);
-
-    tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy);
-    tower->Eem = 0.0;
-    tower->Ehad = hcalEnergy;
-
-    fEFlowNeutralHadronOutputArray->Add(tower);
+     bool isCalPhoton = false;
+
+     if(fTowerTrackHits == 0)
+     {
+        // We have a CalPhoton when there are NOT tracks and there ARE photon hits
+        isCalPhoton = (fTowerPhotonHits > 0);
+     }
+     else
+     {
+         // save all the tracks as energy flow tracks
+         fItTowerTrackArray->Reset();
+         while((track = static_cast<Candidate*>(fItTowerTrackArray->Next())))
+         {
+            fEFlowTrackOutputArray->Add(track);
+         }
+
+         ecalEnergy -= fTrackECalEnergy;
+         hcalEnergy -= fTrackHCalEnergy;
+
+         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;
+     }
+
+     // If it's NOT a CalPhoton; add the tower as a whole entity.
+     // Otherwise, the tower will be split into its ECAL and HCAL components,
+     // then added to fPhotonArray and fTowerArray (respectively).
+     // By construction (no track hits), no track subtraction will occur
+     // for CalPhotons
+     if(!isCalPhoton)
+        fTowerOutputArray->Add(fTower);
+
+     // fill energy flow candidates
+
+     if(ecalEnergy > 0.0)
+     {
+         // create new photon tower
+         tower = static_cast<Candidate*>(fTower->Clone());
+
+         pt = ecalEnergy / TMath::CosH(eta);
+
+         tower->Momentum.SetPtEtaPhiE(pt, eta, phi, ecalEnergy);
+         tower->Eem = ecalEnergy;
+         tower->Ehad = 0.0;
+
+         fEFlowPhotonOutputArray->Add(tower);
+         if(isCalPhoton)
+		      fPhotonOutputArray->Add(tower);
+     }
+
+     if(hcalEnergy > 0.0)
+     {
+        // create new neutral hadron tower
+        tower = static_cast<Candidate*>(fTower->Clone());
+
+        pt = hcalEnergy / TMath::CosH(eta);
+
+        tower->Momentum.SetPtEtaPhiE(pt, eta, phi, hcalEnergy);
+        tower->Eem = 0.0;
+        tower->Ehad = hcalEnergy;
+
+        fEFlowNeutralHadronOutputArray->Add(tower);
+        if(isCalPhoton)
+           fTowerOutputArray->Add(tower);
+     }
   }
 }
