Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:39

0001 #ifndef GEOMETRY_CALOGEOMETRY_IDEALOBLIQUEPRISM_H
0002 #define GEOMETRY_CALOGEOMETRY_IDEALOBLIQUEPRISM_H 1
0003 
0004 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0005 
0006 /** \class IdealObliquePrism
0007     
0008   Oblique prism class used for HCAL  (HB, HE, HO) volumes.
0009   
0010   Required parameters for an ideal oblique prism:
0011   
0012   - eta, phi of axis
0013   - radial distance (along axis) to front and back faces
0014   - single bit - faces parallel or perpendicular to z-axis
0015   - eta width and phi width of faces (same for front/back)
0016   
0017   Total: 6+1 parameters
0018   
0019   Internally, the "point of reference" is the center (eta/phi) of the
0020   front face of the prism.  Therefore, the only internally stored
0021   parameters are eta and phi widths, the axis tower thickness, and the
0022   parallel/perpendicular setting.  The parallel/perpendicular setting
0023   is encoded in the sign of the thickness.  (positive = parallel to
0024   z-axis, negative = perpendicular)
0025 
0026   \author J. Mans - Minnesota
0027   */
0028 class IdealObliquePrism : public CaloCellGeometry {
0029 public:
0030   typedef CaloCellGeometry::CCGFloat CCGFloat;
0031   typedef CaloCellGeometry::Pt3D Pt3D;
0032   typedef CaloCellGeometry::Pt3DVec Pt3DVec;
0033 
0034   static constexpr uint32_t k_dEta = 0;  //Eta-width
0035   static constexpr uint32_t k_dPhi = 1;  //Phi-width
0036   static constexpr uint32_t k_dZ = 2;    //Signed thickness
0037   static constexpr uint32_t k_Eta = 3;   //Eta of the reference point
0038   static constexpr uint32_t k_Z = 4;     //Z   of the reference point
0039 
0040   IdealObliquePrism();
0041   IdealObliquePrism(const IdealObliquePrism& idop);
0042 
0043   IdealObliquePrism& operator=(const IdealObliquePrism& idop);
0044 
0045   IdealObliquePrism(const GlobalPoint& faceCenter, CornersMgr* mgr, const CCGFloat* parm);
0046 
0047   ~IdealObliquePrism() override;
0048 
0049   CCGFloat dEta() const;
0050   CCGFloat dPhi() const;
0051   CCGFloat dz() const;
0052   CCGFloat eta() const;
0053   CCGFloat z() const;
0054 
0055   static void localCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref);
0056 
0057   void vocalCorners(Pt3DVec& vec, const CCGFloat* pv, Pt3D& ref) const override;
0058 
0059 private:
0060   void initCorners(CornersVec&) override;
0061 
0062   static GlobalPoint etaPhiPerp(float eta, float phi, float perp);
0063   static GlobalPoint etaPhiZ(float eta, float phi, float z);
0064 };
0065 
0066 std::ostream& operator<<(std::ostream& s, const IdealObliquePrism& cell);
0067 
0068 #endif