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-hgx198 preparing for corner centered wafers #27122

Merged
merged 4 commits into from
Jun 11, 2019
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
5 changes: 5 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalCons/v10/hgcalCons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<Vector name="ZRanges" type="numeric" nEntries="4">
[hgcal:zHGCalEE1], [hgcal:zHGCalHEsil1], [hgcal:zHGCalHEmix1],
[hgcal:zHGCalHEmix5]</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="50">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
</ConstantsSection>

<SpecParSection label="hgcalCons.xml" eval="true">
Expand Down
5 changes: 5 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalCons/v9/hgcalCons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<Vector name="ZRanges" type="numeric" nEntries="4">
[hgcal:zMinEE], [hgcal:zMinHEsil], [hgcal:zMinHEmix],
[hgcal:zMaxHEmix]</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="52">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
</ConstantsSection>

<SpecParSection label="hgcalCons.xml" eval="true">
Expand Down
5 changes: 5 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalCons/v9a/hgcalCons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<Vector name="ZRanges" type="numeric" nEntries="4">
[hgcal:zMinEE], [hgcal:zMinHEsil], [hgcal:zMinHEmix],
[hgcal:zMaxHEmix]</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="52">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
</ConstantsSection>

<SpecParSection label="hgcalCons.xml" eval="true">
Expand Down
5 changes: 5 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalCons/v9ap/hgcalCons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<Vector name="ZRanges" type="numeric" nEntries="4">
[hgcal:zMinEE], [hgcal:zMinHEsil], [hgcal:zMinHEmix],
[hgcal:zMaxHEmix]</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="52">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
</ConstantsSection>

<SpecParSection label="hgcalCons.xml" eval="true">
Expand Down
5 changes: 5 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalCons/v9p/hgcalCons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<Vector name="ZRanges" type="numeric" nEntries="4">
[hgcal:zMinEE], [hgcal:zMinHEsil], [hgcal:zMinHEmix],
[hgcal:zMaxHEmix]</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="52">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
</ConstantsSection>

