Changeset 8106 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
10/17/06 18:18:40 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8104 r8106  
    6161   * mhist/MHRate.cc:
    6262     - 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
    6373
    6474
  • trunk/MagicSoft/Mars/manalysis/MMcTriggerLvl2.cc

    r3795 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MMcTriggerLvl2.cc,v 1.14 2006-10-17 17:15:58 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    879881Int_t MMcTriggerLvl2::CalcBiggerCellPseudoSize()
    880882{
    881   Int_t fMaxCell=-1;
     883  Int_t maxcell=-1;
    882884
    883885  fCellPseudoSize=0;
     
    889891        {
    890892          fCellPseudoSize = size;
    891           fMaxCell = i;
     893          maxcell = i;
    892894        }
    893895    }
     
    895897  //*fLog << "fCellPseudoSize = " << fCellPseudoSize << " in cell N. " << fMaxCell+1 << endl;
    896898
    897   return fMaxCell;
     899  return maxcell;
    898900}
    899901
  • 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! --------------------------------------------------------------------------
    24!
    35! *
     
    412414        if (hasnull)
    413415        {
    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;
    417419            DrawStar(spot(0), spot(1), *radec, hasmean?kBlack:-1, Form("x=%.1fmm y=%.1fmm", mean(0), mean(1)), resize);
    418420            // This can be used to get the abberation...
  • trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc

    r8066 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MAstroCatalog.cc,v 1.28 2006-10-17 17:15:58 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    272274    }
    273275
    274     Int_t add =0;
    275     Int_t cnt =0;
    276     Int_t line=0;
     276    Int_t add=0;
     277    Int_t cnt=0;
     278    Int_t pos=0;
    277279
    278280    Double_t maxmag=0;
     
    285287            break;
    286288
    287         line++;
     289        pos++;
    288290
    289291        if (row[0]=='#')
     
    301303        if (name.IsNull() || r.IsNull() || d.IsNull() || m.IsNull() || epoch.IsNull())
    302304        {
    303             gLog << warn << "Invalid Entry Line #" << line << ": " << row << endl;
     305            gLog << warn << "Invalid Entry Line #" << pos << ": " << row << endl;
    304306            continue;
    305307        }
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r8103 r8106  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MLog.cc,v 1.54 2006-10-17 14:11:36 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MLog.cc,v 1.55 2006-10-17 17:15:59 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    763763      gErrorIgnoreLevel = 0;
    764764      if (gEnv) {
    765          TString level = gEnv->GetValue("Root.ErrorIgnoreLevel", "Info");
    766          if (!level.CompareTo("Info",TString::kIgnoreCase))
     765         TString lvl = gEnv->GetValue("Root.ErrorIgnoreLevel", "Info");
     766         if (!lvl.CompareTo("Info",TString::kIgnoreCase))
    767767            gErrorIgnoreLevel = kInfo;
    768          else if (!level.CompareTo("Warning",TString::kIgnoreCase))
     768         else if (!lvl.CompareTo("Warning",TString::kIgnoreCase))
    769769            gErrorIgnoreLevel = kWarning;
    770          else if (!level.CompareTo("Error",TString::kIgnoreCase))
     770         else if (!lvl.CompareTo("Error",TString::kIgnoreCase))
    771771            gErrorIgnoreLevel = kError;
    772          else if (!level.CompareTo("Break",TString::kIgnoreCase))
     772         else if (!lvl.CompareTo("Break",TString::kIgnoreCase))
    773773            gErrorIgnoreLevel = kBreak;
    774          else if (!level.CompareTo("SysError",TString::kIgnoreCase))
     774         else if (!lvl.CompareTo("SysError",TString::kIgnoreCase))
    775775            gErrorIgnoreLevel = kSysError;
    776          else if (!level.CompareTo("Fatal",TString::kIgnoreCase))
     776         else if (!lvl.CompareTo("Fatal",TString::kIgnoreCase))
    777777            gErrorIgnoreLevel = kFatal;
    778778      }
  • trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.cc

    r5701 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MCalibrationBlindPix.cc,v 1.15 2006-10-17 17:15:59 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    375377{
    376378
    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;
    383385}
    384386
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r7881 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.166 2006-10-17 17:15:59 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    18071809     
    18081810      MCalibrationChargePix &pix   = (MCalibrationChargePix&)(*chargecam)[i];
    1809       MCalibrationQEPix     &qepix = (MCalibrationQEPix&)    (*qecam)    [i];
     1811      MCalibrationQEPix     &qpix = (MCalibrationQEPix&)    (*qecam)    [i];
    18101812      MBadPixelsPix         &bad   =                         (*badcam)   [i];
    18111813
     
    18181820      const Float_t qerelvar = avphotrelvar +  pix.GetPheFFactorMethodRelVar();
    18191821
    1820       qepix.SetQEFFactor    ( qe            , fPulserColor );
    1821       qepix.SetQEFFactorVar ( qerelvar*qe*qe, fPulserColor );     
    1822       qepix.SetFFactorMethodValid(  kTRUE   , fPulserColor );
    1823 
    1824       if (!qepix.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() ))
    18251827        *fLog << warn << GetDescriptor()
    18261828              << ": Cannot update Quantum efficiencies with the F-Factor Method" << endl;
     
    19491951    {
    19501952     
    1951       MCalibrationChargePix &pix   = (MCalibrationChargePix&)(*chargecam)[i];
    1952       MCalibrationQEPix     &qepix = (MCalibrationQEPix&)    (*qecam)    [i];
    1953       MBadPixelsPix         &bad   =                         (*badcam)   [i];
     1953      MCalibrationChargePix &pix  = (MCalibrationChargePix&)(*chargecam)[i];
     1954      MCalibrationQEPix     &qpix = (MCalibrationQEPix&)    (*qecam)    [i];
     1955      MBadPixelsPix         &bad  =                         (*badcam)   [i];
    19541956
    19551957      if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
    19561958        {
    1957           qepix.SetFFactorMethodValid(kFALSE,fPulserColor);
     1959          qpix.SetFFactorMethodValid(kFALSE,fPulserColor);
    19581960          pix.SetFFactorMethodValid(kFALSE);
    19591961          continue;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r7059 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCam.cc,v 1.69 2006-10-17 17:18:40 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    680682
    681683
    682 Bool_t MCalibrationChargeCam::GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &ffactor)
     684Bool_t MCalibrationChargeCam::GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &ferr, Float_t &ffactor)
    683685{
    684686
     
    691693
    692694  mean    = conv;
    693   err     = pix.GetMeanConvFADC2PheErr();
     695  ferr    = pix.GetMeanConvFADC2PheErr();
    694696  ffactor = pix.GetMeanFFactorFADC2Phot();
    695697
  • trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityChargeCam.cc

    r7188 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MCalibrationIntensityChargeCam.cc,v 1.23 2006-10-17 17:15:59 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    266268      sigerr[cnt]    = pheerr;
    267269
    268       Double_t sig  = 0.;
     270      Double_t sig1 = 0.;
    269271      Double_t sig2 = 0.;
    270272      Int_t    num  = 0;
    271273
    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];
    275277          //
    276278          // Don't use bad pixels
     
    280282          //
    281283          //
    282           if (aidx != geom[i].GetAidx())
     284          if (aidx != geom[j].GetAidx())
    283285            continue;
    284286         
    285           sig  += pix.GetConvertedMean();
     287          sig1 += pix.GetConvertedMean();
    286288          sig2 += pix.GetConvertedMean() * pix.GetConvertedMean();
    287289          num++;
     
    290292      if (num > 1)
    291293        {
    292           sig          /= num;
    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;
    296298          var += pherelvar;
    297299
    298           phepersig[cnt] = phe/sig;
     300          phepersig[cnt] = phe/sig1;
    299301          if (var > 0.)
    300302            phepersigerr[cnt] = TMath::Sqrt(var) * phepersig[cnt];
     
    10571059      for (Int_t i=0; i<GetSize(); i++)
    10581060        {
    1059           MCalibrationChargeCam *cam = (MCalibrationChargeCam*)GetCam(i);
     1061          MCalibrationChargeCam *ccam = (MCalibrationChargeCam*)GetCam(i);
    10601062          //
    10611063          // Get the calibration pix from the calibration cam
    10621064          //
    1063           MCalibrationChargePix &pix = (MCalibrationChargePix&)(*cam)[npix];
     1065          MCalibrationChargePix &pix = (MCalibrationChargePix&)(*ccam)[npix];
    10641066          //
    10651067          // Don't use bad pixels
     
    10961098          if (option.Contains("conversionfactor"))
    10971099          {
    1098               const MCalibrationChargePix &apix = (MCalibrationChargePix&)cam->GetAverageArea(0);
     1100              const MCalibrationChargePix &apix = (MCalibrationChargePix&)ccam->GetAverageArea(0);
    10991101              pvar = apix.GetPheFFactorMethod()/pix.GetConvertedMean();
    11001102          }
  • trunk/MagicSoft/Mars/mfbase/MFEventSelector2.cc

    r6949 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MFEventSelector2.cc,v 1.10 2006-10-17 17:15:59 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    285287    // set the nominal distribution equal to the original distribution
    286288
    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() :
    289291                              &fHistNom->GetHist();
    290292
     
    355357    }
    356358
    357     if (fUseOrigDist)
     359    if (useorigdist)
    358360      delete hnp;
    359361}
  • trunk/MagicSoft/Mars/mhbase/MBinning.cc

    r7804 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MBinning.cc,v 1.17 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    635637            *fLog << warn << GetDescriptor() << "::ReadEnv - WARNING: 'Edges' found... ignoring any 'NumBins', 'EdgeLo' and 'EdgeHi'" << endl;
    636638
    637         const TString type = GetEnvValue(env, prefix, "Edges", "");
     639        const TString etype = GetEnvValue(env, prefix, "Edges", "");
    638640        //type = kIsUserArray;
    639641        /* MISSING */
  • trunk/MagicSoft/Mars/mhbase/MH.cc

    r8073 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MH.cc,v 1.31 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    511513
    512514    TArrayD val(n0-1);
    513     TArrayD err(haserr ? n0-1 : 0);
     515    TArrayD er(haserr ? n0-1 : 0);
    514516    for (int i=1; i<n0; i++)
    515517    {
    516518        val[i-1] = h.GetBinContent(i+1);
    517519        if (haserr)
    518             err[i-1] = h.GetBinError(i+1);
     520            er[i-1] = h.GetBinError(i+1);
    519521    }
    520522
     
    530532        h.SetBinContent(i, val[i-1]);
    531533        if (haserr)
    532             h.SetBinError(i, err[i-1]);
     534            h.SetBinError(i, er[i-1]);
    533535    }
    534536}
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc

    r7886 r8106  
    1 
    21/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHCalibrationHiLoCam.cc,v 1.19 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    34!
    45! *
     
    632633      if (IsAverageing())
    633634        {
    634           MHCalibrationHiLoPix &histhi = (MHCalibrationHiLoPix&)GetAverageHiGainArea(aidx);
    635           histhi.FillHivsLo(sighi,siglo);
     635          MHCalibrationHiLoPix &histhi2 = (MHCalibrationHiLoPix&)GetAverageHiGainArea(aidx);
     636          histhi2.FillHivsLo(sighi,siglo);
    636637        }
    637638
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r7287 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.20 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    393395// the same number of bins than for on-data
    394396//
    395 void MHFalseSource::ProjectOff(const TH3D &src, TH2D *h2, TH2D *all)
     397void MHFalseSource::ProjectOff(const TH3D &src, TH2D *h2, TH2D *hall)
    396398{
    397399    TAxis &axe = *src.GetZaxis();
     
    415417    // Move contents from projection to h2
    416418    h2->Reset();
    417     h2->Add(p, all->GetMaximum());
    418     h2->Divide(all);
     419    h2->Add(p, hall->GetMaximum());
     420    h2->Divide(hall);
    419421
    420422    // Delete p
     
    434436// range (0, fAlphaCut)
    435437//
    436 void MHFalseSource::ProjectOn(const TH3D &src, TH2D *h3, TH2D *all)
     438void MHFalseSource::ProjectOn(const TH3D &src, TH2D *h3, TH2D *hall)
    437439{
    438440    TAxis &axe = *src.GetZaxis();
     
    452454    // Move contents from projection to h3
    453455    h3->Reset();
    454     h3->Add(p, all->GetMaximum());
    455     h3->Divide(all);
     456    h3->Add(p, hall->GetMaximum());
     457    h3->Divide(hall);
    456458
    457459    // Delete p
     
    603605            h->SetTitle(Form("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s));
    604606
    605             TH1D *h0=0;
    606             if ((h0 = (TH1D*)gPad->FindObject("AlphaOff_z")))
     607            TH1D *ho=0;
     608            if ((ho = (TH1D*)gPad->FindObject("AlphaOff_z")))
    607609            {
    608610                fHistOff->ProjectionZ("AlphaOff_z", maxx, maxx, maxy, maxy);
    609611
    610612                /* ============= local scaling ================ */
    611                 const Int_t f = h0->GetXaxis()->FindFixBin(fBgMean-1.5*fAlphaCut);
    612                 const Int_t l = h0->GetXaxis()->FindFixBin(fAlphaCut*3)+f-1;
    613                 h0->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));
    614616
    615617
  • trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc

    r7784 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHThetaSqN.cc,v 1.8 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    282284        //  2: 0.346  ~98%   0.260
    283285
    284         const Double_t dist = src0.Mod()*TMath::Sin(rad/2);
    285         const Double_t cut  = TMath::Sqrt(fFit.GetSignalIntegralMax());
    286         if (dist<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)
    287289        {
    288290            *fLog << warn << "WARNING - Source regions overlap: distance ";
    289             *fLog << dist << " less than theta-sq cut " << cut << "!" << endl;
    290             if (dist*1.7<cut*1.0)
     291            *fLog << dis << " less than theta-sq cut " << cut << "!" << endl;
     292            if (dis*1.7<cut*1.0)
    291293                fCounter[3]++;
    292294            else
    293                 if (dist*1.7<cut*1.5)
     295                if (dis*1.7<cut*1.5)
    294296                    fCounter[2]++;
    295297                else
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r8022 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.95 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    361363// entries with match the given sector are taken into account.
    362364//
    363 Stat_t MHCamera::GetMeanSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t all) const
     365Stat_t MHCamera::GetMeanSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball) const
    364366{
    365367    if (fNcells<=1)
     
    371373    for (int i=0; i<fNcells-2; i++)
    372374    {
    373         if ((all || IsUsed(i)) && MatchSector(i, sector, aidx))
     375        if ((ball || IsUsed(i)) && MatchSector(i, sector, aidx))
    374376        {
    375377            if (TestBit(kProfile) && fBinEntries[i+1]==0)
     
    390392// entries with match the given sector are taken into account.
    391393//
    392 Stat_t MHCamera::GetRmsSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t all) const
     394Stat_t MHCamera::GetRmsSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball) const
    393395{
    394396    if (fNcells<=1)
     
    401403    for (int i=0; i<fNcells-2; i++)
    402404    {
    403         if ((all || IsUsed(i)) && MatchSector(i, sector, aidx))
     405        if ((ball || IsUsed(i)) && MatchSector(i, sector, aidx))
    404406        {
    405407            if (TestBit(kProfile) && fBinEntries[i+1]==0)
     
    429431// only pixels with matching sector number are taken into account.
    430432//
    431 Double_t MHCamera::GetMinimumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t all) const
     433Double_t MHCamera::GetMinimumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball) const
    432434{
    433435    if (fMinimum != -1111)
     
    445447
    446448        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)
    448450            minimum = val;
    449451    }
     
    458460// only pixels with matching sector number are taken into account.
    459461//
    460 Double_t MHCamera::GetMaximumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t all) const
     462Double_t MHCamera::GetMaximumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball) const
    461463{
    462464    if (fMaximum!=-1111)
     
    473475
    474476        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)
    476478            maximum = val;
    477479    }
  • 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\* ======================================================================== */
    14#ifndef MARS_MHCamera
    25#define MARS_MHCamera
     
    172175    Stat_t   GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(binx); }
    173176
    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); }
    176179
    177180    Double_t GetMinimum(Double_t gt) const { return GetMinimumSectors(TArrayI(), TArrayI(), kFALSE); } // FIXME: To be done: Minimum greater than
     
    181184    Double_t GetMaximum() const { return GetMaximum(0.0); } // FIXME: To be done: Maximum lower than
    182185
    183     Double_t GetMinimumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const
    184     {
    185         return GetMinimumSectors(TArrayI(1, &sector), TArrayI(1, &aidx), all);
    186     }
    187     Double_t GetMaximumSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const
    188     {
    189         return GetMaximumSectors(TArrayI(1, &sector), TArrayI(1, &aidx), all);
    190     }
    191     Double_t GetMinimumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t all=kFALSE) const;
    192     Double_t GetMaximumSectors(const TArrayI &sector, 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, &sector), 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, &sector), TArrayI(1, &aidx), ball);
     193    }
     194    Double_t GetMinimumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball=kFALSE) const;
     195    Double_t GetMaximumSectors(const TArrayI &sector, const TArrayI &aidx, Bool_t ball=kFALSE) const;
    193196
    194197    void     SetLevels(const TArrayF &arr);
     
    236239    void     AddNotify(TObject *event);
    237240
    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); }
    240243
    241244    Stat_t   GetMean(Int_t=0) const { return GetMeanSectors(TArrayI(), TArrayI(), kFALSE); }
     
    245248    Stat_t   GetMedianDev() const;
    246249
    247     Stat_t   GetMeanSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const
    248     {
    249         return GetMeanSectors(TArrayI(1, &sector), TArrayI(1, &aidx), all);
    250     }
    251     Stat_t   GetRmsSector(Int_t sector, Int_t aidx, Bool_t all=kFALSE) const
    252     {
    253         return GetRmsSectors(TArrayI(1, &sector), 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, &sector), 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, &sector), TArrayI(1, &aidx), ball);
    254257    }
    255258
  • trunk/MagicSoft/Mars/mimage/MNewImagePar2.cc

    r6869 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MNewImagePar2.cc,v 1.2 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    109111    }
    110112
    111     for (Int_t n=0; idx[n]>=0; n++)
     113    for (Int_t m=0; idx[m]>=0; m++)
    112114    {
    113         const Int_t l = idx[n];
     115        const Int_t l = idx[m];
    114116
    115117        const MGeomPix &gpix = geom[l];
  • trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc

    r7369 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHSingleMuon.cc,v 1.13 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    289291}
    290292
     293Bool_t MHSingleMuon::AsciiWrite(ostream &out) const
     294{
     295    out << fTxtMuon;;
     296    return kTRUE;
     297}
     298
    291299// --------------------------------------------------------------------------
    292300//
     
    419427    chi = f1.GetChisquare()/f1.GetNDF();
    420428
    421     Double_t err;
    422     gMinuit->GetParameter(2, width, err); // get the sigma value
     429    Double_t ferr;
     430    gMinuit->GetParameter(2, width, ferr); // get the sigma value
    423431
    424432    return kTRUE;
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromData.cc

    r4362 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MPedCalcFromData.cc,v 1.3 2006-10-17 17:16:01 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    172174              const ULong_t n     = fWindowSizeLoGain*fDump;
    173175
    174               const Float_t sum  = fSumx.At(idx);
     176              const Float_t sum1 = fSumx.At(idx);
    175177              const Float_t sum2 = fSumx2.At(idx);
    176               const Float_t higainped = sum/n;       
     178              const Float_t higainped = sum1/n;
    177179
    178180              // 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.);
    180182              // 2. Scale the variance to the number of slices:
    181183              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\* ======================================================================== */
    127#include <errno.h>
    228#include <fstream>
     
    251277}
    252278
    253 static void PrintFiles(const MSequence &seq, const TString &kInpathD, Bool_t all)
    254 {
    255     const char *prep = all ? "Found" : "Scheduled";
     279static void PrintFiles(const MSequence &seq, const TString &kInpathD, Bool_t ball)
     280{
     281    const char *prep = ball ? "Found" : "Scheduled";
    256282
    257283    MDirIter Next;
     
    260286    gLog << all;
    261287    gLog.Separator(Form("%s Files", prep));
    262     Next.Print(all?"all":"");
     288    Next.Print(ball?"all":"");
    263289    gLog << endl;
    264290}
Note: See TracChangeset for help on using the changeset viewer.