CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/RecoMET/METAlgorithms/src/GlobalHaloAlgo.cc File Reference

#include "RecoMET/METAlgorithms/interface/GlobalHaloAlgo.h"

Go to the source code of this file.

Functions

int Phi_To_EcaliPhi (float phi)
int Phi_To_HcaliPhi (float phi)

Function Documentation

int Phi_To_EcaliPhi ( float  phi)

Definition at line 21 of file GlobalHaloAlgo.cc.

References phi, and Pi.

Referenced by GlobalHaloAlgo::Calculate().

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

Definition at line 12 of file GlobalHaloAlgo.cc.

References phi, and Pi.

Referenced by GlobalHaloAlgo::Calculate().

{
  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 ;
}