Ignore:
Timestamp:
10/20/03 15:09:44 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/status.C

    r2377 r2405  
    3131/////////////////////////////////////////////////////////////////////////////
    3232
    33 void status(const char *fname="*1947*cosmic*.root")
     33void status()
    3434{
    3535    //
     
    5757    plist.AddToList(&tlist);
    5858
    59     /*
    60      MSrcPosCam src;
    61      src.SetXY(1./geomcam.GetConvMm2Deg(), 0);
    62      plist.AddToList(&src);
    63      */
     59    // ------------- user change -----------------
     60    MDirIter files("~MAGIC/online_data/rootdata", "*Mkn501-I*.root", -1);
     61    //files.Print("all");
    6462
    6563    //
     
    6967    MReadMarsFile read("Events");
    7068    read.DisableAutoScheme();
    71 
    72     // ------------- user change -----------------
    73     read.AddFile(fname);
     69    read.AddFiles(files);
    7470
    7571    MGeomApply        geomapl;
     
    7975    MCerPhotCalc      ncalc;
    8076
    81     TArrayS blinds(2);
    82     blinds[0] = 271;
    83     blinds[1] = 291;
     77    TArrayS blinds(0);
    8478
    8579    MBlindPixelCalc blind;
    86     //blind.SetPixelIndices(blinds);
     80    blind.SetPixelIndices(blinds);
    8781    blind.SetUseInterpolation();
    8882
     
    9185    MHillasCalc       hcalc;
    9286    MHillasSrcCalc    scalc; // !!Preliminary!! Will be removed later!
    93     MCT1SupercutsCalc calc1;
    9487
    9588    MHCamEvent hist("PedestalRms");
     
    9891
    9992    // -------------------------------------------
     93    MHTriggerLvl0 trighi(254, "SaturationHi", "Saturation Rate of Hi Gains");
     94    trighi.SetType(1);
     95
     96    MFillH fillhi(&trighi, "MRawEvtData");
    10097    MFillH hfill0("Uncleaned [MHCamEvent]", "MCerPhotEvt");
    10198    MFillH hfill1("Pedestals [MHCamEvent]", "MPedestalCam");
     
    108105    MFillH hfill8("MHStarMap", "MHillas");
    109106    MFillH hfill9("Cleaned [MHCamEvent]", "MCerPhotEvt");
    110     MFillH hfill10("MHHadronness", "MHadronness");
    111     MFillH hfill11("MHSigmaTheta");
     107
     108    MContinue cont1("MNewImagePar.fNumCorePixels<0");
    112109
    113110    tlist.AddToList(&read);
    114111    tlist.AddToList(&geomapl);
     112    tlist.AddToList(&fillhi);
    115113    tlist.AddToList(&pcopy);
    116114    tlist.AddToList(&pnsb);
     
    121119    tlist.AddToList(&clean);
    122120    tlist.AddToList(&hcalc);
     121    tlist.AddToList(&cont1);
    123122    tlist.AddToList(&scalc);
    124     //tlist.AddToList(&calc1);
    125123    tlist.AddToList(&hfill1);
    126124    tlist.AddToList(&hfill2);
     
    132130    tlist.AddToList(&hfill8);
    133131    tlist.AddToList(&hfill9);
    134     //tlist.AddToList(&hfill10);
    135132
    136133    MEvtLoop evtloop;
     
    146143    tlist.PrintStatistics();
    147144
    148     MHCamera &uncl = *((MHCamEvent*)plist.FindObject("Uncleaned"))->GetHistByName();
    149     MHCamera &hped = *((MHCamEvent*)plist.FindObject("Pedestals"))->GetHistByName();
    150     MHCamera &hrms = *((MHCamEvent*)plist.FindObject("PedestalRms"))->GetHistByName();
    151 
    152     for (int i=0; i<577; i++)
    153     {
    154         if (uncl.IsUsed(i))
    155         {
    156             if (uncl[i+1]>uncl.GetMean()+3*uncl.GetRMS())
    157                 cout << "Mean Charge of Pixel-Index #" << i << ": " << uncl[i+1] << " > 3*rms" << endl;
    158             if (uncl[i+1]==0)
    159                 cout << "Mean Charge of Pixel-Index #" << i << ": " << uncl[i+1] << " <= 0" << endl;
    160             if (uncl[i+1]<uncl.GetMean()-3*uncl.GetRMS())
    161                 cout << "Mean Charge of Pixel-Index #" << i << ": " << uncl[i+1] << " < 3*rms" << endl;
    162         }
    163         if (hped.IsUsed(i))
    164         {
    165             if (hped[i+1]>hped.GetMean()+1.5*hped.GetRMS())
    166                 cout << "Mean Pedestal of Pixel-Index #" << i << ": " << hped[i+1] << " > 1.5*rms" << endl;
    167             if (hped[i+1]==0)
    168                 cout << "Mean Pedestal of Pixel-Index #" << i << ": " << hped[i+1] << " <= 0" << endl;
    169             if (hped[i+1]<hped.GetMean()-1.5*hped.GetRMS())
    170                 cout << "Mean Pedestal of Pixel-Index #" << i << ": " << hped[i+1] << " < 1.5*rms" << endl;
    171         }
    172         if (hrms.IsUsed(i))
    173         {
    174             if (hrms[i+1]>hrms.GetMean()+4*hrms.GetRMS())
    175                 cout << "Mean PedestalRMS of Pixel-Index #" << i << ": " << hrms[i+1] << " > 4*rms" << endl;
    176             if (hrms[i+1]==0)
    177                 cout << "Mean PedestalRMS of Pixel-Index #" << i << ": " << hrms[i+1] << " <= 0" << endl;
    178             if (hrms[i+1]<hrms.GetMean()-4*hrms.GetRMS())
    179                 cout << "Mean PedestalRMS of Pixel-Index #" << i << ": " << hrms[i+1] << " < 4*rms" << endl;
    180         }
    181     }
     145    MHCamEvent *uncl = (MHCamEvent*)plist.FindObject("Uncleaned");
     146    MHCamEvent *hped = (MHCamEvent*)plist.FindObject("Pedestals");
     147    MHCamEvent *hrms = (MHCamEvent*)plist.FindObject("PedestalRms");
     148    uncl->PrintOutliers(3);
     149    hped->PrintOutliers(1.5);
     150    hrms->PrintOutliers(4);
     151    trighi.PrintOutliers(2.5);
    182152
    183153    //
Note: See TracChangeset for help on using the changeset viewer.