Skip to content

Commit

Permalink
change function name: xtalk_get_cell_indices
Browse files Browse the repository at this point in the history
  • Loading branch information
zwu0922 authored and andresailer committed Apr 18, 2024
1 parent 1b83568 commit 4001c36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ std::vector<std::pair<uint64_t, double>> xtalk_neighbours_ModuleThetaMerged(cons
uint64_t aCellId);

// debug: return cell layer/module/theta indices
std::vector<int> xtalk_get_cell_position(const dd4hep::DDSegmentation::FCCSWGridModuleThetaMerged_k4geo& aSeg,
std::vector<int> xtalk_get_cell_indices(const dd4hep::DDSegmentation::FCCSWGridModuleThetaMerged_k4geo& aSeg,
const dd4hep::DDSegmentation::BitFieldCoder& aDecoder,
const std::vector<std::string>& aFieldNames,
uint64_t aCellId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ std::vector<std::pair<uint64_t, double>> xtalk_neighbours_ModuleThetaMerged(cons
}

// return indices of layer/module/theta fields of a give cell. This is a function to be used for debug purpose
std::vector<int> xtalk_get_cell_position(const dd4hep::DDSegmentation::FCCSWGridModuleThetaMerged_k4geo& aSeg,
std::vector<int> xtalk_get_cell_indices(const dd4hep::DDSegmentation::FCCSWGridModuleThetaMerged_k4geo& aSeg,
const dd4hep::DDSegmentation::BitFieldCoder& aDecoder,
const std::vector<std::string>& aFieldNames,
uint64_t aCellId) {
Expand All @@ -234,11 +234,11 @@ std::vector<int> xtalk_get_cell_position(const dd4hep::DDSegmentation::FCCSWGrid
int layer_id = aDecoder.get(aCellId, aFieldNames[idLayerField]);
int module_id = aDecoder.get(aCellId, aFieldNames[idModuleField]);
int theta_id = aDecoder.get(aCellId, aFieldNames[idThetaField]);
std::vector<int> cell_position;
cell_position.emplace_back(layer_id);
cell_position.emplace_back(module_id);
cell_position.emplace_back(theta_id);
return cell_position;
std::vector<int> cell_indices;
cell_indices.emplace_back(layer_id);
cell_indices.emplace_back(module_id);
cell_indices.emplace_back(theta_id);
return cell_indices;
}

}
Expand Down

0 comments on commit 4001c36

Please sign in to comment.