test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Enumerations | Functions
GlobalHaloAlgo.cc File Reference
#include "RecoMET/METAlgorithms/interface/GlobalHaloAlgo.h"

Go to the source code of this file.

Enumerations

enum  detectorregion { EB, EE, HB, HE }
 

Functions

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

Enumeration Type Documentation

Enumerator
EB 
EE 
HB 
HE 

Definition at line 15 of file GlobalHaloAlgo.cc.

15 {EB,EE,HB,HE};

Function Documentation

int Phi_To_EcaliPhi ( float  phi)

Definition at line 25 of file GlobalHaloAlgo.cc.

References Pi.

Referenced by GlobalHaloAlgo::Calculate().

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

Definition at line 16 of file GlobalHaloAlgo.cc.

References Pi.

Referenced by GlobalHaloAlgo::Calculate().

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