Ignore:
Timestamp:
07/15/04 16:48:46 (20 years ago)
Author:
blanch
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc

    r4328 r4392  
    7373// declaration of variables read from datacards
    7474TString  outname;
     75const TString outpath = "./";
    7576TString  idirname;
    7677TString  filter;
    7778TString  psfilename("makehillas.ps");
     79MRunIter pedcaliter;
    7880MRunIter caliter;
    7981MRunIter pediter;
     
    8284ULong_t  nmaxevents= 999999999;
    8385Short_t  calflag   = 1;
     86Short_t  cleanflag   = 1;
     87UShort_t  lrings     = 1;
    8488Float_t  lcore     = 3.0;
    8589Float_t  ltail     = 1.5;
     
    131135{
    132136  // Set the general tasks/containers
    133   MExtractFixedWindow    extractor;
     137  //MExtractFixedWindow    extractor;
     138  //extractor.SetRange(hifirst,hilast,lofirst,lolast);
     139 
     140  MExtractSlidingWindow    extractor;
    134141  extractor.SetRange(hifirst,hilast,lofirst,lolast);
    135  
    136   //  MExtractSlidingWindow    extractor;
    137   // extractor.SetRange(hifirst,hilast,lofirst,lolast);
    138   // extractor.SetWindowSize(2,2);
     142  extractor.SetWindowSize(4,4);
    139143 
    140144  MGeomCamMagic       geomcam;
     
    149153  //badcam.AsciiRead("badpixels.dat");
    150154
    151   MJPedestal pedloop;
    152   pedloop.SetInput(&pediter);
    153   pedloop.SetExtractor(&extractor);
     155  MJPedestal pedcalloop;
     156  pedcalloop.SetInput(&pediter);
     157  pedcalloop.SetExtractor(&extractor);
    154158  //  pedloop.SetBadPixels(badcam);
    155 
    156   if (!pedloop.Process())
     159  //pedcalloop.SetOutputPath(outpath.Data());
     160
     161
     162  if (!pedcalloop.Process())
    157163    return;
    158164
     
    165171  calloop.SetExtractor(&extractor);
    166172  calloop.SetInput(&caliter);
    167   calloop.SetBadPixels(pedloop.GetBadPixels());
    168 
     173  calloop.SetBadPixels(pedcalloop.GetBadPixels());
     174  if(calflag==2)
     175    calloop.SetUseBlindPixel();
    169176  if(calflag>0)
    170     if (!calloop.Process(pedloop.GetPedestalCam()))
     177    if (!calloop.Process(pedcalloop.GetPedestalCam()))
    171178      return;
    172179
     
    175182  /*                THIRD LOOP: PEDESTAL CALIBRATION INTO PHOTONS         */
    176183  /************************************************************************/
     184  // First Compute the pedestals
     185  MJPedestal pedloop;
     186  pedloop.SetInput(&pediter);
     187
     188  if (!pedloop.Process())
     189    return;
     190
    177191  MParList  plist3;
    178192  MTaskList tlist3;
     
    279293 
    280294  MImgCleanStd      clean(lcore,ltail);
     295  clean.SetCleanRings(lrings);
     296  MImgCleanStd::CleaningMethod_t cleanMeth= MImgCleanStd::kStandard; 
     297  if(cleanflag==2)
     298    cleanMeth=MImgCleanStd::kDemocratic;
     299  clean.SetMethod(cleanMeth);
     300
    281301  MArrivalTimeCalc2 timecalc;
    282302  MIslandCalc       island;
     
    338358  tlist4.AddToList(&extractor);
    339359  tlist4.AddToList(&photcalc);
    340   if(calflag==11)
     360  if(calflag==11 || calflag==21)
    341361    tlist4.AddToList(&interpolatebadpixels);
    342362  tlist4.AddToList(&clean);
     
    428448        }
    429449
     450      // pedestal runs for calibration
     451      if(strcmp(word.Data(),"PCRUNS")==0)
     452        {
     453          if(pedcaliter.GetNumRuns())
     454            cout << "readDataCards Warning: adding pedestal runs for calibration to the existing list" << endl;
     455          ifun >> word;
     456          pedcaliter.AddRuns(word.Data(),idirname.Data());
     457        }
     458
    430459      // calibration runs
    431460      if(strcmp(word.Data(),"CRUNS")==0)
     
    483512          ifun >> lcore;
    484513          ifun >> ltail;
     514          ifun >> lrings;
     515          ifun >> cleanflag;
    485516        }
    486517
     
    536567  else if(calflag==11)
    537568    cout << "Default calibration + bad pixels interpolation" << endl;
    538   cout << "Cleaning level: ("<<lcore<<","<<ltail<<")" << endl;
     569  cout << "Cleaning level: ("<<lcore<<","<<ltail<<") - " << lrings << "ring" << endl;
     570  cout << "Cleaning methode: "<< cleanflag << endl;
    539571  if (islflag == 1 || islflag == 2)
    540572    cout << "Island calcultation..." << "using algorithm #" << kalgorithm <<endl;
Note: See TracChangeset for help on using the changeset viewer.