CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_3_0/src/DQMOffline/JetMET/src/BeamHaloAnalyzer.cc File Reference

#include "DQMOffline/JetMET/interface/BeamHaloAnalyzer.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

Go to the source code of this file.

Functions

int Phi_To_iPhi (float phi)

Function Documentation

int Phi_To_iPhi ( float  phi)

Definition at line 10 of file BeamHaloAnalyzer.cc.

References phi, and Pi.

Referenced by BeamHaloAnalyzer::analyze().

{
  phi = phi < 0 ? phi + 2.*TMath::Pi() : phi ;
  float phi_degrees = phi * (360.) / ( 2. * TMath::Pi() ) ;
  int iPhi = (int) ( ( phi_degrees/5. ) + 1.);
   
  return iPhi < 73 ? iPhi : 73 ;
}