Index: trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc	(revision 982)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc	(revision 983)
@@ -72,5 +72,5 @@
 }
 
-Bool_t MMcCollectionAreaCalc::Process () 
+Bool_t MMcCollectionAreaCalc::Process()
 { 
     const Float_t energy = log10(fMcEvt->GetEnergy());
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc	(revision 982)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc	(revision 983)
@@ -66,5 +66,6 @@
 //
 MMcThresholdCalc::MMcThresholdCalc(const Int_t dim, const char* name,
-                                   const char* title) : fDimension(dim)
+                                   const char* title)
+    : fDimension(dim), fMcTrig(NULL), fEnergy(NULL)
 {
     *fName  = name  ? name  : "MMcThresholdCalc";
@@ -108,4 +109,7 @@
         fDimension = -fDimension;
 
+    if (fDimension==0)
+        fDimension=1;
+
     fMcTrig = new TObjArray(pList->FindObjectList("MMcTrig", from, fDimension));
     if (fMcTrig->GetEntriesFast() != fDimension)
@@ -116,6 +120,9 @@
 
     fEnergy = new TObjArray(pList->FindCreateObjList("MHMcEnergy", from, fDimension));
-    if (fMcTrig->GetEntriesFast() != fDimension)
+    if (fMcTrig->GetEntriesFast() != fDimension && fDimension)
+    {
+        *fLog << dbginf << "Error: Not all requested MHMcEnergy objects are available...aborting." << endl;
         return kFALSE;
+    }
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc	(revision 982)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc	(revision 983)
@@ -37,5 +37,5 @@
 
 void MMcTriggerRateCalc::Init(int dim, int part, float *trigbg,
-                              float simbg, float spec, float flux0,
+                              float simbg,
                               const char *name, const char *title)
 {
@@ -52,7 +52,4 @@
 
     fPartId=part;
-
-    fSpecInd=spec;
-    fFlux0=flux0;
 }
 
@@ -61,10 +58,10 @@
 //  overloaded constructor I
 //
-//      dim: fDimension
-//      part: fPartId
+//      dim:     fDimension
+//      part:    fPartId
 //      *trigbg: number of shower from bacground that triggers
 //               a given trigger condition.
-//      simbg: Number of simulated showers for the bacground
-//      rate: rate of incident showers
+//      simbg:   Number of simulated showers for the background
+//      rate:    rate of incident showers
 //
 
@@ -73,5 +70,5 @@
                                        const char *name, const char *title)
 {
-    Init(dim, part, trigbg, simbg, rate, 0, name, title);
+    Init(dim, part, trigbg, simbg, name, title);
 }
 
@@ -81,18 +78,15 @@
 //  overloaded constructor II
 //
-//      dim: fDimension
-//      part: fPartId
+//      dim:     fDimension
+//      part:    fPartId
 //      *trigbg: number of shower from bacground that triggers
 //               a given trigger condition.
-//      simbg: Number of simulated showers for the bacground
-//      spec: spectral index
-//      flux0; fFlux0
-//
-
+//      simbg:   Number of simulated showers for the background
+//
 MMcTriggerRateCalc::MMcTriggerRateCalc(int dim, int part, float *trigbg,
-                                       float simbg, float spec, float flux0,
+                                       float simbg,
                                        const char *name, const char *title)
 {
-    Init(dim, part, trigbg, simbg, spec, flux0, name, title);
+    Init(dim, part, trigbg, simbg, name, title);
 }
 
@@ -122,4 +116,7 @@
         fDimension = -fDimension;
 
+    if (fDimension==0)
+        fDimension=1;
+
     fMcTrig = new TObjArray(pList->FindObjectList("MMcTrig", from, fDimension));
     if (fMcTrig->GetEntriesFast() != fDimension)
@@ -160,19 +157,22 @@
 Bool_t MMcTriggerRateCalc::Process()
 {
+    //
     //  Counting analysed and simulated showers
-
+    //
     fShowers++;
     if (fMcEvt->GetPhotElfromShower())
         fAnalShow++;
 
+    //
     //  Getting angles, energy and impact parameter to set boundaries
-
-    const Float_t theta=fMcEvt->GetTheta();
-    const Float_t phi  =fMcEvt->GetPhi();
-    const Float_t param=fMcEvt->GetImpact();
-    const Float_t ener =fMcEvt->GetEnergy()/1000.0;
-
+    //
+    const Float_t theta = fMcEvt->GetTheta();
+    const Float_t phi   = fMcEvt->GetPhi();
+    const Float_t param = fMcEvt->GetImpact();
+    const Float_t ener  = fMcEvt->GetEnergy()/1000.0;
+
+    //
     //  Counting number of triggers
-
+    //
     for (int i=0; i<fDimension; i++)
     {
@@ -191,13 +191,9 @@
 Bool_t MMcTriggerRateCalc::PostProcess()
 {
-    // Computing trigger rate and showing it
+    //
+    // Computing trigger rate
+    //
     for (int i=0; i<fDimension; i++)
-    {
-        MHMcRate &rate = *GetRate(i);
-
-        rate.CalcRate(fTrigger[i], fAnalShow, fShowers);
-        // rate.Print();
-        // rate.Draw("S");
-    }
+        GetRate(i)->CalcRate(fTrigger[i], fAnalShow, fShowers);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h	(revision 982)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h	(revision 983)
@@ -26,5 +26,5 @@
 
     Int_t      fDimension;     // Information about the trigger conditions
-    // in the root file to be read.
+                               // in the root file to be read.
 
     Float_t    fTrigger[10];   // Number of triggered showers
@@ -34,10 +34,6 @@
     Int_t      fPartId;        // Incident particle that generates showers
 
-    Float_t    fSpecInd;       // Spectral indec of the simualtion
-    Float_t    fFlux0;         // Flux 0 for the differential flux
-
     void Init(int dim, int part, float *trigbg,
-              float simbg, float spec, float flux0,
-              const char *name, const char *title);
+              float simbg, const char *name, const char *title);
 
     MHMcRate *GetRate(UInt_t i) const { return (MHMcRate*)((*fMcRate)[i]); }
@@ -46,5 +42,5 @@
 public:
     MMcTriggerRateCalc(int dim=0, int part=14, float *trigbg=NULL,
-                       float simbg=100000, float spec=2.75, float flux0=10.92e-2,
+                       float simbg=100000,
                        const char *name=NULL, const char *title=NULL);
 
