Index: trunk/MagicSoft/Mars/ganymed.rc
===================================================================
--- trunk/MagicSoft/Mars/ganymed.rc	(revision 8704)
+++ trunk/MagicSoft/Mars/ganymed.rc	(revision 8705)
@@ -128,11 +128,11 @@
 
 # -------------------------------------------------------------------------
-# Such a cut could be used to exclude starnge pointing positions. like
-# the camera center in wobble mode. However this directly influences the
-# effective observation time, which must then be corrected manually!
-# It is currently not recommended to use such a cut except for tests!
+# Such a cut could be used to exclude strange pointing positions. like
+# the camera center in wobble mode. Note, that a cut in the poiting
+# position directly influences the effective observation time and should
+# only be applied if the events are lost anyhow. In both cases you must
+# correct for the loss of observation time calculating your flux!
 # -------------------------------------------------------------------------
 #Cut0.Condition: MSrcPosCam.GetDist*MGeomCam.fConvMm2Deg>0.3
-
 
 # ---------- SETUP FOR ONOFF-MODE -----------
@@ -183,4 +183,11 @@
 
 # -------------------------------------------------------------------------
+# This cut is applied exclusively to the plots in the tab CutT. It is
+# resonable to show the events within your signal region here to
+# see if your signal region is clean from strange events (e.g. sparks)
+# -------------------------------------------------------------------------
+CutT.Condition: ThetaSquared.fVal < ThetaSquaredCut.fVal
+
+# -------------------------------------------------------------------------
 # Use this to executa a task (eg to calc hadronness) before Cut1
 # -------------------------------------------------------------------------
Index: trunk/MagicSoft/Mars/sponde.rc
===================================================================
--- trunk/MagicSoft/Mars/sponde.rc	(revision 8704)
+++ trunk/MagicSoft/Mars/sponde.rc	(revision 8705)
@@ -1,6 +1,89 @@
-EstimateEnergy.Rule: (0.380075+(MPointingPos.fZd*MPointingPos.fZd*0.00109028))*pow(MHillas.fSize,0.892462)
+# -------------------- Define your energy estimator -------------------
 
-BinningSize.Raw:        18   49   63600 log
+# Manually optimized (for example using trainenergy.C)
+EstimateEnergy.Rule: MHillas.fSize^0.906*pow(10, -0.831*(MHillasSrc.fDist*3.37e-3-0.161)^2*(MHillasSrc.fDist*3.37e-3>0.161) + 2.21*(MHillasSrc.fDist*3.37e-3-0.493)^2*(MHillasSrc.fDist*3.37e-3>0.493) + 8.18e-6*MPointingPos.fZd^2.82 - 0.1*MNewImagePar.fLeakage1^0.2)
+
+# You can use instead the Random Forest energy estimator
+#  (for example trained by trainenergy.C)
+#EstimateEnergy: MRanForestCalc
+#EstimateEnergy.NameOutput: MEnergyEst
+#EstimateEnergy.FileName: rf-energy.root
+#EstimateEnergy.Debug: No
+
+# ------------------------ Define your binnings -----------------------
+
+# The energy binning is mandatory
 BinningEnergyEst.Raw:   18   53   35800 log
 
