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

Legend:

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

    r3489 r3567  
    7979  // for excluding pixels from the beginning:
    8080  //
    81   // badcam1.AsciiRead("badpixels.dat");
     81  // badcam.AsciiRead("badpixels.dat");
    8282
    8383  plist1.AddToList(&pedcam);
     
    258258    MHCamera disp4  (geomcam, "Cal;RSigma",         "Reduced Sigmas");
    259259    MHCamera disp5  (geomcam, "Cal;RSigma/Charge",  "Reduced Sigma per Charge");
    260     MHCamera disp6  (geomcam, "Cal;FFactorPh",      "Nr. of Photo-electrons (F-Factor Method)");
     260    MHCamera disp6  (geomcam, "Cal;FFactorPhe",     "Nr. of Photo-electrons (F-Factor Method)");
    261261    MHCamera disp7  (geomcam, "Cal;FFactorConv",    "Conversion Factor to photons (F-Factor Method)");
    262262    MHCamera disp8  (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)");
    263     MHCamera disp9  (geomcam, "Cal;BlindPixPh",     "Photon flux inside plexiglass (Blind Pixel Method)");
    264     MHCamera disp10 (geomcam, "Cal;BlindPixConv",   "Conversion Factor to photons (Blind Pixel Method)");
    265     MHCamera disp11 (geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)");
    266     MHCamera disp12 (geomcam, "Cal;PINDiodePh",     "Photon flux outside plexiglass (PIN Diode Method)");
    267     MHCamera disp13 (geomcam, "Cal;PINDiodeConv",   "Conversion Factor tp photons (PIN Diode Method)");
    268     MHCamera disp14 (geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)");
    269     MHCamera disp15 (geomcam, "Cal;Excluded",       "Pixels previously excluded");
    270     MHCamera disp16 (geomcam, "Cal;NotFitted",      "Pixels that could not be fitted");
    271     MHCamera disp17 (geomcam, "Cal;NotFitValid",    "Pixels with not valid fit results");
    272     MHCamera disp18 (geomcam, "Cal;HiGainOscillating",     "Oscillating Pixels HI Gain");
    273     MHCamera disp19 (geomcam, "Cal;LoGainOscillating",     "Oscillating Pixels LO Gain");
    274     MHCamera disp20 (geomcam, "Cal;HiGainPickup",          "Number Pickup events Hi Gain");
    275     MHCamera disp21 (geomcam, "Cal;LoGainPickup",          "Number Pickup events Lo Gain");
    276     MHCamera disp22 (geomcam, "Cal;Saturation",            "Pixels with saturated Hi Gain");
    277     MHCamera disp23 (geomcam, "Cal;FFactorValid",          "Pixels with valid F-Factor calibration");
    278     MHCamera disp24 (geomcam, "Cal;BlindPixelValid",       "Pixels with valid BlindPixel calibration");
    279     MHCamera disp25 (geomcam, "Cal;PINdiodeFFactorValid",  "Pixels with valid PINDiode calibration");
    280 
    281     MHCamera disp26 (geomcam, "Cal;Ped",         "Pedestals");
    282     MHCamera disp27 (geomcam, "Cal;PedRms",      "Pedestal RMS");
    283 
    284     MHCamera disp28 (geomcam, "time;Time",        "Rel. Arrival Times");
    285     MHCamera disp29 (geomcam, "time;SigmaTime",   "Sigma of Rel. Arrival Times");
    286     MHCamera disp30 (geomcam, "time;TimeProb",    "Probability of Time Fit");
    287     MHCamera disp31 (geomcam, "time;NotFitValid", "Pixels with not valid fit results");
    288     MHCamera disp32 (geomcam, "time;Oscillating", "Oscillating Pixels");
    289 
    290     MHCamera disp33 (geomcam, "Cal;AbsTimeMean", "Abs. Arrival Times");
    291     MHCamera disp34 (geomcam, "Cal;AbsTimeRms",  "RMS of Arrival Times");
    292 
     263    MHCamera disp9  (geomcam, "Cal;BlindPixConv",   "Conversion Factor to photons (Blind Pixel Method)");
     264    MHCamera disp10 (geomcam, "Cal;BlindPixFFactor","Total F-Factor (Blind Pixel Method)");
     265    MHCamera disp11 (geomcam, "Cal;PINDiodeConv",   "Conversion Factor tp photons (PIN Diode Method)");
     266    MHCamera disp12 (geomcam, "Cal;PINDiodeFFactor","Total F-Factor (PIN Diode Method)");
     267    MHCamera disp13 (geomcam, "Cal;Excluded",       "Pixels previously excluded");
     268    MHCamera disp14 (geomcam, "Cal;NotFitted",      "Pixels that could not be fitted");
     269    MHCamera disp15 (geomcam, "Cal;NotFitValid",    "Pixels with not valid fit results");
     270    MHCamera disp16 (geomcam, "Cal;HiGainOscillating",     "Oscillating Pixels HI Gain");
     271    MHCamera disp17 (geomcam, "Cal;LoGainOscillating",     "Oscillating Pixels LO Gain");
     272    MHCamera disp18 (geomcam, "Cal;HiGainPickup",          "Number Pickup events Hi Gain");
     273    MHCamera disp19 (geomcam, "Cal;LoGainPickup",          "Number Pickup events Lo Gain");
     274    MHCamera disp20 (geomcam, "Cal;Saturation",            "Pixels with saturated Hi Gain");
     275    MHCamera disp21 (geomcam, "Cal;FFactorValid",          "Pixels with valid F-Factor calibration");
     276    MHCamera disp22 (geomcam, "Cal;BlindPixelValid",       "Pixels with valid BlindPixel calibration");
     277    MHCamera disp23 (geomcam, "Cal;PINdiodeFFactorValid",  "Pixels with valid PINDiode calibration");
     278   
     279    MHCamera disp24 (geomcam, "Cal;Ped",         "Pedestals");
     280    MHCamera disp25 (geomcam, "Cal;PedRms",      "Pedestal RMS");
     281   
     282    MHCamera disp26 (geomcam, "time;Time",        "Rel. Arrival Times");
     283    MHCamera disp27 (geomcam, "time;SigmaTime",   "Sigma of Rel. Arrival Times");
     284    MHCamera disp28 (geomcam, "time;TimeProb",    "Probability of Time Fit");
     285    MHCamera disp29 (geomcam, "time;NotFitValid", "Pixels with not valid fit results");
     286    MHCamera disp30 (geomcam, "time;Oscillating", "Oscillating Pixels");
     287   
     288    MHCamera disp31 (geomcam, "Cal;AbsTimeMean",  "Abs. Arrival Times");
     289    MHCamera disp32 (geomcam, "Cal;AbsTimeRms",   "RMS of Arrival Times");
     290   
    293291    // Fitted charge means and sigmas
    294292    disp1.SetCamContent(calcam,  0);
     
    296294    disp2.SetCamContent(calcam,  2);
    297295    disp2.SetCamError(  calcam,  3);
    298 
     296 
    299297    // Fit probabilities
    300298    disp3.SetCamContent(calcam,  4);
    301 
     299   
    302300    // Reduced Sigmas and reduced sigmas per charge
    303301    disp4.SetCamContent(calcam,  5);
     
    305303    disp5.SetCamContent(calcam,  7);
    306304    disp5.SetCamError(  calcam,  8);
    307 
     305   
    308306    // F-Factor Method
    309307    disp6.SetCamContent(calcam,  9);
     
    313311    disp8.SetCamContent(calcam, 13);
    314312    disp8.SetCamError(  calcam, 14);
    315 
    316     /// Blind Pixel Method
    317     disp9.SetCamContent(calcam, 15);
    318     disp9.SetCamError(  calcam, 16);
    319     disp10.SetCamContent(calcam,17);
    320     disp10.SetCamError(  calcam,18);
    321     disp11.SetCamContent(calcam,19);
    322     disp11.SetCamError(  calcam,20);
    323 
     313   
     314    // Blind Pixel Method
     315    disp9.SetCamContent(calcam, 16);
     316    disp9.SetCamError(  calcam, 17);
     317    disp10.SetCamContent(calcam,18);
     318    disp10.SetCamError(  calcam,19);
     319   
    324320    // PIN Diode Method
    325     disp12.SetCamContent(calcam,21);
    326     disp12.SetCamError(  calcam,22);
    327     disp13.SetCamContent(calcam,23);
    328     disp13.SetCamError(  calcam,24);
    329     disp14.SetCamContent(calcam,25);
    330     disp14.SetCamError(  calcam,26);
    331 
     321    disp11.SetCamContent(calcam,21);
     322    disp11.SetCamError(  calcam,22);
     323    disp12.SetCamContent(calcam,23);
     324    disp12.SetCamError(  calcam,24);
     325   
    332326    // Pixels with defects
    333     disp15.SetCamContent(calcam,27);
    334     disp16.SetCamContent(calcam,28);
    335     disp17.SetCamContent(badcam,9);
    336     disp18.SetCamContent(badcam,16);
    337     disp19.SetCamContent(badcam,15);
     327    disp13.SetCamContent(calcam,26);
     328    disp14.SetCamContent(badcam,7);
     329    disp15.SetCamContent(badcam,9);
     330    disp16.SetCamContent(badcam,16);
     331    disp17.SetCamContent(badcam,15);
     332    disp18.SetCamContent(calcam,27);
     333    disp19.SetCamContent(calcam,28);
     334   
     335    // Lo Gain calibration
    338336    disp20.SetCamContent(calcam,29);
    339     disp21.SetCamContent(calcam,30);
    340 
    341     // Lo Gain calibration
    342     disp22.SetCamContent(calcam,31);
    343 
     337   
    344338    // Valid flags
    345     disp23.SetCamContent(calcam,32);
    346     disp24.SetCamContent(calcam,33);
    347     disp25.SetCamContent(calcam,34);
    348 
     339    disp21.SetCamContent(calcam,15);
     340    disp22.SetCamContent(calcam,20);
     341    disp23.SetCamContent(calcam,25);
     342   
    349343    // Pedestals
    350     disp26.SetCamContent(calcam,35);
    351     disp26.SetCamError(  calcam,36);
    352     disp27.SetCamContent(calcam,37);
    353     disp27.SetCamError(  calcam,38);
    354 
    355 
     344    disp24.SetCamContent(calcam,30);
     345    disp24.SetCamError(  calcam,31);
     346    disp25.SetCamContent(calcam,32);
     347    disp25.SetCamError(  calcam,33);
     348   
    356349    // Relative Times
    357     disp28.SetCamContent(histtime,0);
    358     disp28.SetCamError(  histtime,1);
    359     disp29.SetCamContent(histtime,2);
    360     disp29.SetCamError(  histtime,3);
    361     disp30.SetCamContent(histtime,4);
    362     disp31.SetCamContent(histtime,5);
    363     disp32.SetCamContent(histtime,6);
    364 
     350    disp26.SetCamContent(histtime,0);
     351    disp26.SetCamError(  histtime,1);
     352    disp27.SetCamContent(histtime,2);
     353    disp27.SetCamError(  histtime,3);
     354    disp28.SetCamContent(histtime,4);
     355    disp29.SetCamContent(histtime,5);
     356    disp30.SetCamContent(histtime,6);
     357   
    365358    // Absolute Times
    366     disp33.SetCamContent(calcam,39);
    367     disp33.SetCamError(  calcam,40);
    368     disp34.SetCamContent(calcam,41);
    369 
     359    disp31.SetCamContent(calcam,34);
     360    disp31.SetCamError(  calcam,35);
     361    disp32.SetCamContent(calcam,35);
     362   
    370363    disp1.SetYTitle("Charge [FADC units]");
    371364    disp2.SetYTitle("\\sigma_{Charge} [FADC units]");
    372365    disp3.SetYTitle("P_{Charge} [1]");
    373 
     366   
    374367    disp4.SetYTitle("\\sqrt{\\sigma^{2}_{Charge} - RMS^{2}_{Ped}} [FADC Counts]");
    375368    disp5.SetYTitle("Reduced Sigma / Mean Charge [1]");
    376 
     369   
    377370    disp6.SetYTitle("Nr. Photo-electrons [1]");
    378371    disp7.SetYTitle("Conversion Factor [Ph/FADC Count]");
    379372    disp8.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1] ");
    380 
    381     disp9.SetYTitle("Photon flux [ph/mm^2]");
    382     disp10.SetYTitle("Conversion Factor [Phot/FADC Count]");
    383     disp11.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
    384 
    385     disp12.SetYTitle("Photon flux [ph/mm^2]");
    386     disp13.SetYTitle("Conversion Factor [Phot/FADC Count]");
    387     disp14.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
    388 
     373   
     374    disp9.SetYTitle("Conversion Factor [Phot/FADC Count]");
     375    disp10.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
     376   
     377    disp11.SetYTitle("Conversion Factor [Phot/FADC Count]");
     378    disp12.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1]");
     379   
     380    disp13.SetYTitle("[1]");
     381    disp14.SetYTitle("[1]");
    389382    disp15.SetYTitle("[1]");
    390383    disp16.SetYTitle("[1]");
     
    396389    disp22.SetYTitle("[1]");
    397390    disp23.SetYTitle("[1]");
    398     disp24.SetYTitle("[1]");
    399     disp25.SetYTitle("[1]");
    400 
    401     disp26.SetYTitle("Ped [FADC Counts ]");
    402     disp27.SetYTitle("RMS_{Ped} [FADC Counts ]");
    403 
    404     disp28.SetYTitle("Time Offset [ns]");
    405     disp29.SetYTitle("Timing resolution [ns]");
    406     disp30.SetYTitle("P_{Time} [1]");
    407 
    408     disp31.SetYTitle("[1]");
    409     disp32.SetYTitle("[1]");
    410 
    411     disp33.SetYTitle("Mean Abs. Time [FADC slice]");
    412     disp34.SetYTitle("RMS Abs. Time [FADC slices]");
    413 
     391   
     392    disp24.SetYTitle("Ped [FADC Counts ]");
     393    disp25.SetYTitle("RMS_{Ped} [FADC Counts ]");
     394   
     395    disp26.SetYTitle("Time Offset [ns]");
     396    disp27.SetYTitle("Timing resolution [ns]");
     397    disp28.SetYTitle("P_{Time} [1]");
     398   
     399    disp29.SetYTitle("[1]");
     400    disp30.SetYTitle("[1]");
     401   
     402    disp31.SetYTitle("Mean Abs. Time [FADC slice]");
     403    disp32.SetYTitle("RMS Abs. Time [FADC slices]");
     404   
    414405    gStyle->SetOptStat(1111);
    415406    gStyle->SetOptFit();
     
    445436    // Blind Pixel Method
    446437    TCanvas &c5 = display->AddTab("BlindPix");
    447     c5.Divide(3, 3);
    448 
    449     CamDraw(c5, disp9,calcam,1, 3 ,  9);
    450     CamDraw(c5, disp10,calcam,2, 3 , 2);
    451     CamDraw(c5, disp11,calcam,3, 3 , 2);
     438    c5.Divide(2,3);
     439
     440    CamDraw(c5, disp9, calcam,1, 2 , 2);
     441    CamDraw(c5, disp10,calcam,2, 2 , 2);
    452442
    453443    // PIN Diode Method
    454444    TCanvas &c6 = display->AddTab("PINDiode");
    455     c6.Divide(3,3);
    456 
    457     CamDraw(c6, disp12,calcam,1, 3 , 9);
    458     CamDraw(c6, disp13,calcam,2, 3 , 2);
    459     CamDraw(c6, disp14,calcam,3, 3 , 2);
     445    c6.Divide(2,3);
     446
     447    CamDraw(c6, disp11,calcam,1, 2 , 2);
     448    CamDraw(c6, disp12,calcam,2, 2 , 2);
    460449
    461450    // Defects
     
    463452    c7.Divide(4,2);
    464453
    465     CamDraw(c7, disp15,calcam,1,4, 0);
    466     CamDraw(c7, disp16,calcam,2,4, 0);
    467     CamDraw(c7, disp20,calcam,3,4, 0);
    468     CamDraw(c7, disp21,calcam,4,4, 0);
     454    CamDraw(c7, disp13,calcam,1,4, 0);
     455    CamDraw(c7, disp14,calcam,2,4, 0);
     456    CamDraw(c7, disp18,calcam,3,4, 0);
     457    CamDraw(c7, disp19,calcam,4,4, 0);
    469458
    470459    // BadCam
     
    472461    c8.Divide(3,2);
    473462
    474     CamDraw(c8, disp17,badcam,1,3, 0);
    475     CamDraw(c8, disp18,badcam,2,3, 0);
    476     CamDraw(c8, disp19,badcam,3,3, 0);
     463    CamDraw(c8, disp15,badcam,1,3, 0);
     464    CamDraw(c8, disp16,badcam,2,3, 0);
     465    CamDraw(c8, disp17,badcam,3,3, 0);
    477466
    478467
     
    481470    c9.Divide(4,2);
    482471
    483     CamDraw(c9, disp22,calcam,1,4,0);
    484     CamDraw(c9, disp23,calcam,2,4,0);
    485     CamDraw(c9, disp24,calcam,3,4,0);
    486     CamDraw(c9, disp25,calcam,4,4,0);
     472    CamDraw(c9, disp20,calcam,1,4,0);
     473    CamDraw(c9, disp21,calcam,2,4,0);
     474    CamDraw(c9, disp22,calcam,3,4,0);
     475    CamDraw(c9, disp23,calcam,4,4,0);
    487476
    488477
     
    491480    c10.Divide(2,3);
    492481
    493     CamDraw(c10,disp26,calcam,1,2,1);
    494     CamDraw(c10,disp27,calcam,2,2,2);
     482    CamDraw(c10,disp24,calcam,1,2,1);
     483    CamDraw(c10,disp25,calcam,2,2,2);
    495484
    496485    // Rel. Times
     
    498487    c11.Divide(3,3);
    499488
    500     CamDraw(c11,disp28,calcam,1,3,2);
    501     CamDraw(c11,disp29,calcam,2,3,2);
    502     CamDraw(c11,disp30,calcam,3,3,4);
     489    CamDraw(c11,disp26,calcam,1,3,2);
     490    CamDraw(c11,disp27,calcam,2,3,2);
     491    CamDraw(c11,disp38,calcam,3,3,4);
    503492
    504493    // Time Defects
     
    506495    c12.Divide(2,2);
    507496
    508     CamDraw(c12, disp31,calcam,1,2, 0);
    509     CamDraw(c12, disp32,calcam,2,2, 0);
     497    CamDraw(c12, disp29,calcam,1,2, 0);
     498    CamDraw(c12, disp30,calcam,2,2, 0);
    510499
    511500    // Abs. Times
     
    513502    c13.Divide(2,3);
    514503
    515     CamDraw(c13,disp33,calcam,1,2,2);
    516     CamDraw(c13,disp34,calcam,2,2,2);
     504    CamDraw(c13,disp31,calcam,1,2,2);
     505    CamDraw(c13,disp32,calcam,2,2,2);
    517506
    518507  /************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.