Changeset 3871 for trunk/MagicSoft
- Timestamp:
- 04/28/04 18:00:41 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3870 r3871 27 27 2004/04/28: Markus Gaug 28 28 29 * mjobs/MGCamDisplays.cc 30 * mjobs/MJCalibration.cc 31 - introduced new "fit" flag in DrawProjection allowing to draw 32 two separate pad with the (fitted) histograms for inner and 33 outer pixels. This is displayed by MJCalibration if the 34 kNormalDisplay option is chosen (default). 35 36 29 37 * msignal/MArrivalTimeCalc.[h,cc] 30 38 -remove the ReInit() which calls to an MGeomCam which is later not -
trunk/MagicSoft/Mars/macros/calibration.C
r3862 r3871 85 85 // badcam.AsciiRead("badpixels.dat"); 86 86 87 gStyle->SetOptStat(1); 88 gStyle->SetOptFit(); 89 87 90 MStatusDisplay *display = new MStatusDisplay; 88 91 display->SetUpdateTime(3000); -
trunk/MagicSoft/Mars/mjobs/MGCamDisplays.cc
r3853 r3871 35 35 #include <TCanvas.h> 36 36 37 #include "MH.h" 37 38 #include "MHCamera.h" 38 39 #include "MGeomCam.h" 39 #include "T Pad.h"40 #include "TVirtualPad.h" 40 41 #include "TProfile.h" 41 42 #include "TF1.h" 43 44 #include "MLog.h" 45 #include "MLogManip.h" 42 46 43 47 #include "MStatusDisplay.h" … … 114 118 // 3: Triple Gauss (for distributions with inner, outer pixels and outliers) 115 119 // 4: flat (for the probability distributions) 120 // 5: Fit Inner and Outer pixels separately by a single Gaussian 121 // (only for MAGIC cameras) 116 122 // 117 123 // Moreover, sectors 6,1 and 2 of the camera and sectors 3,4 and 5 are … … 120 126 void MGCamDisplays::DrawProjection(MHCamera *obj, Int_t fit) const 121 127 { 128 129 TArrayI inner(1); 130 inner[0] = 0; 131 132 TArrayI outer(1); 133 outer[0] = 1; 134 135 if (fit==5) 136 { 137 138 if (obj->GetGeomCam().InheritsFrom("MGeomCamMagic")) 139 { 140 TArrayI s0(6); 141 s0[0] = 6; 142 s0[1] = 1; 143 s0[2] = 2; 144 s0[3] = 3; 145 s0[4] = 4; 146 s0[5] = 5; 147 148 gPad->Clear(); 149 TVirtualPad *pad = gPad; 150 pad->Divide(2,1); 151 152 TH1D *half[2]; 153 half[0] = obj->ProjectionS(s0, inner, "Inner"); 154 half[1] = obj->ProjectionS(s0, outer, "Outer"); 155 156 half[0]->SetDirectory(NULL); 157 half[1]->SetDirectory(NULL); 158 159 for (int i=0; i<2; i++) 160 { 161 pad->cd(i+1); 162 half[i]->SetLineColor(kRed+i); 163 half[i]->SetBit(kCanDelete); 164 half[i]->Draw(); 165 half[i]->Fit("gaus","Q"); 166 } 167 168 gLog << all << obj->GetName() 169 << Form("%s%5.3f%s%3.2f"," Mean: Inner Pixels: ", 170 half[0]->GetFunction("gaus")->GetParameter(1),"+-", 171 half[0]->GetFunction("gaus")->GetParError(1)); 172 gLog << Form("%s%5.3f%s%3.2f"," Outer Pixels: ", 173 half[1]->GetFunction("gaus")->GetParameter(1),"+-", 174 half[1]->GetFunction("gaus")->GetParError(1)) << endl; 175 gLog << all << obj->GetName() 176 << Form("%s%5.3f%s%3.2f"," Sigma: Inner Pixels: ", 177 half[0]->GetFunction("gaus")->GetParameter(2),"+-", 178 half[0]->GetFunction("gaus")->GetParError(2)); 179 gLog << Form("%s%5.3f%s%3.2f"," Outer Pixels: ", 180 half[1]->GetFunction("gaus")->GetParameter(2),"+-", 181 half[1]->GetFunction("gaus")->GetParError(2)) << endl; 182 183 } 184 return; 185 } 122 186 123 187 TH1D *obj2 = (TH1D*)obj->Projection(obj->GetName()); … … 125 189 obj2->Draw(); 126 190 obj2->SetBit(kCanDelete); 191 127 192 128 193 if (obj->GetGeomCam().InheritsFrom("MGeomCamMagic")) … … 138 203 s1[2] = 5; 139 204 140 TArrayI inner(1); 141 inner[0] = 0; 142 143 TArrayI outer(1); 144 outer[0] = 1; 205 206 TH1D *halfInOut[4]; 145 207 146 208 // Just to get the right (maximum) binning 147 TH1D *half[4]; 148 half[0] = obj->ProjectionS(s0, inner, "Sector 6-1-2 Inner"); 149 half[1] = obj->ProjectionS(s1, inner, "Sector 3-4-5 Inner"); 150 half[2] = obj->ProjectionS(s0, outer, "Sector 6-1-2 Outer"); 151 half[3] = obj->ProjectionS(s1, outer, "Sector 3-4-5 Outer"); 209 halfInOut[0] = obj->ProjectionS(s0, inner, "Sector 6-1-2 Inner"); 210 halfInOut[1] = obj->ProjectionS(s1, inner, "Sector 3-4-5 Inner"); 211 halfInOut[2] = obj->ProjectionS(s0, outer, "Sector 6-1-2 Outer"); 212 halfInOut[3] = obj->ProjectionS(s1, outer, "Sector 3-4-5 Outer"); 152 213 153 214 for (int i=0; i<4; i++) 154 215 { 155 half [i]->SetLineColor(kRed+i);156 half [i]->SetDirectory(0);157 half [i]->SetBit(kCanDelete);158 half [i]->Draw("same");216 halfInOut[i]->SetLineColor(kRed+i); 217 halfInOut[i]->SetDirectory(0); 218 halfInOut[i]->SetBit(kCanDelete); 219 halfInOut[i]->Draw("same"); 159 220 } 160 221 } -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r3862 r3871 213 213 214 214 // Create histograms to display 215 MHCamera disp1 (geomcam, "C al;Charge", "Fitted Mean Charges");216 MHCamera disp2 (geomcam, " Cal;SigmaCharge", "Sigma of Fitted Charges");217 MHCamera disp3 (geomcam, " Cal;RSigma", "Reduced Sigmas");218 MHCamera disp4 (geomcam, " Cal;RSigma/Charge","Reduced Sigma per Charge");219 MHCamera disp5 (geomcam, " Cal;FFactorPhe","Nr. of Phe's (F-Factor Method)");220 MHCamera disp6 (geomcam, "C al;FFactorConv","Conversion Factor (F-Factor Method)");221 MHCamera disp7 (geomcam, " Cal;FFactorFFactor","Total F-Factor (F-Factor Method)");222 MHCamera disp8 (geomcam, "Ca l;CascadesQEFFactor", "Cascades QE (F-Factor Method)");223 MHCamera disp9 (geomcam, "Ca l;CascadesQEBlindPix","Cascades QE (Blind Pixel Method)");224 MHCamera disp10(geomcam, "Ca l;CascadesQEPINDiode","Cascades QE (PIN Diode Method)");225 MHCamera disp11(geomcam, "Ca l;CascadesQECombined","Cascades QE (Combined Method)");226 MHCamera disp12(geomcam, " Cal;FFactorValid", "Pixels with valid F-Factor calibration");227 MHCamera disp13(geomcam, " Cal;BlindPixelValid", "Pixels with valid BlindPixel calibration");228 MHCamera disp14(geomcam, " Cal;PINdiodeValid", "Pixels with valid PINDiode calibration");229 MHCamera disp15(geomcam, "C al;CombinedValid", "Pixels with valid Combined calibration");230 MHCamera disp16(geomcam, " Cal;Saturation", "Pixels with saturated Hi Gain");231 MHCamera disp17(geomcam, "C al;ConversionMeans", "Conversion HiGain.vs.LoGain Means");232 MHCamera disp18(geomcam, "C al;ConversionSigmas", "Conversion HiGain.vs.LoGain Sigmas");233 MHCamera disp19(geomcam, " Cal;HiGainPickup", "Number Pickup events Hi Gain");234 MHCamera disp20(geomcam, " Cal;LoGainPickup", "Number Pickup events Lo Gain");235 MHCamera disp21(geomcam, " Cal;HiGainBlackout", "Number Blackout events Hi Gain");236 MHCamera disp22(geomcam, " Cal;LoGainBlackout", "Number Blackout events Lo Gain");237 MHCamera disp23(geomcam, " Cal;Excluded", "Pixels previously excluded");215 MHCamera disp1 (geomcam, "Charge", "Fitted Mean Charges"); 216 MHCamera disp2 (geomcam, "SigmaCharge", "Sigma of Fitted Charges"); 217 MHCamera disp3 (geomcam, "RSigma", "Reduced Sigmas"); 218 MHCamera disp4 (geomcam, "RSigmaPerCharge", "Reduced Sigma per Charge"); 219 MHCamera disp5 (geomcam, "NumPhes", "Nr. of Phe's (F-Factor Method)"); 220 MHCamera disp6 (geomcam, "ConvFADC2Phes", "Conversion Factor (F-Factor Method)"); 221 MHCamera disp7 (geomcam, "TotalFFactor", "Total F-Factor (F-Factor Method)"); 222 MHCamera disp8 (geomcam, "CascadesQEFFactor", "Cascades QE (F-Factor Method)"); 223 MHCamera disp9 (geomcam, "CascadesQEBlindPix","Cascades QE (Blind Pixel Method)"); 224 MHCamera disp10(geomcam, "CascadesQEPINDiode","Cascades QE (PIN Diode Method)"); 225 MHCamera disp11(geomcam, "CascadesQECombined","Cascades QE (Combined Method)"); 226 MHCamera disp12(geomcam, "FFactorValid", "Pixels with valid F-Factor calibration"); 227 MHCamera disp13(geomcam, "BlindPixelValid", "Pixels with valid BlindPixel calibration"); 228 MHCamera disp14(geomcam, "PINdiodeValid", "Pixels with valid PINDiode calibration"); 229 MHCamera disp15(geomcam, "CombinedValid", "Pixels with valid Combined calibration"); 230 MHCamera disp16(geomcam, "Saturation", "Pixels with saturated Hi Gain"); 231 MHCamera disp17(geomcam, "ConversionMeans", "Conversion HiGain.vs.LoGain Means"); 232 MHCamera disp18(geomcam, "ConversionSigmas", "Conversion HiGain.vs.LoGain Sigmas"); 233 MHCamera disp19(geomcam, "HiGainPickup", "Number Pickup events Hi Gain"); 234 MHCamera disp20(geomcam, "LoGainPickup", "Number Pickup events Lo Gain"); 235 MHCamera disp21(geomcam, "HiGainBlackout", "Number Blackout events Hi Gain"); 236 MHCamera disp22(geomcam, "LoGainBlackout", "Number Blackout events Lo Gain"); 237 MHCamera disp23(geomcam, "Excluded", "Pixels previously excluded"); 238 238 MHCamera disp24(geomcam, "Bad;UnSuitable", "Pixels not suited for further analysis"); 239 239 MHCamera disp25(geomcam, "Bad;UnReliable", "Pixels not reliable for further analysis"); … … 368 368 } 369 369 370 gStyle->SetOptStat(1111);371 gStyle->SetOptFit();372 373 370 if (fDisplayType == kDataCheckDisplay) 374 371 { … … 428 425 c11.Divide(2, 4); 429 426 430 CamDraw(c11, 1, 2, disp1, 2, 1);431 CamDraw(c11, 2, 2, disp2, 2, 1);427 CamDraw(c11, 1, 2, disp1, 5, 1); 428 CamDraw(c11, 2, 2, disp2, 5, 1); 432 429 433 430 // Reduced Sigmas … … 435 432 c12.Divide(2,4); 436 433 437 CamDraw(c12, 1, 2, disp3, 2, 1);438 CamDraw(c12, 2, 2, disp4, 2, 1);434 CamDraw(c12, 1, 2, disp3, 5, 1); 435 CamDraw(c12, 2, 2, disp4, 5, 1); 439 436 440 437 // F-Factor … … 442 439 c13.Divide(3,4); 443 440 444 CamDraw(c13, 1, 3, disp5, 2, 1);445 CamDraw(c13, 2, 3, disp6, 2, 1);446 CamDraw(c13, 3, 3, disp7, 2, 1);441 CamDraw(c13, 1, 3, disp5, 5, 1); 442 CamDraw(c13, 2, 3, disp6, 5, 1); 443 CamDraw(c13, 3, 3, disp7, 5, 1); 447 444 448 445 // QE's … … 450 447 c14.Divide(4,4); 451 448 452 CamDraw(c14, 1, 4, disp8, 2, 1);453 CamDraw(c14, 2, 4, disp9, 2, 1);454 CamDraw(c14, 3, 4, disp10, 2, 1);455 CamDraw(c14, 4, 4, disp11, 2, 1);449 CamDraw(c14, 1, 4, disp8, 5, 1); 450 CamDraw(c14, 2, 4, disp9, 5, 1); 451 CamDraw(c14, 3, 4, disp10, 5, 1); 452 CamDraw(c14, 4, 4, disp11, 5, 1); 456 453 457 454 // Defects … … 476 473 c16.Divide(2,3); 477 474 478 CamDraw(c16, 1, 2, disp28, 2);479 CamDraw(c16, 2, 2, disp29, 1);475 CamDraw(c16, 1, 2, disp28, 5); 476 CamDraw(c16, 2, 2, disp29, 5); 480 477 481 478 if (fRelTimes) … … 485 482 c17.Divide(2,4); 486 483 487 CamDraw(c17, 1, 2, disp30, 2, 1);488 CamDraw(c17, 2, 2, disp31, 2, 1);484 CamDraw(c17, 1, 2, disp30, 5, 1); 485 CamDraw(c17, 2, 2, disp31, 5, 1); 489 486 } 490 487
Note:
See TracChangeset
for help on using the changeset viewer.