Changeset 3529


Ignore:
Timestamp:
03/17/04 10:22:59 (21 years ago)
Author:
wittek
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r3522 r3529  
    149149        const MGeomPix &gpix = geom[idx];
    150150
    151         Int_t sector = (Int_t)(atan2(gpix.GetY(),gpix.GetX())*6
    152                        / (TMath::Pi()*2));
    153         if (sector<0)
    154             sector+=6;
     151        // This is wrong : rounding has to be done on positive values
     152        //Int_t sector = (Int_t)(atan2(gpix.GetY(),gpix.GetX())*6
     153        //               / (TMath::Pi()*2));
     154        //if (sector<0)
     155        //    sector+=6;
     156
     157        Float_t sectorf = atan2(gpix.GetY(),gpix.GetX()) * 6.0
     158                          / (TMath::Pi()*2);
     159        if (sectorf < 0.0)
     160          sectorf += 6.0;
     161        Int_t sector = (Int_t)sectorf;
    155162
    156163        // count only those pixels which have a sigma != 0.0
     
    207214    }
    208215
    209     //TString opt = "";
    210     //Print(opt);
     216    TString opt = "";
     217    Print(opt);
    211218
    212219  return fSigmabar;
Note: See TracChangeset for help on using the changeset viewer.