Skip to content

Commit

Permalink
Make modifications for the mouse bite, guard rings for the HGCAL vers…
Browse files Browse the repository at this point in the history
…ion 18
  • Loading branch information
Sunanda committed Nov 30, 2023
1 parent df4abb9 commit 742517c
Show file tree
Hide file tree
Showing 10 changed files with 869 additions and 43 deletions.
10 changes: 8 additions & 2 deletions Geometry/HGCalCommonData/interface/HGCalCellUV.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

#ifndef Geometry_HGCalCommonData_HGCalCellUV_h
#define Geometry_HGCalCommonData_HGCalCellUV_h

#include <cstdint>
#include <iterator>
#include <map>
#include <memory>
#include "Geometry/HGCalCommonData/interface/HGCalCell.h"

class HGCalCellUV {
Expand All @@ -16,6 +18,9 @@ class HGCalCellUV {
std::pair<int32_t, int32_t> cellUVFromXY2(
double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug) const;

std::pair<int32_t, int32_t> cellUVFromXY2( // for v18
double xloc, double yloc, int32_t placement, int32_t type, int32_t partial, bool extend, bool debug) const;

std::pair<int32_t, int32_t> cellUVFromXY3(
double xloc, double yloc, int32_t placement, int32_t type, bool extend, bool debug) const;

Expand All @@ -41,9 +46,10 @@ class HGCalCellUV {
static constexpr double sin60_ = 0.5 * sqrt3_;
static constexpr double cos60_ = 0.5;

const double waferSize_;
int32_t ncell_[2];
double cellX_[2], cellY_[2], cellXTotal_[2], cellYTotal_[2], waferSize;

double cellX_[2], cellY_[2], cellXTotal_[2], cellYTotal_[2];
std::unique_ptr<HGCalCell> hgcalcell_;
std::map<std::pair<int32_t, int32_t>, std::pair<double, double> > cellPosFine_[HGCalCell::cellPlacementTotal],
cellPosCoarse_[HGCalCell::cellPlacementTotal];
};
Expand Down
2 changes: 2 additions & 0 deletions Geometry/HGCalCommonData/interface/HGCalTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class HGCalTypes {
static constexpr int32_t WaferOut = 99;
static constexpr int32_t WaferPartLDOffset = 11;
static constexpr int32_t WaferPartHDOffset = 21;
static constexpr int32_t WaferPartLDCount = 6;
static constexpr int32_t WaferPartHDCount = 5;
static constexpr int32_t WaferTypeOffset[3] = {0, 5, 11};

static constexpr int32_t WaferOrient0 = 0;
Expand Down
8 changes: 8 additions & 0 deletions Geometry/HGCalCommonData/interface/HGCalWaferMask.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <cmath>
#include <vector>
#include <array>

class HGCalWaferMask {
public:
Expand Down Expand Up @@ -68,11 +69,18 @@ class HGCalWaferMask {
const double& ypos,
const bool& v17);

static std::array<double, 4> maskCut(const int& part, const int& place, const double& waferSize, const double& offset, const bool& v17OrLess);

private:
static constexpr double sqrt3_ = 1.732050807568877; // std::sqrt(3.0) in double precision
static constexpr double sin_60_ = 0.5 * sqrt3_;
static constexpr double cos_60_ = 0.5;
static constexpr double tan_60_ = sqrt3_;
static constexpr std::array<double, 12> tan_1 = {
{-sqrt3_, sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0}};
static constexpr std::array<double, 12> cos_1 = {{0.5, -0.5, -1.0, -0.5, 0.5, 1.0, -0.5, 0.5, 1.0, 0.5, -0.5, -1.0}};
static constexpr std::array<double, 12> cot_1 = {
{sqrt3_, -sqrt3_, 0.0, sqrt3_, -sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0, -sqrt3_, sqrt3_, 0.0}};
};

#endif
Loading

0 comments on commit 742517c

Please sign in to comment.