Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-06 04:26:56

0001 #ifndef Geometry_HGCalCommonData_HGCalCellOffset_h
0002 #define Geometry_HGCalCommonData_HGCalCellOffset_h
0003 
0004 #include <cmath>
0005 #include <cstdint>
0006 #include <array>
0007 #include <memory>
0008 #include "Geometry/HGCalCommonData/interface/HGCalCell.h"
0009 
0010 class HGCalCellOffset {
0011 public:
0012   HGCalCellOffset(double waferSize,
0013                   int32_t nFine,
0014                   int32_t nCoarse,
0015                   double guardRingOffset_,
0016                   double mouseBiteCut_,
0017                   double sizeOffset_);
0018 
0019   std::pair<double, double> cellOffsetUV2XY1(int32_t u, int32_t v, int32_t placementIndex, int32_t type);
0020   std::pair<double, double> cellOffsetUV2XY1(
0021       int32_t u, int32_t v, int32_t placementIndex, int32_t type, int32_t partialType);
0022   double cellAreaUV(int32_t u, int32_t v, int32_t placementIndex, int32_t type, bool reco);
0023   double cellAreaUV(int32_t u, int32_t v, int32_t placementIndex, int32_t type, int32_t partialType, bool reco);
0024 
0025 private:
0026   const double sqrt3_ = std::sqrt(3.0);
0027   const double sqrt3By2_ = (0.5 * sqrt3_);
0028   std::array<std::array<std::array<double, 6>, 6>, 2> offsetX, offsetY;
0029   std::array<std::array<std::array<double, 6>, 11>, 2> offsetPartialX, offsetPartialY;
0030   int32_t ncell_[2];
0031   double cellX_[2], cellY_[2], fullArea[2], cellArea[2][6], cellAreaPartial[2][11];
0032   std::unique_ptr<HGCalCell> hgcalcell_;
0033 };
0034 
0035 #endif