CMS 3D CMS Logo

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 102 of file EgammaIsoHcalDetIdCollectionProducer.cc.

Referenced by EgammaIsoHcalDetIdCollectionProducer::addDetIds().

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

Definition at line 114 of file EgammaIsoHcalDetIdCollectionProducer.cc.

References dPhi().

Referenced by EgammaIsoHcalDetIdCollectionProducer::addDetIds().

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