Changeset 4616
- Timestamp:
- 08/14/04 12:35:23 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4615 r4616 26 26 - documented data members 27 27 - included default for SetNamePedContainer() 28 29 * mjobs/MJPedestal.[h,cc] 30 - some small modifications in the data-check display, discussed 31 with Florian 28 32 29 33 -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r4609 r4616 77 77 const Float_t MJPedestal::fgRefPedExtraGalactic = 9.93; 78 78 const Float_t MJPedestal::fgRefPedGalactic = 10.03; 79 const Float_t MJPedestal::fgRefPedRmsClosedLids = 1.7; 80 const Float_t MJPedestal::fgRefPedRmsExtraGalactic = 5.6; 81 const Float_t MJPedestal::fgRefPedRmsGalactic = 6.92; 82 79 const Float_t MJPedestal::fgRefPedRmsClosedLidsInner = 1.7; 80 const Float_t MJPedestal::fgRefPedRmsExtraGalacticInner = 5.6; 81 const Float_t MJPedestal::fgRefPedRmsGalacticInner = 6.92; 82 const Float_t MJPedestal::fgRefPedRmsClosedLidsOuter = 1.7; 83 const Float_t MJPedestal::fgRefPedRmsExtraGalacticOuter = 3.35; 84 const Float_t MJPedestal::fgRefPedRmsGalacticOuter = 4.2; 83 85 // -------------------------------------------------------------------------- 84 86 // … … 183 185 disp1.SetCamError (fPedestalCam, 3); 184 186 185 disp0.SetYTitle("P [fadc/slice]");186 disp1.SetYTitle(" \\sigma_{P} [fadc/slice]");187 disp0.SetYTitle("Pedestal [counts/slice]"); 188 disp1.SetYTitle("RMS [counts/slice]"); 187 189 188 190 // … … 203 205 gPad->SetTicks(); 204 206 MHCamera *obj1=(MHCamera*)disp0.DrawCopy("hist"); 205 obj1->SetDirectory(NULL);206 207 207 // 208 208 // for the datacheck, fix the ranges!! … … 211 211 obj1->SetMaximum(fgPedestalMax); 212 212 213 // 214 // Set the datacheck sizes: 215 // 216 FixDataCheckHist((TH1D*)obj1); 213 217 // 214 218 // set reference lines … … 227 231 gPad->SetBorderMode(0); 228 232 gPad->SetTicks(); 229 obj1->DrawProjection(7); 233 TH1D *obj2 = (TH1D*)obj1->Projection(obj1->GetName()); 234 obj2->Draw(); 235 obj2->SetBit(kCanDelete); 236 obj2->Fit("gaus","Q"); 237 obj2->GetFunction("gaus")->SetLineColor(kYellow); 238 // 239 // Set the datacheck sizes: 240 // 241 FixDataCheckHist(obj2); 242 obj2->SetStats(1); 230 243 231 244 c3.cd(2); 232 245 gPad->SetBorderMode(0); 233 246 gPad->SetTicks(); 234 MHCamera *obj2=(MHCamera*)disp1.DrawCopy("hist"); 235 obj2->SetDirectory(NULL); 236 obj2->SetMinimum(fgPedRmsMin); 237 obj2->SetMaximum(fgPedRmsMax); 238 247 MHCamera *obj3=(MHCamera*)disp1.DrawCopy("hist"); 248 // 249 // for the datacheck, fix the ranges!! 250 // 251 obj3->SetMinimum(fgPedRmsMin); 252 obj3->SetMaximum(fgPedRmsMax); 253 // 254 // Set the datacheck sizes: 255 // 256 FixDataCheckHist((TH1D*)obj3); 239 257 // 240 258 // set reference lines … … 244 262 c3.cd(4); 245 263 gPad->SetBorderMode(0); 246 obj 2->SetPrettyPalette();247 obj 2->Draw();264 obj3->SetPrettyPalette(); 265 obj3->Draw(); 248 266 249 267 c3.cd(6); … … 282 300 inout[0] = disp1.ProjectionS(s0, inner, "Inner"); 283 301 inout[1] = disp1.ProjectionS(s0, outer, "Outer"); 302 FixDataCheckHist(inout[0]); 303 FixDataCheckHist(inout[1]); 304 305 inout[0]->SetTitle(Form("%s %s",disp1.GetTitle(),"Inner")); 306 inout[1]->SetTitle(Form("%s %s",disp1.GetTitle(),"Outer")); 307 284 308 285 309 for (int i=0; i<2; i++) … … 326 350 void MJPedestal::DisplayReferenceLines(MHCamera *cam, const Int_t what) const 327 351 { 328 const Double_t x = cam->GetNbinsX(); 329 330 TLine line; 331 line.SetLineStyle(kDashed); 332 line.SetLineWidth(3); 352 353 Double_t x = cam->GetNbinsX(); 354 355 const MGeomCam *geom = cam->GetGeometry(); 356 357 if (geom->InheritsFrom("MGeomCamMagic")) 358 x = what ? 397 : cam->GetNbinsX(); 359 360 TLine line; 361 line.SetLineStyle(kDashed); 362 line.SetLineWidth(3); 363 364 line.SetLineColor(kBlue); 365 TLine *l1 = line.DrawLine(0, what ? fgRefPedRmsGalacticInner : fgRefPedGalactic, 366 x, what ? fgRefPedRmsGalacticInner : fgRefPedGalactic); 367 368 line.SetLineColor(kYellow); 369 TLine *l2 = line.DrawLine(0, what ? fgRefPedRmsExtraGalacticInner : fgRefPedExtraGalactic, 370 x, what ? fgRefPedRmsExtraGalacticInner : fgRefPedExtraGalactic); 371 372 line.SetLineColor(kMagenta); 373 TLine *l3 = line.DrawLine(0, what ? fgRefPedRmsClosedLidsInner : fgRefPedClosedLids, 374 x, what ? fgRefPedRmsClosedLidsInner : fgRefPedClosedLids); 375 376 if (geom->InheritsFrom("MGeomCamMagic")) 377 if (what) 378 { 379 const Double_t x2 = cam->GetNbinsX(); 380 381 line.SetLineColor(kBlue); 382 line.DrawLine(398, fgRefPedRmsGalacticOuter, 383 x2, fgRefPedRmsGalacticOuter); 384 385 line.SetLineColor(kYellow); 386 line.DrawLine(398, fgRefPedRmsExtraGalacticOuter, 387 x2, fgRefPedRmsExtraGalacticOuter); 388 389 line.SetLineColor(kMagenta); 390 line.DrawLine(398, fgRefPedRmsClosedLidsOuter, 391 x2, fgRefPedRmsClosedLidsOuter); 392 } 393 333 394 334 line.SetLineColor(kBlue); 335 TLine *l1 = line.DrawLine(0, what ? fgRefPedRmsGalactic : fgRefPedGalactic, 336 x, what ? fgRefPedRmsGalactic : fgRefPedGalactic); 337 338 line.SetLineColor(kYellow); 339 TLine *l2 = line.DrawLine(0, what ? fgRefPedRmsExtraGalactic : fgRefPedExtraGalactic, 340 x, what ? fgRefPedRmsExtraGalactic : fgRefPedExtraGalactic); 341 342 line.SetLineColor(kMagenta); 343 TLine *l3 = line.DrawLine(0, what ? fgRefPedRmsClosedLids : fgRefPedClosedLids, 344 x, what ? fgRefPedRmsClosedLids : fgRefPedClosedLids); 345 346 347 TLegend *leg = new TLegend(0.4,0.75,0.7,0.99); 348 leg->SetBit(kCanDelete); 349 leg->AddEntry(l1, "Galactic Source","l"); 350 leg->AddEntry(l2, "Extra-Galactic Source","l"); 351 leg->AddEntry(l3, "Closed Lids","l"); 352 leg->Draw(); 395 TLegend *leg = new TLegend(0.4,0.75,0.7,0.99); 396 leg->SetBit(kCanDelete); 397 leg->AddEntry(l1, "Galactic Source","l"); 398 leg->AddEntry(l2, "Extra-Galactic Source","l"); 399 leg->AddEntry(l3, "Closed Lids","l"); 400 leg->Draw(); 353 401 } 354 402 … … 369 417 noisytex.DrawLatex(0.1,hist->GetBinContent(hist->GetMaximumBin())/1.2,Form("%3i noisy pixels",(Int_t)noisy)); 370 418 } 419 420 void MJPedestal::FixDataCheckHist(TH1D *hist) const 421 { 422 423 hist->SetDirectory(NULL); 424 hist->SetStats(0); 425 426 // 427 // set the labels bigger 428 // 429 TAxis *xaxe = hist->GetXaxis(); 430 TAxis *yaxe = hist->GetYaxis(); 431 432 xaxe->CenterTitle(); 433 yaxe->CenterTitle(); 434 xaxe->SetTitleSize(0.06); 435 yaxe->SetTitleSize(0.06); 436 xaxe->SetTitleOffset(0.8); 437 yaxe->SetTitleOffset(0.5); 438 xaxe->SetLabelSize(0.05); 439 yaxe->SetLabelSize(0.05); 440 441 } 442 371 443 372 444 Bool_t MJPedestal::WriteResult() -
trunk/MagicSoft/Mars/mjobs/MJPedestal.h
r4609 r4616 30 30 static const Float_t fgRefPedGalactic; 31 31 32 static const Float_t fgRefPedRmsClosedLids ;33 static const Float_t fgRefPedRmsExtraGalactic ;34 static const Float_t fgRefPedRmsGalactic ;32 static const Float_t fgRefPedRmsClosedLidsInner; 33 static const Float_t fgRefPedRmsExtraGalacticInner; 34 static const Float_t fgRefPedRmsGalacticInner; 35 35 36 static const Float_t fgRefPedRmsClosedLidsOuter; 37 static const Float_t fgRefPedRmsExtraGalacticOuter; 38 static const Float_t fgRefPedRmsGalacticOuter; 39 36 40 TString fOutputPath; 37 41 … … 57 61 void DisplayReferenceLines(MHCamera *cam, const Int_t what) const; 58 62 void DisplayOutliers(TH1D *hist) const; 59 63 void FixDataCheckHist(TH1D *hist) const; 64 60 65 void CheckEnv(); 61 66
Note:
See TracChangeset
for help on using the changeset viewer.