Skip to content

Commit

Permalink
Merge pull request #272 from eic/davidl_missing_collection_fixes
Browse files Browse the repository at this point in the history
Davidl missing collection fixes
  • Loading branch information
faustus123 authored Oct 23, 2022
2 parents d207873 + 06a1b58 commit 15b17de
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
22 changes: 16 additions & 6 deletions src/algorithms/calorimetry/CalorimeterHitReco.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,29 @@ void CalorimeterHitReco::AlgorithmInit(std::shared_ptr<spdlog::logger>& logger)
id_dec = id_spec.decoder();
if (!m_sectorField.empty()) {
sector_idx = id_dec->index(m_sectorField);
//LOG_INFO(default_cerr_logger) << "Find sector field " << m_sectorField << ", index = " << sector_idx << LOG_END;
m_logger->info("Find sector field {}, index = {}", m_sectorField, sector_idx);
}
if (!m_layerField.empty()) {
layer_idx = id_dec->index(m_layerField);
//LOG_INFO(default_cerr_logger) << "Find layer field " << m_layerField << ", index = " << sector_idx << LOG_END;
m_logger->info("Find layer field {}, index = {}", m_layerField, sector_idx);
}
} catch (...) {
//LOG_ERROR(default_cerr_logger) << "Failed to load ID decoder for " << m_readout << LOG_END;
m_logger->error("Failed to load ID decoder for {}", m_readout);
if( !id_dec ) {
m_logger->error("Failed to load ID decoder for {}", m_readout);
std::stringstream readouts;
for (auto r: m_geoSvc->detector()->readouts()) readouts << "\"" << r.first << "\", ";
m_logger->warn("Available readouts: {}", readouts.str() );
}else {
m_logger->warn("Failed to find field index for {}.", m_readout);
if (!m_sectorField.empty()) { m_logger->warn(" -- looking for sector field \"{}\".", m_sectorField); }
if (!m_layerField.empty()) { m_logger->warn(" -- looking for layer field \"{}\".", m_layerField); }
std::stringstream fields;
for (auto field: id_spec.decoder()->fields()) fields << "\"" << field.name() << "\", ";
m_logger->warn("Available fields: {}", fields.str() );
m_logger->warn("n.b. The local position, sector id and layer id will not be correct for this.");
m_logger->warn("however, the position, energy, and time values should still be good.");
}

return;
}

Expand All @@ -59,10 +71,8 @@ void CalorimeterHitReco::AlgorithmInit(std::shared_ptr<spdlog::logger>& logger)
if (!m_localDetElement.empty()) {
try {
local = m_geoSvc->detector()->detector(m_localDetElement);
//LOG_INFO(default_cerr_logger) << "local coordinate system from DetElement " << m_localDetElement << LOG_END;
m_logger->info("local coordinate system from DetElement {}", m_localDetElement);
} catch (...) {
//LOG_ERROR(default_cerr_logger) << "failed to load local coordinate system from DetElement " << m_localDetElement << LOG_END;
m_logger->error("failed to load local coordinate system from DetElement {}", m_localDetElement);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/default_flags_table/reco_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
('EEMC:EcalEndcapNTruthClusters:moduleDimZName', '', ''),
('EEMC:EcalEndcapNTruthClusters:samplingFraction', '0.03', '*'),

('EEMC:EcalEndcapNClusters:input_protoclust_tag', 'EcalEndcapNHits', ''),
('EEMC:EcalEndcapNClusters:input_protoclust_tag', 'EcalEndcapNIslandProtoClusters', ''),
('EEMC:EcalEndcapNClusters:samplingFraction', '1', ''),
('EEMC:EcalEndcapNClusters:logWeightBase', '3.6', ''),
('EEMC:EcalEndcapNClusters:depthCorrection', '0', ''),
Expand Down

0 comments on commit 15b17de

Please sign in to comment.