Changeset 1880 for trunk/MagicSoft/Mars/manalysis/MSigmabar.cc
- Timestamp:
- 03/31/03 10:37:56 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MSigmabar.cc
r1748 r1880 91 91 Int_t outerPixels[6] = {0,0,0,0,0,0}; 92 92 93 Int_t currentSector;94 Float_t angle;95 96 93 // sum up sigma**2 for each sector, separately for inner and outer region; 97 94 // all pixels are renormalized to the area of pixel 0 … … 117 114 118 115 Int_t j = cerpix.GetPixId(); 119 Double_t Area = geom.GetPixRatio(j);116 Double_t area = geom.GetPixRatio(j); 120 117 121 118 const MGeomPix &gpix = geom[j]; … … 125 122 //if (angle<0.0) angle+=6.0; 126 123 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; 130 128 131 129 // count only those pixels which have a sigma != 0.0 … … 134 132 if ( sigma != 0.0 ) 135 133 { 136 if ( Area < 1.5)134 if (area < 1.5) 137 135 { 138 136 innerPixels[currentSector]++; 139 innerSquaredSum[currentSector]+= sigma*sigma / Area;137 innerSquaredSum[currentSector]+= sigma*sigma / area; 140 138 } 141 139 else 142 140 { 143 141 outerPixels[currentSector]++; 144 outerSquaredSum[currentSector]+= sigma*sigma / Area;142 outerSquaredSum[currentSector]+= sigma*sigma / area; 145 143 } 146 144 } … … 191 189 } 192 190 193 return (fSigmabar);191 return fSigmabar; 194 192 } 195 193
Note:
See TracChangeset
for help on using the changeset viewer.