CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
EgammaIsoHcalDetIdCollectionProducer.cc File Reference
#include "RecoEgamma/EgammaIsolationAlgos/plugins/EgammaIsoHcalDetIdCollectionProducer.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "DataFormats/DetId/interface/DetIdCollection.h"
#include "Geometry/Records/interface/CaloGeometryRecord.h"

Go to the source code of this file.

Functions

int calDIEta (int iEta1, int iEta2)
 
int calDIPhi (int iPhi1, int iPhi2)
 

Function Documentation

int calDIEta ( int  iEta1,
int  iEta2 
)

Definition at line 105 of file EgammaIsoHcalDetIdCollectionProducer.cc.

Referenced by EgammaIsoHcalDetIdCollectionProducer::addDetIds().

106 {
107 
108  int dEta = iEta1-iEta2;
109  if(iEta1*iEta2<0) {//-ve to +ve transistion and no crystal at zero
110  if(dEta<0) dEta++;
111  else dEta--;
112  }
113  return dEta;
114 }
int calDIPhi ( int  iPhi1,
int  iPhi2 
)

Definition at line 117 of file EgammaIsoHcalDetIdCollectionProducer.cc.

References dPhi().

Referenced by EgammaIsoHcalDetIdCollectionProducer::addDetIds().

118 {
119 
120  int dPhi = iPhi1-iPhi2;
121 
122  if(dPhi>72/2) dPhi-=72;
123  else if(dPhi<-72/2) dPhi+=72;
124 
125  return dPhi;
126 
127 }
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30