Skip to content

Commit 9f8ff8e

Browse files
authored
Merge pull request #45724 from bsunanda/Phase2-hgx359N
Phase2-hgx359N Correct the conversion code for fine scintillator tiles of HGCal V19 geometry in the assignment of cassette number
2 parents 5b93e63 + 16b974f commit 9f8ff8e

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Geometry/HGCalCommonData/interface/HGCalProperty.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ namespace HGCalProperty {
4848
constexpr int32_t kHGCalTilePhis = 288;
4949
constexpr int32_t kHGCalFineTilePhis = 432;
5050
constexpr int32_t kHGCalTilePhisWord = 24;
51+
constexpr int32_t kHGCalFineTilePhisWord = 36;
5152
constexpr int32_t kHGCalTilePhisBy2 = kHGCalTilePhis / 2;
5253
constexpr int32_t kHGCalTilePhisBy3 = kHGCalTilePhis / 3;
5354
constexpr int32_t kHGCalFineTilePhisBy2 = kHGCalFineTilePhis / 2;

Geometry/HGCalCommonData/test/HGCalConvert.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ void ConvertScintillator::makeTitle(const char* outfile,
11511151
int lmax,
11521152
bool debug) {
11531153
const int zside = 1;
1154-
const int phiCassette = 24;
1154+
const int phiCassette = HGCalProperty::kHGCalTilePhisWord;
11551155
std::vector<tileZone> zones;
11561156
for (int layer = lmin; layer <= lmax; ++layer) {
11571157
tileZone tile0;
@@ -1744,10 +1744,11 @@ void ConvertScintillatorV1::makeTitle(std::ofstream& fout,
17441744
int mode,
17451745
bool debug) {
17461746
const int zside = 1;
1747+
int tilePhisWord = (mode > 0) ? HGCalProperty::kHGCalFineTilePhisWord : HGCalProperty::kHGCalTilePhisWord;
17471748
std::vector<tileZone> zones;
17481749
if ((debug % 10) > 0)
17491750
std::cout << "makeTile called with Layer:" << lmin << ":" << lmax << " nphi " << nphis << " mode " << mode
1750-
<< " nmodules " << module.size() << std::endl;
1751+
<< " nmodules " << module.size() << " tilePhisWord " << tilePhisWord << std::endl;
17511752
for (int layer = lmin; layer <= lmax; ++layer) {
17521753
tileZone tile0;
17531754
int kk, irmin, irmax;
@@ -1783,19 +1784,19 @@ void ConvertScintillatorV1::makeTitle(std::ofstream& fout,
17831784
tile0.cassette = (cassette_ == 0) ? 0 : 1;
17841785
} else if ((tile0.rmin != irmin) || (tile0.rmax != irmax)) {
17851786
if (cassette_ != 0) {
1786-
if (tile0.cassette * HGCalProperty::kHGCalTilePhisWord < tile0.phimax) {
1787+
if (tile0.cassette * tilePhisWord < tile0.phimax) {
17871788
do {
17881789
int phimax = tile0.phimax;
1789-
tile0.phimax = tile0.cassette * HGCalProperty::kHGCalTilePhisWord;
1790+
tile0.phimax = tile0.cassette * tilePhisWord;
17901791
zones.push_back(tile0);
17911792
tile0.phimin = tile0.phimax + 1;
17921793
tile0.phimax = phimax;
17931794
++tile0.cassette;
1794-
} while (tile0.cassette * HGCalProperty::kHGCalTilePhisWord < tile0.phimax);
1795+
} while (tile0.cassette * tilePhisWord < tile0.phimax);
17951796
}
17961797
}
17971798
zones.push_back(tile0);
1798-
int cassette = (cassette_ == 0) ? 0 : (1 + ((phi - 1) / HGCalProperty::kHGCalTilePhisWord));
1799+
int cassette = (cassette_ == 0) ? 0 : (1 + ((phi - 1) / tilePhisWord));
17991800
tile0.layer = layer;
18001801
tile0.rmin = irmin;
18011802
tile0.rmax = irmax;

0 commit comments

Comments
 (0)