- Timestamp:
- 01/28/04 21:58:14 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r2926 r2952 51 51 52 52 MGeomApply geomapl; 53 MExtractSignal sigcalc; 53 54 MPedCalcPedRun pedcalc; 55 pedcalc.SetUseHists(); 56 57 tlist.AddToList(&read); 58 tlist.AddToList(&geomapl); 59 tlist.AddToList(&sigcalc); 60 tlist.AddToList(&pedcalc); 61 54 62 MGeomCamMagic geomcam; 55 63 MPedestalCam pedcam; 56 57 tlist.AddToList(&read); 58 tlist.AddToList(&geomapl); 59 tlist.AddToList(&pedcalc); 60 64 plist.AddToList(&geomcam); 61 65 plist.AddToList(&pedcam); 62 66 63 MHCamEvent hist("Pedestal");64 hist.SetType(1);65 plist.AddToList(&hist);66 MFillH fill(&hist, "MPedestalCam");67 68 tlist.AddToList(&fill);69 70 67 // 71 68 // Create and setup the eventloop 72 //69 // 73 70 MEvtLoop evtloop; 74 71 evtloop.SetParList(&plist); 75 72 76 73 // 77 74 // Execute first analysis … … 81 78 82 79 tlist.PrintStatistics(); 80 81 pedcam[559].DrawClone(); 82 83 MStatusDisplay *d1 = new MStatusDisplay; 84 d1->SetUpdateTime(3000); 85 d1->Resize(850,700); 86 87 MHCamera dispped0 (geomcam, "MPedestalPix;Pedestal", "Mean"); 88 MHCamera dispped1 (geomcam, "MPedestalPix;PedestalRms", "RMS"); 89 MHCamera dispped2 (geomcam, "MPedestalPix;Mean", "Fitted Mean"); 90 MHCamera dispped3 (geomcam, "MPedestalPix;MeanErr", "Fitted Error of Mean"); 91 MHCamera dispped4 (geomcam, "MPedestalPix;Sigma", "Fitted Sigma"); 92 MHCamera dispped5 (geomcam, "MPedestalPix;SigmaErr", "Fitted Error of Sigma"); 93 MHCamera dispped6 (geomcam, "MPedestalPix;Prob", "Probability of Fit"); 94 MHCamera dispped7 (geomcam, "MPedestalPix;DeltaPedestalMean", "Pedestal minus Fitted Mean"); 95 MHCamera dispped8 (geomcam, "MPedestalPix;DeltaRmsSigma", "Pedestal RMS minus Fitted Sigma"); 96 97 dispped0.SetCamContent(pedcam, 0); 98 dispped0.SetCamError(pedcam, 1); 99 dispped1.SetCamContent(pedcam, 1); 100 dispped2.SetCamContent(pedcam, 2); 101 dispped2.SetCamError(pedcam,3); 102 dispped3.SetCamContent(pedcam, 3); 103 dispped3.SetCamError(pedcam, 4); 104 dispped4.SetCamContent(pedcam, 4); 105 dispped5.SetCamContent(pedcam, 5); 106 dispped6.SetCamContent(pedcam, 6); 107 dispped7.SetCamContent(pedcam, 7); 108 dispped8.SetCamContent(pedcam, 8); 109 110 dispped0.SetYTitle("Pedestal [FADC counts]"); 111 dispped1.SetYTitle("Pedestal RMS [FADC counts]"); 112 dispped2.SetYTitle("Mean Pedestal [FADC counts]"); 113 dispped3.SetYTitle("Error of Mean Pedestal [FADC counts]"); 114 dispped4.SetYTitle("Sigma Pedestal [FADC counts]"); 115 dispped5.SetYTitle("Error of Sigma Pedestal [FADC counts]"); 116 dispped6.SetYTitle("Fit Probability [1]"); 117 dispped7.SetYTitle("Pedestal - Mean [FADC counts]"); 118 dispped8.SetYTitle("RMS - Sigma [FADC counts]"); 119 120 gStyle->SetOptStat(1111); 121 gStyle->SetOptFit(); 122 123 // Charges 124 TCanvas &b1 = d1->AddTab("Pedestals"); 125 b1.Divide(2,3); 126 127 CamDraw(b1,dispped0,pedcam,1,2,1); 128 CamDraw(b1,dispped1,pedcam,2,2,1); 129 130 // Means 131 TCanvas &b2 = d1->AddTab("Means"); 132 b2.Divide(2,3); 133 134 CamDraw(b2,dispped2,pedcam,1,2,1); 135 CamDraw(b2,dispped3,pedcam,2,2,1); 136 137 // Sigmas 138 TCanvas &b12 = d1->AddTab("Sigmas"); 139 b12.Divide(2,3); 140 141 CamDraw(b12,dispped4,pedcam,1,2,1); 142 CamDraw(b12,dispped5,pedcam,2,2,1); 143 144 // Fits Probability 145 TCanvas &b3 = d1->AddTab("Fit Probabilities"); 146 b3.Divide(1,3); 147 148 CamDraw(b3,dispped6,pedcam,1,1,3); 149 150 // Differences 151 TCanvas &c4 = d1->AddTab("Differences"); 152 c4.Divide(2,3); 153 154 CamDraw(c4,dispped7,pedcam,1,2,1); 155 CamDraw(c4,dispped8,pedcam,2,2,1); 83 156 84 157 // … … 94 167 // Get the previously created MPedestalCam into the new Parameter List 95 168 // 169 plist2.AddToList(&geomcam); 96 170 plist2.AddToList(&pedcam); 97 171 plist2.AddToList(&sigcam); … … 102 176 // 103 177 tlist2.AddToList(&geomapl); 104 plist2.AddToList(&geomcam);105 178 106 179 // … … 112 185 read2.DisableAutoScheme(); 113 186 114 MExtractSignal sigcalc;187 // MExtractSignal sigcalc; 115 188 MArrivalTimeCalc timecalc; 116 189 MCalibrationCalc calcalc; … … 132 205 // (This is a preliminary feature) 133 206 // 134 // calcalc.ExcludePixelsFromAsciiFile("badpixels_all.dat");207 // calcalc.ExcludePixelsFromAsciiFile("badpixels_all.dat"); 135 208 136 209 // -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
r2943 r2952 430 430 431 431 fEvents++; 432 433 Int_t overflow = 0; 432 434 433 435 // … … 499 501 500 502 if (!pix.FillRChargevsTimeLoGain(sumlo,fEvents)) 501 *fLog << warn << "Could not fill Lo Gain Charge vs. EvtNr of pixel: " 502 << pixid << " signal = " << sumlo << " event Nr: " << fEvents << endl; 503 overflow++; 503 504 504 505 if (!pix.FillRChargevsTimeHiGain(sumhi,fEvents)) 505 *fLog << warn << "Could not fill Hi Gain Charge vs. EvtNr of pixel: " 506 << pixid << " signal = " << sumhi << " event Nr: " << fEvents << endl; 506 overflow++; 507 507 508 508 if (sig.IsLoGainUsed()) … … 538 538 539 539 } /* while (pixel.Next()) */ 540 541 if (overflow) 542 *fLog << warn << "Overflow occurred filling Charges vs. EvtNr " << overflow << " times" << endl; 540 543 541 544 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.