1 #ifndef HGCalCommonData_HGCalDDDConstants_h 2 #define HGCalCommonData_HGCalDDDConstants_h 28 #include <CLHEP/Geometry/Point3D.h> 34 #include <unordered_map> 41 std::pair<int, int>
assignCell(
float x,
float y,
int lay,
int subSec,
bool reco)
const;
86 std::vector<HGCalParameters::hgtrap>
getModules()
const;
96 std::vector<HGCalParameters::hgtrform>
getTrForms()
const;
99 std::pair<double, double>
getXY(
int layer,
double x,
double y,
bool forwd)
const;
105 bool isValidHex8(
int lay,
int modU,
int modV,
int cellU,
int cellV,
bool fullAndPart)
const;
141 int modifyUV(
int uv,
int type1,
int type2)
const;
155 std::pair<double, double>
rangeR(
double z,
bool reco)
const;
157 std::pair<double, double>
rangeZ(
bool reco)
const;
182 void waferFromPosition(
const double x,
const double y,
int& wafer,
int& icell,
int& celltyp)
const;
231 HepGeom::Point3D<float>& loc,
const DetId&
id,
bool useWafer,
bool reco,
bool debug)
const;
241 return ((wafer >= 0) && (wafer < static_cast<int>(
hgpar_->
waferCopy_.size())))
265 const std::vector<double>&
posX,
266 const std::vector<double>&
posY)
const;
268 double xloc,
double yloc,
int cellType,
int place,
int part,
int& cellU,
int& cellV,
bool extend,
bool debug)
270 std::pair<int, float>
getIndex(
int lay,
bool reco)
const;
272 bool isValidCell(
int layindex,
int wafer,
int cell)
const;
bool maskCell(const DetId &id, int corners) const
std::pair< double, double > rangeRLayer(int lay, bool reco) const
double waferZ(int layer, bool reco) const
static constexpr double tol_
void waferFromPosition(const double x, const double y, int &wafer, int &icell, int &celltyp) const
std::pair< double, double > rangeZ(bool reco) const
std::pair< int, int > tileRings(int layer) const
unsigned int layersInit(bool reco) const
static constexpr int32_t WaferCenter
int waferToCopy(int wafer) const
bool isValidCell(int layindex, int wafer, int cell) const
std::pair< double, double > cellSizeTrap(int type, int irad) const
int getPhiBins(int lay) const
HGCalCassette hgcassette_
bool cassetteShiftScintillator(int zside, int layer, int iphi) const
std::pair< double, double > cellEtaPhiTrap(int type, int irad) const
unsigned int volumes() const
int scintType(const int layer) const
const HGCalParameters * getParameter() const
bool waferInLayerTest(int wafer, int lay, bool full) const
std::pair< double, double > waferParameters(bool reco) const
std::vector< int > moduleLayR_
bool waferFullInLayer(int wafer, int lay, bool reco) const
int32_t maxWafersPerLayer_
double distFromEdgeTrap(double x, double y, double z) const
std::unique_ptr< HGCalCellUV > hgcellUV_
Simrecovecs max_modules_layer_
HGCalParameters::hgtrap getModule(unsigned int k, bool hexType, bool reco) const
std::array< std::vector< int32_t >, 2 > Simrecovecs
int32_t waferU(const int32_t index)
HGCalParameters::waferInfo waferInfo(int lay, int waferU, int waferV) const
bool trapezoidFile() const
bool isValidHex(int lay, int mod, int cell, bool reco) const
bool tileRingEdge(double rho, int layer, int ring) const
int getLayerOffset() const
std::pair< int, int > getREtaRange(int lay) const
int lastLayer(bool reco) const
int waferTypeT(int wafer) const
std::pair< double, double > getXY(int layer, double x, double y, bool forwd) const
bool waferHexagon8() const
std::pair< int, int > waferTypeRotation(int layer, int waferU, int waferV, bool fromFile, bool debug) const
int modulesInit(int lay, bool reco) const
std::unordered_map< int32_t, bool > waferIn_
int layerFromIndex(int index, bool reco) const
std::vector< uint32_t > trformIndex_
HGCalGeometryMode::GeometryMode geomMode() const
int32_t cellType(int type, int waferU, int waferV, int iz, int fwdBack, int orient) const
bool waferHexagon6() const
bool isValidHex8(int lay, int waferU, int waferV, bool fullAndPart) const
const std::vector< double > & getRadiusLayer(int layer) const
~HGCalDDDConstants()=default
const HGCalCellOffset * cellOffset() const
hgtrform getTrForm(unsigned int k) const
std::pair< double, double > getRangeR(int, bool reco) const
HGCalGeomTools geomTools_
bool waferInLayer(int wafer, int lay, bool reco) const
HGCalParameters::tileInfo tileInfo(int zside, int layer, int ring) const
std::map< int, HGCWaferParam > waferLayer_
static constexpr int32_t WaferFull
unsigned int waferFileSize() const
std::unique_ptr< HGCalCell > hgcell_
int getTypeHex(int layer, int waferU, int waferV) const
bool isHalfCell(int waferType, int cell) const
bool waferHexagon8Fine() const
int maxCells(bool reco) const
bool waferFileInfoExist(int kk) const
std::tuple< int, int, int, int > waferFileInfoFromIndex(int kk) const
std::tuple< int, int, int, int > waferFileInfo(unsigned int kk) const
std::array< int, 5 > assignCellHex(float x, float y, int zside, int lay, bool reco, bool extend, bool debug) const
int waferFileIndex(unsigned int kk) const
int maxModulesPerLayer() const
HGCalDDDConstants(const HGCalParameters *hp, const std::string &name)
int layerIndex(int lay, bool reco) const
bool cellInLayer(int waferU, int waferV, int cellU, int cellV, int lay, int zside, bool reco) const
int getUVMax(int type) const
bool isValidCell8(int lay, int waferU, int waferV, int cellU, int cellV, int type) const
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
std::pair< int, float > getIndex(int lay, bool reco) const
int tileSiPM(int sipm) const
bool isValidTrap(int zside, int lay, int ieta, int iphi) const
bool waferVirtual(int layer, int waferU, int waferV) const
int tileCount(int layer, int ring) const
std::pair< int, int > assignCell(float x, float y, int lay, int subSec, bool reco) const
std::vector< int > calibCellPartHD_
std::vector< HGCalParameters::hgtrap > getModules() const
double mouseBite(bool reco) const
unsigned int layers(bool reco) const
bool tileTrapezoid() const
std::pair< int, int > tileType(int layer, int ring, int phi) const
bool tilePhiEdge(double phi, int layer, int iphi) const
std::pair< float, float > locateCellTrap(int zside, int lay, int ieta, int iphi, bool reco, bool debug) const
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
int getTypeTrap(int layer) const
int32_t tileCassette(int32_t, int32_t, int32_t, int32_t)
bool waferHexagon8Module() const
double cellSizeHex(int type) const
std::vector< int > calibCellFullHD_
std::vector< int > layerType_
std::pair< double, double > rangeR(double z, bool reco) const
std::pair< double, double > waferPosition(int wafer, bool reco) const
void etaPhiFromPosition(const double x, const double y, const double z, const int layer, int &ieta, int &iphi, int &type, double &wt) const
std::vector< double > slopeMin_
std::array< int, 4 > waferMax_
static constexpr double k_ScaleToDDD
int numberCellsHexagon(int wafer) const
std::array< int, 3 > assignCellTrap(float x, float y, float z, int lay, bool reco) const
bool tileExist(int zside, int layer, int ring, int phi) const
GlobalPoint waferLocal2Global(HepGeom::Point3D< float > &loc, const DetId &id, bool useWafer, bool reco, bool debug) const
int numberCells(bool reco) const
std::pair< float, float > locateCellHex(int cell, int wafer, bool reco) const
double cellThickness(int layer, int waferU, int waferV) const
int waferType(DetId const &id, bool fromFile) const
std::pair< int, int > rowColumnWafer(const int wafer) const
unsigned int getTrFormN() const
HGCalParameters::hgtrform getTrForm(unsigned int k) const
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
bool waferHexagon8File() const
int maxRows(int lay, bool reco) const
const HGCalGeometryMode::GeometryMode mode_
int32_t waferIndex(int wafer, int index) const
std::vector< HGCalParameters::hgtrform > getTrForms() const
double waferSepar(bool reco) const
int getLayer(double z, bool reco) const
bool cassetteShiftSilicon(int zside, int layer, int waferU, int waferV) const
static constexpr float dPhiMin
std::vector< int > calibCells(bool hd, bool full) const
std::array< int, 3 > HGCWaferParam
bool cassetteMode() const
int32_t waferV(const int32_t index)
int waferTypeL(int wafer) const
std::vector< int > waferCopy_
static constexpr double tan30deg_
double guardRingOffset(bool reco) const
std::vector< int > calibCellPartLD_
std::unique_ptr< HGCalCellOffset > cellOffset_
int cassetteTile(int iphi) const
double sensorSizeOffset(bool reco) const
std::vector< double > radiusLayer_[2]
std::array< uint32_t, 2 > tot_layers_
std::vector< int > waferTypeT_
int modules(int lay, bool reco) const
double calibCellRad(bool hd) const
std::vector< int > levelT_
int modifyUV(int uv, int type1, int type2) const
waferInfo_map waferInfoMap_
std::pair< float, float > localToGlobal8(int zside, int lay, int waferU, int waferV, double localX, double localY, bool reco, bool debug) const
const HGCalParameters * hgpar_
int levelTop(int ind=0) const
T mod(const T &a, const T &b)
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
int partialWaferType(int lay, int waferU, int waferV) const
std::vector< int > waferTypeL_
std::pair< double, double > waferPositionNoRot(int lay, int waferU, int waferV, bool reco, bool debug) const
static constexpr double k_horizontalShift
double waferSize(bool reco) const
double distFromEdgeHex(double x, double y, double z) const
int layerType(int lay) const
int waferFromCopy(int copy) const
std::vector< int > calibCellFullLD_
int waferCount(const int type) const