Changeset 8106 for trunk/MagicSoft/Mars
- Timestamp:
- 10/17/06 18:18:40 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8104 r8106 61 61 * mhist/MHRate.cc: 62 62 - removed an obsolete debugging "Y" 63 64 * sinope.cc, manalysis/MMcTriggerLvl2.cc, mastro/MAstroCamera.cc, 65 mastro/MAstroCatalog.cc, mbase/MLog.cc, mcalib/MCalibrationBlindPix.cc, 66 mcalib/MCalibrationChargeCalc.cc, mcalib/MCalibrationChargeCam.cc, 67 mcalib/MCalibrationIntensityChargeCam.cc, mfbase/MFEventSelector2.cc, 68 mhbase/MBinning.cc, mhbase/MH.cc, mhcalib/MHCalibrationHiLoCam.cc, 69 mhflux/MHFalseSource.cc, mhflux/MHThetaSqN.cc, mhist/MHCamera.[h,cc], 70 mimage/MNewImagePar2.cc, mmuon/MHSingleMuon.cc, 71 mpedestal/MPedCalcFromData.cc 72 - fixed warnings about shadows of parameters 63 73 64 74 -
trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc
r3795 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MMcTriggerLvl2.cc,v 1.14 2006-10-17 17:15:58 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 879 881 Int_t MMcTriggerLvl2::CalcBiggerCellPseudoSize() 880 882 { 881 Int_t fMaxCell=-1;883 Int_t maxcell=-1; 882 884 883 885 fCellPseudoSize=0; … … 889 891 { 890 892 fCellPseudoSize = size; 891 fMaxCell = i;893 maxcell = i; 892 894 } 893 895 } … … 895 897 //*fLog << "fCellPseudoSize = " << fCellPseudoSize << " in cell N. " << fMaxCell+1 << endl; 896 898 897 return fMaxCell;899 return maxcell; 898 900 } 899 901 -
trunk/MagicSoft/Mars/mastro/MAstroCamera.cc
r7784 r8106 1 /*====================================================================== *\ 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MAstroCamera.cc,v 1.30 2006-10-17 17:15:58 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 412 414 if (hasnull) 413 415 { 414 TVector3 star(*radec);415 star *= rot;416 const TVector3 spot = fMirror0->GetReflection( star, fGeom->GetCameraDist())*1000;416 TVector3 vstar(*radec); 417 vstar *= rot; 418 const TVector3 spot = fMirror0->GetReflection(vstar, fGeom->GetCameraDist())*1000; 417 419 DrawStar(spot(0), spot(1), *radec, hasmean?kBlack:-1, Form("x=%.1fmm y=%.1fmm", mean(0), mean(1)), resize); 418 420 // This can be used to get the abberation... -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
r8066 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MAstroCatalog.cc,v 1.28 2006-10-17 17:15:58 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 272 274 } 273 275 274 Int_t add 275 Int_t cnt 276 Int_t line=0;276 Int_t add=0; 277 Int_t cnt=0; 278 Int_t pos=0; 277 279 278 280 Double_t maxmag=0; … … 285 287 break; 286 288 287 line++;289 pos++; 288 290 289 291 if (row[0]=='#') … … 301 303 if (name.IsNull() || r.IsNull() || d.IsNull() || m.IsNull() || epoch.IsNull()) 302 304 { 303 gLog << warn << "Invalid Entry Line #" << line<< ": " << row << endl;305 gLog << warn << "Invalid Entry Line #" << pos << ": " << row << endl; 304 306 continue; 305 307 } -
trunk/MagicSoft/Mars/mbase/MLog.cc
r8103 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MLog.cc,v 1.5 4 2006-10-17 14:11:36tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MLog.cc,v 1.55 2006-10-17 17:15:59 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 763 763 gErrorIgnoreLevel = 0; 764 764 if (gEnv) { 765 TString l evel = gEnv->GetValue("Root.ErrorIgnoreLevel", "Info");766 if (!l evel.CompareTo("Info",TString::kIgnoreCase))765 TString lvl = gEnv->GetValue("Root.ErrorIgnoreLevel", "Info"); 766 if (!lvl.CompareTo("Info",TString::kIgnoreCase)) 767 767 gErrorIgnoreLevel = kInfo; 768 else if (!l evel.CompareTo("Warning",TString::kIgnoreCase))768 else if (!lvl.CompareTo("Warning",TString::kIgnoreCase)) 769 769 gErrorIgnoreLevel = kWarning; 770 else if (!l evel.CompareTo("Error",TString::kIgnoreCase))770 else if (!lvl.CompareTo("Error",TString::kIgnoreCase)) 771 771 gErrorIgnoreLevel = kError; 772 else if (!l evel.CompareTo("Break",TString::kIgnoreCase))772 else if (!lvl.CompareTo("Break",TString::kIgnoreCase)) 773 773 gErrorIgnoreLevel = kBreak; 774 else if (!l evel.CompareTo("SysError",TString::kIgnoreCase))774 else if (!lvl.CompareTo("SysError",TString::kIgnoreCase)) 775 775 gErrorIgnoreLevel = kSysError; 776 else if (!l evel.CompareTo("Fatal",TString::kIgnoreCase))776 else if (!lvl.CompareTo("Fatal",TString::kIgnoreCase)) 777 777 gErrorIgnoreLevel = kFatal; 778 778 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.cc
r5701 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationBlindPix.cc,v 1.15 2006-10-17 17:15:59 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 375 377 { 376 378 377 const Float_t err = fAttErr[fColor];378 379 if ( err < 0.)380 return -1.; 381 382 return err*err*2.3;379 const Float_t ferr = fAttErr[fColor]; 380 381 if (ferr < 0.) 382 return -1.; 383 384 return ferr*ferr*2.3; 383 385 } 384 386 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r7881 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.166 2006-10-17 17:15:59 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 1807 1809 1808 1810 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1809 MCalibrationQEPix &q epix= (MCalibrationQEPix&) (*qecam) [i];1811 MCalibrationQEPix &qpix = (MCalibrationQEPix&) (*qecam) [i]; 1810 1812 MBadPixelsPix &bad = (*badcam) [i]; 1811 1813 … … 1818 1820 const Float_t qerelvar = avphotrelvar + pix.GetPheFFactorMethodRelVar(); 1819 1821 1820 q epix.SetQEFFactor ( qe , fPulserColor );1821 q epix.SetQEFFactorVar ( qerelvar*qe*qe, fPulserColor );1822 q epix.SetFFactorMethodValid( kTRUE , fPulserColor );1823 1824 if (!q epix.UpdateFFactorMethod( qecam->GetPlexiglassQE() ))1822 qpix.SetQEFFactor ( qe , fPulserColor ); 1823 qpix.SetQEFFactorVar ( qerelvar*qe*qe, fPulserColor ); 1824 qpix.SetFFactorMethodValid( kTRUE , fPulserColor ); 1825 1826 if (!qpix.UpdateFFactorMethod( qecam->GetPlexiglassQE() )) 1825 1827 *fLog << warn << GetDescriptor() 1826 1828 << ": Cannot update Quantum efficiencies with the F-Factor Method" << endl; … … 1949 1951 { 1950 1952 1951 MCalibrationChargePix &pix 1952 MCalibrationQEPix &q epix = (MCalibrationQEPix&) (*qecam) [i];1953 MBadPixelsPix &bad 1953 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i]; 1954 MCalibrationQEPix &qpix = (MCalibrationQEPix&) (*qecam) [i]; 1955 MBadPixelsPix &bad = (*badcam) [i]; 1954 1956 1955 1957 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 1956 1958 { 1957 q epix.SetFFactorMethodValid(kFALSE,fPulserColor);1959 qpix.SetFFactorMethodValid(kFALSE,fPulserColor); 1958 1960 pix.SetFFactorMethodValid(kFALSE); 1959 1961 continue; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r7059 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCam.cc,v 1.69 2006-10-17 17:18:40 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 680 682 681 683 682 Bool_t MCalibrationChargeCam::GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t & err, Float_t &ffactor)684 Bool_t MCalibrationChargeCam::GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &ferr, Float_t &ffactor) 683 685 { 684 686 … … 691 693 692 694 mean = conv; 693 err= pix.GetMeanConvFADC2PheErr();695 ferr = pix.GetMeanConvFADC2PheErr(); 694 696 ffactor = pix.GetMeanFFactorFADC2Phot(); 695 697 -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.cc
r7188 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationIntensityChargeCam.cc,v 1.23 2006-10-17 17:15:59 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 266 268 sigerr[cnt] = pheerr; 267 269 268 Double_t sig 270 Double_t sig1 = 0.; 269 271 Double_t sig2 = 0.; 270 272 Int_t num = 0; 271 273 272 for (Int_t i=0; i<cam->GetSize(); i++)273 { 274 const MCalibrationChargePix &pix = (MCalibrationChargePix&)(*cam)[ i];274 for (Int_t j=0; j<cam->GetSize(); j++) 275 { 276 const MCalibrationChargePix &pix = (MCalibrationChargePix&)(*cam)[j]; 275 277 // 276 278 // Don't use bad pixels … … 280 282 // 281 283 // 282 if (aidx != geom[ i].GetAidx())284 if (aidx != geom[j].GetAidx()) 283 285 continue; 284 286 285 sig 287 sig1 += pix.GetConvertedMean(); 286 288 sig2 += pix.GetConvertedMean() * pix.GetConvertedMean(); 287 289 num++; … … 290 292 if (num > 1) 291 293 { 292 sig 293 294 Double_t var = (sig2 - sig *sig*num) / (num-1);295 var /= sig *sig;294 sig1 /= num; 295 296 Double_t var = (sig2 - sig1*sig1*num) / (num-1); 297 var /= sig1*sig1; 296 298 var += pherelvar; 297 299 298 phepersig[cnt] = phe/sig ;300 phepersig[cnt] = phe/sig1; 299 301 if (var > 0.) 300 302 phepersigerr[cnt] = TMath::Sqrt(var) * phepersig[cnt]; … … 1057 1059 for (Int_t i=0; i<GetSize(); i++) 1058 1060 { 1059 MCalibrationChargeCam *c am = (MCalibrationChargeCam*)GetCam(i);1061 MCalibrationChargeCam *ccam = (MCalibrationChargeCam*)GetCam(i); 1060 1062 // 1061 1063 // Get the calibration pix from the calibration cam 1062 1064 // 1063 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*c am)[npix];1065 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*ccam)[npix]; 1064 1066 // 1065 1067 // Don't use bad pixels … … 1096 1098 if (option.Contains("conversionfactor")) 1097 1099 { 1098 const MCalibrationChargePix &apix = (MCalibrationChargePix&)c am->GetAverageArea(0);1100 const MCalibrationChargePix &apix = (MCalibrationChargePix&)ccam->GetAverageArea(0); 1099 1101 pvar = apix.GetPheFFactorMethod()/pix.GetConvertedMean(); 1100 1102 } -
trunk/MagicSoft/Mars/mfbase/MFEventSelector2.cc
r6949 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MFEventSelector2.cc,v 1.10 2006-10-17 17:15:59 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 285 287 // set the nominal distribution equal to the original distribution 286 288 287 const Bool_t fUseOrigDist = fHistNom->GetHist().GetEntries()==0;288 TH1 *hnp = fUseOrigDist ? (TH1*)(fHistOrig->GetHist()).Clone() :289 const Bool_t useorigdist = fHistNom->GetHist().GetEntries()==0; 290 TH1 *hnp = useorigdist ? (TH1*)(fHistOrig->GetHist()).Clone() : 289 291 &fHistNom->GetHist(); 290 292 … … 355 357 } 356 358 357 if ( fUseOrigDist)359 if (useorigdist) 358 360 delete hnp; 359 361 } -
trunk/MagicSoft/Mars/mhbase/MBinning.cc
r7804 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MBinning.cc,v 1.17 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 635 637 *fLog << warn << GetDescriptor() << "::ReadEnv - WARNING: 'Edges' found... ignoring any 'NumBins', 'EdgeLo' and 'EdgeHi'" << endl; 636 638 637 const TString type = GetEnvValue(env, prefix, "Edges", "");639 const TString etype = GetEnvValue(env, prefix, "Edges", ""); 638 640 //type = kIsUserArray; 639 641 /* MISSING */ -
trunk/MagicSoft/Mars/mhbase/MH.cc
r8073 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.31 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 511 513 512 514 TArrayD val(n0-1); 513 TArrayD er r(haserr ? n0-1 : 0);515 TArrayD er(haserr ? n0-1 : 0); 514 516 for (int i=1; i<n0; i++) 515 517 { 516 518 val[i-1] = h.GetBinContent(i+1); 517 519 if (haserr) 518 er r[i-1] = h.GetBinError(i+1);520 er[i-1] = h.GetBinError(i+1); 519 521 } 520 522 … … 530 532 h.SetBinContent(i, val[i-1]); 531 533 if (haserr) 532 h.SetBinError(i, er r[i-1]);534 h.SetBinError(i, er[i-1]); 533 535 } 534 536 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc
r7886 r8106 1 2 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCalibrationHiLoCam.cc,v 1.19 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 3 4 ! 4 5 ! * … … 632 633 if (IsAverageing()) 633 634 { 634 MHCalibrationHiLoPix &histhi = (MHCalibrationHiLoPix&)GetAverageHiGainArea(aidx);635 histhi .FillHivsLo(sighi,siglo);635 MHCalibrationHiLoPix &histhi2 = (MHCalibrationHiLoPix&)GetAverageHiGainArea(aidx); 636 histhi2.FillHivsLo(sighi,siglo); 636 637 } 637 638 -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r7287 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.20 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 393 395 // the same number of bins than for on-data 394 396 // 395 void MHFalseSource::ProjectOff(const TH3D &src, TH2D *h2, TH2D * all)397 void MHFalseSource::ProjectOff(const TH3D &src, TH2D *h2, TH2D *hall) 396 398 { 397 399 TAxis &axe = *src.GetZaxis(); … … 415 417 // Move contents from projection to h2 416 418 h2->Reset(); 417 h2->Add(p, all->GetMaximum());418 h2->Divide( all);419 h2->Add(p, hall->GetMaximum()); 420 h2->Divide(hall); 419 421 420 422 // Delete p … … 434 436 // range (0, fAlphaCut) 435 437 // 436 void MHFalseSource::ProjectOn(const TH3D &src, TH2D *h3, TH2D * all)438 void MHFalseSource::ProjectOn(const TH3D &src, TH2D *h3, TH2D *hall) 437 439 { 438 440 TAxis &axe = *src.GetZaxis(); … … 452 454 // Move contents from projection to h3 453 455 h3->Reset(); 454 h3->Add(p, all->GetMaximum());455 h3->Divide( all);456 h3->Add(p, hall->GetMaximum()); 457 h3->Divide(hall); 456 458 457 459 // Delete p … … 603 605 h->SetTitle(Form("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s)); 604 606 605 TH1D *h 0=0;606 if ((h 0= (TH1D*)gPad->FindObject("AlphaOff_z")))607 TH1D *ho=0; 608 if ((ho = (TH1D*)gPad->FindObject("AlphaOff_z"))) 607 609 { 608 610 fHistOff->ProjectionZ("AlphaOff_z", maxx, maxx, maxy, maxy); 609 611 610 612 /* ============= local scaling ================ */ 611 const Int_t f = h 0->GetXaxis()->FindFixBin(fBgMean-1.5*fAlphaCut);612 const Int_t l = h 0->GetXaxis()->FindFixBin(fAlphaCut*3)+f-1;613 h 0->Scale(h1->Integral(f, l)/h0->Integral(f, l));613 const Int_t f = ho->GetXaxis()->FindFixBin(fBgMean-1.5*fAlphaCut); 614 const Int_t l = ho->GetXaxis()->FindFixBin(fAlphaCut*3)+f-1; 615 ho->Scale(h1->Integral(f, l)/ho->Integral(f, l)); 614 616 615 617 -
trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc
r7784 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHThetaSqN.cc,v 1.8 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 282 284 // 2: 0.346 ~98% 0.260 283 285 284 const Double_t dis t= src0.Mod()*TMath::Sin(rad/2);285 const Double_t cut 286 if (dis t<cut)286 const Double_t dis = src0.Mod()*TMath::Sin(rad/2); 287 const Double_t cut = TMath::Sqrt(fFit.GetSignalIntegralMax()); 288 if (dis<cut) 287 289 { 288 290 *fLog << warn << "WARNING - Source regions overlap: distance "; 289 *fLog << dis t<< " less than theta-sq cut " << cut << "!" << endl;290 if (dis t*1.7<cut*1.0)291 *fLog << dis << " less than theta-sq cut " << cut << "!" << endl; 292 if (dis*1.7<cut*1.0) 291 293 fCounter[3]++; 292 294 else 293 if (dis t*1.7<cut*1.5)295 if (dis*1.7<cut*1.5) 294 296 fCounter[2]++; 295 297 else -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r8022 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.95 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 361 363 // entries with match the given sector are taken into account. 362 364 // 363 Stat_t MHCamera::GetMeanSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all) const365 Stat_t MHCamera::GetMeanSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball) const 364 366 { 365 367 if (fNcells<=1) … … 371 373 for (int i=0; i<fNcells-2; i++) 372 374 { 373 if (( all || IsUsed(i)) && MatchSector(i, sector, aidx))375 if ((ball || IsUsed(i)) && MatchSector(i, sector, aidx)) 374 376 { 375 377 if (TestBit(kProfile) && fBinEntries[i+1]==0) … … 390 392 // entries with match the given sector are taken into account. 391 393 // 392 Stat_t MHCamera::GetRmsSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all) const394 Stat_t MHCamera::GetRmsSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball) const 393 395 { 394 396 if (fNcells<=1) … … 401 403 for (int i=0; i<fNcells-2; i++) 402 404 { 403 if (( all || IsUsed(i)) && MatchSector(i, sector, aidx))405 if ((ball || IsUsed(i)) && MatchSector(i, sector, aidx)) 404 406 { 405 407 if (TestBit(kProfile) && fBinEntries[i+1]==0) … … 429 431 // only pixels with matching sector number are taken into account. 430 432 // 431 Double_t MHCamera::GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all) const433 Double_t MHCamera::GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball) const 432 434 { 433 435 if (fMinimum != -1111) … … 445 447 446 448 const Double_t val = TestBit(kProfile) ? fArray[i+1]/fBinEntries[i+1] : fArray[i+1]; 447 if (MatchSector(i, sector, aidx) && ( all || IsUsed(i)) && val<minimum)449 if (MatchSector(i, sector, aidx) && (ball || IsUsed(i)) && val<minimum) 448 450 minimum = val; 449 451 } … … 458 460 // only pixels with matching sector number are taken into account. 459 461 // 460 Double_t MHCamera::GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all) const462 Double_t MHCamera::GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball) const 461 463 { 462 464 if (fMaximum!=-1111) … … 473 475 474 476 const Double_t val = TestBit(kProfile) ? fArray[i+1]/fBinEntries[i+1] : fArray[i+1]; 475 if (MatchSector(i, sector, aidx) && ( all || IsUsed(i)) && val>maximum)477 if (MatchSector(i, sector, aidx) && (ball || IsUsed(i)) && val>maximum) 476 478 maximum = val; 477 479 } -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r8066 r8106 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.h,v 1.60 2006-10-17 17:16:00 tbretz Exp $ 3 \* ======================================================================== */ 1 4 #ifndef MARS_MHCamera 2 5 #define MARS_MHCamera … … 172 175 Stat_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(binx); } 173 176 174 Double_t GetMinimum(Bool_t all) const { return GetMinimumSectors(TArrayI(), TArrayI(),all); }175 Double_t GetMaximum(Bool_t all) const { return GetMaximumSectors(TArrayI(), TArrayI(),all); }177 Double_t GetMinimum(Bool_t ball) const { return GetMinimumSectors(TArrayI(), TArrayI(), ball); } 178 Double_t GetMaximum(Bool_t ball) const { return GetMaximumSectors(TArrayI(), TArrayI(), ball); } 176 179 177 180 Double_t GetMinimum(Double_t gt) const { return GetMinimumSectors(TArrayI(), TArrayI(), kFALSE); } // FIXME: To be done: Minimum greater than … … 181 184 Double_t GetMaximum() const { return GetMaximum(0.0); } // FIXME: To be done: Maximum lower than 182 185 183 Double_t GetMinimumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const184 { 185 return GetMinimumSectors(TArrayI(1, §or), TArrayI(1, &aidx), all);186 } 187 Double_t GetMaximumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const188 { 189 return GetMaximumSectors(TArrayI(1, §or), TArrayI(1, &aidx), all);190 } 191 Double_t GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all=kFALSE) const;192 Double_t GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t all=kFALSE) const;186 Double_t GetMinimumSector(Int_t sector, Int_t aidx, Bool_t ball=kFALSE) const 187 { 188 return GetMinimumSectors(TArrayI(1, §or), TArrayI(1, &aidx), ball); 189 } 190 Double_t GetMaximumSector(Int_t sector, Int_t aidx, Bool_t ball=kFALSE) const 191 { 192 return GetMaximumSectors(TArrayI(1, §or), TArrayI(1, &aidx), ball); 193 } 194 Double_t GetMinimumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball=kFALSE) const; 195 Double_t GetMaximumSectors(const TArrayI §or, const TArrayI &aidx, Bool_t ball=kFALSE) const; 193 196 194 197 void SetLevels(const TArrayF &arr); … … 236 239 void AddNotify(TObject *event); 237 240 238 Stat_t GetMean(Bool_t all) const { return GetMeanSectors(TArrayI(), TArrayI(),all); }239 Stat_t GetRMS(Bool_t all) const { return GetRmsSectors(TArrayI(), TArrayI(),all); }241 Stat_t GetMean(Bool_t ball) const { return GetMeanSectors(TArrayI(), TArrayI(), ball); } 242 Stat_t GetRMS(Bool_t ball) const { return GetRmsSectors(TArrayI(), TArrayI(), ball); } 240 243 241 244 Stat_t GetMean(Int_t=0) const { return GetMeanSectors(TArrayI(), TArrayI(), kFALSE); } … … 245 248 Stat_t GetMedianDev() const; 246 249 247 Stat_t GetMeanSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const248 { 249 return GetMeanSectors(TArrayI(1, §or), TArrayI(1, &aidx), all);250 } 251 Stat_t GetRmsSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const252 { 253 return GetRmsSectors(TArrayI(1, §or), TArrayI(1, &aidx), all);250 Stat_t GetMeanSector(Int_t sector, Int_t aidx, Bool_t ball=kFALSE) const 251 { 252 return GetMeanSectors(TArrayI(1, §or), TArrayI(1, &aidx), ball); 253 } 254 Stat_t GetRmsSector(Int_t sector, Int_t aidx, Bool_t ball=kFALSE) const 255 { 256 return GetRmsSectors(TArrayI(1, §or), TArrayI(1, &aidx), ball); 254 257 } 255 258 -
trunk/MagicSoft/Mars/mimage/MNewImagePar2.cc
r6869 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MNewImagePar2.cc,v 1.2 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 109 111 } 110 112 111 for (Int_t n=0; idx[n]>=0; n++)113 for (Int_t m=0; idx[m]>=0; m++) 112 114 { 113 const Int_t l = idx[ n];115 const Int_t l = idx[m]; 114 116 115 117 const MGeomPix &gpix = geom[l]; -
trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc
r7369 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.13 2006-10-17 17:16:00 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 289 291 } 290 292 293 Bool_t MHSingleMuon::AsciiWrite(ostream &out) const 294 { 295 out << fTxtMuon;; 296 return kTRUE; 297 } 298 291 299 // -------------------------------------------------------------------------- 292 300 // … … 419 427 chi = f1.GetChisquare()/f1.GetNDF(); 420 428 421 Double_t err;422 gMinuit->GetParameter(2, width, err); // get the sigma value429 Double_t ferr; 430 gMinuit->GetParameter(2, width, ferr); // get the sigma value 423 431 424 432 return kTRUE; -
trunk/MagicSoft/Mars/mpedestal/MPedCalcFromData.cc
r4362 r8106 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromData.cc,v 1.3 2006-10-17 17:16:01 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 2 4 ! 3 5 ! * … … 172 174 const ULong_t n = fWindowSizeLoGain*fDump; 173 175 174 const Float_t sum 176 const Float_t sum1 = fSumx.At(idx); 175 177 const Float_t sum2 = fSumx2.At(idx); 176 const Float_t higainped = sum /n;178 const Float_t higainped = sum1/n; 177 179 178 180 // 1. Calculate the Variance of the sums: 179 Float_t higainVar = (sum2-sum *sum/fDump)/(fDump-1.);181 Float_t higainVar = (sum2-sum1*sum1/fDump)/(fDump-1.); 180 182 // 2. Scale the variance to the number of slices: 181 183 higainVar /= (Float_t)(fWindowSizeLoGain); -
trunk/MagicSoft/Mars/sinope.cc
r8088 r8106 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: sinope.cc,v 1.12 2006-10-17 17:15:58 tbretz Exp $ 3 ! -------------------------------------------------------------------------- 4 ! 5 ! * 6 ! * This file is part of MARS, the MAGIC Analysis and Reconstruction 7 ! * Software. It is distributed to you in the hope that it can be a useful 8 ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes. 9 ! * It is distributed WITHOUT ANY WARRANTY. 10 ! * 11 ! * Permission to use, copy, modify and distribute this software and its 12 ! * documentation for any purpose is hereby granted without fee, 13 ! * provided that the above copyright notice appear in all copies and 14 ! * that both that copyright notice and this permission notice appear 15 ! * in supporting documentation. It is provided "as is" without express 16 ! * or implied warranty. 17 ! * 18 ! 19 ! 20 ! Author(s): Thomas Bretz 21 ! Author(s): Daniela Doener 22 ! 23 ! Copyright: MAGIC Software Development, 2000-2006 24 ! 25 ! 26 \* ======================================================================== */ 1 27 #include <errno.h> 2 28 #include <fstream> … … 251 277 } 252 278 253 static void PrintFiles(const MSequence &seq, const TString &kInpathD, Bool_t all)254 { 255 const char *prep = all ? "Found" : "Scheduled";279 static void PrintFiles(const MSequence &seq, const TString &kInpathD, Bool_t ball) 280 { 281 const char *prep = ball ? "Found" : "Scheduled"; 256 282 257 283 MDirIter Next; … … 260 286 gLog << all; 261 287 gLog.Separator(Form("%s Files", prep)); 262 Next.Print( all?"all":"");288 Next.Print(ball?"all":""); 263 289 gLog << endl; 264 290 }
Note:
See TracChangeset
for help on using the changeset viewer.