Changeset 6514


Ignore:
Timestamp:
02/16/05 10:47:00 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6513 r6514  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23
     24 2005/02/16 Abelardo Moralejo
     25
     26   * macros/starmc2.C:
     27     - Changed the way in which the "OriginalMC" tree is copied from
     28       the input to the output file. Now we ise the new procedure
     29       MWriteRootFile::AddCopySource
     30
    2331
    2432 2005/02/16 Thomas Bretz
  • trunk/MagicSoft/Mars/macros/starmc2.C

    r6403 r6514  
    3838void starmc2()
    3939{
    40   Char_t* AnalysisFilename = "calibrated_gamma_train.root"; // File to be analyzed
    41   //  Char_t* AnalysisFilename = "calibrated_gamma_test.root"; // File to be analyzed
     40  //  Char_t* AnalysisFilename = "calibrated_gamma_train.root"; // File to be analyzed
     41  Char_t* AnalysisFilename = "calibrated_gamma_test.root"; // File to be analyzed
    4242
    4343  TString* OutFilename;
    4444
    4545  // Output file name
    46   OutFilename = new TString("star_gamma_train.root");   // Output file name
    47   //  OutFilename = new TString("star_gamma_test.root");   // Output file name
     46  //  OutFilename = new TString("star_gamma_train.root");   // Output file name
     47  OutFilename = new TString("star_gamma_test.root");   // Output file name
    4848
    49   MImgCleanStd      clean(4.5, 3.); // Applies tail cuts to image.
     49  MImgCleanStd      clean(10., 5.); // Applies tail cuts to image.
     50  clean.SetMethod(MImgCleanStd::kAbsolute);
     51
    5052  // WARNING: the tightness of the tail cuts depends on the signal extraction method
    5153  // used in mccalibrate.C!! (some methods result in positively biased signals)
     
    119121  write.AddContainer("MConcentration","Events");
    120122
     123  //
     124  // Next line makes that the tree "OriginalMC" containing the MMcEvtBasic
     125  // container for all produced Corsika events from which the events in the
     126  // normal "Events" tree derive:
     127  //
     128  write.AddCopySource("OriginalMC");
     129
    121130  tlist.AddToList(&write);
    122131
     
    136145  tlist.PrintStatistics();
    137146
    138   ////////////////////////////////////////////////////////////////////
    139   //
    140   // Second event loop: simply copy the tree MMcEvtBasic in the tree
    141   // "OriginalMC" from the input file to the output file:
    142 
    143   MParList  plist2;
    144   MTaskList tlist2;
    145 
    146   plist2.AddToList(&tlist2);
    147 
    148   MReadMarsFile read2("OriginalMC");
    149   read2.AddFile(AnalysisFilename);
    150   read2.DisableAutoScheme();
    151 
    152   tlist2.AddToList(&read2);
    153 
    154   MWriteRootFile writeOrig(OutFilename->Data(),"UPDATE");
    155   writeOrig.AddContainer("MMcEvtBasic", "OriginalMC", kFALSE);
    156 
    157   tlist2.AddToList(&writeOrig);
    158 
    159   MEvtLoop evtloop2;
    160   bar.SetWindowName("Copying OriginalMC tree...");
    161   evtloop2.SetProgressBar(&bar);
    162   evtloop2.SetParList(&plist2);
    163  
    164   if (!evtloop2.Eventloop())
    165     return;
    166 
    167   tlist2.PrintStatistics();
    168 
    169147  return;
    170148}
Note: See TracChangeset for help on using the changeset viewer.