CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CaloNavigator< T > Class Template Reference

#include <CaloNavigator.h>

Public Member Functions

 CaloNavigator ()
 Default constructor. More...
 
 CaloNavigator (const T &home)
 
 CaloNavigator (const T &home, const CaloSubdetectorTopology *topology)
 
virtual T down () const
 move the navigator west More...
 
virtual T east () const
 move the navigator east More...
 
const CaloSubdetectorTopologygetTopology () const
 set the starting position More...
 
void home () const
 move the navigator back to the starting point More...
 
virtual T north () const
 move the navigator north More...
 
virtual T offsetBy (int deltaX, int deltaY) const
 Free movement of arbitray steps. More...
 
T operator* () const
 get the current position More...
 
T pos () const
 get the current position More...
 
void setHome (const T &startingPoint)
 set the starting position More...
 
void setTopology (const CaloSubdetectorTopology *)
 set the starting position More...
 
virtual T south () const
 move the navigator south More...
 
virtual T up () const
 move the navigator west More...
 
virtual T west () const
 move the navigator west More...
 
virtual ~CaloNavigator ()
 Default constructor. More...
 

Protected Attributes

T currentPoint_
 
const CaloSubdetectorTopologymyTopology_
 
T startingPoint_
 

Detailed Description

template<class T>
class CaloNavigator< T >

Definition at line 7 of file CaloNavigator.h.

Constructor & Destructor Documentation

template<class T>
CaloNavigator< T >::CaloNavigator ( )
inline

Default constructor.

Definition at line 11 of file CaloNavigator.h.

11  : myTopology_(0)
12  {
13  }
const CaloSubdetectorTopology * myTopology_
template<class T>
CaloNavigator< T >::CaloNavigator ( const T home)
inline

Definition at line 15 of file CaloNavigator.h.

15  : myTopology_(0)
16  {
17  setHome(home);
18  };
void setHome(const T &startingPoint)
set the starting position
void home() const
move the navigator back to the starting point
const CaloSubdetectorTopology * myTopology_
template<class T>
CaloNavigator< T >::CaloNavigator ( const T home,
const CaloSubdetectorTopology topology 
)
inline

Definition at line 21 of file CaloNavigator.h.

21  : myTopology_(topology)
22  {
23  setHome(home);
24  };
void setHome(const T &startingPoint)
set the starting position
void home() const
move the navigator back to the starting point
const CaloSubdetectorTopology * myTopology_
template<class T>
virtual CaloNavigator< T >::~CaloNavigator ( )
inlinevirtual

Default constructor.

Definition at line 27 of file CaloNavigator.h.

27 {};

Member Function Documentation

template<class T>
virtual T CaloNavigator< T >::down ( ) const
inlinevirtual

move the navigator west

Definition at line 101 of file CaloNavigator.h.

102  {
103  if ((myTopology_->down(currentPoint_)).size()==1)
105  else
106  currentPoint_=T(0);
107  return currentPoint_;
108  } ;
const CaloSubdetectorTopology * myTopology_
long double T
tuple size
Write out results.
virtual std::vector< DetId > down(const DetId &id) const =0
template<class T>
virtual T CaloNavigator< T >::east ( ) const
inlinevirtual
template<class T>
const CaloSubdetectorTopology* CaloNavigator< T >::getTopology ( ) const
inline

set the starting position

Definition at line 36 of file CaloNavigator.h.

37  {
38  return myTopology_;
39  }
const CaloSubdetectorTopology * myTopology_
template<class T >
void CaloNavigator< T >::home ( ) const
template<class T>
virtual T CaloNavigator< T >::north ( ) const
inlinevirtual
template<class T>
virtual T CaloNavigator< T >::offsetBy ( int  deltaX,
int  deltaY 
) const
inlinevirtual

Free movement of arbitray steps.

Definition at line 111 of file CaloNavigator.h.

Referenced by spr::chargeIsolation(), EcalClusterTools::covariances(), ClusterShapeAlgo::Create_Map(), HybridClusterAlgo::e2Et(), HybridClusterAlgo::et25(), PFClusterShapeAlgo::fill5x5Map(), EcalClusterTools::localCovariances(), EcalClusterTools::matrixDetId(), EcalClusterTools::matrixEnergy(), CosmicClusterAlgo::prepareCluster(), Multi5x5ClusterAlgo::prepareCluster(), EEBadScFilter::scan5x5(), EcalMipGraphs::selectHits(), and EcalDisplaysByEvent::selectHits().

112  {
113  for(int x=0; x < abs(deltaX) && currentPoint_ != T(0); x++)
114  {
115  if(deltaX > 0) east();
116  else west();
117  }
118 
119  for(int y=0; y < abs(deltaY) && currentPoint_ != T(0); y++)
120  {
121  if(deltaY > 0) north();
122  else south();
123  }
124 
125  return currentPoint_;
126 
127  }
virtual T west() const
move the navigator west
Definition: CaloNavigator.h:81
#define abs(x)
Definition: mlp_lapack.h:159
virtual T north() const
move the navigator north
Definition: CaloNavigator.h:51
virtual T east() const
move the navigator east
Definition: CaloNavigator.h:71
Definition: DDAxes.h:10
virtual T south() const
move the navigator south
Definition: CaloNavigator.h:61
long double T
template<class T>
T CaloNavigator< T >::operator* ( void  ) const
inline

get the current position

Definition at line 48 of file CaloNavigator.h.

48 { return currentPoint_; }
template<class T>
T CaloNavigator< T >::pos ( ) const
inline
template<class T>
void CaloNavigator< T >::setHome ( const T startingPoint)
template<class T >
void CaloNavigator< T >::setTopology ( const CaloSubdetectorTopology topology)

set the starting position

Definition at line 149 of file CaloNavigator.h.

150 {
151  if (myTopology_ == 0)
152  myTopology_=topology;
153  else
154  return;
155 }
const CaloSubdetectorTopology * myTopology_
template<class T>
virtual T CaloNavigator< T >::south ( ) const
inlinevirtual
template<class T>
virtual T CaloNavigator< T >::up ( ) const
inlinevirtual

move the navigator west

Definition at line 91 of file CaloNavigator.h.

92  {
93  if ((myTopology_->up(currentPoint_)).size()==1)
95  else
96  currentPoint_=T(0);
97  return currentPoint_;
98  } ;
const CaloSubdetectorTopology * myTopology_
virtual std::vector< DetId > up(const DetId &id) const =0
long double T
tuple size
Write out results.
template<class T>
virtual T CaloNavigator< T >::west ( ) const
inlinevirtual

Member Data Documentation

template<class T>
T CaloNavigator< T >::currentPoint_
mutableprotected
template<class T>
const CaloSubdetectorTopology* CaloNavigator< T >::myTopology_
protected
template<class T>
T CaloNavigator< T >::startingPoint_
mutableprotected

Definition at line 132 of file CaloNavigator.h.