Skip to content

Commit

Permalink
Fix missed field renames
Browse files Browse the repository at this point in the history
  • Loading branch information
ruse-traveler committed Dec 30, 2024
1 parent b4511b4 commit 6976ee2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
33 changes: 33 additions & 0 deletions src/algorithms/calorimetry/CalorimeterHitsMerger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ void CalorimeterHitsMerger::init() {
// throw std::runtime_error(mess);
}


/* TO REMOVE
// if no field-by-field transformations provided, initialize relevant bitmasks
// otherwise intialize relevant functionals
if (m_cfg.fieldTransformations.empty()) {
Expand Down Expand Up @@ -93,6 +95,7 @@ void CalorimeterHitsMerger::init() {
++iMap;
} // end loop over fieldTransformations
}
*/

}

Expand Down Expand Up @@ -183,6 +186,35 @@ void CalorimeterHitsMerger::build_map_via_funcs(
MergeMap& merge_map
) const {

// throw error if field and transformation vectors
// are different sizes
if (m_cfg.fields.size() != m_fieldTransformations.size()) {
error(
"field and transformation vectors are different sizes ({} vs. {}). Vectors should be 1-to-1.",
m_cfg.fields.size(),
m_fieldTransformations.size()
);
return;
}

// loop over hits
std::vector<RefField> ref_fields;
for (std::size_t iHit = 0; const auto& hit : *in_hits) {

// loop through readout fields
for (std::size_t iField = 0; const auto& name_field : id_desc.fields()) {



} // end field loop

// add hit to appropriate group
merge_map[ref_id].push_back(iHit);
++iHit;

} // end hit loop

/* TO REMOVE
std::vector<RefField> ref_fields;
for (std::size_t iHit = 0; const auto& hit : *in_hits) {
Expand Down Expand Up @@ -213,6 +245,7 @@ void CalorimeterHitsMerger::build_map_via_funcs(
// add hit to appropriate group
merge_map[ref_id].push_back(iHit);
++iHit;
*/

} // end hit loop

Expand Down
4 changes: 2 additions & 2 deletions src/factories/calorimetry/CalorimeterHitsMerger_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class CalorimeterHitsMerger_factory : public JOmniFactory<CalorimeterHitsMerger_

ParameterRef<std::string> m_readout {this, "readout", config().readout};
ParameterRef<std::vector<std::string>> m_fields {this, "fields", config().fields};
ParameterRef<std::vector<int>> m_field_refs {this, "fieldRefs", config().refs};
ParameterRef<std::vector<std::string>> m_field_transformations {this, "fieldTransormations", config().mappings};
ParameterRef<std::vector<int>> m_field_refs {this, "fieldRefs", config().fieldRefs};
ParameterRef<std::vector<std::string>> m_field_transformations {this, "fieldTransormations", config().fieldTransformations};

Service<AlgorithmsInit_service> m_algorithmsInit {this};

Expand Down

0 comments on commit 6976ee2

Please sign in to comment.