#if !defined (__CINT__) || defined (__MAKECINT__) ////////////////////////////////////////////////////////////////////////// // // Component: Geometry.hh // Purpose: This class knows about tower boundaries i.e. // the minimum, maximum, and center eta and // theta etc.. Could eventually be split into individual // class and container. This is not a singleton but // in principle, there should be just one instance // of a Geometry object, available through // the HWCalorDetectorGeometry class. // // Created: 16/04/99 Pierre Savard (based on J. Lamoureux's Tower // Boundaries class). // History: // ////////////////////////////////////////////////////////////////////////// #include #include #include #include "CalConstants.hh" #include "CalParameters.hh" class Geometry { public: // constructor Geometry(); // destructor ~Geometry(); // // Equality test //bool operator==(const Geometry& rhs) const; // // Manipulation and access // float theta(int ieta) const; float thetaMin(int ieta) const; float thetaMax(int ieta) const; float eta(int ieta) const; float etaMin(int ieta) const; float etaMax(int ieta) const; float cotTheta(int ieta) const; float cotThetaMin(int ieta) const; float cotThetaMax(int ieta) const; float phi(int IETA, int IPHI) const; float phiMin(int IETA, int IPHI) const; float phiMax(int IETA, int IPHI) const; float phiGranularity(int ieta) const; float etaGranularity(int ieta) const; size_t iEta(float x, float y, float z) const; size_t iEta(float eta) const; size_t iPhi(size_t iEta, float phi) const; // printing void spew(); private: float _theta[TOWER_NETA]; // detector Theta of tower float _thetaMin[TOWER_NETA]; // detector theta of low tower edge float _thetaMax[TOWER_NETA]; // detector theta of high tower edge float _eta[TOWER_NETA]; // detector eta of tower float _etaMin[TOWER_NETA]; // detector theta of low tower edge float _etaMax[TOWER_NETA]; // detector theta of high tower edge float _cotThetaMin[TOWER_NETA]; // detector cot(theta) of high tower edge float _cotTheta[TOWER_NETA]; // detector cotTheta of tower float _cotThetaMax[TOWER_NETA]; // detector cot(theta) of low tower edge float _etaGranularity[TOWER_NETA]; // detector eta granularity float _phiGranularity[TOWER_NETA]; // detector phi granularity }; inline float Geometry::theta(int ieta) const { return _theta[ieta];} inline float Geometry::thetaMin(int ieta) const { return _thetaMin[ieta];} inline float Geometry::thetaMax(int ieta) const { return _thetaMax[ieta];} inline float Geometry::eta(int ieta) const { return _eta[ieta];} inline float Geometry::etaMin(int ieta) const { return _etaMin[ieta];} inline float Geometry::etaMax(int ieta) const { return _etaMax[ieta];} inline float Geometry::cotTheta(int ieta) const { return _cotTheta[ieta];} inline float Geometry::cotThetaMin(int ieta) const { return _cotThetaMin[ieta];} inline float Geometry::cotThetaMax(int ieta) const { return _cotThetaMax[ieta];} inline float Geometry::etaGranularity(int ieta) const { return _etaGranularity[ieta];} inline float Geometry::phiGranularity(int ieta) const { return _phiGranularity[ieta];} #endif