Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions offline/packages/CaloReco/CaloTowerCalib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ int CaloTowerCalib::process_event(PHCompositeNode *topNode)
float calibconst = cdbttree->GetFloatValue(key, m_fieldname);
bool isZS = caloinfo_raw->get_isZS();

if (calibconst <= 0)
{
_calib_towers->get_tower_at_channel(channel)->set_energy(0.0);
_calib_towers->get_tower_at_channel(channel)->set_isNoCalib(true);
continue;
}

if (isZS && m_doZScrosscalib)
{
float crosscalibconst = cdbttree_ZScrosscalib->GetFloatValue(key, m_fieldname_ZScrosscalib);
Expand All @@ -250,11 +257,6 @@ int CaloTowerCalib::process_event(PHCompositeNode *topNode)
{
_calib_towers->get_tower_at_channel(channel)->set_energy(raw_amplitude * calibconst);
}

if (calibconst == 0)
{
_calib_towers->get_tower_at_channel(channel)->set_isNoCalib(true);
}
if(m_dotimecalib)
{
//timing is not useful for ZS towers
Expand Down