- Timestamp:
- 08/22/07 19:18:35 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8694 r8695 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 22 2007/08/22 Thomas Bretz 23 24 * mbase/MEnv.cc: 25 - changed title print out for untouched resources 26 27 * mhbase/HBaseLinkDef.h, mhbase/Makefile: 28 - added new class MHn 29 30 * mhbase/MH.[h,cc] 31 - changed start bin to search for GetRange 32 - added GetRangeX and GetRangeY member functions 33 - added GetRangeUserX and GetRangeUserY member functions 34 - added default to SetPalette 35 36 * mhbase/MH3.[h,cc]: 37 - chnaged to tokenize the name allowing to have different 38 Binning names for all axes 39 - added a style bit which allow to auto scale an axis if the 40 histogram is finally filled 41 - replaced 9999 with -1 in ProfileX/Y 42 - moved SetLog from Paint to Draw 43 - increased class version 44 45 * mhflux/MAlphaFitter.cc, mhflux/MHAlpha.cc, mhflux/MHCollectionArea.cc, 46 mhflux/MHEffectiveOnTime.cc, mhflux/MHEnergyEst.cc, 47 mreflector/MHReflector.cc: 48 - replaced 9999 with -1 in ProjectionX/Y/Z 49 - replaced 9999 with -1 in ProfileX/Y 50 51 * mhflux/MMcSpectrumWeight.cc: 52 - tiny change to output of Print 53 54 * mjobs/MJCut.cc: 55 - added a new Tab CuT displaying VsSize a second time, but with a 56 user definable cut "CutT" applied 57 58 * mjobs/MSequence.[h,cc]: 59 - added "Comment" to resources 60 - increased class version nimber 61 62 * mmuon/MHMuonPar.cc: 63 - enable all grids 64 20 65 21 66 -
trunk/MagicSoft/Mars/mbase/MEnv.cc
r8674 r8695 875 875 gLog << inf << flush; 876 876 877 TString sep = "Untouched Resources -";877 TString sep = "Untouched Resources in "; 878 878 sep += GetRcName(); 879 879 gLog.Separator(sep); -
trunk/MagicSoft/Mars/mhbase/HBaseLinkDef.h
r6915 r8695 9 9 #pragma link C++ class MH+; 10 10 #pragma link C++ class MH3+; 11 #pragma link C++ class MHn+; 11 12 #pragma link C++ class MHArray+; 12 13 #pragma link C++ class MHMatrix+; -
trunk/MagicSoft/Mars/mhbase/MH3.cc
r8669 r8695 54 54 // If the binning should have a different name than the histogram name 55 55 // the binning name can be added to the name, eg.: 56 // SetName("MyHistName;My Binning")56 // SetName("MyHistName;MyXBins;MyYBins") 57 57 // Instead of BinningMyHistName[XYZ] the parameter list will be searched 58 // for BinningMy Binning[XYZ].58 // for BinningMyXBinning, BinningMyYBins and BinningMyHistNameZ 59 59 // 60 60 // … … 86 86 // + MData *fData[3]; // Object from which the data is filled 87 87 // 88 // Class Version 3: 89 // ---------------- 90 // - Byte_t fStyleBits 88 91 // 89 92 ///////////////////////////////////////////////////////////////////////////// … … 93 96 #include <fstream> 94 97 95 #include <TPad.h>98 //#include <TPad.h> 96 99 #include <TStyle.h> 97 100 #include <TCanvas.h> … … 121 124 // 122 125 MH3::MH3(const unsigned int dim) 123 : fDimension(dim>3?3:dim), fHist(NULL) 126 : fDimension(dim>3?3:dim), fHist(NULL), fStyleBits(0) 124 127 { 125 128 switch (fDimension) … … 162 165 // 163 166 MH3::MH3(const char *memberx) 164 : fDimension(1) 167 : fDimension(1), fStyleBits(0) 165 168 { 166 169 fHist = new TH1D; … … 182 185 } 183 186 184 MH3::MH3(const TH1 &h1) : fDimension(1) 187 MH3::MH3(const TH1 &h1) 188 : fDimension(1), fStyleBits(0) 185 189 { 186 190 if (h1.InheritsFrom(TH3::Class())) … … 221 225 // 222 226 MH3::MH3(const char *memberx, const char *membery) 223 : fDimension(2) 227 : fDimension(2), fStyleBits(0) 224 228 { 225 229 fHist = new TH2D; … … 248 252 // 249 253 MH3::MH3(const char *memberx, const char *membery, const char *memberz) 250 : fDimension(3) 254 : fDimension(3), fStyleBits(0) 251 255 { 252 256 fHist = new TH3D; … … 312 316 fHist->Reset(); 313 317 314 const Int_t split = fName.First(';'); 315 316 const TString name = split<0 ? fName : fName(0, split); 317 const TString bins = split<0 ? fName : fName(split+1, fName.Length()); 318 319 TString bname("Binning"); 320 bname += bins; 318 // Tokenize name into name and binnings names 319 TObjArray *tok = fName.Tokenize(";"); 320 321 const TString name = (*tok)[0] ? (*tok)[0]->GetName() : fName.Data(); 322 323 TString bx = (*tok)[1] ? (*tok)[1]->GetName() : Form("%sX", name.Data()); 324 TString by = (*tok)[2] ? (*tok)[2]->GetName() : Form("%sY", name.Data()); 325 TString bz = (*tok)[3] ? (*tok)[3]->GetName() : Form("%sZ", name.Data()); 326 327 bx.Prepend("Binning"); 328 by.Prepend("Binning"); 329 bz.Prepend("Binning"); 330 331 delete tok; 332 321 333 322 334 MBinning *binsx = NULL; … … 327 339 { 328 340 case 3: 329 binsz = (MBinning*)plist->FindObject(b name+"Z", "MBinning");341 binsz = (MBinning*)plist->FindObject(bz, "MBinning"); 330 342 if (!binsz) 331 343 { 332 *fLog << err << dbginf << "MBinning '" << b name << "X' not found... aborting." << endl;344 *fLog << err << dbginf << "MBinning '" << bz << "' not found... aborting." << endl; 333 345 return kFALSE; 334 346 } … … 342 354 fHist->SetBit(kIsLogz); 343 355 case 2: 344 binsy = (MBinning*)plist->FindObject(b name+"Y", "MBinning");356 binsy = (MBinning*)plist->FindObject(by, "MBinning"); 345 357 if (!binsy) 346 358 { 347 *fLog << err << dbginf << "MBinning '" << b name << "Y' not found... aborting." << endl;359 *fLog << err << dbginf << "MBinning '" << by << "' not found... aborting." << endl; 348 360 return kFALSE; 349 361 } … … 357 369 fHist->SetBit(kIsLogy); 358 370 case 1: 359 binsx = (MBinning*)plist->FindObject(b name+"X", "MBinning");371 binsx = (MBinning*)plist->FindObject(bx, "MBinning"); 360 372 if (!binsx) 361 373 { 362 374 if (fDimension==1) 363 binsx = (MBinning*)plist->FindObject( bname, "MBinning");375 binsx = (MBinning*)plist->FindObject("Binning"+fName, "MBinning"); 364 376 365 377 if (!binsx) 366 378 { 367 *fLog << err << dbginf << "Neither MBinning '" << bname << "X' nor '" << bname << "' found... aborting." << endl;379 *fLog << err << dbginf << "Neither '" << bx << "' nor '" << binsx << fName << "' found... aborting." << endl; 368 380 return kFALSE; 369 381 } … … 477 489 return kFALSE; 478 490 } 479 /* 480 // -------------------------------------------------------------------------- 481 // 482 // Set the palette you wanna use: 483 // - you could set the root "Pretty Palette Violet->Red" by 484 // gStyle->SetPalette(1, 0), but in some cases this may look 485 // confusing 486 // - The maximum colors root allowes us to set by ourself 487 // is 50 (idx: 51-100). This colors are set to a grayscaled 488 // palette 489 // - the number of contours must be two less than the number 490 // of palette entries 491 // 492 void MHStarMap::PrepareDrawing() const 493 { 494 const Int_t numg = 32; // number of gray scaled colors 495 const Int_t numw = 32; // number of white 496 497 Int_t palette[numg+numw]; 498 499 // 500 // The first half of the colors are white. 501 // This is some kind of optical background supression 502 // 503 gROOT->GetColor(51)->SetRGB(1, 1, 1); 504 505 Int_t i; 506 for (i=0; i<numw; i++) 507 palette[i] = 51; 508 509 // 510 // now the (gray) scaled part is coming 511 // 512 for (;i<numw+numg; i++) 513 { 514 const Float_t gray = 1.0-(float)(i-numw)/(numg-1.0); 515 516 gROOT->GetColor(52+i)->SetRGB(gray, gray, gray); 517 palette[i] = 52+i; 518 } 519 520 // 521 // Set the palette and the number of contour levels 522 // 523 gStyle->SetPalette(numg+numw, palette); 524 fStarMap->SetContour(numg+numw-2); 525 } 526 */ 491 492 // -------------------------------------------------------------------------- 493 // 494 // If an auto range bit is set the histogram range of the corresponding 495 // axis is set to show only the non-empty bins (with a single empty bin 496 // on both sides) 497 // 498 Bool_t MH3::Finalize() 499 { 500 Bool_t autorangex=TESTBIT(fStyleBits, 0); 501 Bool_t autorangey=TESTBIT(fStyleBits, 1); 502 //Bool_t autorangez=TESTBIT(fStyleBits, 2); 503 504 Int_t lo, hi; 505 506 if (autorangex) 507 { 508 GetRangeX(*fHist, lo, hi); 509 cout << "====> " << GetName() << " " << fHist->GetName() << ": " << lo << " " << hi <<" " << fHist->GetNbinsX() << endl; 510 fHist->GetXaxis()->SetRange(lo-2, hi+1); 511 } 512 if (autorangey) 513 { 514 GetRangeY(*fHist, lo, hi); 515 fHist->GetYaxis()->SetRange(lo-2, hi+1); 516 } 517 /* 518 if (autorangez) 519 { 520 GetRangeZ(*fHist, lo, hi); 521 fHist->GetZaxis()->SetRange(lo-2, hi+1); 522 } 523 */ 524 return kTRUE; 525 } 526 527 527 // -------------------------------------------------------------------------- 528 528 // … … 547 547 { 548 548 Int_t col = p->GetLineColor(); 549 p = ((TH2*)fHist)->ProfileX(pfx, -1, 9999, "s");549 p = ((TH2*)fHist)->ProfileX(pfx, -1, -1, "s"); 550 550 p->SetLineColor(col); 551 551 } … … 555 555 { 556 556 Int_t col = p->GetLineColor(); 557 p = ((TH2*)fHist)->ProfileY(pfy, -1, 9999, "s");557 p = ((TH2*)fHist)->ProfileY(pfy, -1, -1, "s"); 558 558 p->SetLineColor(col); 559 559 } 560 560 /* 561 561 if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx(); 562 562 if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy(); 563 563 if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz(); 564 */ 564 565 } 565 566 … … 587 588 pad->SetGridy(); 588 589 590 if (fHist->TestBit(kIsLogx)) pad->SetLogx(); 591 if (fHist->TestBit(kIsLogy)) pad->SetLogy(); 592 if (fHist->TestBit(kIsLogz)) pad->SetLogz(); 593 589 594 fHist->SetFillStyle(4000); 590 595 … … 624 629 *fLog << warn << "TProfile " << pfx << " already in pad." << endl; 625 630 626 p = ((TH2*)fHist)->ProfileX(pfx, -1, 9999, "s");631 p = ((TH2*)fHist)->ProfileX(pfx, -1, -1, "s"); 627 632 p->UseCurrentStyle(); 628 633 p->SetLineColor(blue ? kBlue : fHist->GetLineColor()); … … 640 645 *fLog << warn << "TProfile " << pfy << " already in pad." << endl; 641 646 642 p = ((TH2*)fHist)->ProfileY(pfy, -1, 9999, "s");647 p = ((TH2*)fHist)->ProfileY(pfy, -1, -1, "s"); 643 648 p->UseCurrentStyle(); 644 649 p->SetLineColor(blue ? kBlue : fHist->GetLineColor()); -
trunk/MagicSoft/Mars/mhbase/MH3.h
r8082 r8695 10 10 11 11 class TH1; 12 class TMethodCall;13 12 class MData; 14 13 … … 25 24 MData *fData[3]; // Object from which the data is filled 26 25 Double_t fScale[3]; // Scale for the three axis (eg unit) 26 Byte_t fStyleBits; // Set the range of a histogram automatically in Finalize 27 27 28 28 void StreamPrimitive(ostream &out) const; … … 46 46 void SetScaleY(Double_t scale) { fScale[1] = scale; } 47 47 void SetScaleZ(Double_t scale) { fScale[2] = scale; } 48 void SetScale(Double_t x, Double_t y=1, Double_t z=2) { SetScaleX(x); SetScaleY(y); SetScaleZ(z); } 48 49 49 50 void SetLogx(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogx) : fHist->ResetBit(kIsLogx); } 50 51 void SetLogy(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogy) : fHist->ResetBit(kIsLogy); } 51 52 void SetLogz(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogz) : fHist->ResetBit(kIsLogz); } 53 void SetLog(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) { SetLogx(x); SetLogy(y); SetLogz(z); } 54 55 void SetAutoRangeX(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 0) : CLRBIT(fStyleBits, 0); } 56 void SetAutoRangeY(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 1) : CLRBIT(fStyleBits, 1); } 57 void SetAutoRangeZ(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 2) : CLRBIT(fStyleBits, 2); } 58 void SetAutoRange(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) { SetAutoRangeX(x); SetAutoRangeY(y); SetAutoRangeZ(z); } 52 59 53 60 void Sumw2() const { if (fHist) fHist->Sumw2(); } … … 67 74 Bool_t SetupFill(const MParList *pList); 68 75 Bool_t Fill(const MParContainer *par, const Stat_t w=1); 76 Bool_t Finalize(); 69 77 70 78 TH1 *GetHistByName(const TString name="") const { return fHist; } … … 86 94 void Paint(Option_t *opt=""); 87 95 88 ClassDef(MH3, 2) // Generalized 1/2/3D-histogram for Mars variables96 ClassDef(MH3, 3) // Generalized 1/2/3D-histogram for Mars variables 89 97 }; 90 98 -
trunk/MagicSoft/Mars/mhbase/Makefile
r6915 r8695 25 25 MH.cc \ 26 26 MH3.cc \ 27 MHn.cc \ 27 28 MHArray.cc \ 28 29 MHMatrix.cc -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r8049 r8695 526 526 { 527 527 const TString name(Form("TempAlphaEnergy%06d", gRandom->Integer(1000000))); 528 TH1D *h = hon.ProjectionZ(name, -1, 9999, bin, bin, "E");528 TH1D *h = hon.ProjectionZ(name, -1, -1, bin, bin, "E"); 529 529 h->SetDirectory(0); 530 530 … … 537 537 { 538 538 const TString name(Form("TempAlphaTheta%06d", gRandom->Integer(1000000))); 539 TH1D *h = hon.ProjectionZ(name, bin, bin, -1, 9999, "E");539 TH1D *h = hon.ProjectionZ(name, bin, bin, -1, -1, "E"); 540 540 h->SetDirectory(0); 541 541 … … 551 551 hon.GetZaxis()->SetRange(bin,bin); 552 552 TH1D *h = (TH1D*)hon.Project3D("ye"); 553 hon.GetZaxis()->SetRange(-1, 9999);553 hon.GetZaxis()->SetRange(-1,-1); 554 554 555 555 h->SetDirectory(0); … … 563 563 { 564 564 const TString name(Form("TempAlpha%06d", gRandom->Integer(1000000))); 565 TH1D *h = hon.ProjectionZ(name, -1, 9999, -1, 9999, "E");565 TH1D *h = hon.ProjectionZ(name, -1, -1, -1, -1, "E"); 566 566 h->SetDirectory(0); 567 567 … … 576 576 const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000))); 577 577 578 TH1D *h1 = hon.ProjectionZ(name1, -1, 9999, bin, bin, "E");579 TH1D *h0 = hof.ProjectionZ(name0, -1, 9999, bin, bin, "E");578 TH1D *h1 = hon.ProjectionZ(name1, -1, -1, bin, bin, "E"); 579 TH1D *h0 = hof.ProjectionZ(name0, -1, -1, bin, bin, "E"); 580 580 h1->SetDirectory(0); 581 581 h0->SetDirectory(0); … … 594 594 const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000))); 595 595 596 TH1D *h1 = hon.ProjectionZ(name1, bin, bin, -1, 9999, "E");597 TH1D *h0 = hof.ProjectionZ(name0, bin, bin, -1, 9999, "E");596 TH1D *h1 = hon.ProjectionZ(name1, bin, bin, -1, -1, "E"); 597 TH1D *h0 = hof.ProjectionZ(name0, bin, bin, -1, -1, "E"); 598 598 h1->SetDirectory(0); 599 599 h0->SetDirectory(0); … … 614 614 hon.GetZaxis()->SetRange(bin,bin); 615 615 TH1D *h1 = (TH1D*)hon.Project3D("ye"); 616 hon.GetZaxis()->SetRange(-1, 9999);616 hon.GetZaxis()->SetRange(-1,-1); 617 617 h1->SetDirectory(0); 618 618 619 619 hof.GetZaxis()->SetRange(bin,bin); 620 620 TH1D *h0 = (TH1D*)hof.Project3D("ye"); 621 hof.GetZaxis()->SetRange(-1, 9999);621 hof.GetZaxis()->SetRange(-1,-1); 622 622 h0->SetDirectory(0); 623 623 … … 635 635 const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000))); 636 636 637 TH1D *h1 = hon.ProjectionZ(name1, -1, 9999, -1, 9999, "E");638 TH1D *h0 = hof.ProjectionZ(name0, -1, 9999, -1, 9999, "E");637 TH1D *h1 = hon.ProjectionZ(name1, -1, -1, -1, -1, "E"); 638 TH1D *h0 = hof.ProjectionZ(name0, -1, -1, -1, -1, "E"); 639 639 h1->SetDirectory(0); 640 640 h0->SetDirectory(0); -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r8664 r8695 401 401 MAlphaFitter fit(fFit); 402 402 403 TH1D *h = fOffData ? fOffData->ProjectionZ("ProjTimeTemp", -1, 9999, -1, 9999, "E") : 0;403 TH1D *h = fOffData ? fOffData->ProjectionZ("ProjTimeTemp", -1, -1, -1, -1, "E") : 0; 404 404 const Bool_t rc = fit.ScaleAndFit(fHistTime, h); 405 405 if (h) -
trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc
r8674 r8695 121 121 void MHCollectionArea::CalcEfficiency() 122 122 { 123 TH1D *hsel = fHistSel.ProjectionY("Spy", -1, 9999, "E");;124 TH1D *hall = fHistAll.ProjectionY("Apy", -1, 9999, "E");123 TH1D *hsel = fHistSel.ProjectionY("Spy", -1, -1, "E");; 124 TH1D *hall = fHistAll.ProjectionY("Apy", -1, -1, "E"); 125 125 126 126 // … … 327 327 pad->cd(1); 328 328 if (gPad->FindObject("ProjSelX")) 329 fHistSel.ProjectionX("ProjSelX", -1, 9999, "E");329 fHistSel.ProjectionX("ProjSelX", -1, -1, "E"); 330 330 331 331 pad->cd(2); 332 332 if (gPad->FindObject("ProjAllY")) 333 h1=fHistAll.ProjectionY("ProjAllY", -1, 9999, "E");333 h1=fHistAll.ProjectionY("ProjAllY", -1, -1, "E"); 334 334 if (gPad->FindObject("ProjSelY")) 335 h2=fHistSel.ProjectionY("ProjSelY", -1, 9999, "E");335 h2=fHistSel.ProjectionY("ProjSelY", -1, -1, "E"); 336 336 337 337 if (h1 && h1->GetMaximum()>0) … … 381 381 gPad->SetGridy(); 382 382 /* 383 h = fHistAll.ProjectionX("ProjAllX", -1, 9999, "E");383 h = fHistAll.ProjectionX("ProjAllX", -1, -1, "E"); 384 384 h->SetXTitle("\\Theta [\\circ]"); 385 385 h->SetDirectory(NULL); … … 388 388 h->Draw(); 389 389 */ 390 h = fHistSel.ProjectionX("ProjSelX", -1, 9999, "E");390 h = fHistSel.ProjectionX("ProjSelX", -1, -1, "E"); 391 391 h->SetXTitle("\\Theta [\\circ]"); 392 392 h->SetDirectory(NULL); … … 405 405 gPad->SetGridy(); 406 406 407 h1 = fHistAll.ProjectionY("ProjAllY", -1, 9999, "E");407 h1 = fHistAll.ProjectionY("ProjAllY", -1, -1, "E"); 408 408 h1->SetDirectory(NULL); 409 409 h1->SetLineColor(kGreen); … … 412 412 h1->Draw(); 413 413 414 h2 = fHistSel.ProjectionY("ProjSelY", -1, 9999, "E");414 h2 = fHistSel.ProjectionY("ProjSelY", -1, -1, "E"); 415 415 h2->SetDirectory(NULL); 416 416 h2->SetLineColor(kRed); -
trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc
r7818 r8695 866 866 if ((h = (TH1D*)gPad->FindObject("ProjDeltaT"/*fNameProjDeltaT*/))) 867 867 { 868 h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, 9999, "E");868 h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, -1, "E"); 869 869 if (h->GetEntries()>0) 870 870 gPad->SetLogy(); … … 873 873 pad->GetPad(2)->cd(1); 874 874 if ((h = (TH1D*)gPad->FindObject("ProjTheta"/*fNameProjTheta*/))) 875 fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, 9999, "E");875 fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, -1, "E"); 876 876 877 877 if (!fIsFinalized) … … 963 963 pad->GetPad(1)->cd(1); 964 964 gPad->SetBorderMode(0); 965 h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, 9999, "E");965 h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, -1, "E"); 966 966 h->SetTitle("Distribution of \\Delta t [s]"); 967 967 h->SetXTitle("\\Delta t [s]"); … … 993 993 pad->GetPad(2)->cd(1); 994 994 gPad->SetBorderMode(0); 995 h = fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, 9999, "E");995 h = fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, -1, "E"); 996 996 h->SetTitle("Distribution of \\Theta [\\circ]"); 997 997 h->SetXTitle("\\Theta [\\circ]"); -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
r8673 r8695 364 364 if ((hx=(TH1D*)gPad->FindObject(MString::Format("Prof%s", h.GetName())))) 365 365 { 366 hx = hyx->ProfileX(Form("Prof%s", h.GetName()), -1, 9999, "s");366 hx = hyx->ProfileX(Form("Prof%s", h.GetName()), -1, -1, "s"); 367 367 368 368 if (logy && hx->GetMaximum()>0) … … 387 387 h2->SetLineColor(kRed); 388 388 389 TH1D *h1 = h2->ProfileX(Form("Prof%s", h.GetName()), -1, 9999, "s");389 TH1D *h1 = h2->ProfileX(Form("Prof%s", h.GetName()), -1, -1, "s"); 390 390 h1->SetDirectory(NULL); 391 391 h1->SetBit(kCanDelete); … … 478 478 gPad->SetGridy(); 479 479 /* 480 h = fHImpact.ProjectionX("Impact", -1, 9999, "e");480 h = fHImpact.ProjectionX("Impact", -1, -1, "e"); 481 481 h->SetBit(TH1::kNoStats); 482 482 h->SetTitle("Distribution of Impact"); -
trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc
r8680 r8695 485 485 *fLog << " New spectral slope: "; 486 486 if (fNewSlope==-99) 487 *fLog << "undefined " << endl;487 *fLog << "undefined/no change" << endl; 488 488 else 489 489 *fLog << fNewSlope << endl; -
trunk/MagicSoft/Mars/mimage/MNewImagePar.cc
r8647 r8695 271 271 fConcCOG /= hillas.GetSize(); // [ratio] 272 272 273 // This can for example happen in case of Muon Rings 274 if (fConcCOG<0) 275 fConcCOG=0; 276 273 277 // Concentration of signal contained in ellipse 274 278 fConcCore /= hillas.GetSize(); -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r8669 r8695 62 62 63 63 // Filter 64 //#include "MFDataMember.h"64 #include "MFDataPhrase.h" 65 65 66 66 // Fit signal environment … … 665 665 cont3.SetAllowEmpty(); 666 666 667 // Filter for VsSize 668 MFDataPhrase ftheta("", "CutT"); 669 ftheta.SetAllowEmpty(); 670 667 671 // ------------- Loop Off Data -------------------- 668 672 MReadReports readoffdata; … … 712 716 MFillH fill2a("MHHillasOffPost [MHHillas]", "MHillas", "FillHillasPost"); 713 717 MFillH fill3a("MHVsSizeOffPost [MHVsSize]", "MHillasSrc", "FillVsSizePost"); 718 MFillH fill3c("MHVsSizeOffTheta [MHVsSize]", "MHillasSrc", "FillVsSizeTheta"); 714 719 MFillH fill4a("MHHilExtOffPost [MHHillasExt]", "MHillasSrc", "FillHilExtPost"); 715 720 MFillH fill5a("MHHilSrcOffPost [MHHillasSrc]", "MHillasSrc", "FillHilSrcPost"); … … 720 725 fill2a.SetNameTab("PostCut"); 721 726 fill3a.SetNameTab("VsSize"); 727 fill3c.SetNameTab("CutT"); 722 728 fill4a.SetNameTab("HilExt"); 723 729 fill5a.SetNameTab("HilSrc"); … … 726 732 //fill9a.SetNameTab("EffOffT"); 727 733 734 fill3c.SetFilter(&ftheta); 735 728 736 //MFDataMember fbin("Bin.fVal", '>', 0); 729 737 //fill9a.SetFilter(&fbin); … … 738 746 fill2a.SetWeight(&scale); 739 747 fill3a.SetWeight(&scale); 748 fill3c.SetWeight(&scale); 740 749 fill4a.SetWeight(&scale); 741 750 fill5a.SetWeight(&scale); … … 797 806 if (fFullDisplay) 798 807 { 808 tlist2.AddToList(&ftheta); 799 809 tlist2.AddToList(&fill3a); 810 tlist2.AddToList(&fill3c); 800 811 tlist2.AddToList(&fill4a); 801 812 tlist2.AddToList(&fill5a); … … 905 916 MFillH fill2b("MHHillasOnPost [MHHillas]", "MHillas", "FillHillasPost"); 906 917 MFillH fill3b("MHVsSizeOnPost [MHVsSize]", "MHillasSrc", "FillVsSizePost"); 918 MFillH fill3d("MHVsSizeOnTheta [MHVsSize]", "MHillasSrc", "FillVsSizeTheta"); 907 919 MFillH fill4b("MHHilExtOnPost [MHHillasExt]", "MHillasSrc", "FillHilExtPost"); 908 920 MFillH fill5b("MHHilSrcOnPost [MHHillasSrc]", "MHillasSrc", "FillHilSrcPost"); … … 913 925 fill2b.SetNameTab("PostCut"); 914 926 fill3b.SetNameTab("VsSize"); 927 fill3d.SetNameTab("CutT"); 915 928 fill4b.SetNameTab("HilExt"); 916 929 fill5b.SetNameTab("HilSrc"); … … 921 934 fill2b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 922 935 fill3b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 936 fill3d.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 923 937 fill4b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 924 938 fill5b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); … … 926 940 fill7b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 927 941 //fill9b.SetFilter(&fbin); 942 943 fill3d.SetFilter(&ftheta); 928 944 929 945 /* … … 985 1001 { 986 1002 tlist.Replace(&fill1b); 987 /* if (fIsWobble) 988 { 989 tlist2.AddToListAfter(&fill2b, &fill2a); 990 tlist2.AddToListAfter(&fill3b, &fill3a); 991 } 992 else 993 */ 1003 994 1004 tlist2.Replace(&fill2b); 995 1005 if (fFullDisplay) 996 1006 { 997 1007 tlist2.Replace(&fill3b); 1008 tlist2.Replace(&fill3d); 998 1009 tlist2.Replace(&fill4b); 999 1010 tlist2.Replace(&fill5b); -
trunk/MagicSoft/Mars/mjobs/MSequence.cc
r8674 r8695 123 123 // + fMonteCarlo 124 124 // 125 // Class Version 3: 126 // + fComment 127 // 125 128 ///////////////////////////////////////////////////////////////////////////// 126 129 #include "MSequence.h" … … 450 453 fHvSettings = env.GetValue("HvSettings", ""); 451 454 fMonteCarlo = env.GetValue("MonteCarlo", kFALSE); 455 fComment = env.GetValue("Comment", ""); 452 456 453 457 str = env.GetValue("Runs", ""); … … 544 548 if (!fDataPath.IsNull()) 545 549 gLog << endl << "DataPath: " << fDataPath << endl; 550 551 gLog << endl << "Comment: " << fComment << endl; 552 546 553 } 547 554 -
trunk/MagicSoft/Mars/mjobs/MSequence.h
r8674 r8695 45 45 TString fTriggerTable; 46 46 TString fHvSettings; 47 TString fComment; 47 48 48 49 TArrayI fRuns; … … 144 145 static Bool_t InflatePath(TString &seq, Bool_t ismc=kFALSE); 145 146 146 ClassDef(MSequence, 2)147 ClassDef(MSequence, 3) 147 148 }; 148 149 -
trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc
r8691 r8695 201 201 pad->cd(1); 202 202 gPad->SetBorderMode(0); 203 gPad->SetGridx(); 204 gPad->SetGridy(); 203 205 fHistRadius.Draw(); 204 206 205 207 pad->cd(2); 206 208 gPad->SetBorderMode(0); 209 gPad->SetGridx(); 210 gPad->SetGridy(); 207 211 fHistArcWidth.Draw(); 208 212 209 213 pad->cd(3); 210 214 gPad->SetBorderMode(0); 215 gPad->SetGridx(); 216 gPad->SetGridy(); 211 217 fHistSize.Draw(); 212 218 … … 228 234 pad->cd(4); 229 235 gPad->SetBorderMode(0); 236 gPad->SetGridx(); 237 gPad->SetGridy(); 230 238 fHistBroad.Draw(); 231 239 -
trunk/MagicSoft/Mars/mreflector/MHReflector.cc
r8315 r8695 196 196 pad->cd(2); 197 197 gPad->SetBorderMode(0); 198 TH1 *h = fHistRad.ProjectionY("ProfRad", -1, 9999, "e");198 TH1 *h = fHistRad.ProjectionY("ProfRad", -1, -1, "e"); 199 199 h->SetTitle("RadialProfile"); 200 200 h->SetDirectory(NULL); … … 209 209 gPad->SetLogx(); 210 210 gPad->SetLogy(); 211 h = fHistSize.ProjectionY("ProfSize", -1, 9999, "e");211 h = fHistSize.ProjectionY("ProfSize", -1, -1, "e"); 212 212 h->SetTitle("Size distribution"); 213 213 h->SetDirectory(NULL); … … 279 279 if (gPad->FindObject("ProfRad")) 280 280 { 281 h = fHistRad.ProjectionY("ProfRad", -1, 9999, "e");281 h = fHistRad.ProjectionY("ProfRad", -1, -1, "e"); 282 282 h->Scale(1./h->Integral()); 283 283 } … … 287 287 if (gPad->FindObject("ProfSize")) 288 288 { 289 h = fHistSize.ProjectionY("ProfSize", -1, 9999, "e");289 h = fHistSize.ProjectionY("ProfSize", -1, -1, "e"); 290 290 h->Scale(1./h->Integral()); 291 291 }
Note:
See TracChangeset
for help on using the changeset viewer.