Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase2-hgx166 Bug fix to geometry and provision to mask parts of virtual wafer #25021

Merged
merged 7 commits into from Nov 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions Geometry/HGCalCommonData/interface/HGCalDDDConstants.h
Expand Up @@ -73,6 +73,7 @@ class HGCalDDDConstants {
bool isValidHex8(int lay, int modU, int modV, int cellU,
int cellV) const;
bool isValidTrap(int lay, int ieta, int iphi) const;
int lastLayer(bool reco) const;
int layerIndex(int lay, bool reco) const;
unsigned int layers(bool reco) const;
unsigned int layersInit(bool reco) const;
Expand All @@ -85,6 +86,7 @@ class HGCalDDDConstants {
std::pair<float,float> locateCellTrap(int lay, int ieta, int iphi,
bool reco) const;
int levelTop(int ind=0) const {return hgpar_->levelT_[ind];}
bool maskCell(const DetId& id, int corners) const;
int maxCellUV() const {
return ((mode_==HGCalGeometryMode::Trapezoid) ? hgpar_->nCellsFine_ :
2*hgpar_->nCellsFine_);}
Expand Down Expand Up @@ -136,6 +138,7 @@ class HGCalDDDConstants {
int waferTypeL(int wafer) const {return ((wafer>=0)&&(wafer<(int)(hgpar_->waferTypeL_.size()))) ? hgpar_->waferTypeL_[wafer] : 0;}
int waferType(DetId const& id) const;
int waferUVMax() const {return hgpar_->waferUVMax_;}
bool waferVirtual(int layer, int waferU, int waferV) const;
double waferZ(int layer, bool reco) const;

private:
Expand Down
4 changes: 3 additions & 1 deletion Geometry/HGCalCommonData/interface/HGCalParameters.h
Expand Up @@ -17,6 +17,7 @@ class HGCalParameters {

typedef std::vector<std::unordered_map<int32_t,int32_t> > layer_map;
typedef std::unordered_map<int32_t, int32_t> wafer_map;
typedef std::unordered_map<int32_t,std::pair<int32_t,int32_t> > waferT_map;

static constexpr double k_ScaleFromDDD = 0.1;
static constexpr double k_ScaleToDDD = 10.0;
Expand Down Expand Up @@ -152,7 +153,8 @@ class HGCalParameters {
int firstMixedLayer_;
wafer_map wafersInLayers_;
wafer_map typesInLayers_;

waferT_map waferTypes_;

COND_SERIALIZABLE;

private:
Expand Down
5 changes: 4 additions & 1 deletion Geometry/HGCalCommonData/interface/HGCalWaferIndex.h
Expand Up @@ -10,10 +10,13 @@ class HGCalWaferIndex {

HGCalWaferIndex() {}
~HGCalWaferIndex() {}
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV);
static int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV,
bool old=false);
static int32_t waferLayer(const int32_t index);
static int32_t waferU(const int32_t index);
static int32_t waferV(const int32_t index);
static int32_t waferCopy(const int32_t index);
static bool waferFormat(const int32_t index);

};

Expand Down
729 changes: 431 additions & 298 deletions Geometry/HGCalCommonData/src/HGCalDDDConstants.cc

Large diffs are not rendered by default.