Changeset 3725 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
04/13/04 20:03:32 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3724 r3725  
    5151       Don't know why. Removed and stored some variables instead
    5252
    53    * mjobs/MJCalibration.cc
     53   * mjobs/MJCalibration.[h,cc]
    5454     - updated documentation, updated QE Cam
     55     - set the pulser colour (now obligatory)
     56
     57   * mcalib/MCalibrationChargeCalc.cc
     58     - set the pulser colour (now obligatory)
    5559
    5660
  • 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 
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r3724 r3725  
    272272  SetLambdaErrLimit();
    273273  SetPheErrLimit();
    274   SetPulserColor(MCalibrationCam::kCT1);
     274  SetPulserColor(MCalibrationCam::kNONE);
    275275
    276276  Clear();
     
    342342 
    343343  fEvtTime = (MTime*)pList->FindObject("MTime");
     344
     345  //
     346  // Check the pulser colour --> FIXME: this solution is only valid until the arrival of the DM's
     347  //
     348  if (fPulserColor == MCalibrationCam::kNONE)
     349    {
     350      *fLog << endl;
     351      *fLog << err << GetDescriptor()
     352            << ": No Pulser colour has been chosen. Since the installation of the IFAE pulser box,"
     353            << " you HAVE to provide the LEDs colour, otherwise there is no calibration. " << endl;
     354      *fLog << "See e.g. the macro calibration.C " << endl;
     355      return kFALSE;
     356    }
    344357 
    345358  return kTRUE;
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r3723 r3725  
    6666
    6767#include "MPedestalCam.h"
     68#include "MCalibrationCam.h"
    6869#include "MCalibrationQECam.h"
    6970#include "MCalibrationChargeCam.h"
     
    9596// Default constructor.
    9697//
    97 // Sets fRuns to 0
    98 //
    99 MJCalibration::MJCalibration(const char *name, const char *title) : fRuns(0)
    100 {
    101     fName  = name  ? name  : "MJCalibration";
    102     fTitle = title ? title : "Tool to create a pedestal file (MPedestalCam)";
     98// Sets fRuns to 0, fColor to kNONE
     99//
     100MJCalibration::MJCalibration(const char *name, const char *title)
     101    : fRuns(0), fColor(MCalibrationCam::kNONE)
     102{
     103  fName  = name  ? name  : "MJCalibration";
     104  fTitle = title ? title : "Tool to create a pedestal file (MPedestalCam)";
     105
    103106}
    104107
     
    719722    MExtractSignal2          extract;
    720723    MCalibrationChargeCalc   calcalc;
    721     calcalc.SetPulserColor(MCalibrationCam::kCT1);
     724
     725    //
     726    // As long as there are no DM's, have to colour by hand
     727    //
     728    calcalc.SetPulserColor(fColor);
    722729
    723730    MFillH fillpin("MHCalibrationChargePINDiode", "MExtractedSignalPINDiode");
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.h

    r3723 r3725  
    2929  MCalibrationQECam     fQECam;                            // Quantum efficiency, can be set from previous runs
    3030  MBadPixelsCam         fBadPixels;                        // Bad Pixels cam, can be set from previous runs
     31
     32  MCalibrationCam::PulserColor_t fColor;                   // Colour of the pulsed LEDs
    3133 
    3234  void DrawProjection   ( MHCamera *obj, Int_t fit) const; // Draw projection of pixels values
     
    5355  void SetBadPixels(const MBadPixelsCam &bad)    { bad.Copy(fBadPixels);   }
    5456  void SetQECam    (const MCalibrationQECam &qe) { qe.Copy(fQECam);        }   
     57  void SetColor    (const MCalibrationCam::PulserColor_t color) { fColor = color;   }
    5558 
    5659  Bool_t ReadCalibrationCam();
Note: See TracChangeset for help on using the changeset viewer.