Index: trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.cc	(revision 6848)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.cc	(revision 6915)
@@ -82,5 +82,5 @@
 //                                            
 //  Output Container:                        
-//   MWeight  
+//   MWeight [MParameterD]
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -94,5 +94,5 @@
 #include "MMcRunHeader.hxx"
 #include "MMcCorsikaRunHeader.h"
-#include "MWeight.h"
+#include "MParameters.h"
 
 #include "TF1.h"
@@ -232,10 +232,7 @@
       }
 
-    fWeight = (MWeight*)pList->FindCreateObj("MWeight");
+    fWeight = (MParameterD*)pList->FindCreateObj("MParameterD", "MWeight");
     if (!fWeight)
-      {
-	*fLog << err << dbginf << "MWeight not found... exit." << endl;
 	return kFALSE;
-      }
     
     return kTRUE;
@@ -347,14 +344,14 @@
 
     const Double_t C = fCorSpecInt / fNewSpecInt;
-    Double_t weight;
+    Double_t weight = C;
 
 
     if (fNewSpecIsPowLaw)   
-      weight = C * pow(energy,fNewSlope-fCorsikaSlope);
+        weight *= pow(energy,fNewSlope-fCorsikaSlope);
     else
-      weight = C * fNewSpectrum->Eval(energy) / pow(energy,fCorsikaSlope);
+        weight *= fNewSpectrum->Eval(energy) / pow(energy,fCorsikaSlope);
      
 
-    fWeight->SetWeight( weight );
+    fWeight->SetVal(weight);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.h
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.h	(revision 6848)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcWeightEnergySpecCalc.h	(revision 6915)
@@ -9,5 +9,5 @@
 class MParList;
 class MMcEvt;
-class MWeight;
+class MParameterD;
 class TF1;
 
@@ -19,5 +19,5 @@
 
     const MMcEvt *fMcEvt;
-    MWeight  *fWeight;
+    MParameterD  *fWeight;
 
     TF1*     fNewSpectrum;     // Function with the new spectrum
