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/IdealGeometryRecord.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 106 of file EgammaIsoHcalDetIdCollectionProducer.cc.

Referenced by EgammaIsoHcalDetIdCollectionProducer::addDetIds().

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

Definition at line 118 of file EgammaIsoHcalDetIdCollectionProducer.cc.

References dPhi().

Referenced by EgammaIsoHcalDetIdCollectionProducer::addDetIds().

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