//====================================================================== // File and Version Information: // $Id:$ // // Class PndEmcTwoCoordIndex // // Software developed for the BaBar Detector at the SLAC B-Factory. // Adapted for the PANDA experiment at GSI // // Class to hold coordinate and index information // for system in which two co-ordinates specifies a channel uniquely. // (Simplified version of class taken from BABAR framework) // It is convenient to use 2-coordinate index to describe barel part of EMC // to search for neigbour crystals in clustering algorithms // // // Author List: // // Phil Strother Imperial College // Stephen J. Gowdy University of Edinburgh // Dima Melnichuk - adaption for PANDA // //====================================================================== #ifndef PNDEMCTWOCOORDINDEX_HH #define PNDEMCTWOCOORDINDEX_HH //--------------- // C++ Headers -- //--------------- #include "stdlib.h" //#include #include "TObject.h" #include "PndEmcNeighbourStore.h" class PndEmcTwoCoordIndex: public TObject { public: // Constructors PndEmcTwoCoordIndex(); PndEmcTwoCoordIndex( long theXcoord, long theYcoord, long theIndex ); // Destructors // destructor in base class virtual ~PndEmcTwoCoordIndex(); // Operators bool operator==( const PndEmcTwoCoordIndex& c ) const { return index==c.index; } bool operator!=( const PndEmcTwoCoordIndex& c ) const { return index!=c.index; } virtual const PndEmcNeighbourStore itsNeighbours() const; long itsXCoord() const {return itsCoords[0];} long itsYCoord() const {return itsCoords[1];} long itsIndex() const {return index;} virtual void addToNeighbourList(PndEmcTwoCoordIndex *); //check if 2 tci are neigbour or not bool isNeighbour(PndEmcTwoCoordIndex* _tci); protected: long itsCoords[2]; long index; PndEmcNeighbourStore theNeighbours; private: ClassDef(PndEmcTwoCoordIndex,1) }; #endif // PNDEMCTWOCOORDINDEX_HH