-#MMcSpectrumWeight.NewSlope: -2.26
+# Binnings used for the Energy- and Disp-tab
+#BinningSize.Raw:            50  10  100000  log
+#BinningLeakage.Raw:         50   0     0.3  lin
+#BinningEnergyResidual.Raw:  51  -1       1  lin
+#BinningResidualDist.Raw:    51  -1       1  lin
+
+# A change of the theta binning must be done in ganymed (see below) :(
+#BinningTheta.Raw: 101 -0.005 0.505 asin
+
+# --------------- Setup the weighting for your spectrum ---------------
+#     For more details MMcSpectrumWeight::ReadEnv
+
+# A simple power law with a differential spectral index of -4
+#MMcSpectrumWeight.NewSlope: -4
+
+# Give a formula for the spectrum. Capital X is a place-holder
+# for the energy (eg. the crab-spectrum from our publication)
+#MMcSpectrumWeight.Formula: pow(X/300, -2.31-0.26*log10(X/300))
+
+# ----------------------- Additional setup ----------------------------
+
+# In the loop filling the ThetaSq histogram the theta cut is switched off
+# and the theta-cut is implicitly done in the histogram. Reading the
+# Monte Carlo for determining the collection area there is no theta-
+# histogram involved, thus you need the theta cut switched on
+MJSpectrum.Cut1.ThetaCut: On
+
+# You may want to change the scale region to a different region than
+# previously used in your ganymed-file. This might be usefull for
+# on/off-data. Note, that the result can also depend on what else
+# was setup for your MAlphaFitter in ganymed.
+#MAlphaFitter.ScaleMin: 0.137
+#MAlphaFitter.ScaleMax: 0.500
+
+# You may use this to change the scale and/or fit region for
+# determination of the excess vs energy (can be usefull in On/Off mode)
+#MAlphaFitter.ScaleMode: Fixed
+
+# You may want to allow scaling of each energy bin individually. (This
+# can be useful if on- and off- data in wobble mode do not agree well)
+#MAlphaFitter.ScaleMode: background
+#MAlphaFitter.BackgroundFitMin: 0.09
+#MAlphaFitter.BackgroundFitMax: 0.25
+
+# ------------------------- Additional cut ----------------------------
+
+# You can apply a cut in addition to all other cuts to your data and
+# MOnte Carlos. This can be usefull for example to setup a second
+# MFMagicCuts with a tighter behaviour assuming that your ganymed
+# was written with a really loose cut.
+#CutS.Inverted:  Yes
+#CutS.Condition: MFMagicCuts
+#CutS.ThetaCut: None
+#CutS.HadronnesCut: Area
+# Parametrization of Area
+#CutS.Param2:   0.215468
+#CutS.Param3:   5.63973
+#CutS.Param4:   0.0836169
+
+# --------------------------- Other binnings --------------------------
+
+# Binnings that are used by sponde but can not/shoud not be changed
+# because they are taken from the ganymed file
+#BinningTheta
+#BinningWidth
+#BinningLength
+#BinningDist
+#BinningM3Long
+#BinningM3Trans
+#BinningSlope
+#BinningAsym
+#BinningConc1
Index: trunk/MagicSoft/Mars/sponde_onoff.rc
===================================================================
--- trunk/MagicSoft/Mars/sponde_onoff.rc	(revision 8704)
+++ trunk/MagicSoft/Mars/sponde_onoff.rc	(revision 8705)
@@ -1,30 +1,89 @@
-# Defaine your energy estimator
-EstimateEnergy.Rule: 1.40871*pow(MHillas.fSize,0.810253)
+# -------------------- Define your energy estimator -------------------
 
+# Manually optimized (for example using trainenergy.C)
+EstimateEnergy.Rule: MHillas.fSize^0.906*pow(10, -0.831*(MHillasSrc.fDist*3.37e-3-0.161)^2*(MHillasSrc.fDist*3.37e-3>0.161) + 2.21*(MHillasSrc.fDist*3.37e-3-0.493)^2*(MHillasSrc.fDist*3.37e-3>0.493) + 8.18e-6*MPointingPos.fZd^2.82 - 0.1*MNewImagePar.fLeakage1^0.2)
+
+# You can use instead the Random Forest energy estimator
+#  (for example trained by trainenergy.C)
 #EstimateEnergy: MRanForestCalc
 #EstimateEnergy.NameOutput: MEnergyEst
-#EstimateEnergy.FileName: ranforest.root
+#EstimateEnergy.FileName: rf-energy.root
 #EstimateEnergy.Debug: No
 
