CMS 3D CMS Logo

Classes | Functions
CaloRectangle.h File Reference
#include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
#include "Geometry/CaloTopology/interface/CaloTopology.h"

Go to the source code of this file.

Classes

struct  CaloRectangle
 
class  CaloRectangleRange< T >
 
class  CaloRectangleRange< T >::Iterator
 

Functions

template<class T >
T offsetBy (T start, CaloSubdetectorTopology const &topo, int dIEtaOrIX, int dIPhiOrIY)
 

Function Documentation

◆ offsetBy()

template<class T >
T offsetBy ( T  start,
CaloSubdetectorTopology const &  topo,
int  dIEtaOrIX,
int  dIPhiOrIY 
)

Definition at line 24 of file CaloRectangle.h.

24  {
25  for (int i = 0; i < std::abs(dIEtaOrIX) && start != T(0); i++) {
26  start = dIEtaOrIX > 0 ? topo.goEast(start) : topo.goWest(start);
27  }
28 
29  for (int i = 0; i < std::abs(dIPhiOrIY) && start != T(0); i++) {
30  start = dIPhiOrIY > 0 ? topo.goNorth(start) : topo.goSouth(start);
31  }
32  return start;
33 }

References funct::abs(), CaloSubdetectorTopology::goEast(), CaloSubdetectorTopology::goNorth(), CaloSubdetectorTopology::goSouth(), CaloSubdetectorTopology::goWest(), mps_fire::i, and command_line::start.

Referenced by CaloRectangleRange< T >::Iterator::operator*().

mps_fire.i
i
Definition: mps_fire.py:355
start
Definition: start.py:1
T
long double T
Definition: Basic3DVectorLD.h:48
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
command_line.start
start
Definition: command_line.py:167