FairRoot/PandaRoot
Public Member Functions | Protected Attributes | List of all members
PndEmcTwoCoordIndex Class Reference

stores crystal index coordinates (x,y) or (theta,phi) More...

#include <PndEmcTwoCoordIndex.h>

Inheritance diagram for PndEmcTwoCoordIndex:

Public Member Functions

 PndEmcTwoCoordIndex ()
 
 PndEmcTwoCoordIndex (long theXcoord, long theYcoord, long theIndex)
 
virtual ~PndEmcTwoCoordIndex ()
 
bool operator== (const PndEmcTwoCoordIndex &c) const
 
bool operator!= (const PndEmcTwoCoordIndex &c) const
 
bool operator< (const PndEmcTwoCoordIndex &) const
 
virtual const PndEmcCoordIndexSet GetNeighbours () const
 
long XCoord () const
 
long YCoord () const
 
long Index () const
 
virtual void AddToNeighbourList (PndEmcTwoCoordIndex *)
 
bool IsNeighbour (PndEmcTwoCoordIndex *_tci)
 

Protected Attributes

long fCoords [2]
 
long fIndex
 
PndEmcCoordIndexSet fNeighbours
 

Detailed Description

stores crystal index coordinates (x,y) or (theta,phi)

Definition at line 41 of file PndEmcTwoCoordIndex.h.

Constructor & Destructor Documentation

PndEmcTwoCoordIndex::PndEmcTwoCoordIndex ( )

Definition at line 29 of file PndEmcTwoCoordIndex.cxx.

References fCoords.

30 {
31  fCoords[0]=-1;
32  fCoords[1]=-1;
33 }
std::set< PndEmcTwoCoordIndex * > PndEmcCoordIndexSet
PndEmcCoordIndexSet fNeighbours
PndEmcTwoCoordIndex::PndEmcTwoCoordIndex ( long  theXcoord,
long  theYcoord,
long  theIndex 
)

Definition at line 35 of file PndEmcTwoCoordIndex.cxx.

References fCoords, x, and y.

36 {
37  fCoords[0]=x;
38  fCoords[1]=y;
39 }
std::set< PndEmcTwoCoordIndex * > PndEmcCoordIndexSet
PndEmcCoordIndexSet fNeighbours
Double_t x
Double_t y
PndEmcTwoCoordIndex::~PndEmcTwoCoordIndex ( )
virtual

Definition at line 44 of file PndEmcTwoCoordIndex.cxx.

45 {
46 }

Member Function Documentation

void PndEmcTwoCoordIndex::AddToNeighbourList ( PndEmcTwoCoordIndex addition)
virtual

Definition at line 68 of file PndEmcTwoCoordIndex.cxx.

References fNeighbours.

69 {
70  fNeighbours.insert( addition );
71 }
PndEmcCoordIndexSet fNeighbours
const PndEmcCoordIndexSet PndEmcTwoCoordIndex::GetNeighbours ( ) const
virtual

Definition at line 62 of file PndEmcTwoCoordIndex.cxx.

References fNeighbours.

63 {
64  return fNeighbours;
65 }
PndEmcCoordIndexSet fNeighbours
long PndEmcTwoCoordIndex::Index ( ) const
inline
bool PndEmcTwoCoordIndex::IsNeighbour ( PndEmcTwoCoordIndex _tci)

Definition at line 74 of file PndEmcTwoCoordIndex.cxx.

References fCoords, XCoord(), and YCoord().

Referenced by PndEmc2DLocMaxFinder::getNeighbourDigis(), and PndEmcDigi::isNeighbour().

75 {
76 
77  if( abs(fCoords[0] - tci->XCoord()) > 1 ) return false;
78  if (fCoords[1]<200) {
79  if((abs(fCoords[1] - tci->YCoord()) > 1)&&(abs(fCoords[1] - tci->YCoord()) !=159 )) return false;
80  } else if (abs(fCoords[1] - tci->YCoord()) > 1) {
81  return false;
82  }
83 
84  return true;
85 }
bool PndEmcTwoCoordIndex::operator!= ( const PndEmcTwoCoordIndex c) const
inline

Definition at line 57 of file PndEmcTwoCoordIndex.h.

References fIndex.

57 { return fIndex!=c.fIndex; }
bool PndEmcTwoCoordIndex::operator< ( const PndEmcTwoCoordIndex compare) const

Definition at line 52 of file PndEmcTwoCoordIndex.cxx.

References fIndex.

53 {
54  bool answer = (fIndex < compare.fIndex);
55  return answer;
56 }
bool PndEmcTwoCoordIndex::operator== ( const PndEmcTwoCoordIndex c) const
inline

Definition at line 56 of file PndEmcTwoCoordIndex.h.

References fIndex.

56 { return fIndex==c.fIndex; }
long PndEmcTwoCoordIndex::XCoord ( ) const
inline
long PndEmcTwoCoordIndex::YCoord ( ) const
inline

Member Data Documentation

long PndEmcTwoCoordIndex::fCoords[2]
protected

Definition at line 74 of file PndEmcTwoCoordIndex.h.

Referenced by IsNeighbour(), PndEmcTwoCoordIndex(), XCoord(), and YCoord().

long PndEmcTwoCoordIndex::fIndex
protected

Definition at line 75 of file PndEmcTwoCoordIndex.h.

Referenced by Index(), operator!=(), operator<(), and operator==().

PndEmcCoordIndexSet PndEmcTwoCoordIndex::fNeighbours
protected

Definition at line 76 of file PndEmcTwoCoordIndex.h.

Referenced by AddToNeighbourList(), and GetNeighbours().


The documentation for this class was generated from the following files: