Changeset 3743


Ignore:
Timestamp:
04/15/04 11:48:40 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r3742 r3743  
    2222!
    2323\* ======================================================================== */
    24 //const TString inpath = "/home/rootdata/Calib/2004_04_08/";
     24/////////////////////////////////////////////////////////////////////////////
     25//
     26//  calibration.C
     27//
     28//  Needs as arguments the run number of a calibration file ("*_C_*.root") and
     29//  the run number of the corresponding pedestal file ("*_P_*.root").
     30//
     31//  The TString inpath has to be set correctly.
     32//
     33//  The macro searches for the pulser colour which corresponds to the calibration
     34//  run number. If the run number is smaller than 20000, pulser colour "CT1"
     35//  is assumed, otherwise, it searches for the strings "green", "blue", "uv" or
     36//  "ct1" in the filenames. If no colour or multiple colours are found, the
     37//  execution is aborted. 
     38//
     39//  The container MBadPixelsCam is created and followed during the execution of the
     40//  rest of the macro.
     41//
     42//  A first loop over the pedestal file is performed using the class MJPedestal
     43//
     44//  The container MCalibrationQECam is created and followed during the execution of the
     45//  rest of the macro.
     46//
     47//  A loop over the calibration files is performed using the class MJCalibration.
     48//  The results are displayed using the MJCalibration::SetNormalDisplay() facility,
     49//  but other displays can easily be uncommented.
     50//  The call to MJCalibration skips the relative time calibration, which can be
     51//  uncommented as well.
     52//
     53/////////////////////////////////////////////////////////////////////////////
    2554const TString inpath = "/home/rootdata/BlindPixel/";
    26 const Int_t pedrun = 20491;
    27 const Int_t calrun = 20494;
    28 
    29 void calibration(const Int_t prun=pedrun, const Int_t crun=calrun)
     55const Int_t pedrun  = 20491;
     56const Int_t calrun1 = 20494;
     57const Int_t calrun2 = 20496;
     58
     59void calibration(const Int_t prun=pedrun, const Int_t crun1=calrun1, const Int_t crun2=calrun2)
    3060{
    3161 
     
    3464
    3565  pruns.AddRun(prun,inpath);
    36   cruns.AddRun(crun,inpath);
     66
     67  if (crun2==0)
     68    cruns.AddRun(crun1,inpath);
     69  else
     70    cruns.AddRuns(crun1,crun2,inpath);
    3771
    3872  MCalibrationCam::PulserColor_t color;
    3973
    40   if (crun < 20000)
     74  if (crun1 < 20000)
    4175    color = MCalibrationCam::kCT1;
    4276  else
     
    4882  MCalibrationQECam qecam;
    4983  MBadPixelsCam     badcam;
    50   badcam.AsciiRead("badpixels.dat");
     84
     85  //
     86  // If you want to exclude pixels from the beginning, read
     87  // an ascii-file with the corr. pixel numbers (see MBadPixelsCam)
     88  //
     89  //  badcam.AsciiRead("badpixels.dat");
    5190
    5291  for (Int_t i=0;i<badcam.GetSize();i++)
     
    98137  //
    99138  // If you want to calibrate the times as well, choose:
     139  //
    100140  //  calloop.SetRelTimeCalibration();
    101141  calloop.SetInput(&cruns);
Note: See TracChangeset for help on using the changeset viewer.