Index: trunk/MagicSoft/Mars/mhflux/MHDisp.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHDisp.cc	(revision 7202)
+++ trunk/MagicSoft/Mars/mhflux/MHDisp.cc	(revision 7208)
@@ -248,45 +248,48 @@
     // To calculate significance map smear with 2*theta-cut and
     // do not normalize gauss, for event map use theta-cut/2 instead
-    for (int x=1; x<=nx; x++)
-    {
-        const Double_t cx = axex.GetBinCenter(x);
-        const Double_t px = cx-pos1.X();
-
-        for (int y=1; y<=ny; y++)
-        {
-            const Double_t cy = axey.GetBinCenter(y);
-            const Double_t sp = Sq(px, cy-pos1.Y());
-            if (smear)
+    if (smear || fHistOff)
+    {
+        for (int x=1; x<=nx; x++)
+        {
+            const Double_t cx = axex.GetBinCenter(x);
+            const Double_t px = cx-pos1.X();
+
+            for (int y=1; y<=ny; y++)
             {
-                const Double_t dp = sp/psf;
-
-                // Values below 1e-3 (>3.5sigma) are not filled into the histogram
-                if (dp<4)
+                const Double_t cy = axey.GetBinCenter(y);
+                const Double_t sp = Sq(px, cy-pos1.Y());
+                if (smear)
                 {
-                    const Double_t rc = TMath::Exp(-dp)/normg;
-                    if (!fHistOff)
-                        bg.AddBinContent(bg.GetBin(x, y), rc);
-                    else
-                        fHist.AddBinContent(fHist.GetBin(x, y, bz), rc);
+                    const Double_t dp = sp/psf;
+
+                    // Values below 1e-3 (>3.5sigma) are not filled into the histogram
+                    if (dp<4)
+                    {
+                        const Double_t rc = TMath::Exp(-dp)/normg;
+                        if (!fHistOff)
+                            bg.AddBinContent(bg.GetBin(x, y), rc);
+                        else
+                            fHist.AddBinContent(fHist.GetBin(x, y, bz), rc);
+                    }
                 }
+
+                if (!fHistOff)
+                    continue;
+
+                // If we are filling the signal already (fHistOff!=NULL)
+                // we also fill the background by projecting the
+                // background in the camera into the sky plot.
+                const TVector2 v = TVector2(cx+m.X(), cy+m.Y());
+
+                // Speed up further: Xmax-fWobble
+                if (v.Mod()>axex.GetXmax()) // Gains 10% speed
+                    continue;
+
+                const Int_t    bx = axex.FindFixBin(v^rot);
+                const Int_t    by = axey.FindFixBin(v*rot);
+                const Double_t bg = fHistOff->GetBinContent(bx, by, bz);
+
+                fHistBg.AddBinContent(fHistBg.GetBin(x, y), bg);
             }
-
-            if (!fHistOff)
-                continue;
-
-            // If we are filling the signal already (fHistOff!=NULL)
-            // we also fill the background by projecting the
-            // background in the camera into the sky plot.
-            const TVector2 v = TVector2(cx+m.X(), cy+m.Y());
-
-            // Speed up further: Xmax-fWobble
-            if (v.Mod()>axex.GetXmax()) // Gains 10% speed
-                continue;
-
-            const Int_t    bx = axex.FindFixBin(v^rot);
-            const Int_t    by = axey.FindFixBin(v*rot);
-            const Double_t bg = fHistOff->GetBinContent(bx, by, bz);
-
-            fHistBg.AddBinContent(fHistBg.GetBin(x, y), bg);
         }
     }
