Ignore:
Timestamp:
03/31/03 10:37:56 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MSigmabar.cc

    r1748 r1880  
    9191  Int_t outerPixels[6]       = {0,0,0,0,0,0};
    9292
    93   Int_t currentSector;
    94   Float_t angle;
    95  
    9693  // sum up sigma**2 for each sector, separately for inner and outer region;
    9794  // all pixels are renormalized to the area of pixel 0
     
    117114
    118115      Int_t j = cerpix.GetPixId();
    119       Double_t Area = geom.GetPixRatio(j);
     116      Double_t area = geom.GetPixRatio(j);
    120117
    121118      const MGeomPix    &gpix = geom[j];
     
    125122      //if (angle<0.0) angle+=6.0;
    126123
    127       angle = 6.0*atan2(gpix.GetY(),gpix.GetX()) / (2.0*TMath::Pi());
    128       if (angle<0.0) angle+=6.0;
    129       currentSector=(Int_t)angle;
     124      Float_t angle = atan2(gpix.GetY(),gpix.GetX())*6 / (TMath::Pi()*2);
     125      if (angle<0) angle+=6;
     126
     127      Int_t currentSector=(Int_t)angle;
    130128       
    131129      // count only those pixels which have a sigma != 0.0
     
    134132      if ( sigma != 0.0 )
    135133      { 
    136         if (Area < 1.5)
     134        if (area < 1.5)
    137135        {
    138136          innerPixels[currentSector]++;
    139           innerSquaredSum[currentSector]+= sigma*sigma / Area;
     137          innerSquaredSum[currentSector]+= sigma*sigma / area;
    140138        }
    141139        else
    142140        {
    143141          outerPixels[currentSector]++;
    144           outerSquaredSum[currentSector]+= sigma*sigma / Area;
     142          outerSquaredSum[currentSector]+= sigma*sigma / area;
    145143        }
    146144      }
     
    191189  }
    192190   
    193   return (fSigmabar);
     191  return fSigmabar;
    194192}
    195193
Note: See TracChangeset for help on using the changeset viewer.