Ignore:
Timestamp:
01/25/05 17:00:22 (20 years ago)
Author:
rico
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mifae/macros/mmcCleaning.C

    r5278 r5999  
    66
    77
    8 void mmcCleaning()
     8void mmcCleaning(TString NoiseFilename, TString NoiseOutFilename)
    99{
    1010  //
     
    1515
    1616  // ------------- user change -----------------
    17   Char_t*  NonoiseFilename = "/local_disk/jrico/mc/Gammas/Gamma_zbin0_0_7_1000to1009_w0_nonoise.root";  // File to be used for the calibration (must be a camera file without added noise)
    18   Char_t*  NoiseFilename   = "/local_disk/jrico/mc/Gammas/Gamma_zbin0_0_7_1000to1009_w0.root"; // File to be analyzed
     17  Char_t*  NonoiseFilename = "/local_disk/jrico/mc/Gamma_zbin0_0_7_1000to1009_w0.root";
     18  //  Char_t*  NoiseFilename   = "/mnt/wdflix/root_0.73mirror/wuerzburg/gammas/Gamma_zbin3_0_7_1160to1169_w0.root"; // File to be analyzed
    1919
    20   Char_t* NoiseOutFilename   = "/local_disk/jrico/mc/Gammas/prueba.root";   // Output file name
     20  //  Char_t* NoiseOutFilename   = "/mnt/users/jrico/prueba.root";   // Output file name
    2121
    22   // Signal extractor
     22  const Int_t wsize=2;
     23  // Signal sigextract
    2324  // (other extraction methods can be used)
    24   MExtractFixedWindowPeakSearch sigextract;
    25 
     25  MExtractor* sigextract = new MExtractTimeAndChargeSpline();
     26  ((MExtractTimeAndChargeSpline*)sigextract)->SetTimeType(MExtractTimeAndChargeSpline::kHalfMaximum);
     27  ((MExtractTimeAndChargeSpline*)sigextract)->SetChargeType(MExtractTimeAndChargeSpline::kIntegral);     
     28  ((MExtractTimeAndChargeSpline*)sigextract)->SetRiseTime((Float_t)wsize*0.25);
     29  ((MExtractTimeAndChargeSpline*)sigextract)->SetFallTime((Float_t)wsize*0.75);
     30 
    2631  // Define FADC slices to be integrated in high and low gain:
    27   sigextract.SetRange(1, 14, 2, 14);
    28   sigextract.SetWindows(6,6,4);
     32  sigextract->SetRange(1, 11, 2, 12);
    2933
    3034  // Defines when to switch to low gain
    31   sigextract.SetSaturationLimit(240);
     35  sigextract->SetSaturationLimit(240);
    3236
    3337  // ---------------------------------------------------------------------
     
    8286  calib.SetCalibrationMode(MCalibrate::kFfactor);
    8387
    84   MImgCleanStd clean(2.5,2.0);
     88  MImgCleanStd clean(4.0,3.5);
    8589  clean.SetCleanRings(1);
    8690  //  clean.SetRemoveSingle(kFALSE);
     
    97101  MMcCalibrationCalc mccalibcalc;
    98102  // Calculates calibration constants to convert from ADC counts to photons.
    99  
     103
    100104  tlist.AddToList(&read);
    101105  tlist.AddToList(&geom);
    102106  tlist.AddToList(&pcopy);
    103107  tlist.AddToList(&pointcalc);
    104   tlist.AddToList(&sigextract);
     108  tlist.AddToList(sigextract);
    105109  tlist.AddToList(&mccalibupdate);
    106110  tlist.AddToList(&calib);
     
    118122
    119123  MEvtLoop evtloop;
    120   evtloop.SetProgressBar(&bar);
     124  //  evtloop.SetProgressBar(&bar);
    121125  evtloop.SetParList(&plist);
    122126
     
    133137  MIslands      isl;
    134138  MArrivalTimeCam timecam;     
     139  MTopology     topology;
    135140  plist.AddToList(&isl);
    136141  plist.AddToList(&timecam);
     142  plist.AddToList(&topology);
    137143
    138144  MArrivalTimeCalc2 timecalc;
     
    143149  islclean.SetInputName("MIslands");
    144150  islclean.SetMethod(1);
     151  MTopologyCalc     topcalc;
    145152
    146153  MReadMarsFile read2("Events");
     
    152159  tlist.AddToListBefore(&timecalc,&mccalibupdate,"All");
    153160  tlist.AddToListBefore(&islandcalc,&hcalc,"All");
    154   tlist.AddToListBefore(&islclean,&hcalc,"All");
     161  tlist.AddToListBefore(&topcalc,&hcalc,"All");
    155162
    156163  MWriteRootFile write(NoiseOutFilename); // Writes output
     164  write.AddContainer("MRawRunHeader", "RunHeaders");
     165  write.AddContainer("MMcRunHeader",  "RunHeaders");
     166  write.AddContainer("MSrcPosCam",    "RunHeaders");
     167  write.AddContainer("MGeomCam",      "RunHeaders");
     168  write.AddContainer("MMcConfigRunHeader",  "RunHeaders");
     169  write.AddContainer("MMcCorsikaRunHeader", "RunHeaders");
     170  write.AddContainer("MMcFadcHeader",  "RunHeaders");
     171  write.AddContainer("MMcTrigHeader",  "RunHeaders");
     172
    157173  write.AddContainer("MRawRunHeader", "Events");
    158174  write.AddContainer("MMcEvt",        "Events");
     
    160176  write.AddContainer("MHillas",       "Events");
    161177  write.AddContainer("MHillasSrc",    "Events");
     178  write.AddContainer("MHillasExt",    "Events");
     179  write.AddContainer("MConcentration","Events");
    162180  write.AddContainer("MImagePar",     "Events");
    163181  write.AddContainer("MNewImagePar",  "Events");
    164182  write.AddContainer("MIslands",      "Events");
     183  write.AddContainer("MPointingPos",  "Events");
     184  write.AddContainer("MTopology",      "Events");
    165185
    166186  tlist.RemoveFromList(&mccalibcalc);
Note: See TracChangeset for help on using the changeset viewer.