Changeset 6890
- Timestamp:
- 03/29/05 09:56:16 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/ganymed.cc
r6888 r6890 49 49 gLog << " -b Batch mode (no graphical output to screen)" << endl<<endl; 50 50 gLog << " Operation Mode:" << endl; 51 gLog << " --wobble Wobble Mode" << endl << endl; 51 gLog << " --wobble Force wobble mode (overwrites dataset)" << endl; 52 gLog << " --no-wobble Force normal mode (overwrites dataset)" << endl << endl; 52 53 gLog << " Options:" << endl; 53 54 gLog.Usage(); … … 112 113 kDebugEnv = arg.GetIntAndRemove("--debug-env=", kDebugEnv); 113 114 114 const Bool_t kQuit = arg.HasOnlyAndRemove("-q"); 115 const Bool_t kBatch = arg.HasOnlyAndRemove("-b"); 116 const Bool_t kOverwrite = arg.HasOnlyAndRemove("-f"); 117 //const Bool_t kForceExec = arg.HasOnlyAndRemove("-ff"); 118 119 const Bool_t kModeWobble = arg.HasOnlyAndRemove("--wobble"); 120 121 const Int_t kNumAnalysis = arg.GetIntAndRemove("--n=", -1); 122 const TString kOutpath = arg.GetStringAndRemove("--out=", "."); 123 const TString kOutfile = arg.GetStringAndRemove("--outf=", ""); 124 const Bool_t kWriteSummary = arg.HasOnlyAndRemove("--sum"); 125 const TString kNameSummary = arg.GetStringAndRemove("--sum="); 126 const Bool_t kWriteResult = arg.HasOnlyAndRemove("--res"); 127 const TString kNameResult = arg.GetStringAndRemove("--res="); 115 const Bool_t kQuit = arg.HasOnlyAndRemove("-q"); 116 const Bool_t kBatch = arg.HasOnlyAndRemove("-b"); 117 const Bool_t kOverwrite = arg.HasOnlyAndRemove("-f"); 118 //const Bool_t kForceExec = arg.HasOnlyAndRemove("-ff"); 119 120 const Bool_t kWobbleModeOn = arg.HasOnlyAndRemove("--wobble"); 121 const Bool_t kWobbleModeOff = arg.HasOnlyAndRemove("--no-wobble"); 122 123 const Int_t kNumAnalysis = arg.GetIntAndRemove("--n=", -1); 124 const TString kOutpath = arg.GetStringAndRemove("--out=", "."); 125 const TString kOutfile = arg.GetStringAndRemove("--outf=", ""); 126 const Bool_t kWriteSummary = arg.HasOnlyAndRemove("--sum"); 127 const TString kNameSummary = arg.GetStringAndRemove("--sum="); 128 const Bool_t kWriteResult = arg.HasOnlyAndRemove("--res"); 129 const TString kNameResult = arg.GetStringAndRemove("--res="); 130 131 if (kWobbleModeOn && kWobbleModeOff) 132 { 133 gLog << err << "ERROR - Wobble mode options are exclusive." << endl; 134 Usage(); 135 return 2; 136 } 128 137 129 138 if (arg.GetNumOptions()>0) … … 194 203 return 1; 195 204 } 205 206 Bool_t iswobble = seq.IsWobbleMode(); 207 if (kWobbleModeOn) 208 iswobble = kTRUE; 209 if (kWobbleModeOff) 210 iswobble = kFALSE; 196 211 197 212 // … … 219 234 job.SetNameResultFile(kNameResult); 220 235 job.EnableWriteOnly(kWriteOnly); 221 job.EnableWobbleMode( kModeWobble);236 job.EnableWobbleMode(iswobble); 222 237 if (kWriteSummary) // Don't change flag set in SetNameSummaryFile 223 238 job.EnableStorageOfSummary(); -
trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
r6513 r6890 263 263 264 264 return kTRUE; 265 } 266 267 // -------------------------------------------------------------------------- 268 // 269 // Return the memory currently used by this process (VmSize) 270 // which contains shared memory, data memory and private memory. 271 // 272 UInt_t MEvtLoop::GetMemoryUsage() 273 { 274 const TString path = Form("/proc/%d/status", gSystem->GetPid()); 275 if (gSystem->AccessPathName(path, kFileExists)) 276 return 0; 277 278 return TEnv(path).GetValue("VmSize", 0); 265 279 } 266 280 … … 400 414 return kFALSE; 401 415 416 const UInt_t mem0 = GetMemoryUsage(); 417 402 418 // 403 419 // loop over all events and process all tasks for … … 514 530 if (numcnts>0) 515 531 *fLog << " --> " << numcnts/clock.RealTime() << " Events/s"; 532 533 534 const UInt_t mem1 = GetMemoryUsage(); 535 if (mem1>mem0) 536 *fLog << endl << "Mem - Loss: " << mem1-mem0 << "kB" << endl; 516 537 517 538 *fLog << endl << endl; -
trunk/MagicSoft/Mars/mbase/MEvtLoop.h
r5911 r6890 40 40 41 41 Bool_t ProcessGuiEvents(Int_t num); 42 static UInt_t GetMemoryUsage(); 42 43 43 44 public: -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc
r6591 r6890 64 64 65 65 #include <TH1.h> // TH1::AddDirectory 66 #include <TEnv.h> // TEnv 66 67 #include <TLine.h> // TLine 67 68 #include <TText.h> // TText … … 239 240 MGPopupMenu *sizemenu = new MGPopupMenu(gClient->GetRoot()); 240 241 sizemenu->AddEntry("Fit to 640x&480", kSize640); 242 sizemenu->AddEntry("Fit to 768x&576", kSize768); 241 243 sizemenu->AddEntry("Fit to 800x&600", kSize800); 242 244 sizemenu->AddEntry("Fit to 960x7&20", kSize960); 243 245 sizemenu->AddEntry("Fit to 1024x&768", kSize1024); 246 sizemenu->AddEntry("Fit to 1152x&864", kSize1152); 244 247 sizemenu->AddEntry("Fit to 1280x&1024", kSize1280); 248 sizemenu->AddEntry("Fit to 1400x1050", kSize1400); 249 sizemenu->AddEntry("Fit to 1600x1200", kSize1600); 245 250 sizemenu->Associate(this); 246 251 … … 524 529 // a = (-1+-sqrt(1+4))/2 = sqrt(5)/2-1/2 = 0.618 525 530 // 526 Int_t p[ 2] = {38, 62};527 528 fStatusBar->SetParts(p, 2);531 Int_t p[] = {38-2, 62-8, 10}; 532 533 fStatusBar->SetParts(p, 3); 529 534 530 535 TGLayoutHints *layb = new TGLayoutHints(kLHintsNormal|kLHintsExpandX, 5, 4, 0, 3); … … 539 544 // Change the text in the status line 1 540 545 // 541 void MStatusDisplay::SetStatusLine 1(const char *txt)546 void MStatusDisplay::SetStatusLine(const char *txt, Int_t i) 542 547 { 543 548 if (gROOT->IsBatch()) 544 549 return; 545 fStatusBar->SetText(txt, 0);550 fStatusBar->SetText(txt, i); 546 551 547 552 // FIXME: This is a workaround, because TApplication::Run is not … … 555 560 // -------------------------------------------------------------------------- 556 561 // 557 // Change the text in the status line 2558 //559 void MStatusDisplay::SetStatusLine2(const char *txt)560 {561 if (gROOT->IsBatch())562 return;563 564 fStatusBar->SetText(txt, 1);565 566 // FIXME: This is a workaround, because TApplication::Run is not567 // thread safe against ProcessEvents. We assume, that if568 // we are not in the Main-Thread ProcessEvents() is569 // called by the TApplication Event Loop...570 if (!TThread::Self()/*gApplication->InheritsFrom(TRint::Class())*/)571 gClient->ProcessEventsFor(fStatusBar);572 }573 574 // --------------------------------------------------------------------------575 //576 562 // Display information about the name of a container 577 563 // … … 643 629 // set the smallest and biggest size of the Main frame 644 630 // and move it to its appearance position 645 SetWMSizeHints(570, 480, 1280, 980, 1, 1);631 SetWMSizeHints(570, 480, 2048, 1536, 1, 1); 646 632 MoveResize(rand()%100+570, rand()%100+480, 570, 480); 647 633 … … 1264 1250 return kTRUE; 1265 1251 1266 case kSize640: 1252 case kSize640: 1267 1253 Resize(570, 480); 1268 1254 return kTRUE; 1269 case kSize800: 1255 case kSize768: 1256 Resize(700, 576); 1257 return kTRUE; 1258 case kSize800: 1270 1259 Resize(740, 600); 1271 1260 return kTRUE; 1272 case kSize960: 1261 case kSize960: 1273 1262 Resize(880, 700); 1274 1263 return kTRUE; 1275 case kSize1024: 1264 case kSize1024: 1276 1265 Resize(980, 768); 1277 1266 return kTRUE; 1278 case kSize1280: 1267 case kSize1152: 1268 Resize(1080, 864); 1269 case kSize1280: 1279 1270 Resize(1280, 980); 1271 return kTRUE; 1272 case kSize1400: 1273 Resize(1350, 1050); 1274 return kTRUE; 1275 case kSize1600: 1276 Resize(1550, 1400); 1280 1277 return kTRUE; 1281 1278 … … 1527 1524 void MStatusDisplay::CloseWindow() 1528 1525 { 1529 Close(); 1526 if (Close()) 1527 delete this; 1530 1528 } 1531 1529 … … 1552 1550 // -------------------------------------------------------------------------- 1553 1551 // 1552 // Update the memory display in the status bar 1553 // 1554 void MStatusDisplay::UpdateMemory() const 1555 { 1556 const TString path = MString::Form("/proc/%d/status", gSystem->GetPid()); 1557 if (gSystem->AccessPathName(path, kFileExists)) 1558 return; 1559 1560 TEnv env(path); 1561 const UInt_t kb = env.GetValue("VmSize", 0); 1562 if (kb==0) 1563 return; 1564 1565 char type = 'k'; 1566 Float_t val = kb; 1567 1568 if (val>999) 1569 { 1570 type = 'M'; 1571 val /= 1024; 1572 } 1573 if (val>999) 1574 { 1575 type = 'G'; 1576 val /= 1024; 1577 } 1578 const TString txt = MString::Form("%.1f%c", val, type); 1579 fStatusBar->SetText(txt, 2); 1580 } 1581 1582 // -------------------------------------------------------------------------- 1583 // 1554 1584 // Updates the canvas (if existing) in the currenly displayed Tab. 1555 1585 // The update intervall is controlled by StartUpdate and StopUpdate … … 1559 1589 if (gROOT->IsBatch()) 1560 1590 return kTRUE; 1591 1592 UpdateMemory(); 1561 1593 1562 1594 const Int_t c = fTab->GetCurrent(); … … 2480 2512 { 2481 2513 if (Close()) 2482 delete this;2514 delete this; 2483 2515 // Close(); 2484 2516 return kTRUE; -
trunk/MagicSoft/Mars/mbase/MStatusDisplay.h
r5912 r6890 46 46 kTabSaveAsC, kTabPrint, kTabNext, kTabPrevious, kTabRemove, 47 47 // kSize 48 kSize640, kSize800, kSize960, kSize1024, kSize1280, 48 kSize640, kSize768, kSize800, kSize960, kSize1024, kSize1152, 49 kSize1280, kSize1400, kSize1600, 49 50 // kLog 50 51 kLogCopy, kLogClear, kLogSelect, kLogFind, kLogSave, kLogAppend, … … 117 118 Bool_t HandleTimer(TTimer *timer=NULL); 118 119 void UpdateTab(TGCompositeFrame *f); 120 void UpdateMemory() const; 119 121 120 122 void DrawClonePad(TCanvas &newc, TCanvas &oldc) const; … … 127 129 128 130 void RemoveTab(int i); 131 void SetStatusLine(const char *txt, Int_t idx); 129 132 130 133 TRootEmbeddedCanvas *GetEmbeddedCanvas(TGCompositeFrame *cf) const; … … 143 146 TGProgressBar *GetBar() const { return (TGProgressBar*)fBar; } 144 147 145 void SetStatusLine1(const char *txt) ;146 void SetStatusLine2(const char *txt) ;148 void SetStatusLine1(const char *txt) { SetStatusLine(txt, 0); } 149 void SetStatusLine2(const char *txt) { SetStatusLine(txt, 1); } 147 150 void SetStatusLine2(const MParContainer &cont); 148 151 -
trunk/MagicSoft/Mars/mhbase/MH.cc
r5994 r6890 664 664 Double_t min = FLT_MAX; 665 665 666 const TAxis &axex = *((TH1&)h).GetXaxis();667 const TAxis &axey = *((TH1&)h).GetYaxis();668 const TAxis &axez = *((TH1&)h).GetZaxis();669 670 for (int iz=1; iz<= axez.GetNbins(); iz++)671 for (int iy=1; iy<= axey.GetNbins(); iy++)672 for (int ix=1; ix<= axex.GetNbins(); ix++)666 const Int_t nx = h.GetXaxis()->GetNbins(); 667 const Int_t ny = h.GetYaxis()->GetNbins(); 668 const Int_t nz = h.GetZaxis()->GetNbins(); 669 670 for (int iz=1; iz<=nz; iz++) 671 for (int iy=1; iy<=ny; iy++) 672 for (int ix=1; ix<=nx; ix++) 673 673 { 674 674 const Double_t v = h.GetBinContent(h.GetBin(ix, iy, iz)); -
trunk/MagicSoft/Mars/mhbase/MHMatrix.cc
r5832 r6890 143 143 Int_t MHMatrix::AddColumn(const char *rule) 144 144 { 145 if ( fM.IsValid())145 if (IsValid(fM)) 146 146 { 147 147 *fLog << warn << "Warning - matrix is already in use. Can't add a new column... skipped." << endl; … … 173 173 void MHMatrix::AddColumns(MDataArray *matrix) 174 174 { 175 if ( fM.IsValid())175 if (IsValid(fM)) 176 176 { 177 177 *fLog << warn << "Warning - matrix is already in use. Can't add new columns... skipped." << endl; … … 224 224 return; 225 225 226 if (! fM.IsValid())226 if (!IsValid(fM)) 227 227 { 228 228 fM.ResizeTo(1, fData->GetNumEntries()); … … 525 525 Double_t MHMatrix::CalcDist(const TVector &evt, Int_t num) 526 526 { 527 if (! fM2.IsValid())528 { 529 if (! fM.IsValid())527 if (!IsValid(fM2)) 528 { 529 if (!IsValid(fM)) 530 530 { 531 531 *fLog << err << "MHMatrix::CalcDist - ERROR: fM not valid." << endl; … … 803 803 Int_t nmaxevts, TMatrix *rest) 804 804 { 805 if (! fM.IsValid())805 if (!IsValid(fM)) 806 806 { 807 807 *fLog << err << dbginf << "Matrix not initialized" << endl; … … 1001 1001 Bool_t MHMatrix::DefRefMatrix(Int_t nmaxevts, TMatrix *rest) 1002 1002 { 1003 if (! fM.IsValid())1003 if (!IsValid(fM)) 1004 1004 { 1005 1005 *fLog << err << dbginf << "Matrix not initialized" << endl; … … 1113 1113 Int_t MHMatrix::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 1114 1114 { 1115 if ( fM.IsValid())1115 if (IsValid(fM)) 1116 1116 { 1117 1117 *fLog << err << "ERROR - matrix is already in use. Can't add a new column from TEnv... skipped." << endl; -
trunk/MagicSoft/Mars/mhbase/MHMatrix.h
r5832 r6890 44 44 45 45 void AddRow(); 46 Bool_t IsValid(const TMatrix &m) const 47 { 48 return m.GetNrows()>0 && m.IsValid(); 49 } 46 50 47 51 Bool_t SetupFill(const MParList *pList); … … 73 77 const TMatrix &GetM() const { return fM; } 74 78 75 Bool_t IsValid() const { return fM.IsValid(); }79 Bool_t IsValid() const { return IsValid(fM); } 76 80 Int_t GetNumRows() const { return fM.GetNrows(); } 77 81 -
trunk/MagicSoft/Mars/mhflux/FluxLinkDef.h
r6883 r6890 10 10 #pragma link C++ class MHEnergyEst+; 11 11 #pragma link C++ class MHFalseSource+; 12 #pragma link C++ class MHEnergyEst+; 12 13 #pragma link C++ class MHEffectiveOnTime+; 13 14 -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r6874 r6890 138 138 MBinning binsa, binse, binst; 139 139 binsa.SetEdges(18, 0, 90); 140 binse.SetEdgesLog( 25, 10, 100000);140 binse.SetEdgesLog(15, 10, 100000); 141 141 binst.SetEdgesCos(50, 0, 60); 142 142 binse.Apply(fHEnergy); … … 467 467 468 468 alpha = hil->GetAlpha(); 469 469 470 if (fHillas) 470 471 size = fHillas->GetSize(); … … 472 473 theta = fPointPos ? fPointPos->GetZd() : 0; 473 474 } 475 476 //if (size>0) 477 // alpha /= (2.4 + 1.13*(log10((energy-14)/0.37)-5)*(log10((energy-14)/0.37)-5))/15; 474 478 475 479 // enhance histogram if necessary … … 563 567 } 564 568 } 569 else 570 hon->SetMinimum(0); 565 571 FitEnergyBins(); 566 572 FitThetaBins(); … … 748 754 Int_t n = fHAlpha.GetNbinsY(); 749 755 Int_t nc = (Int_t)(TMath::Sqrt((Float_t)n-1)+1); 750 c->Divide(nc, nc, 0,0);756 c->Divide(nc, nc, 1e-10, 1e-10); 751 757 752 758 // Do not store the 'final' result in fFit -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
r6283 r6890 147 147 148 148 fChisq = 0; 149 fHEnergy.Reset(); 150 fHImpact.Reset(); 151 fHResolution.Reset(); 149 152 150 153 return kTRUE; … … 159 162 const Double_t eest = fEnergy->GetEnergy(); 160 163 const Double_t etru = fMatrix ? GetVal(0) : fMcEvt->GetEnergy(); 164 const Double_t imp = fMatrix ? GetVal(1) : fMcEvt->GetImpact()/100; 161 165 const Double_t theta = fMatrix ? GetVal(2) : fMcEvt->GetTelescopeTheta()*TMath::RadToDeg(); 162 const Double_t imp = fMatrix ? GetVal(1) : fMcEvt->GetImpact()/100;163 166 const Double_t res = (eest-etru)/etru; 164 167 165 168 fHEnergy.Fill(eest, etru, theta, w); 166 fHResolution.Fill(eest, etru, res, w); 167 fHImpact.Fill(imp, res, w); 168 169 fChisq += res*res; 169 fHResolution.Fill(eest, etru, TMath::Abs(res), w); 170 fHImpact.Fill(imp, TMath::Abs(res), w); 171 172 fChisq += TMath::Abs(res);//*res; 173 fBias += res; 170 174 171 175 return kTRUE; … … 175 179 { 176 180 fChisq /= GetNumExecutions(); 177 178 fResult->SetVal(fChisq); 179 180 *fLog << all << "Mean Energy Resoltuion: " << Form("%.1f%%", TMath::Sqrt(fChisq)*100) << endl; 181 fBias /= GetNumExecutions(); 182 183 Double_t res = fChisq; //TMath::Sqrt(fChisq - fBias*fBias); 184 185 fResult->SetVal(TMath::IsNaN(res)?0:res);/// GetNumExecutions()); 186 187 *fLog << all << "Mean Energy Resoltuion: " << Form("%.1f%%", fResult->GetVal()*100) << endl; 188 *fLog << all << "Energy Bias at: " << Form("%.1f%%", fBias*100) << endl; 181 189 182 190 return kTRUE; … … 223 231 { 224 232 pad->GetPad(1)->GetPad(2)->cd(1); 225 /*h =*/ fHImpact.ProjectionX("Impact", -1, 9999, "e"); 226 227 pad->GetPad(1)->GetPad(2)->cd(2); 228 if ((hx=(TH1D*)gPad->FindObject("EnergyEst_z"))) 233 if ((hx=(TH1D*)gPad->FindObject("EnergyEst_ez"))) 229 234 { 230 TH1D *h2 = (TH1D*)fHEnergy.Project3D("dum_ z");235 TH1D *h2 = (TH1D*)fHEnergy.Project3D("dum_ez"); 231 236 hx->Reset(); 232 237 hx->Add(h2); 233 238 delete h2; 234 239 } 240 241 //pad->GetPad(1)->GetPad(2)->cd(2); 242 ///*h =*/ fHImpact.ProjectionX("Impact", -1, 9999, "e"); 235 243 } 236 244 } … … 273 281 274 282 TH1D *hx = 0; 275 if ((hx=(TH1D*)gPad->FindObject( "Prof")))283 if ((hx=(TH1D*)gPad->FindObject(Form("Prof%s", h.GetName())))) 276 284 { 277 hx = hyx->ProfileX( "Prof", -1, 9999, "s");285 hx = hyx->ProfileX(Form("Prof%s", h.GetName()), -1, 9999, "s"); 278 286 279 287 if (logy && hx->GetMaximum()>0) … … 287 295 gPad->SetLogx(); 288 296 289 gROOT->GetListOfCleanups()->Add(gPad); // WHY?297 //gROOT->GetListOfCleanups()->Add(gPad); // WHY? 290 298 291 299 TH2D *h2 = (TH2D*)h.Project3D(how); 292 TH1D *h1 = h2->ProfileX("Prof", -1, 9999, "s");293 294 h1->SetDirectory(NULL);295 //h1->SetBit(kCanDelete);296 h1->SetLineWidth(2);297 h1->SetLineColor(kRed); // PROBLEM!298 h1->SetStats(kFALSE);299 300 300 h2->SetDirectory(NULL); 301 301 h2->SetBit(kCanDelete); 302 302 h2->SetFillColor(kBlue); 303 303 304 h1->Draw("E3"); 305 h2->Draw("boxsame"); 304 TH1D *h1 = h2->ProfileX(Form("Prof%s", h.GetName()), -1, 9999, "s"); 305 h1->SetDirectory(NULL); 306 h1->SetBit(kCanDelete); 307 h1->SetLineWidth(2); 308 h1->SetLineColor(kRed); 309 h1->SetFillStyle(4000); 310 h1->SetStats(kFALSE); 311 312 313 //h1->Draw("E3"); 314 h2->Draw(); 306 315 h1->Draw("Chistsame"); 307 316 … … 323 332 324 333 pad->SetBorderMode(0); 325 pad->Divide(2, 1, 0,0);334 pad->Divide(2, 1, 1e-10, 1e-10); 326 335 327 336 TH1 *h; … … 330 339 gPad->SetBorderMode(0); 331 340 332 gPad->Divide(1, 2, 0,0);341 gPad->Divide(1, 2, 1e-10, 1e-10); 333 342 334 343 TVirtualPad *pad2 = gPad; … … 365 374 366 375 TVirtualPad *pad3 = gPad; 367 pad3->Divide(2, 1, 0,0);376 pad3->Divide(2, 1, 1e-10, 1e-10); 368 377 pad3->cd(1); 369 gPad->SetBorderMode(0); 378 gPad->SetBorderMode(0);/* 370 379 h = fHImpact.ProjectionX("Impact", -1, 9999, "e"); 371 380 h->SetBit(TH1::kNoStats); … … 374 383 h->SetXTitle("Impact [m]"); 375 384 h->SetBit(kCanDelete); 376 h->Draw(); 377 378 pad3->cd(2); 379 gPad->SetBorderMode(0); 385 h->Draw();*/ 380 386 h = fHEnergy.Project3D("ez"); 381 387 h->SetTitle("Distribution of Theta"); … … 386 392 h->Draw(); 387 393 394 pad3->cd(2); 395 gPad->SetBorderMode(0); 396 388 397 pad->cd(2); 389 398 gPad->SetBorderMode(0); 390 399 391 gPad->Divide(1, 3, 0,0);400 gPad->Divide(1, 3, 1e-10, 1e-10); 392 401 pad2 = gPad; 393 402 -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.h
r6283 r6890 35 35 36 36 Double_t fChisq; 37 Double_t fBias; 37 38 38 39 TH1 *MakePlot(TH3 &h, const char *how); -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r6364 r6890 410 410 411 411 // Get projection for range 412 TH2D *p = (TH2D*)src.Project3D("yx_off ");412 TH2D *p = (TH2D*)src.Project3D("yx_off_NULL"); 413 413 414 414 // Reset range 415 415 axe.SetRange(0,9999); 416 416 417 //#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00) 417 418 // Move contents from projection to h2 418 419 h2->Reset(); … … 422 423 // Delete p 423 424 delete p; 425 /*#else 426 p->Scale(all->GetMaximum()); 427 p->Divide(all); 428 #endif*/ 424 429 425 430 // Set Minimum as minimum value Greater Than 0 … … 442 447 443 448 // Get projection for range 444 TH2D *p = (TH2D*)src.Project3D("yx_on ");449 TH2D *p = (TH2D*)src.Project3D("yx_on_NULL"); 445 450 446 451 // Reset range 447 452 axe.SetRange(0,9999); 448 453 454 //#if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00) 449 455 // Move contents from projection to h3 450 456 h3->Reset(); … … 454 460 // Delete p 455 461 delete p; 462 /*#else 463 p->Scale(all->GetMaximum()); 464 p->Divide(all); 465 #endif*/ 456 466 457 467 // Set Minimum as minimum value Greater Than 0 … … 469 479 470 480 // Get projection for range 471 TH2D *p = (TH2D*)fHist.Project3D(Form("yx_%d", gRandom->Uniform(999999))); 472 p->SetDirectory(0);481 #if ROOT_VERSION_CODE < ROOT_VERSION(4,02,00) 482 TH2D *p = (TH2D*)fHist.Project3D("yx_all"); 473 483 474 484 // Move contents from projection to h3 … … 476 486 h3->Add(p); 477 487 delete p; 488 #else 489 fHist.Project3D("yx_all"); 490 #endif 478 491 479 492 // Set Minimum as minimum value Greater Than 0 … … 518 531 TH2D* h5; 519 532 520 /*521 fHistProjAll = Form("All_%p", this);522 fHistProjOn = Form("On_%p", this);523 fHistProjOff = Form("Off_%p", this);524 fHistProjDiff = Form("Diff_%p", this);525 fHistProjAll = Form("All_%p", this);526 */527 528 533 // Update projection of all-events 529 534 padsave->GetPad(2)->cd(3); … … 559 564 const Int_t nx = h4->GetXaxis()->GetNbins(); 560 565 const Int_t ny = h4->GetYaxis()->GetNbins(); 561 //const Int_t nr = nx*nx + ny*ny;562 566 563 567 Int_t maxx=nx/2; … … 566 570 Int_t max = h4->GetBin(nx, ny); 567 571 572 h4->SetEntries(0); 568 573 for (int ix=1; ix<=nx; ix++) 569 574 for (int iy=1; iy<=ny; iy++) … … 651 656 AppendPad(""); 652 657 653 pad->Divide(1, 2, 0, 0.03);658 pad->Divide(1, 2, 1e-10, 0.03); 654 659 655 660 // TObject *catalog = GetCatalog(); … … 1048 1053 gStyle->SetPalette(1, 0); 1049 1054 1050 c->Divide(3,2, 0,0);1055 c->Divide(3,2, 1e-10, 1e-10); 1051 1056 c->cd(1); 1052 1057 gPad->SetBorderMode(0); -
trunk/MagicSoft/Mars/mhist/MHHadronness.cc
r5401 r6890 73 73 #include "MBinning.h" 74 74 #include "MHMatrix.h" 75 #include "M Hadronness.h"75 #include "MParameters.h" 76 76 77 77 #include "MLog.h" … … 163 163 } 164 164 165 fHadronness = (M Hadronness*)plist->FindObject("MHadronness");165 fHadronness = (MParameterD*)plist->FindObject("MHadronness"); 166 166 167 167 fGhness->Reset(); … … 207 207 } 208 208 209 const M Hadronness &had = par ? *(MHadronness*)par : *fHadronness;210 211 const Double_t h = had.Get Hadronness();209 const MParameterD &had = par ? *(MParameterD*)par : *fHadronness; 210 211 const Double_t h = had.GetVal(); 212 212 213 213 if (TMath::IsNaN(h)) -
trunk/MagicSoft/Mars/mhist/MHHadronness.h
r2296 r6890 10 10 class MParList; 11 11 class MMcEvt; 12 class M Hadronness;12 class MParameterD; 13 13 class MHMatrix; 14 14 … … 16 16 { 17 17 private: 18 const MMcEvt *fMcEvt;//!19 const M Hadronness*fHadronness; //!20 MHMatrix *fMatrix; //!18 const MMcEvt *fMcEvt; //! 19 const MParameterD *fHadronness; //! 20 MHMatrix *fMatrix; //! 21 21 Int_t fMap; //! 22 22 -
trunk/MagicSoft/Mars/mimage/ImageLinkDef.h
r6869 r6890 24 24 #pragma link C++ class MHNewImagePar+; 25 25 #pragma link C++ class MHNewImagePar2+; 26 #pragma link C++ class MHVsSize+; 26 27 #pragma link C++ class MStereoPar+; 27 28 #pragma link C++ class MStereoCalc+; -
trunk/MagicSoft/Mars/mimage/MHHillas.cc
r6454 r6890 325 325 fSize->Draw(same?"same":""); 326 326 327 if (!same)327 //if (!same) 328 328 { 329 329 pad->cd(4); 330 330 gPad->SetBorderMode(0); 331 331 gPad->SetPad(0.51, 0.01, 0.99, 0.65); 332 SetColors(); 333 fCenter->Draw("colz"); 332 if (same) 333 { 334 /* 335 TH1 *h = dynamic_cast<TH1*>(gPad->FindObject("Center")); 336 if (h) 337 { 338 h->SetDrawOption(""); 339 h->SetMarkerColor(kBlack); 340 }*/ 341 fCenter->SetMarkerColor(kGreen); 342 fCenter->Draw("same"); 343 } 344 else 345 { 346 //SetColors(); 347 fCenter->Draw(/*"colz"*/); 348 } 334 349 if (fGeomCam) 335 350 { -
trunk/MagicSoft/Mars/mimage/Makefile
r6869 r6890 42 42 MHNewImagePar.cc \ 43 43 MHNewImagePar2.cc \ 44 MHVsSize.cc \ 44 45 MStereoPar.cc \ 45 46 MStereoCalc.cc
Note:
See TracChangeset
for help on using the changeset viewer.