Changeset 7616 for trunk/MagicSoft/Mars/mhflux/MHDisp.cc
- Timestamp:
- 03/20/06 12:48:14 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r7287 r7616 32 32 // in the tasklist. Switching of the M3L cut in MFMagicCuts is recommended. 33 33 // 34 // Class Version 3: 35 // ---------------- 36 // + Double_t fScaleMin; // [deg] Minimum circle for integration of off-data for scaling 37 // + Double_t fScaleMax; // [deg] Maximum circle for integration of off-data for scaling 38 // 34 39 ////////////////////////////////////////////////////////////////////////////// 35 40 #include "MHDisp.h" … … 65 70 // 66 71 MHDisp::MHDisp(const char *name, const char *title) 67 : fDisp(0), fDeviation(0), fSmearing(-1), fWobble(kFALSE) 72 : fDisp(0), fDeviation(0), fSmearing(-1), fWobble(kFALSE), 73 fScaleMin(0.325), fScaleMax(0.475) 68 74 { 69 75 // … … 165 171 if (!fHistOff) 166 172 { 167 if (delta>1 65)173 if (delta>180-25) 168 174 return kTRUE; 169 175 … … 175 181 // increased uncertainty 176 182 // FIXME: The delta stuff could be replaced by a 2*antitheta cut... 177 w0 = delta> 15 ? 1 : 2;183 w0 = delta>25 ? 1 : 2; 178 184 } 179 185 … … 331 337 } 332 338 339 // -------------------------------------------------------------------------- 340 // 341 // Make sure that if the scale is changed by the context menu all subpads 342 // are redrawn. 343 // 344 void MHDisp::Update() 345 { 346 TVirtualPad *pad = gPad; 347 for (int i=1; i<=6; i++) 348 { 349 if (pad->GetPad(i)) 350 pad->GetPad(i)->Modified(); 351 } 352 } 333 353 334 354 // -------------------------------------------------------------------------- … … 348 368 { 349 369 const Double_t d = TMath::Hypot(axex.GetBinCenter(x+1), axey.GetBinCenter(y+1)); 350 if (d> 0.325 && d<0.475)370 if (d>fScaleMin && d<fScaleMax) 351 371 { 352 372 sum += h.GetBinContent(x+1,y+1); … … 354 374 } 355 375 } 376 356 377 return sum/cnt; 357 378 } … … 611 632 // ----- Pad number 4 ----- 612 633 TString name = Form("%s_4", pad->GetName()); 613 TPad *p = new TPad(name,name, 0.5 025, 0.3355, 0.995, 0.995, col, 0, 0);634 TPad *p = new TPad(name,name, 0.525/*0.5025*/, 0.3355, 0.995, 0.995, col, 0, 0); 614 635 p->SetNumber(4); 615 636 p->Draw(); … … 631 652 pad->cd(); 632 653 name = Form("%s_1", pad->GetName()); 633 p = new TPad(name,name, 0.005, 0.3355, 0.4 975, 0.995, col, 0, 0);654 p = new TPad(name,name, 0.005, 0.3355, 0.475/*0.4975*/, 0.995, col, 0, 0); 634 655 p->SetNumber(1); 635 656 p->Draw(); … … 733 754 SetWobble(GetEnvValue(env, prefix, "Wobble", fWobble)); 734 755 } 756 if (IsEnvDefined(env, prefix, "ScaleMin", print)) 757 { 758 rc = kTRUE; 759 SetScaleMin(GetEnvValue(env, prefix, "ScaleMin", fScaleMin)); 760 } 761 if (IsEnvDefined(env, prefix, "ScaleMax", print)) 762 { 763 rc = kTRUE; 764 SetScaleMax(GetEnvValue(env, prefix, "ScaleMax", fScaleMax)); 765 } 735 766 736 767 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.