// ESAF : Euso Simulation and Analysis Framework // class MacroCellGeometry // $Id: MacroCellGeometry.hh,v 1.11 2005/04/28 23:15:12 thea Exp $ // M. Pallavicini - created 10-10-03 // #ifndef _MACROCELLGEOMETRY__H #define _MACROCELLGEOMETRY__H #include "EVector.hh" #include "Photon.hh" #include "Photomultiplier.hh" #include "EsafMsgSource.hh" class MacroCell; class MacroCellGeometry : public EsafMsgSource { public: // ctor MacroCellGeometry( MacroCell* ); // dtor virtual ~MacroCellGeometry(); // get normal inline const EVector& GetNormal() const { return fNormal;} // get center inline const EVector& GetCenter() const { return fCenter;} // get xaxis inline const EVector& GetXAxis() const { return fXAxis;} // get yaxis inline const EVector& GetYAxis() const { return fYAxis;} // get up-left corner inline EVector GetUpLeft() const { return fCenter+fXMin*fXAxis+fYMax*fYAxis;} // get up-right corner inline EVector GetUpRight() const { return fCenter+fXMax*fXAxis+fYMax*fYAxis;} // get down-left corner inline EVector GetDownLeft() const { return fCenter+fXMin*fXAxis+fYMin*fYAxis;} // get down-right corner inline EVector GetDownRight() const { return fCenter+fXMax*fXAxis+fYMin*fYAxis;} // checks if p hits the MC. In that case returns the distance Double_t IsHit(const Photon &p ) const; // finds which pmt has been hit, if exists Photomultiplier* FindHitPmt(const Photon &p) const; // draw the macrocell virtual void Draw() const; private: // MacroCell MacroCell *pCell; inline MacroCell* Cell() { return pCell;} // compute internal infos virtual void Compute(); // compute (roughly) the area covered by this macrocell // it is used in Optics module to search for hit pmt // the area is a circle centered in the macrocell centroid EVector fNormal; EVector fCenter; EVector fXAxis; EVector fYAxis; Double_t fXMin; Double_t fXMax; Double_t fYMin; Double_t fYMax; friend class MacroCell; ClassDef(MacroCellGeometry,0) }; #endif