Ignore:
Timestamp:
04/13/04 20:03:32 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r3651 r3725  
    2222!
    2323\* ======================================================================== */
    24 #include "MAGIC.h"
    2524
    2625void calibration()
    2726{
     27 
     28  const MCalibrationCam::PulserColor_t color = MCalibrationCam::kGREEN;
    2829
    2930  //  const TString inpath = "/mnt/Data/rootdata/CrabNebula/2004_01_27/";
     
    4142  gStyle->SetOptFit();
    4243 
     44  MCalibrationQECam qecam;
     45  MBadPixelsCam     badcam;
     46  badcam.AsciiRead("badpixels.dat");
     47
     48  for (Int_t i=0;i<badcam.GetSize();i++)
     49    if (badcam[i].IsBad())
     50      cout << "Bad Pixel: " << i << endl;
     51
    4352  MStatusDisplay *display = new MStatusDisplay;
    4453  display->SetUpdateTime(3000);
    4554  display->Resize(850,700);
    4655 
    47   MBadPixelsCam badcam;
    48   badcam.AsciiRead("badpixels.dat");
    49 
    5056  /************************************/
    5157  /* FIRST LOOP: PEDESTAL COMPUTATION */
    5258  /************************************/
    53  
     59
    5460  MJPedestal pedloop;
    5561  pedloop.SetInput(&pruns);
     
    7682  static_cast<MRead&>(read).AddFiles(pruns);
    7783
    78   MGeomApply      geomapl;
    79   MExtractSignal  sigcalc;
    80  
    81   //
    82   // Additionally to calculating the pedestals,
    83   // you can fill histograms and look at them
    84   //
    85   MFillH fill("MHPedestalCam", "MExtractedSignalCam");
    86  
    87   tlist0.AddToList(&read);
    88   tlist0.AddToList(&geomapl);
    89   tlist0.AddToList(&sigcalc);
    90   tlist0.AddToList(&fill);
    91  
    92   MGeomCamMagic  geomcam;
    93   MHPedestalCam  hpedcam;
    94   plist0.AddToList(&geomcam);
    95   plist0.AddToList(&pedloop.GetPedestalCam());
    96   plist0.AddToList(&badcam);
    97   plist0.AddToList(&hpedcam);
    98  
    99   //
    100   // Create and setup the eventloop
    101   //
    102   MEvtLoop evtloop0;
    103  
    104   evtloop0.SetParList(&plist0);
    105   evtloop0.SetDisplay(display);
    106  
    107   //
    108   // Execute first analysis
    109   //
    110   if (!evtloop0.Eventloop())
    111     return;
    112 
    113   tlist0.PrintStatistics();
    114 
    115   for (Int_t aidx=0;aidx<2;aidx++)
    116     {
    117       hpedcam.GetAverageHiGainArea(aidx).DrawClone("fourierevents");
    118       hpedcam.GetAverageLoGainArea(aidx).DrawClone("fourierevents");
    119     }
    120  
    121   for (Int_t sector=1;sector<7;sector++)
    122     {
    123       hpedcam.GetAverageHiGainSector(sector).DrawClone("fourierevents");
    124       hpedcam.GetAverageLoGainSector(sector).DrawClone("fourierevents");
    125     }
    126  
    127 
    12884  //
    12985  // Now the short version:
    13086  //
    131   /*
    13287  MJCalibration calloop;
     88  calloop.SetColor(color);
    13389  calloop.SetInput(&cruns);
    13490  calloop.SetDisplay(display);
    135   calloop.SetBadPixels(pedloop.GetBadPixelsCam());
     91  calloop.SetQECam(qecam);
     92  calloop.SetBadPixels(pedloop.GetBadPixels());
    13693  if (!calloop.Process(pedloop.GetPedestalCam()))
    13794    return;
    138     #if 0
    139   */
     95
     96#if 0
    14097  //
    14198  // The longer version:
     
    163120  MArrivalTimeCam            timecam;
    164121  MCalibrationRelTimeCam     relcam;
     122  MCalibrationQECam          qecam;
    165123  MCalibrationChargeCam      calcam;
    166124  MCalibrationChargePINDiode pindiode;   
     
    174132  histblind.SetSinglePheCut(600);
    175133  //
    176   // As long, as we don't have digital modules,
    177   // we have to set the color of the pulser LED by hand
    178   //
    179   blindpix.SetColor(kCT1);
    180   //    pindiode.SetColor(kCT1);
    181   //
    182134  // Get the previously created MPedestalCam into the new Parameter List
    183135  //
     
    186138  plist.AddToList(&timecam);
    187139  plist.AddToList(&relcam);
     140  plist.AddToList(&qecam);
    188141  plist.AddToList(&calcam);
    189142  plist.AddToList(&histtime);
     
    210163  MFillH fillblind("MHCalibrationChargeBlindPix", "MExtractedSignalBlindPixel");
    211164  MFillH fillcam  ("MHCalibrationChargeCam"     , "MExtractedSignalCam");
     165 
     166  //
     167  // As long, as we don't have digital modules,
     168  // we have to set the color of the pulser LED by hand
     169  //
     170  calcalc.SetPulserColor(MCalibrationCam::kCT1);
    212171 
    213172  //
     
    300259  MHCamera disp7  (geomcam, "Cal;FFactorConv",          "Conversion Factor to photons (F-Factor Method)");
    301260  MHCamera disp8  (geomcam, "Cal;FFactorFFactor",       "Total F-Factor (F-Factor Method)");
    302   MHCamera disp9  (geomcam, "Cal;BlindPixConv",         "Conversion Factor to photons (Blind Pixel Method)");
    303   MHCamera disp10 (geomcam, "Cal;BlindPixFFactor",      "Total F-Factor (Blind Pixel Method)");
     261  MHCamera disp9  (geomcam, "Cal;CascadesQEFFactor",    "Av. Quantum Efficiency (F-Factor Method)");
     262  MHCamera disp10 (geomcam, "Cal;QEFFactor",            "Measured QE (F-Factor Method)");
    304263  MHCamera disp11 (geomcam, "Cal;PINDiodeConv",         "Conversion Factor tp photons (PIN Diode Method)");
    305264  MHCamera disp12 (geomcam, "Cal;PINDiodeFFactor",      "Total F-Factor (PIN Diode Method)");
     
    351310  disp8.SetCamError(  calcam, 14);
    352311 
    353   // Blind Pixel Method
    354   disp9.SetCamContent(calcam, 16);
    355   disp9.SetCamError(  calcam, 17);
    356   disp10.SetCamContent(calcam,18);
    357   disp10.SetCamError(  calcam,19);
     312  // Quantum efficiency
     313  disp9.SetCamContent( qecam, 0 );
     314  disp9.SetCamError(   qecam, 1 );
     315  disp10.SetCamContent(qecam, 8);
     316  disp10.SetCamError(  qecam, 9);
    358317 
    359318  // PIN Diode Method
     
    411370  disp8.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1] ");
    412371 
    413   disp9.SetYTitle("Conversion Factor [Phot/FADC Count]");
    414   disp10.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
     372  disp9.SetYTitle("Average QE Cascades [1]");
     373  disp10.SetYTitle("Measured QE (F-Factor Method) [1]");
    415374 
    416375  disp11.SetYTitle("Conversion Factor [Phot/FADC Count]");
     
    475434 
    476435
    477   // Blind Pixel Method
    478   TCanvas &c5 = display->AddTab("BlindPix");
     436  // Quantum Efficiencies
     437  TCanvas &c5 = display->AddTab("QE");
    479438  c5.Divide(2, 4);
    480439 
Note: See TracChangeset for help on using the changeset viewer.