Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:16

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