Index: trunk/MagicSoft/Mars/macros/starmc2.C
===================================================================
--- trunk/MagicSoft/Mars/macros/starmc2.C	(revision 6496)
+++ trunk/MagicSoft/Mars/macros/starmc2.C	(revision 6514)
@@ -38,14 +38,16 @@
 void starmc2()
 {
-  Char_t* AnalysisFilename = "calibrated_gamma_train.root"; // File to be analyzed
-  //  Char_t* AnalysisFilename = "calibrated_gamma_test.root"; // File to be analyzed
+  //  Char_t* AnalysisFilename = "calibrated_gamma_train.root"; // File to be analyzed
+  Char_t* AnalysisFilename = "calibrated_gamma_test.root"; // File to be analyzed
 
   TString* OutFilename;
 
   // Output file name
-  OutFilename = new TString("star_gamma_train.root");   // Output file name
-  //  OutFilename = new TString("star_gamma_test.root");   // Output file name
+  //  OutFilename = new TString("star_gamma_train.root");   // Output file name
+  OutFilename = new TString("star_gamma_test.root");   // Output file name
 
-  MImgCleanStd      clean(4.5, 3.); // Applies tail cuts to image.
+  MImgCleanStd      clean(10., 5.); // Applies tail cuts to image.
+  clean.SetMethod(MImgCleanStd::kAbsolute);
+
   // WARNING: the tightness of the tail cuts depends on the signal extraction method
   // used in mccalibrate.C!! (some methods result in positively biased signals)
@@ -119,4 +121,11 @@
   write.AddContainer("MConcentration","Events");
 
+  //
+  // Next line makes that the tree "OriginalMC" containing the MMcEvtBasic
+  // container for all produced Corsika events from which the events in the
+  // normal "Events" tree derive:
+  //
+  write.AddCopySource("OriginalMC");
+
   tlist.AddToList(&write);
 
@@ -136,35 +145,4 @@
   tlist.PrintStatistics();
 
-  ////////////////////////////////////////////////////////////////////
-  //
-  // Second event loop: simply copy the tree MMcEvtBasic in the tree 
-  // "OriginalMC" from the input file to the output file:
-
-  MParList  plist2;
-  MTaskList tlist2;
-
-  plist2.AddToList(&tlist2);
-
-  MReadMarsFile read2("OriginalMC");
-  read2.AddFile(AnalysisFilename);
-  read2.DisableAutoScheme();
-
-  tlist2.AddToList(&read2);
-
-  MWriteRootFile writeOrig(OutFilename->Data(),"UPDATE");
-  writeOrig.AddContainer("MMcEvtBasic", "OriginalMC", kFALSE);
-
-  tlist2.AddToList(&writeOrig);
-
-  MEvtLoop evtloop2;
-  bar.SetWindowName("Copying OriginalMC tree...");
-  evtloop2.SetProgressBar(&bar);
-  evtloop2.SetParList(&plist2);
-  
-  if (!evtloop2.Eventloop())
-    return;
-
-  tlist2.PrintStatistics();
-
   return;
 }
