Changeset 3725 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 04/13/04 20:03:32 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r3651 r3725 22 22 ! 23 23 \* ======================================================================== */ 24 #include "MAGIC.h"25 24 26 25 void calibration() 27 26 { 27 28 const MCalibrationCam::PulserColor_t color = MCalibrationCam::kGREEN; 28 29 29 30 // const TString inpath = "/mnt/Data/rootdata/CrabNebula/2004_01_27/"; … … 41 42 gStyle->SetOptFit(); 42 43 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 43 52 MStatusDisplay *display = new MStatusDisplay; 44 53 display->SetUpdateTime(3000); 45 54 display->Resize(850,700); 46 55 47 MBadPixelsCam badcam;48 badcam.AsciiRead("badpixels.dat");49 50 56 /************************************/ 51 57 /* FIRST LOOP: PEDESTAL COMPUTATION */ 52 58 /************************************/ 53 59 54 60 MJPedestal pedloop; 55 61 pedloop.SetInput(&pruns); … … 76 82 static_cast<MRead&>(read).AddFiles(pruns); 77 83 78 MGeomApply geomapl;79 MExtractSignal sigcalc;80 81 //82 // Additionally to calculating the pedestals,83 // you can fill histograms and look at them84 //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 eventloop101 //102 MEvtLoop evtloop0;103 104 evtloop0.SetParList(&plist0);105 evtloop0.SetDisplay(display);106 107 //108 // Execute first analysis109 //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 128 84 // 129 85 // Now the short version: 130 86 // 131 /*132 87 MJCalibration calloop; 88 calloop.SetColor(color); 133 89 calloop.SetInput(&cruns); 134 90 calloop.SetDisplay(display); 135 calloop.SetBadPixels(pedloop.GetBadPixelsCam()); 91 calloop.SetQECam(qecam); 92 calloop.SetBadPixels(pedloop.GetBadPixels()); 136 93 if (!calloop.Process(pedloop.GetPedestalCam())) 137 94 return; 138 #if 0 139 */ 95 96 #if 0 140 97 // 141 98 // The longer version: … … 163 120 MArrivalTimeCam timecam; 164 121 MCalibrationRelTimeCam relcam; 122 MCalibrationQECam qecam; 165 123 MCalibrationChargeCam calcam; 166 124 MCalibrationChargePINDiode pindiode; … … 174 132 histblind.SetSinglePheCut(600); 175 133 // 176 // As long, as we don't have digital modules,177 // we have to set the color of the pulser LED by hand178 //179 blindpix.SetColor(kCT1);180 // pindiode.SetColor(kCT1);181 //182 134 // Get the previously created MPedestalCam into the new Parameter List 183 135 // … … 186 138 plist.AddToList(&timecam); 187 139 plist.AddToList(&relcam); 140 plist.AddToList(&qecam); 188 141 plist.AddToList(&calcam); 189 142 plist.AddToList(&histtime); … … 210 163 MFillH fillblind("MHCalibrationChargeBlindPix", "MExtractedSignalBlindPixel"); 211 164 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); 212 171 213 172 // … … 300 259 MHCamera disp7 (geomcam, "Cal;FFactorConv", "Conversion Factor to photons (F-Factor Method)"); 301 260 MHCamera disp8 (geomcam, "Cal;FFactorFFactor", "Total F-Factor (F-Factor Method)"); 302 MHCamera disp9 (geomcam, "Cal; BlindPixConv", "Conversion Factor to photons (Blind PixelMethod)");303 MHCamera disp10 (geomcam, "Cal; BlindPixFFactor", "Total F-Factor (Blind PixelMethod)");261 MHCamera disp9 (geomcam, "Cal;CascadesQEFFactor", "Av. Quantum Efficiency (F-Factor Method)"); 262 MHCamera disp10 (geomcam, "Cal;QEFFactor", "Measured QE (F-Factor Method)"); 304 263 MHCamera disp11 (geomcam, "Cal;PINDiodeConv", "Conversion Factor tp photons (PIN Diode Method)"); 305 264 MHCamera disp12 (geomcam, "Cal;PINDiodeFFactor", "Total F-Factor (PIN Diode Method)"); … … 351 310 disp8.SetCamError( calcam, 14); 352 311 353 // Blind Pixel Method354 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); 358 317 359 318 // PIN Diode Method … … 411 370 disp8.SetYTitle("\\sqrt{N_{Ph}}*\\sigma_{Charge}/\\mu_{Charge} [1] "); 412 371 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]"); 415 374 416 375 disp11.SetYTitle("Conversion Factor [Phot/FADC Count]"); … … 475 434 476 435 477 // Blind Pixel Method478 TCanvas &c5 = display->AddTab(" BlindPix");436 // Quantum Efficiencies 437 TCanvas &c5 = display->AddTab("QE"); 479 438 c5.Divide(2, 4); 480 439
Note:
See TracChangeset
for help on using the changeset viewer.