Changeset 1809 for trunk/MagicSoft/Mars/mhist/MHMatrix.cc
- Timestamp:
- 03/08/03 14:00:30 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1772 r1809 504 504 } 505 505 506 // -------------------------------------------------------------------------- 507 // 506 508 void MHMatrix::Reassign() 507 509 { … … 691 693 // 692 694 // Define the reference matrix 693 // refcolumn number of the column containing the variable, for which a694 // target distribution may be given;695 // refcolumn number of the column (starting at 1)containing the variable, 696 // for which a target distribution may be given; 695 697 // if refcolumn is negative the target distribution will be set 696 698 // equal to the real distribution; the events in the reference … … 748 750 //--------------------------------------------------------- 749 751 // 750 // if refcol < 0 : select reference events randomly 751 // i.e. set the normaliztion factotrs equal to 1.0 752 // if refcolumn < 0 : select reference events randomly 753 // i.e. set the normaliztion factotrs equal to 1.0 754 // refcol is the column number starting at 0; it is >= 0 752 755 753 756 if (refcolumn<0) 754 757 { 755 frefcol = -refcolumn ;758 frefcol = -refcolumn - 1; 756 759 } 757 760 else 758 761 { 759 frefcol = refcolumn;762 frefcol = refcolumn - 1; 760 763 } 761 764 … … 790 793 // << ", " << fM(j-1,frefcol) << endl; 791 794 } 792 793 // if refcolumn<0 set target distribution equal to the real distribution794 // in order to obtain normalization factors = 1.0795 //if (refcolumn<0)796 //{797 // for (Int_t j=1; j<=fnbins; j++)798 // {799 // float cont = fHth-> GetBinContent(j);800 // fHthsh->SetBinContent(j, cont);801 // }802 //}803 795 804 796 //--------------------------------------------------------- … … 816 808 817 809 // if refcolumn < 0 set the correction factors equal to 1 818 if ( refcolumn>=0 .0)810 if ( refcolumn>=0 ) 819 811 b = fHthsh->GetBinContent(j); 820 812 else … … 948 940 { 949 941 *fLog <<ir <<" "; 950 for (Int_t ic=0; ic<13;ic++) cout<<Mnew(ir,ic)<<" ";942 for (Int_t ic=0; ic<Mnew.GetNcols(); ic++) cout<<Mnew(ir,ic)<<" "; 951 943 *fLog <<endl; 952 944 } … … 957 949 { 958 950 float a = fHthaft->GetBinContent(j); 959 if (a>0)*fLog << j << " "<< a << " ";951 *fLog << j << " "<< a << " "; 960 952 } 961 953 *fLog <<endl; … … 967 959 968 960 th1->cd(1); 969 ((TH1F*)fHthsh)->Draw (); // target961 ((TH1F*)fHthsh)->DrawCopy(); // target 970 962 971 963 th1->cd(2); 972 ((TH1F*)fHth)->Draw (); // real histogram before964 ((TH1F*)fHth)->DrawCopy(); // real histogram before 973 965 974 966 th1->cd(3); 975 ((TH1F*)fHthd) -> Draw();// correction factors967 ((TH1F*)fHthd)->DrawCopy(); // correction factors 976 968 977 969 th1->cd(4); 978 ((TH1F*)fHthaft) -> Draw(); // histogram after 979 980 //--------------------------------------------------------- 981 // --- write onto output file 982 // 983 //TFile *outfile = new TFile(fileNameout, "RECREATE", ""); 984 //Mnew.Write(fileNameout); 985 //outfile->Close(); 970 ((TH1F*)fHthaft)->DrawCopy(); // histogram after 971 972 //--------------------------------------------------------- 986 973 987 974 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.