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

Fix HCAL TP compression LUTs by populating plan 1 TP list first. #17790

Merged
merged 1 commit into from Mar 17, 2017
Merged
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
22 changes: 11 additions & 11 deletions CalibCalorimetry/CaloTPG/src/CaloTPGTranscoderULUT.cc
Expand Up @@ -253,21 +253,21 @@ void CaloTPGTranscoderULUT::setup(HcalLutMetadata const& lutMetadata, HcalTrigTo
outputLUT_.resize(theTopology->getHTSize());
hcaluncomp_.resize(theTopology->getHTSize());

plan1_towers_.clear();
for (const auto& id: lutMetadata.getAllChannels()) {
if (not (id.det() == DetId::Hcal and theTopology->valid(id)))
continue;
HcalDetId cell(id);
if (not theTopology->dddConstants()->isPlan1(cell))
continue;
for (const auto& tower: theTrigTowerGeometry.towerIds(cell))
plan1_towers_.emplace(tower);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello @matz-e
plan1_towers_
is filled only at this line, inside CaloTPGTranscoderULUT::getOutputLUTSize(...),
and loadHCALCompress() does not seem to affect its content.

Therefore,
why does the swapping the ordering matter ?

Copy link
Contributor Author

@matz-e matz-e Mar 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loadHCALCompress() calls getOutputLUTSize() in line 74, and thus relies on plan1_towers already filled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getOutputLUTSize() uses plan1_towers_ in line 212, that's why the order matters…


if (compressionFile_.empty() && decompressionFile_.empty()) {
loadHCALCompress(lutMetadata,theTrigTowerGeometry);
}
else {
throw cms::Exception("Not Implemented") << "setup of CaloTPGTranscoderULUT from text files";
}

plan1_towers_.clear();
for (const auto& id: lutMetadata.getAllChannels()) {
if (not (id.det() == DetId::Hcal and theTopology->valid(id)))
continue;
HcalDetId cell(id);
if (not theTopology->dddConstants()->isPlan1(cell))
continue;
for (const auto& tower: theTrigTowerGeometry.towerIds(cell))
plan1_towers_.emplace(tower);
}
}