CMS 3D CMS Logo

Functions
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 createfilelist::int, and Pi.

Referenced by BeamHaloAnalyzer::analyze().

11 {
12  phi = phi < 0 ? phi + 2.*TMath::Pi() : phi ;
13  float phi_degrees = phi * (360.) / ( 2. * TMath::Pi() ) ;
14  int iPhi = (int) ( ( phi_degrees/5. ) + 1.);
15 
16  return iPhi < 73 ? iPhi : 73 ;
17 }
const double Pi