CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
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().

22 {
23  phi = phi < 0 ? phi + 2.*TMath::Pi() : phi ;
24  float phi_degrees = phi * (360.) / ( 2. * TMath::Pi() ) ;
25  int iPhi = (int) ( phi_degrees + 1.);
26 
27  return iPhi < 361 ? iPhi : 360 ;
28 }
const double Pi
Geom::Phi< T > phi() const
int Phi_To_HcaliPhi ( float  phi)

Definition at line 12 of file GlobalHaloAlgo.cc.

References phi, and Pi.

Referenced by GlobalHaloAlgo::Calculate().

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