Skip to content

Commit

Permalink
[CaloTowerTool] Fix useHalfTower option (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrieucF authored Mar 2, 2023
1 parent 89a764d commit 5814105
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion RecCalorimeter/src/components/CaloTowerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,14 @@ void CaloTowerTool::CellsIntoTowers(std::vector<std::vector<float>>& aTowers,
}
bool pass = true;
for (const auto& cell : *aCells) {
pass = true;
// if multisegmentation is used - first find out which segmentation to use
if( aType == SegmentationType::kMulti) {
segmentation = dynamic_cast<const dd4hep::DDSegmentation::FCCSWGridPhiEta*>(&multisegmentation->subsegmentation(cell.getCellID()));
}
if (m_useHalfTower) {
uint layerId = m_decoder->get(cell.getCellID(), "layer");
if ( layerId > 3 ) {
if ( layerId > m_max_layer ) {
pass = false;
}
}
Expand Down
3 changes: 2 additions & 1 deletion RecCalorimeter/src/components/CaloTowerTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ class CaloTowerTool : public GaudiTool, virtual public ITowerTool {
/// map to cells contained within a tower so they can be attached to a reconstructed cluster (note that fraction of
/// their energy assigned to a cluster is not acknowledged)
std::map<std::pair<uint, uint>, std::vector<edm4hep::CalorimeterHit>> m_cellsInTowers;
/// Use only half of calorimeter
/// Use only a part of the calorimeter (in depth)
Gaudi::Property<bool> m_useHalfTower{this, "halfTower", false, "Use half tower"};
Gaudi::Property<uint> m_max_layer{this, "max_layer", 6, "Specify which radial layer are used. The condition is 'if(cellLayer > m_max_layer) skip this cell'."};
};

#endif /* RECCALORIMETER_CALOTOWERTOOL_H */

0 comments on commit 5814105

Please sign in to comment.