Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7716)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7717)
@@ -43,4 +43,10 @@
      - enabled grids
      - slightly improved calculation of shown threshold
+
+   * mhflux/MHThetaSqN.[h,cc]:
+     - added
+
+   * mhflux/Makefile, mhflux/FluxLinkDef.h:
+     - added MHThetaSqN
 
 
Index: trunk/MagicSoft/Mars/mhflux/FluxLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mhflux/FluxLinkDef.h	(revision 7716)
+++ trunk/MagicSoft/Mars/mhflux/FluxLinkDef.h	(revision 7717)
@@ -12,4 +12,5 @@
 //#pragma link C++ class MHAlphaTime+;
 #pragma link C++ class MHThetaSq+;
+#pragma link C++ class MHThetaSqN+;
 #pragma link C++ class MHEnergyEst+;
 #pragma link C++ class MHFalseSource+;
Index: trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc	(revision 7716)
+++ trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc	(revision 7717)
@@ -29,4 +29,14 @@
 // For more detailes see MHAlpha.
 //
+// How to use this class:
+//  - in your ganymed.rc add:
+//      MJCut.NameHist: MHThetaSqN
+//  - setup the number of off-source regions in your ganymed.rc by:
+//      MHThetaSqN.NumOffSourcePos: 2
+//  - switch on/off whether an off-theta cut should be done:
+//      MHThetaSqN.DoOffCut: Yes,No
+//  - and if necessary switch off the Theta cut in your Magic cuts:
+//      Cut1.ThetaCut: None
+//
 //////////////////////////////////////////////////////////////////////////////
 #include "MHThetaSqN.h"
Index: trunk/MagicSoft/Mars/mhflux/MHThetaSqN.h
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHThetaSqN.h	(revision 7717)
+++ trunk/MagicSoft/Mars/mhflux/MHThetaSqN.h	(revision 7717)
@@ -0,0 +1,57 @@
+#ifndef MARS_MHThetaSqN
+#define MARS_MHThetaSqN
+
+#ifndef MARS_MHAlpha
+#include "MHAlpha.h"
+#endif
+
+class TVector2;
+
+class MTaskList;
+class MSrcPosCam;
+
+class MHThetaSqN : public MHAlpha
+{
+private:
+    MParameterD *fDisp;      //!
+    MSrcPosCam  *fSrcPosCam; //!
+
+    Double_t fMm2Deg;
+
+    UInt_t fNumBinsSignal;
+    UInt_t fNumBinsTotal;
+    UInt_t fNumOffSourcePos;
+
+    Bool_t fDoOffCut;
+
+    // MHThetaSqN
+    TVector2 GetVec(const TVector2 &v, Int_t n1) const;
+    void     SetVal(Double_t val);
+
+    // MHAlpha
+    Bool_t   GetParameter(const MParList &pl) { return kTRUE; }
+    Double_t GetVal() const;
+
+    // MH
+    Bool_t   SetupFill(const MParList *pl);
+    Bool_t   Fill(const MParContainer *par, const Stat_t weight);
+
+    // MParContainer
+    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
+
+public:
+    MHThetaSqN(const char *name=NULL, const char *title=NULL);
+    ~MHThetaSqN();
+
+    void InitMapping(MHMatrix *mat, Int_t type=0);
+
+    void SetNumBinsSignal(UInt_t n)      { fNumBinsSignal  =TMath::Max(n, 1U); }
+    void SetNumBinsTotal(UInt_t n)       { fNumBinsTotal   =TMath::Max(n, 1U); }
+    void SetNumOffSourcePos(UInt_t n=3)  { fNumOffSourcePos=TMath::Max(n, 1U); }
+
+    void SetDoOffCut(Bool_t b=kTRUE)     { fDoOffCut = b; }
+
+    ClassDef(MHThetaSqN, 1) // Theta-Plot which is fitted online
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mhflux/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mhflux/Makefile	(revision 7716)
+++ trunk/MagicSoft/Mars/mhflux/Makefile	(revision 7717)
@@ -27,4 +27,5 @@
 	   MHAlpha.cc \
            MHThetaSq.cc \
+           MHThetaSqN.cc \
            MHPhi.cc \
            MHDisp.cc \
