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

Legend:

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

    r3603 r3605  
    1818!   Author(s): Markus Gaug, 11/2003 <mailto:markus@ifae.es>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    2727{
    2828
    29   const TString inpath = "/mnt/Data/rootdata/CrabNebula/2004_01_27/";
     29  //  const TString inpath = "/mnt/Data/rootdata/CrabNebula/2004_01_27/";
     30  const TString inpath = "/home/rootdata/BlindPixel/";
    3031
    3132  MRunIter pruns;
    3233  MRunIter cruns;
    3334
    34   pruns.AddRun(12386,inpath);
    35   cruns.AddRun(12525,inpath);
     35  pruns.AddRun(22007,inpath);
     36  cruns.AddRun(22006,inpath);
    3637
    3738  gStyle->SetOptStat(1111);
     
    101102  MHCalibrationChargePINDiode histpin;
    102103  MHCalibrationChargeBlindPix histblind;
    103   histblind.SetSinglePheCut(1000);
     104  histcharge.SetPulserFrequency(500);
     105  histblind.SetSinglePheCut(600);
    104106  //
    105107  // As long, as we don't have digital modules,
     
    128130  MExtractBlindPixel     blindcalc;
    129131  sigcalc2.SetRange(2,15,6,5,14,6);
    130   blindcalc.SetRange(11,29);
     132  blindcalc.SetRange(12,17);
    131133
    132134  MArrivalTimeCalc2      timecalc;
     
    187189  tlist.PrintStatistics();
    188190 
     191  MBadPixelsCam *badpixels = (MBadPixelsCam*)plist->FindObject("MBadPixelsCam");
     192
    189193  //
    190194  // print the most important results of all pixels to a file
     
    194198  gauglog.SetOutputFile(Form("%s%s",calcam.GetName(),".txt"),1);
    195199  calcam.SetLogStream(&gauglog);
    196   badcam.Print();
     200  badpixels->Print();
    197201  calcam.SetLogStream(&gLog);
    198202  */
     
    200204  // just one example how to get the plots of individual pixels
    201205  //
    202   //    histblind.DrawClone("all");
    203   //  histcharge[5].DrawClone("all");
    204   //    histcharge(5).DrawClone("all");
    205   //    histtime[5].DrawClone("fourierevents");
     206  //  histblind.DrawClone("all");
     207  //  histcharge[555].DrawClone("all");
     208  //  histcharge(5).DrawClone("all");
     209  //  histtime[5].DrawClone("fourierevents");
    206210 
    207211  // Create histograms to display
    208   MHCamera disp1  (geomcam, "Cal;Charge",         "Fitted Mean Charges");
    209   MHCamera disp2  (geomcam, "Cal;SigmaCharge",    "Sigma of Fitted Charges");
    210   MHCamera disp3  (geomcam, "Cal;FitProb",        "Probability of Fit");
    211   MHCamera disp4  (geomcam, "Cal;RSigma",         "Reduced Sigmas");
    212   MHCamera disp5  (geomcam, "Cal;RSigma/Charge",  "Reduced Sigma per Charge");
    213   MHCamera disp6  (geomcam, "Cal;FFactorPhe",     "Nr. of Photo-electrons (F-Factor Method)");
    214   MHCamera disp7  (geomcam, "Cal;FFactorConv",    "Conversion Factor to photons (F-Factor Method)");
    215   MHCamera disp8  (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)");
    216   MHCamera disp9  (geomcam, "Cal;BlindPixConv",   "Conversion Factor to photons (Blind Pixel Method)");
    217   MHCamera disp10 (geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)");
    218   MHCamera disp11 (geomcam, "Cal;PINDiodeConv",   "Conversion Factor tp photons (PIN Diode Method)");
    219   MHCamera disp12 (geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)");
    220   MHCamera disp13 (geomcam, "Cal;Excluded",       "Pixels previously excluded");
    221   MHCamera disp14 (geomcam, "Cal;NotFitted",      "Pixels that could not be fitted");
    222   MHCamera disp15 (geomcam, "Cal;NotFitValid",    "Pixels with not valid fit results");
    223   MHCamera disp16 (geomcam, "Cal;HiGainOscillating",     "Oscillating Pixels HI Gain");
    224   MHCamera disp17 (geomcam, "Cal;LoGainOscillating",     "Oscillating Pixels LO Gain");
    225   MHCamera disp18 (geomcam, "Cal;HiGainPickup",          "Number Pickup events Hi Gain");
    226   MHCamera disp19 (geomcam, "Cal;LoGainPickup",          "Number Pickup events Lo Gain");
    227   MHCamera disp20 (geomcam, "Cal;Saturation",            "Pixels with saturated Hi Gain");
    228   MHCamera disp21 (geomcam, "Cal;FFactorValid",          "Pixels with valid F-Factor calibration");
    229   MHCamera disp22 (geomcam, "Cal;BlindPixelValid",       "Pixels with valid BlindPixel calibration");
    230   MHCamera disp23 (geomcam, "Cal;PINdiodeFFactorValid",  "Pixels with valid PINDiode calibration");
     212  MHCamera disp1  (geomcam, "Cal;Charge",               "Fitted Mean Charges");
     213  MHCamera disp2  (geomcam, "Cal;SigmaCharge",          "Sigma of Fitted Charges");
     214  MHCamera disp3  (geomcam, "Cal;FitProb",              "Probability of Fit");
     215  MHCamera disp4  (geomcam, "Cal;RSigma",               "Reduced Sigmas");
     216  MHCamera disp5  (geomcam, "Cal;RSigma/Charge",        "Reduced Sigma per Charge");
     217  MHCamera disp6  (geomcam, "Cal;FFactorPhe",           "Nr. of Photo-electrons (F-Factor Method)");
     218  MHCamera disp7  (geomcam, "Cal;FFactorConv",          "Conversion Factor to photons (F-Factor Method)");
     219  MHCamera disp8  (geomcam, "Cal;FFactorFFactor",       "Total F-Factor (F-Factor Method)");
     220  MHCamera disp9  (geomcam, "Cal;BlindPixConv",         "Conversion Factor to photons (Blind Pixel Method)");
     221  MHCamera disp10 (geomcam, "Cal;BlindPixFFactor",      "Total F-Factor (Blind Pixel Method)");
     222  MHCamera disp11 (geomcam, "Cal;PINDiodeConv",         "Conversion Factor tp photons (PIN Diode Method)");
     223  MHCamera disp12 (geomcam, "Cal;PINDiodeFFactor",      "Total F-Factor (PIN Diode Method)");
     224  MHCamera disp13 (geomcam, "Cal;Excluded",             "Pixels previously excluded");
     225  MHCamera disp14 (geomcam, "Cal;Unsuited",             "Unsuited Pixels  ");
     226  MHCamera disp15 (geomcam, "Cal;Unreliable",           "Unreliable Pixels");
     227  MHCamera disp16 (geomcam, "Cal;HiGainOscillating",    "Oscillating Pixels High Gain");
     228  MHCamera disp17 (geomcam, "Cal;LoGainOscillating",    "Oscillating Pixels Low Gain");
     229  MHCamera disp18 (geomcam, "Cal;HiGainPickup",         "Number Pickup events Hi Gain");
     230  MHCamera disp19 (geomcam, "Cal;LoGainPickup",         "Number Pickup events Lo Gain");
     231  MHCamera disp20 (geomcam, "Cal;Saturation",           "Pixels with saturated Hi Gain");
     232  MHCamera disp21 (geomcam, "Cal;FFactorValid",         "Pixels with valid F-Factor calibration");
     233  MHCamera disp22 (geomcam, "Cal;BlindPixelValid",      "Pixels with valid BlindPixel calibration");
     234  MHCamera disp23 (geomcam, "Cal;PINdiodeFFactorValid", "Pixels with valid PINDiode calibration");
    231235 
    232236  MHCamera disp24 (geomcam, "Cal;Ped",         "Pedestals");
     
    279283  // Pixels with defects
    280284  disp13.SetCamContent(calcam,26);
    281   disp14.SetCamContent(badcam,7);
    282   disp15.SetCamContent(badcam,9);
    283   disp16.SetCamContent(badcam,16);
    284   disp17.SetCamContent(badcam,15);
     285  disp14.SetCamContent(*badpixels,1);
     286  disp15.SetCamContent(*badpixels,3);
     287  disp16.SetCamContent(*badpixels,10);
     288  disp17.SetCamContent(*badpixels,11);
    285289  disp18.SetCamContent(calcam,27);
    286290  disp19.SetCamContent(calcam,28);
     
    314318  disp32.SetCamContent(calcam,35);
    315319 
    316   disp1.SetYTitle("Charge [FADC units]");
    317   disp2.SetYTitle("\\sigma_{Charge} [FADC units]");
    318   disp3.SetYTitle("P_{Charge} [1]");
     320  disp1.SetYTitle("Mean Charge [FADC Counts]");
     321  disp2.SetYTitle("\\sigma_{Charge} [FADC Counts]");
     322  disp3.SetYTitle("P_{Sum} [1]");
    319323 
    320324  disp4.SetYTitle("\\sqrt{\\sigma^{2}_{Charge} - RMS^{2}_{Ped}} [FADC Counts]");
     
    492496  gPad->SetBorderMode(0);
    493497  gPad->SetTicks();
     498  cam.GetXaxis()->SetLabelOffset(0.005);
     499  cam.GetXaxis()->SetLabelSize(0.06); 
     500  cam.GetYaxis()->SetLabelOffset(0.005);
     501  cam.GetYaxis()->SetLabelSize(0.06); 
     502  cam.GetXaxis()->SetTitleOffset(0.85);
     503  cam.GetXaxis()->SetTitleSize(0.06); 
     504  cam.GetYaxis()->SetTitleOffset(0.7);
     505  cam.GetYaxis()->SetTitleSize(0.06); 
    494506  MHCamera *obj1 = (MHCamera*)cam.DrawCopy("hist");
    495507  obj1->SetDirectory(NULL);
     508
    496509
    497510  c.cd(i+j);
     
    507520      TProfile *obj2 = obj1->RadialProfile(Form("%s%s",obj1->GetName(),"_rad"));
    508521      obj2->SetDirectory(NULL);
     522      obj2->GetXaxis()->SetLabelOffset(0.005);
     523      obj2->GetXaxis()->SetLabelSize(0.06); 
     524      obj2->GetYaxis()->SetLabelOffset(0.005);
     525      obj2->GetYaxis()->SetLabelSize(0.06); 
     526      obj2->GetXaxis()->SetTitleOffset(0.85);
     527      obj2->GetXaxis()->SetTitleSize(0.06); 
     528      obj2->GetYaxis()->SetTitleOffset(0.7);
     529      obj2->GetYaxis()->SetTitleSize(0.06); 
    509530      obj2->Draw();
    510531      obj2->SetBit(kCanDelete);
     
    538559      obj3->SetDirectory(NULL);
    539560//      obj3->Sumw2();
     561      obj3->GetXaxis()->SetLabelOffset(0.005);
     562      obj3->GetXaxis()->SetLabelSize(0.06); 
     563      obj3->GetYaxis()->SetLabelOffset(0.005);
     564      obj3->GetYaxis()->SetLabelSize(0.06); 
     565      obj3->GetXaxis()->SetTitleOffset(0.85);
     566      obj3->GetXaxis()->SetTitleSize(0.06); 
     567      obj3->GetYaxis()->SetTitleOffset(0.7);
     568      obj3->GetYaxis()->SetTitleSize(0.06); 
    540569      obj3->Draw();
    541570      obj3->SetBit(kCanDelete);
Note: See TracChangeset for help on using the changeset viewer.