<SpecParSection label="hgcalCons.xml" eval="true">
Expand Down
3 changes: 3 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalEE/v10/hgcalEE.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@
0,-2,-2,-2,-2,-2,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,-2,-2,-2,-2,-2,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,-2
</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="28">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Numeric name="FirstLayer" value="1"/>
<Numeric name="AbsorberMode" value="0"/>
<Numeric name="zMinBlock" value="[hgcal:zHGCalEE1]"/>
Expand Down
3 changes: 3 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalEE/v9/hgcalEE.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0
</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="28">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Numeric name="FirstLayer" value="1"/>
<Numeric name="AbsorberMode" value="0"/>
<Numeric name="zMinBlock" value="[hgcal:zMinEE]"/>
Expand Down
3 changes: 3 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalEE/v9a/hgcalEE.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0
</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="28">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Numeric name="FirstLayer" value="1"/>
<Numeric name="AbsorberMode" value="0"/>
<Numeric name="zMinBlock" value="[hgcal:zMinEE]"/>
Expand Down
2 changes: 2 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalHEmix/v10/hgcalHEmix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
-1, 0, -1, 1, -2, -1, 0, -1, 1, -2, -1, 0, -1, 1, -2,
-1, 0, -1, 1, -2, -1, 0, -1, 1, -2, -1, 0, -1, 1, -2,
-1, 0, -1, 1, -2, -1, 0, -1, 1, -2</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="14">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Numeric name="FirstLayer" value="[hgcal:FirstMixedLayer]"/>
<Numeric name="AbsorberMode" value="1"/>
<Vector name="TopMaterialNames" type="string" nEntries="6">
Expand Down
2 changes: 2 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalHEmix/v9/hgcalHEmix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,
0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,
0, 0, 0, 1, 0 </Vector>
<Vector name="LayerCenter" type="numeric" nEntries="16">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Numeric name="FirstLayer" value="[hgcal:FirstMixedLayer]"/>
<Numeric name="AbsorberMode" value="0"/>
<Vector name="TopMaterialNames" type="string" nEntries="3">
Expand Down
2 changes: 2 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalHEmix/v9a/hgcalHEmix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,
0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,
0, 0, 0, 1, 0 </Vector>
<Vector name="LayerCenter" type="numeric" nEntries="16">
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Vector name="TopMaterialNames" type="string" nEntries="3">
materials:Cables, materials:H_Scintillator,
hgcalMaterial:HGC_G10-FR4</Vector>
Expand Down
2 changes: 2 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalHEsil/v10/hgcalHEsil.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
-1, 0, -2, 0, 0, 0, 0, 1, 0, 0, 0, 0, -2,
-1, 0, -2, 0, 0, 0, 0, 1, 0, 0, 0, 0, -2,
-1, 0, -2, 0, 0, 0, 0, 1, 0, 0, 0, 0, -2</Vector>
<Vector name="LayerCenter" type="numeric" nEntries="8">
0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Numeric name="FirstLayer" value="1"/>
<Numeric name="AbsorberMode" value="1"/>
<Numeric name="zMinBlock" value="[hgcal:zHGCalHEsil1]"/>
Expand Down
2 changes: 2 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalHEsil/v9/hgcalHEsil.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0 </Vector>
<Vector name="LayerCenter" type="numeric" nEntries="8">
0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Numeric name="FirstLayer" value="1"/>
<Numeric name="AbsorberMode" value="0"/>
<Numeric name="zMinBlock" value="[hgcal:zMinHEsil]"/>
Expand Down
2 changes: 2 additions & 0 deletions Geometry/HGCalCommonData/data/hgcalHEsil/v9a/hgcalHEsil.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0 </Vector>
<Vector name="LayerCenter" type="numeric" nEntries="8">
0, 0, 0, 0, 0, 0, 0, 0</Vector>
<Numeric name="FirstLayer" value="1"/>
<Numeric name="AbsorberMode" value="0"/>
<Numeric name="zMinBlock" value="[hgcal:zMinHEsil]"/>
Expand Down
1 change: 1 addition & 0 deletions Geometry/HGCalCommonData/interface/HGCalDDDConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class HGCalDDDConstants {
return ((wafer >= 0) && (wafer < (int)(hgpar_->waferTypeL_.size()))) ? hgpar_->waferTypeL_[wafer] : 0;
}
int waferType(DetId const& id) const;
int waferType(int layer, int waferU, int waferV) const;
int waferUVMax() const { return hgpar_->waferUVMax_; }
bool waferVirtual(int layer, int waferU, int waferV) const;
double waferZ(int layer, bool reco) const;
Expand Down
14 changes: 12 additions & 2 deletions Geometry/HGCalCommonData/interface/HGCalGeomTools.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
#ifndef Geometry_HGCalCommonData_HGCalGeomTools_h
#define Geometry_HGCalCommonData_HGCalGeomTools_h

#include <cmath>
#include <cstdint>
#include <vector>