-# Define your binnings
-BinningSize.Raw:        12   49   6360 log
-BinningEnergyEst.Raw:   12   53   3580 log
+# ------------------------ Define your binnings -----------------------
 
-# Setup the weighting for your spectrum
-# For more details MMcSpectrumWeight::ReadEnv
-MMcSpectrumWeight.NewSlope: -2.6
+# The energy binning is mandatory
+BinningEnergyEst.Raw:   18   53   35800 log
 
-# Give a formula for the spectrum. Capital X is a place-holder for the energy
-#MMcSpectrumWeight.Formula: pow(X, -2.6)
+# Binnings used for the Energy- and Disp-tab
+#BinningSize.Raw:            50  10  100000  log
+#BinningLeakage.Raw:         50   0     0.3  lin
+#BinningEnergyResidual.Raw:  51  -1       1  lin
+#BinningResidualDist.Raw:    51  -1       1  lin
+
+# A change of the theta binning must be done in ganymed (see below) :(
+#BinningTheta.Raw: 101 -0.005 0.505 asin
+
+# --------------- Setup the weighting for your spectrum ---------------
+#     For more details MMcSpectrumWeight::ReadEnv
+
+# A simple power law with a differential spectral index of -4
+#MMcSpectrumWeight.NewSlope: -4
+
+# Give a formula for the spectrum. Capital X is a place-holder
+# for the energy (eg. the crab-spectrum from our publication)
+#MMcSpectrumWeight.Formula: pow(X/300, -2.31-0.26*log10(X/300))
+
+# ----------------------- Additional setup ----------------------------
 
 # In the loop filling the ThetaSq histogram the theta cut is switched off
-# Reading the Monte Carlo for determining the collection area you the
-# Theta cut switched on
+# and the theta-cut is implicitly done in the histogram. Reading the
+# Monte Carlo for determining the collection area there is no theta-
+# histogram involved, thus you need the theta cut switched on
 MJSpectrum.Cut1.ThetaCut: On
 
-# You may use this to change the scale and/or fit region
-#MAlphaFitter.BackgroundFitMin: 0.12
-#MAlphaFitter.BackgroundFitMax: 0.50
+# You may want to change the scale region to a different region than
+# previously used in your ganymed-file. This might be usefull for
+# on/off-data. Note, that the result can also depend on what else
+# was setup for your MAlphaFitter in ganymed.
+#MAlphaFitter.ScaleMin: 0.137
+#MAlphaFitter.ScaleMax: 0.500
 
-# Use this if you like to use the global scale factor for all bins
+# You may use this to change the scale and/or fit region for
+# determination of the excess vs energy (can be usefull in On/Off mode)
 #MAlphaFitter.ScaleMode: Fixed
+
+# You may want to allow scaling of each energy bin individually. (This
+# can be useful if on- and off- data in wobble mode do not agree well)
+#MAlphaFitter.ScaleMode: background
+#MAlphaFitter.BackgroundFitMin: 0.09
+#MAlphaFitter.BackgroundFitMax: 0.25
+
+# ------------------------- Additional cut ----------------------------
+
+# You can apply a cut in addition to all other cuts to your data and
+# MOnte Carlos. This can be usefull for example to setup a second
+# MFMagicCuts with a tighter behaviour assuming that your ganymed
+# was written with a really loose cut.
+#CutS.Inverted:  Yes
+#CutS.Condition: MFMagicCuts
+#CutS.ThetaCut: None
+#CutS.HadronnesCut: Area
+# Parametrization of Area
+#CutS.Param2:   0.215468
+#CutS.Param3:   5.63973
+#CutS.Param4:   0.0836169
+
+# --------------------------- Other binnings --------------------------
+
+# Binnings that are used by sponde but can not/shoud not be changed
+# because they are taken from the ganymed file
+#BinningTheta
+#BinningWidth
+#BinningLength
+#BinningDist
+#BinningM3Long
+#BinningM3Trans
+#BinningSlope
+#BinningAsym
+#BinningConc1
