- Timestamp:
- 06/14/08 16:55:58 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8956 r8957 89 89 the default was not correctly treated because char* was 90 90 compared with char* 91 92 * mbase/MLog.cc, mbase/MMath.cc, mbase/MParContainer.cc, 93 mcalib/MCalibrateData.cc, mcalib/MCalibrationPulseTimeCam.cc, 94 mhbase/MBinning.h, mhbase/MH.cc, mhbase/MHMatrix.cc, 95 mhbase/MHn.cc, mhcalib/MHCalibrationChargeCam.cc, mhflux/MHDisp.cc, 96 mimage/MCameraSmooth.cc, mimage/MConcentration.cc, 97 mjobs/MJCalibration.cc, mjoptim/MJOptimize.cc, 98 mjtrain/MJTrainSeparation.cc, mmuon/MMuonSearchPar.cc, 99 mreport/MReportCurrents.cc, mreport/MReportRun.cc, 100 mtools/MChisqEval.cc: 101 - fixed some cast-away constness warnings 102 - fixed some shadow declarations 103 104 * mhbase/MH.[h,cc]: 105 - removed an old obsolete workaround (ProjectionX/Y) 106 107 * mimage/Makefile, mimage/IMageLinkDef.h: 108 - removed MCameraSmooth 91 109 92 110 -
trunk/MagicSoft/Mars/mbase/MLog.cc
r8805 r8957 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MLog.cc,v 1. 59 2008-01-11 10:37:01tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MLog.cc,v 1.60 2008-06-14 15:55:50 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 663 663 { 664 664 // gcc 3.2: 665 c har *txt = (char*)"logXXXXXX";665 const char *txt = "logXXXXXX"; 666 666 667 667 TString n(fname ? fname : txt); -
trunk/MagicSoft/Mars/mbase/MMath.cc
r8673 r8957 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.3 7 2007-08-17 10:53:48tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.38 2008-06-14 15:55:50 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 128 128 } 129 129 130 /* 131 Double_t MMath::SignificanceLiMaErr(Double_t s, Double_t b, Double_t alpha) 132 { 133 Double_t S = SignificanceLiMa(s, b, alpha); 134 if (S<0) 135 return -1; 136 137 const Double_t sum = s+b; 138 139 140 Double_t l = TMath::Log(s/sum*(alpha+1)/alpha)/TMath::Sqrt(2*S); 141 Double_t m = TMath::Log(s/sum*(alpha+1)/alpha)/TMath::Sqrt(2*S); 142 143 144 const Double_t sum = s+b; 145 146 if (s<0 || b<0 || alpha<=0) 147 return -1; 148 149 const Double_t l = s==0 ? 0 : s*TMath::Log(s/sum*(alpha+1)/alpha); 150 const Double_t m = b==0 ? 0 : b*TMath::Log(b/sum*(alpha+1) ); 151 152 return l+m<0 ? -1 : TMath::Sqrt((l+m)*2); 153 } 154 */ 155 130 156 // -------------------------------------------------------------------------- 131 157 // … … 752 778 static const Double_t sqrt3 = TMath::Sqrt(3.); 753 779 754 const Double_t s = TMath::Sin(t)*sqrt3;755 const Double_t c = TMath::Cos(t);756 757 x1 = 2*sqrtq * c- a/3;758 x2 = -sqrtq * (s + c) - a/3;759 x3 = sqrtq * (s - c) - a/3;780 const Double_t sn = TMath::Sin(t)*sqrt3; 781 const Double_t cs = TMath::Cos(t); 782 783 x1 = 2*sqrtq * cs - a/3; 784 x2 = -sqrtq * (sn + cs) - a/3; 785 x3 = sqrtq * (sn - cs) - a/3; 760 786 761 787 /* --- Easier to understand but slower --- -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r8724 r8957 359 359 return kFALSE; 360 360 361 /*const*/ TMethodCall *call = ((TDataMember*)member)->GetterMethod(); //FIXME: Root361 /*const*/ TMethodCall *call = const_cast<TDataMember*>(member)->GetterMethod(); //FIXME: Root 362 362 if (!call) 363 363 { -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r8642 r8957 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.7 0 2007-07-18 19:30:12tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MCalibrateData.cc,v 1.71 2008-06-14 15:55:51 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 558 558 // Correct for global shifts in light emission 559 559 // 560 const MCalibrationChargePix &ugpix = (MCalibrationChargePix&)updatecam->GetAverageArea(0);560 const MCalibrationChargePix &ugpix = static_cast<const MCalibrationChargePix&>(updatecam->GetAverageArea(0)); 561 561 562 562 const Float_t globmean = avpix.GetConvertedMean(); 563 563 calibUpdate = globmean==0 ? 1 : ugpix.GetConvertedMean()/globmean; 564 564 565 MBadPixelsPix &ubad = (MBadPixelsPix&)updatecam->GetAverageBadArea(0);565 const MBadPixelsPix &ubad = static_cast<const MBadPixelsPix&>(updatecam->GetAverageBadArea(0)); 566 566 if (ubad.IsUncalibrated(MBadPixelsPix::kChargeIsPedestal)) 567 567 { … … 698 698 // shall be calibrated, respectively. 699 699 // 700 Int_t MCalibrateData::Calibrate(Bool_t data, Bool_t pedestal) const701 { 702 if (!data && ! pedestal)700 Int_t MCalibrateData::Calibrate(Bool_t data, Bool_t doped) const 701 { 702 if (!data && !doped) 703 703 return kTRUE; 704 704 … … 763 763 } /* if (data) */ 764 764 765 if ( pedestal)765 if (doped) 766 766 { 767 767 TIter NextPed(&fPedestalCams); -
trunk/MagicSoft/Mars/mcalib/MCalibrationPulseTimeCam.cc
r8506 r8957 199 199 Float_t area = cam[idx].GetA(); 200 200 201 if (area == 0)201 if (area == 0) 202 202 return kFALSE; 203 203 204 MCalibrationPix &pix = (MCalibrationPix&)(*this)[idx];204 const MCalibrationPix &pix = static_cast<const MCalibrationPix&>((*this)[idx]); 205 205 206 206 switch (type) -
trunk/MagicSoft/Mars/mhbase/MBinning.h
r8679 r8957 94 94 Int_t GetNumBins() const { return fEdges.GetSize()-1; } 95 95 96 Double_t *GetEdges() const { return (Double_t*)fEdges.GetArray(); }96 const Double_t *GetEdges() const { return fEdges.GetArray(); } 97 97 const TArrayD &GetEdgesD() const { return fEdges; } 98 98 -
trunk/MagicSoft/Mars/mhbase/MH.cc
r8916 r8957 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.3 8 2008-06-02 17:21:24tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.39 2008-06-14 15:55:52 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 554 554 if (h->InheritsFrom(TH3::Class()) && x->InheritsFrom(TH3::Class())) 555 555 { 556 SetBinning((TH3*)h, ((TH1*)x)->GetXaxis(), ((TH1*)x)->GetYaxis(), ((TH1*)x)->GetZaxis());556 SetBinning((TH3*)h, x->GetXaxis(), x->GetYaxis(), x->GetZaxis()); 557 557 return; 558 558 } … … 561 561 if (h->InheritsFrom(TH2::Class()) && x->InheritsFrom(TH2::Class())) 562 562 { 563 SetBinning((TH2*)h, ((TH1*)x)->GetXaxis(), ((TH1*)x)->GetYaxis());563 SetBinning((TH2*)h, x->GetXaxis(), x->GetYaxis()); 564 564 return; 565 565 } … … 568 568 if (h->InheritsFrom(TH1::Class()) && x->InheritsFrom(TH1::Class())) 569 569 { 570 SetBinning(h, ((TH1*)x)->GetXaxis());570 SetBinning(h, x->GetXaxis()); 571 571 return; 572 572 } … … 869 869 // Draw first histogram 870 870 // 871 TH1 *h1 = ((TH1&)hist1).DrawCopy();871 TH1 *h1 = hist1.DrawCopy(); 872 872 gPad->SetBorderMode(0); 873 873 gPad->Update(); … … 921 921 // Draw second histogram 922 922 // 923 TH1 *h2 = ((TH1&)hist2).DrawCopy("sames");923 TH1 *h2 = hist2.DrawCopy("sames"); 924 924 gPad->Update(); 925 925 … … 1208 1208 } 1209 1209 1210 void MH::ProjectionX(TH1D &dest, const TH2 &src, Int_t firstybin, Int_t lastybin)1211 {1212 //*-*-*-*-*Project a 2-D histogram into a 1-D histogram along X*-*-*-*-*-*-*1213 //*-* ====================================================1214 //1215 // The projection dest is always of the type TH1D.1216 // The projection is made from the channels along the Y axis1217 // ranging from firstybin to lastybin included.1218 // By default, bins 1 to ny are included1219 // When all bins are included, the number of entries in the projection1220 // is set to the number of entries of the 2-D histogram, otherwise1221 // the number of entries is incremented by 1 for all non empty cells.1222 //1223 // if Sumw2() was called for dest, the errors are computed.1224 //1225 TAxis &axex = *((TH2&)src).GetXaxis();1226 TAxis &axey = *((TH2&)src).GetYaxis();1227 1228 const Int_t nx = axex.GetNbins();1229 const Int_t ny = axey.GetNbins();1230 if (firstybin < 0)1231 firstybin = 1;1232 if (lastybin > ny)1233 lastybin = ny;1234 1235 dest.Reset();1236 SetBinning(&dest, &axex);1237 1238 // Create the projection histogram1239 const Bool_t computeErrors = dest.GetSumw2N() ? 1 : 0;1240 1241 // Fill the projected histogram1242 for (Int_t binx=0; binx<=nx+1; binx++)1243 {1244 Double_t err2 = 0;1245 for (Int_t biny=firstybin; biny<=lastybin; biny++)1246 {1247 const Double_t cont = src.GetCellContent(binx,biny);1248 const Double_t err1 = src.GetCellError(binx,biny);1249 err2 += err1*err1;1250 if (cont)1251 dest.Fill(axex.GetBinCenter(binx), cont);1252 }1253 if (computeErrors)1254 dest.SetBinError(binx, TMath::Sqrt(err2));1255 }1256 if (firstybin <=1 && lastybin >= ny)1257 dest.SetEntries(src.GetEntries());1258 }1259 1260 void MH::ProjectionY(TH1D &dest, const TH2 &src, Int_t firstxbin, Int_t lastxbin)1261 {1262 //*-*-*-*-*Project a 2-D histogram into a 1-D histogram along X*-*-*-*-*-*-*1263 //*-* ====================================================1264 //1265 // The projection dest is always of the type TH1D.1266 // The projection is made from the channels along the Y axis1267 // ranging from firstybin to lastybin included.1268 // By default, bins 1 to ny are included1269 // When all bins are included, the number of entries in the projection1270 // is set to the number of entries of the 2-D histogram, otherwise1271 // the number of entries is incremented by 1 for all non empty cells.1272 //1273 // if Sumw2() was called for dest, the errors are computed.1274 //1275 TAxis &axex = *((TH2&)src).GetXaxis();1276 TAxis &axey = *((TH2&)src).GetYaxis();1277 1278 const Int_t nx = axex.GetNbins();1279 const Int_t ny = axey.GetNbins();1280 if (firstxbin < 0)1281 firstxbin = 1;1282 if (lastxbin > nx)1283 lastxbin = nx;1284 1285 dest.Reset();1286 SetBinning(&dest, &axey);1287 1288 // Create the projection histogram1289 const Bool_t computeErrors = dest.GetSumw2N() ? 1 : 0;1290 1291 // Fill the projected histogram1292 for (Int_t biny=0; biny<=ny+1; biny++)1293 {1294 Double_t err2 = 0;1295 for (Int_t binx=firstxbin; binx<=lastxbin; binx++)1296 {1297 const Double_t cont = src.GetCellContent(binx,biny);1298 const Double_t err1 = src.GetCellError(binx,biny);1299 err2 += err1*err1;1300 if (cont)1301 dest.Fill(axey.GetBinCenter(biny), cont);1302 }1303 if (computeErrors)1304 dest.SetBinError(biny, TMath::Sqrt(err2));1305 }1306 if (firstxbin <=1 && lastxbin >= nx)1307 dest.SetEntries(src.GetEntries());1308 }1309 1310 1210 // -------------------------------------------------------------------------- 1311 1211 // -
trunk/MagicSoft/Mars/mhbase/MH.h
r8892 r8957 119 119 const char* name="ProjectArray", const char* title="Projected Array"); 120 120 121 static void ProjectionX(TH1D &dest, const TH2 &src, Int_t firstybin=-1, Int_t lastybin=9999);122 static void ProjectionY(TH1D &dest, const TH2 &src, Int_t firstxbin=-1, Int_t lastxbin=9999);123 124 121 static void GetRangeUser(const TH1 &hist, Axis_t &lo, Axis_t &hi); 125 122 static void GetRangeUserX(const TH1 &hist, Axis_t &lo, Axis_t &hi); -
trunk/MagicSoft/Mars/mhbase/MHMatrix.cc
r8907 r8957 783 783 784 784 th1->cd(1); 785 ((TH1&)hth).DrawCopy(); // real histogram before785 hth.DrawCopy(); // real histogram before 786 786 787 787 th1->cd(2); 788 ((TH1&)hta).DrawCopy(); // histogram after788 hta.DrawCopy(); // histogram after 789 789 790 790 th1->cd(3); 791 ((TH1&)hthd).DrawCopy(); // correction factors791 hthd.DrawCopy(); // correction factors 792 792 793 793 th1->cd(4); 794 ((TH1&)thsh).DrawCopy(); // target794 thsh.DrawCopy(); // target 795 795 } 796 796 … … 895 895 SetBinning(&hthd, &thsh); 896 896 hthd.SetDirectory(NULL); 897 hthd.Divide( (TH1F*)&thsh, &hth, 1, 1);897 hthd.Divide(&thsh, &hth, 1, 1); 898 898 899 899 if (hthd.GetMaximum() <= 0) -
trunk/MagicSoft/Mars/mhbase/MHn.cc
r8893 r8957 584 584 for (int i=0; i<fNum; i++) 585 585 { 586 TString opt(fDrawOption[i]);586 TString dopt(fDrawOption[i]); 587 587 if (same) 588 opt += " same";588 dopt += " same"; 589 589 590 590 pad->cd(i+1); 591 fHist[i]->Draw( opt);592 } 593 } 591 fHist[i]->Draw(dopt); 592 } 593 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r8552 r8957 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.6 0 2007-06-12 20:50:30tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationChargeCam.cc,v 1.61 2008-06-14 15:55:53 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 743 743 } 744 744 745 const Int_t n pix= fRawEvt->GetNumPixels();746 const Int_t nhi 747 for (int pixid=0; pixid<n pix; pixid++)745 const Int_t num = fRawEvt->GetNumPixels(); 746 const Int_t nhi = fRunHeader->GetNumSamplesHiGain(); 747 for (int pixid=0; pixid<num; pixid++) 748 748 { 749 749 MHCalibrationChargePix &histhi = (MHCalibrationChargePix&)(*this)[pixid]; -
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r8719 r8957 243 243 const Int_t bz = fHist.GetZaxis()->FindFixBin(0); 244 244 245 TH2 & bg = fHalf ? fHistBg1 : fHistBg2;245 TH2 &hbg = fHalf ? fHistBg1 : fHistBg2; 246 246 247 247 const Bool_t smear = fSmearing>0; … … 249 249 { 250 250 if (!fHistOff) 251 bg.Fill(pos1.X(), pos1.Y(), w*w0);251 hbg.Fill(pos1.X(), pos1.Y(), w*w0); 252 252 else 253 253 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*w0); … … 276 276 const Double_t rc = TMath::Exp(-dp)/normg; 277 277 if (!fHistOff) 278 bg.AddBinContent(bg.GetBin(x, y), rc);278 hbg.AddBinContent(hbg.GetBin(x, y), rc); 279 279 else 280 280 fHist.AddBinContent(fHist.GetBin(x, y, bz), rc); … … 310 310 311 311 if (!fHistOff) 312 bg.SetEntries(bg.GetEntries()+1);312 hbg.SetEntries(hbg.GetEntries()+1); 313 313 else 314 314 fHist.SetEntries(fHist.GetEntries()+1); -
trunk/MagicSoft/Mars/mimage/ImageLinkDef.h
r6890 r8957 6 6 7 7 #pragma link C++ class MImgCleanStd+; 8 #pragma link C++ class MCameraSmooth+;9 8 10 9 #pragma link C++ class MHillas+; -
trunk/MagicSoft/Mars/mimage/MCameraSmooth.cc
r8489 r8957 110 110 const MGeomPix &gpix = (*fGeomCam)[i]; 111 111 112 const Int_t n = gpix.GetNumNeighbors();112 const Int_t nn = gpix.GetNumNeighbors(); 113 113 114 114 Int_t num = fUseCentralPixel ? 1 : 0; … … 116 116 errors[i] = fUseCentralPixel ? pix.GetErrorPhot() : 0; 117 117 118 for (int j=0; j<n ; j++)118 for (int j=0; j<nn; j++) 119 119 { 120 120 const UShort_t nid = gpix.GetNeighbor(j); -
trunk/MagicSoft/Mars/mimage/MConcentration.cc
r6855 r8957 111 111 112 112 const UInt_t npix = evt.GetNumPixels(); 113 for (UInt_t i=0; i<npix; i++)113 for (UInt_t j=0; j<npix; j++) 114 114 { 115 const MSignalPix &pix = evt[ i];115 const MSignalPix &pix = evt[j]; 116 116 if (!pix.IsPixelUsed()) 117 117 continue; 118 118 119 const Double_t nphot = pix.GetNumPhotons()* geom.GetPixRatio( i);119 const Double_t nphot = pix.GetNumPhotons()* geom.GetPixRatio(j); 120 120 121 121 // Get number of photons in the 8 most populated pixels … … 134 134 continue; 135 135 136 for(int j=0;j<i-1;j++)137 maxpix[7- j]=maxpix[6-j]; // [#phot]136 for(int k=0;k<i-1;k++) 137 maxpix[7-k]=maxpix[6-k]; // [#phot] 138 138 139 139 maxpix[8-i]=nphot; -
trunk/MagicSoft/Mars/mimage/Makefile
r6890 r8957 27 27 28 28 SRCFILES = MImgCleanStd.cc \ 29 MCameraSmooth.cc \30 29 MHillas.cc \ 31 30 MHillasSrc.cc \ -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r8948 r8957 917 917 gPad->SetBorderMode(0); 918 918 gPad->SetTicks(); 919 MHCamera *obj1 0=(MHCamera*)disp30.DrawCopy("hist");919 MHCamera *obj12=(MHCamera*)disp30.DrawCopy("hist"); 920 920 // 921 921 // for the datacheck, fix the ranges!! 922 922 // 923 obj1 0->SetMinimum(fTimeOffsetMin);924 obj1 0->SetMaximum(fTimeOffsetMax);923 obj12->SetMinimum(fTimeOffsetMin); 924 obj12->SetMaximum(fTimeOffsetMax); 925 925 // 926 926 // Set the datacheck sizes: 927 927 // 928 FixDataCheckHist((TH1D*)obj1 0);929 obj1 0->SetStats(kFALSE);928 FixDataCheckHist((TH1D*)obj12); 929 obj12->SetStats(kFALSE); 930 930 // 931 931 // set reference lines 932 932 // 933 DisplayReferenceLines(obj1 0,5);933 DisplayReferenceLines(obj12,5); 934 934 935 935 c5.cd(3); … … 949 949 gPad->SetBorderMode(0); 950 950 gPad->SetTicks(); 951 MHCamera *obj1 1=(MHCamera*)disp31.DrawCopy("hist");951 MHCamera *obj13=(MHCamera*)disp31.DrawCopy("hist"); 952 952 // 953 953 // for the datacheck, fix the ranges!! 954 954 // 955 obj1 1->SetMinimum(fTimeResolutionMin);956 obj1 1->SetMaximum(fTimeResolutionMax);955 obj13->SetMinimum(fTimeResolutionMin); 956 obj13->SetMaximum(fTimeResolutionMax); 957 957 // 958 958 // Set the datacheck sizes: 959 959 // 960 FixDataCheckHist((TH1D*)obj1 1);961 obj1 1->SetStats(kFALSE);960 FixDataCheckHist((TH1D*)obj13); 961 obj13->SetStats(kFALSE); 962 962 // 963 963 // set reference lines 964 964 // 965 DisplayReferenceLines(obj1 1,6);965 DisplayReferenceLines(obj13,6); 966 966 967 967 c5.cd(4); 968 968 gPad->SetBorderMode(0); 969 obj1 1->SetPrettyPalette();970 obj1 1->Draw();969 obj13->SetPrettyPalette(); 970 obj13->Draw(); 971 971 972 972 c5.cd(6); … … 1151 1151 disp34.CamDraw(c32, 2, 2, 0); 1152 1152 1153 MHCalibrationCam *c am = (MHCalibrationCam*)plist.FindObject("MHCalibrationRelTimeCam");1153 MHCalibrationCam *ccam = (MHCalibrationCam*)plist.FindObject("MHCalibrationRelTimeCam"); 1154 1154 1155 for (Int_t sector=1;sector<c am->GetAverageSectors();sector++)1155 for (Int_t sector=1;sector<ccam->GetAverageSectors();sector++) 1156 1156 { 1157 c am->GetAverageHiGainSector(sector).DrawClone("fourierevents");1158 c am->GetAverageLoGainSector(sector).DrawClone("fourierevents");1157 ccam->GetAverageHiGainSector(sector).DrawClone("fourierevents"); 1158 ccam->GetAverageLoGainSector(sector).DrawClone("fourierevents"); 1159 1159 } 1160 1160 -
trunk/MagicSoft/Mars/mjoptim/MJOptimize.cc
r8704 r8957 413 413 Int_t MJOptimize::Minuit(TMinuit &minuit, const char *cmd) const 414 414 { 415 Int_t er r;415 Int_t er; 416 416 Double_t tmp[2] = { fNumMaxCalls, fTolerance }; 417 minuit.mnexcm(cmd, tmp, 2, er r);418 419 switch (er r)417 minuit.mnexcm(cmd, tmp, 2, er); 418 419 switch (er) 420 420 { 421 421 case 0: … … 461 461 } 462 462 463 return er r;463 return er; 464 464 } 465 465 -
trunk/MagicSoft/Mars/mjtrain/MJTrainSeparation.cc
r8888 r8957 227 227 const Float_t s = gx->Integral(1, y+1); 228 228 const Float_t b = hx->Integral(1, y+1); 229 const Float_t s ig1 = MMath::SignificanceLiMa(s+b, b);230 const Float_t s ig2 = s<1 ? 0 : MMath::SignificanceLiMa(s+b, b)*TMath::Log10(s);231 232 gr3.SetPoint(y, h.GetYaxis()->GetBinLowEdge(y+2), s ig1);233 gr4.SetPoint(y, h.GetYaxis()->GetBinLowEdge(y+2), s ig2);229 const Float_t sg1 = MMath::SignificanceLiMa(s+b, b); 230 const Float_t sg2 = s<1 ? 0 : MMath::SignificanceLiMa(s+b, b)*TMath::Log10(s); 231 232 gr3.SetPoint(y, h.GetYaxis()->GetBinLowEdge(y+2), sg1); 233 gr4.SetPoint(y, h.GetYaxis()->GetBinLowEdge(y+2), sg2); 234 234 } 235 235 delete hx; -
trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc
r8911 r8957 228 228 229 229 // Perform Simplex minimization 230 Int_t er r;230 Int_t er; 231 231 Double_t tmp[2] = { 0, 0 }; 232 minuit.mnexcm("simplex", tmp, 2, er r);232 minuit.mnexcm("simplex", tmp, 2, er); 233 233 234 234 // Get resulting parameters -
trunk/MagicSoft/Mars/mreport/MReportCurrents.cc
r4575 r8957 94 94 pos += 4; 95 95 96 const Int_t n =sscanf(hex, "%4x", &c);97 if (n !=1)96 const Int_t nn=sscanf(hex, "%4x", &c); 97 if (nn!=1) 98 98 { 99 99 *fLog << warn << "WARNING - Reading hexadecimal DC information." << endl; -
trunk/MagicSoft/Mars/mreport/MReportRun.cc
r8955 r8957 85 85 if (ver>=200805190) 86 86 { 87 Int_t len; 88 const Int_t n=sscanf(str.Data(), "%d %n", &file, &len); 89 if (n!=1) 87 const Int_t nn=sscanf(str.Data(), "%d %n", &file, &len); 88 if (nn!=1) 90 89 { 91 90 *fLog << warn << "WARNING - Wrong number of arguments." << endl; -
trunk/MagicSoft/Mars/mtools/MChisqEval.cc
r8679 r8957 146 146 const Double_t y2 = fData1 ? fData1->GetValue() : 0; 147 147 148 const Double_t dy 149 const Double_t er r= fData1 ? y1*y2 : 1;148 const Double_t dy = y2-y1; 149 const Double_t er = fData1 ? y1*y2 : 1; 150 150 151 const Double_t w 151 const Double_t w = fWeight ? fWeight->GetVal() : 1; 152 152 153 fChisq += w*dy*dy/er r;153 fChisq += w*dy*dy/er; 154 154 fSumW += w; 155 155
Note:
See TracChangeset
for help on using the changeset viewer.