class HGCalGeomTools {
public:
HGCalGeomTools() {}
HGCalGeomTools();
~HGCalGeomTools() {}

enum WaferType {WaferFull = 0, WaferFive=1, WaferChoptwo=2, WaferChopTwom=3,
WaferHalf=4, WaferSemi=5, WaferSemi2=6, WaferThree=7};

enum WaferPosition {UnknownPosition=-1, WaferCenter=0, CornerCenterYp=1,
CornerCenterYm=2, CornerCenterXp=3, CornerCenterXm=4};

static void radius(double zf,
double zb,
std::vector<double> const& zFront1,
Expand All @@ -26,6 +34,7 @@ class HGCalGeomTools {
std::vector<double> const& slope);
static double radius(
double z, int layer0, int layerf, std::vector<double> const& zFront, std::vector<double> const& rFront);
std::pair<double,double> shiftXY(int waferPosition, double waferSize);
static double slope(double z, std::vector<double> const& zFront, std::vector<double> const& slope);
static std::pair<double, double> zradius(double z1,
double z2,
Expand All @@ -35,7 +44,8 @@ class HGCalGeomTools {
double xpos, double ypos, double r, double R, double rMin, double rMax, bool oldBug = false);

private:
static constexpr double tol = 0.0001;
static constexpr double tol_ = 0.0001;
double factor_;
};

#endif
33 changes: 21 additions & 12 deletions Geometry/HGCalCommonData/src/HGCalDDDConstants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
//#define EDM_ML_DEBUG
using namespace geant_units::operators;

static const int maxType = 2;
static const int minType = 0;

HGCalDDDConstants::HGCalDDDConstants(const HGCalParameters* hp, const std::string& name)
: hgpar_(hp), sqrt3_(std::sqrt(3.0)) {
mode_ = hgpar_->mode_;
Expand Down Expand Up @@ -213,14 +210,13 @@ bool HGCalDDDConstants::cellInLayer(int waferU, int waferV, int cellU, int cellV

double HGCalDDDConstants::cellThickness(int layer, int waferU, int waferV) const {
double thick(-1);
if ((mode_ == HGCalGeometryMode::Hexagon8) || (mode_ == HGCalGeometryMode::Hexagon8Full)) {
auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
int type = ((itr == hgpar_->typesInLayers_.end() ? maxType : hgpar_->waferTypeL_[itr->second]));
thick = 10000.0 * hgpar_->cellThickness_[type]; // cm to micron
} else if ((mode_ == HGCalGeometryMode::Hexagon) || (mode_ == HGCalGeometryMode::HexagonFull)) {
int type =
(((waferU >= 0) && (waferU < (int)(hgpar_->waferTypeL_.size()))) ? hgpar_->waferTypeL_[waferU] : minType);
thick = 100.0 * type; // type = 1,2,3 for 100,200,300 micron
int type = waferType(layer, waferU, waferV);
if (type >= 0) {
if ((mode_ == HGCalGeometryMode::Hexagon8) || (mode_ == HGCalGeometryMode::Hexagon8Full)) {
thick = 10000.0 * hgpar_->cellThickness_[type]; // cm to micron
} else if ((mode_ == HGCalGeometryMode::Hexagon) || (mode_ == HGCalGeometryMode::HexagonFull)) {
thick = 100.0 * (type+1); // type = 1,2,3 for 100,200,300 micron
}
}
return thick;
}
Expand Down Expand Up @@ -362,7 +358,7 @@ int HGCalDDDConstants::getLayer(double z, bool reco) const {
if (((mode_ == HGCalGeometryMode::Hexagon) || (mode_ == HGCalGeometryMode::HexagonFull)) && reco) {
int indx = layerIndex(lay, false);
if (indx >= 0)
lay = hgpar_->layerGroup_[indx];
lay = hgpar_->layerGroupO_[indx];
} else {
lay += (hgpar_->firstLayer_ - 1);
}
Expand Down Expand Up @@ -1231,6 +1227,19 @@ int HGCalDDDConstants::waferType(DetId const& id) const {
return type;
}

int HGCalDDDConstants::waferType(int layer, int waferU, int waferV) const {
int type(-1);
if ((mode_ == HGCalGeometryMode::Hexagon8) || (mode_ == HGCalGeometryMode::Hexagon8Full)) {
auto itr = hgpar_->typesInLayers_.find(HGCalWaferIndex::waferIndex(layer, waferU, waferV));
if (itr != hgpar_->typesInLayers_.end())
type = hgpar_->waferTypeL_[itr->second];
} else if ((mode_ == HGCalGeometryMode::Hexagon) || (mode_ == HGCalGeometryMode::HexagonFull)) {
if ((waferU >= 0) && (waferU < (int)(hgpar_->waferTypeL_.size())))
type = (hgpar_->waferTypeL_[waferU]-1);
}
return type;
}

bool HGCalDDDConstants::waferVirtual(int layer, int waferU, int waferV) const {
bool type(false);
if ((mode_ == HGCalGeometryMode::Hexagon8) || (mode_ == HGCalGeometryMode::Hexagon8Full)) {
Expand Down
42 changes: 30 additions & 12 deletions Geometry/HGCalCommonData/src/HGCalGeomTools.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string>

//#define EDM_ML_DEBUG
HGCalGeomTools::HGCalGeomTools() : factor_(1.0/std::sqrt(3.0)) {}

void HGCalGeomTools::radius(double zf,
double zb,
Expand All @@ -22,19 +23,19 @@ void HGCalGeomTools::radius(double zf,
auto zf1 = std::lower_bound(zFront1.begin(), zFront1.end(), zf);
if (zf1 != zFront1.begin())
--zf1;
if (std::abs(*(zf1 + 1) - zf) < tol) {
if (std::abs(*(zf1 + 1) - zf) < tol_) {
++zf1;
dz1 = 2 * tol;
dz1 = 2 * tol_;
}
auto zf2 = std::lower_bound(zFront2.begin(), zFront2.end(), zf);
if (zf2 != zFront2.begin())
--zf2;
auto zb1 = std::lower_bound(zFront1.begin(), zFront1.end(), zb);
if (zb1 != zFront1.begin())
--zb1;
if (std::abs(*zb1 - zb) < tol) {
if (std::abs(*zb1 - zb) < tol_) {
--zb1;
dz2 = -2 * tol;
dz2 = -2 * tol_;
}
auto zb2 = std::lower_bound(zFront2.begin(), zFront2.end(), zb);
if (zb2 != zFront2.begin())
Expand All @@ -61,10 +62,10 @@ void HGCalGeomTools::radius(double zf,
zz.emplace_back(zf);
rin.emplace_back(radius(zf, zFront1, rFront1, slope1));
rout.emplace_back(radius(zf, zFront2, rFront2, slope2));
if (slope(*zb2, zFront2, slope2) < tol) {
if (slope(*zb2, zFront2, slope2) < tol_) {
zz.emplace_back(*zb2);
rin.emplace_back(radius(*zb2, zFront1, rFront1, slope1));
rout.emplace_back(radius(*zb2 - tol, zFront2, rFront2, slope2));
rout.emplace_back(radius(*zb2 - tol_, zFront2, rFront2, slope2));
}
zz.emplace_back(*zb2);
rin.emplace_back(radius(*zb2, zFront1, rFront1, slope1));
Expand All @@ -79,9 +80,9 @@ void HGCalGeomTools::radius(double zf,
zz.emplace_back(zf);
rin.emplace_back(radius(zf, zFront1, rFront1, slope1));
rout.emplace_back(radius(zf, zFront2, rFront2, slope2));
if (slope(*zb1, zFront1, slope1) < tol) {
if (slope(*zb1, zFront1, slope1) < tol_) {
zz.emplace_back(*zb1);
rin.emplace_back(radius(*zb1 - tol, zFront1, rFront1, slope1));
rin.emplace_back(radius(*zb1 - tol_, zFront1, rFront1, slope1));
rout.emplace_back(radius(*zb1, zFront2, rFront2, slope2));
}
zz.emplace_back(*zb1);
Expand Down Expand Up @@ -129,7 +130,7 @@ double HGCalGeomTools::radius(double z,
if (itrz != zFront.begin())
--itrz;
unsigned int ik = static_cast<unsigned int>(itrz - zFront.begin());
if (ik < zFront.size() && std::abs(z - zFront[ik + 1]) < tol)
if (ik < zFront.size() && std::abs(z - zFront[ik + 1]) < tol_)
++ik;
double r = rFront[ik] + (z - zFront[ik]) * slope[ik];
#ifdef EDM_ML_DEBUG
Expand All @@ -151,7 +152,7 @@ double HGCalGeomTools::radius(
#ifdef EDM_ML_DEBUG
ik = k;
#endif
if (z < zFront[k1] + tol)
if (z < zFront[k1] + tol_)
break;
}
}
Expand All @@ -161,12 +162,29 @@ double HGCalGeomTools::radius(
return r;
}

std::pair<double,double> HGCalGeomTools::shiftXY(int waferPosition,
double waferSize) {

double dx(0), dy(0);
switch (waferPosition) {
case (CornerCenterYp): { dy = factor_*waferSize; break;}
case (CornerCenterYm): { dy =-factor_*waferSize; break;}
case (CornerCenterXp): { dx = factor_*waferSize; break;}
case (CornerCenterXm): { dx =-factor_*waferSize; break;}
}
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HGCalGeom")
<< "Shift for " << waferPosition << " is (" << dx << ":" << dy << ")";
#endif
return std::make_pair(dx,dy);
}

double HGCalGeomTools::slope(double z, std::vector<double> const& zFront, std::vector<double> const& slope) {
auto itrz = std::lower_bound(zFront.begin(), zFront.end(), z);
if (itrz != zFront.begin())
--itrz;
unsigned int ik = static_cast<unsigned int>(itrz - zFront.begin());
// if (ik < zFront.size() && std::abs(z-zFront[ik+1]) < tol) ++ik;
// if (ik < zFront.size() && std::abs(z-zFront[ik+1]) < tol_) ++ik;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HGCalGeom") << "HGCalGeomTools::slope:z " << z << " k " << ik << " Slope " << slope[ik];
#endif
Expand All @@ -179,7 +197,7 @@ std::pair<double, double> HGCalGeomTools::zradius(double z1,
std::vector<double> const& rF) {
double z(-1), r(-1);
for (unsigned int k = 0; k < rF.size(); ++k) {
if ((z1 > zF[k] - tol) && (z2 < zF[k] + tol)) {
if ((z1 > zF[k] - tol_) && (z2 < zF[k] + tol_)) {
z = zF[k];
r = rF[k];
break;
Expand Down