Index: trunk/MagicSoft/Mars/msim/MSimMMCS.cc
===================================================================
--- trunk/MagicSoft/Mars/msim/MSimMMCS.cc	(revision 9567)
+++ trunk/MagicSoft/Mars/msim/MSimMMCS.cc	(revision 9595)
@@ -122,4 +122,6 @@
     mch->SetSpectrum(fRunHeader->GetSlopeSpectrum(),
                      fRunHeader->GetEnergyMin(), fRunHeader->GetEnergyMax());
+    mch->SetViewCone(fRunHeader->GetViewConeInnerAngle(),
+                     fRunHeader->GetViewConeOuterAngle());
     mch->SetReadyToSave();
 
@@ -147,5 +149,5 @@
 
     // FIXME: Is there a way to write them as LAST entry in the file?
-    rh->SetRunInfo(1, fRunHeader->GetRunNumber(), 0);
+    rh->SetFileNumber(fRunHeader->GetRunNumber()%1000);
     rh->SetSourceInfo(MMcEvtBasic::GetParticleName(id));
     rh->SetReadyToSave();
@@ -160,4 +162,31 @@
 // --------------------------------------------------------------------------
 //
+// We have two scenarios for the ponting:
+//
+//  1) Diffuse flux (view cone option)
+//
+//     Azimuth and Zenith angle are fixed values (min==max).
+//     The diffuse flux is produced in a cone around this angle.
+//
+//     That means that the telescope orientation is aligned and fixed
+//     along the cone axis.
+//
+//     To analyse a diffuse flux the source position should be fixed to
+//     the camera center.
+//     In some cases (e.g. training of RF) the source depending parameters
+//     might be needed w.r.t. the real origin of the primary particle.
+//     In this case the primary shower direction is needed.
+//
+//  2) Directed flux
+//
+//     Particles are produced between a min and max Azimuth and Zenith angle.
+//     The telescope axis is either parallel (on source) or off axis
+//     (wobble) to the primary particle direction.
+//     This is used to "fake" the trajectory of the source.
+//
+//  3) Flux along a trajectory
+//
+//     [...]
+//
 Int_t MSimMMCS::Process()
 {
@@ -165,23 +194,19 @@
     fMcEvtBasic->SetImpact(fEvtHeader->GetImpact());
 
+    // Pointing direction of the telescope (telescope axis)
     fMcEvtBasic->SetTelescopeTheta(fPointingTel->GetZdRad());
     fMcEvtBasic->SetTelescopePhi(fPointingTel->GetAzRad());
 
-    fMcEvtBasic->SetReadyToSave();
-
-    static_cast<MMcEvtBasic&>(*fMcEvt) = *fMcEvtBasic;
-
+    // Direction of primary particle
     // Convert from corsika frame to telescope frame, taking
     // the magnetic field into account: tel = corsika+offset
-    if (fRunHeader->HasViewCone())
-    {
-        fMcEvt->SetTheta(fPointingTel->GetZdRad());
-        fMcEvt->SetPhi(fPointingTel->GetAzRad());
-    }
-    else
-    {
-        fMcEvt->SetTheta(fEvtHeader->GetZd());
-        fMcEvt->SetPhi(fEvtHeader->GetAz()+fRunHeader->GetMagneticFieldAz());
-    }
+    fMcEvtBasic->SetParticleTheta(fEvtHeader->GetZd());
+    fMcEvtBasic->SetParticlePhi(fEvtHeader->GetAz()+fRunHeader->GetMagneticFieldAz());
+
+    fMcEvtBasic->SetReadyToSave();
+
+
+    static_cast<MMcEvtBasic&>(*fMcEvt) = *fMcEvtBasic;
+
 
     fMcEvt->SetEvtNumber(fEvtHeader->GetEvtNumber());
