Changeset 3725 for trunk/MagicSoft/Mars
- Timestamp:
- 04/13/04 20:03:32 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3724 r3725 51 51 Don't know why. Removed and stored some variables instead 52 52 53 * mjobs/MJCalibration. cc53 * mjobs/MJCalibration.[h,cc] 54 54 - updated documentation, updated QE Cam 55 - set the pulser colour (now obligatory) 56 57 * mcalib/MCalibrationChargeCalc.cc 58 - set the pulser colour (now obligatory) 55 59 56 60 -
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 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3724 r3725 272 272 SetLambdaErrLimit(); 273 273 SetPheErrLimit(); 274 SetPulserColor(MCalibrationCam::k CT1);274 SetPulserColor(MCalibrationCam::kNONE); 275 275 276 276 Clear(); … … 342 342 343 343 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 } 344 357 345 358 return kTRUE; -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r3723 r3725 66 66 67 67 #include "MPedestalCam.h" 68 #include "MCalibrationCam.h" 68 69 #include "MCalibrationQECam.h" 69 70 #include "MCalibrationChargeCam.h" … … 95 96 // Default constructor. 96 97 // 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 // 100 MJCalibration::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 103 106 } 104 107 … … 719 722 MExtractSignal2 extract; 720 723 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); 722 729 723 730 MFillH fillpin("MHCalibrationChargePINDiode", "MExtractedSignalPINDiode"); -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r3723 r3725 29 29 MCalibrationQECam fQECam; // Quantum efficiency, can be set from previous runs 30 30 MBadPixelsCam fBadPixels; // Bad Pixels cam, can be set from previous runs 31 32 MCalibrationCam::PulserColor_t fColor; // Colour of the pulsed LEDs 31 33 32 34 void DrawProjection ( MHCamera *obj, Int_t fit) const; // Draw projection of pixels values … … 53 55 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 54 56 void SetQECam (const MCalibrationQECam &qe) { qe.Copy(fQECam); } 57 void SetColor (const MCalibrationCam::PulserColor_t color) { fColor = color; } 55 58 56 59 Bool_t ReadCalibrationCam();
Note:
See TracChangeset
for help on using the changeset viewer.