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

[HCAL] Make sure that trigger towers with abs(ieta)=16 are processed with QIE8 settings in 2018. #22077

Merged
merged 1 commit into from Feb 8, 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
Expand Up @@ -85,6 +85,7 @@ class HcalTriggerPrimitiveAlgo {

bool validUpgradeFG(const HcalTrigTowerDetId& id, int depth) const;
bool validChannel(const QIE10DataFrame& digi, int ts) const;
bool needLegacyFG(const HcalTrigTowerDetId& id) const;

/// adds the actual RecHits
void analyze(IntegerCaloSamples & samples, HcalTriggerPrimitiveDigi & result);
Expand Down
17 changes: 17 additions & 0 deletions SimCalorimetry/HcalTrigPrimAlgos/src/HcalTriggerPrimitiveAlgo.cc
Expand Up @@ -741,13 +741,30 @@ HcalTriggerPrimitiveAlgo::validUpgradeFG(const HcalTrigTowerDetId& id, int depth
return false;
if (id.ietaAbs() > LAST_FINEGRAIN_TOWER)
return false;
if (id.ietaAbs() == HBHE_OVERLAP_TOWER and not upgrade_hb_)
return false;
return true;
}

bool
HcalTriggerPrimitiveAlgo::needLegacyFG(const HcalTrigTowerDetId& id) const
{
// This tower (ietaAbs == 16) does not accept upgraded FG bits,
// but needs pseudo legacy ones to ensure that the tower is processed
// even when the QIE8 depths in front of it do not have energy deposits.
if (id.ietaAbs() == HBHE_OVERLAP_TOWER and not upgrade_hb_)
return true;
return false;
}

void
HcalTriggerPrimitiveAlgo::addUpgradeFG(const HcalTrigTowerDetId& id, int depth, const std::vector<std::bitset<2>>& bits)
{
if (not validUpgradeFG(id, depth)) {
if (needLegacyFG(id)) {
std::vector<bool> pseudo(bits.size(), false);
addFG(id, pseudo);
}
return;
}

Expand Down