//----------------------------------------------------------- // // Description: // Representation of a 5-dimensional cube for the // FHT algorithm: (phi, theta, c, m, t) // // // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Felix Boehmer TU Munich (original author) // // //----------------------------------------------------------- // NOTE: assumes NORMALIZED root parameter space with side length 1. #ifndef HOUGH5DNODE_H #define HOUGH5DNODE_H typedef unsigned int uint; class Hough5DNode { public: // Constructors/Destructors --------- Hough5DNode(); //TODO: get should not depend on nHyperplanes Hough5DNode(float* center, uint level, uint nHyperplanes=100000); ~Hough5DNode(); float* getCenter() {return _center;} int getLevel() {return _level;} float* getSonArray(); //return center positions of sons float* getCorners() { return _corners;} float getSideLength() {return _length;} bool* getHitList() {return _hitList;} int getVote() {return _votes;} float* getProjection0() {return _proj0;} //return the two coordinates of the float* getProjection1() {return _proj1;} //corners projected onto one float* getProjection2() {return _proj2;} //dimension of the parameter space; float* getProjection3() {return _proj3;} float* getProjection4() {return _proj4;} void setHit(int j) {_hitList[j] = true;} //hyperplane was a hit void removeHit(int j) {_hitList[j] = false; _votes--; } //ask if hyperplane was a hit bool checkHit(int j) {return _hitList[j];} void setVotes(uint votes) {_votes = votes;} void vote() {_votes++;} void print(); private: // Private Data Members ------------ int _nPlanes; bool* _hitList; float _length; float* _center; float* _corners; float* _sons; bool _sonsAllocd; float* _proj0; float* _proj1; float* _proj2; float* _proj3; float* _proj4; uint _votes; uint _level; // Private Methods ----------------- }; #endif //-------------------------------------------------------------- // $Log$ //--------------------------------------------------------------