22 return StatusCode::SUCCESS;
28 const EventContext& ctx,
30 boost::dynamic_bitset<>& addedCellsMap)
const {
34 return StatusCode::SUCCESS;
38 if (!caloCellInHandle.
isValid()) {
39 ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << caloCellInHandle.
key());
40 return StatusCode::FAILURE;
44 std::vector<const CaloCell*> removed_cells;
47 if (!removedClustersHandle.
isValid()){
48 ATH_MSG_ERROR (
"Could not retrieve HiveDataObj with key " << removedClustersHandle.
key());
49 return StatusCode::FAILURE;
53 for (
auto cluster : *removed_clusters_cont){
54 for(
auto cell_it = cluster->cell_cbegin(); cell_it != cluster->cell_cend(); cell_it++){
55 removed_cells.push_back(*cell_it);
64 std::vector<CaloCell_ID::SUBCALO> emSubCaloBlocks;
66 std::unique_ptr<CaloCellList> cellList = std::make_unique<CaloCellList>(caloDDMgr, cellContainer, emSubCaloBlocks);
72 std::vector<const CaloCell*> shotCells;
74 for (
const CaloCell* cell : *cellList) {
76 int sampling = cell->caloDDE()->getSampling();
77 if (sampling > 7)
continue;
79 if (
m_removeElectronCells &&
inEleRM() && std::find(removed_cells.cbegin(), removed_cells.cend(), cell) != removed_cells.cend())
continue;
83 if (!addedCellsMap.test(cellHash)) {
85 addedCellsMap.
set(cellHash);
88 if (sampling == CaloCell_ID::EMB1 || sampling == CaloCell_ID::EME1) {
90 shotCells.push_back(cell);
97 acc_shotCells(tau) = std::move(shotCells);
99 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(x,...)
Container class for CaloCell.
Data object for each calorimeter readout cell.
void set(const CaloDetDescrElement *caloDDE, const Identifier &ID)
Fast method to change the identity of a cell.
CaloCellContainer that can accept const cell pointers.
This class provides the client interface for accessing the detector description information common to...
value_type push_back(value_type pElem)
Add an element to the end of the collection.
This is a "hash" representation of an Identifier.
Helper class to provide type-safe access to aux data.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
virtual StatusCode executeTool(xAOD::TauJet &pTau, const EventContext &ctx, CaloConstCellContainer &Pi0CellContainer, boost::dynamic_bitset<> &map) const override
TauPi0CreateROI(const std::string &name)
Gaudi::Property< bool > m_removeElectronCells
SG::ReadHandleKey< CaloCellContainer > m_caloCellInputContainer
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_removedClusterInputContainer
Gaudi::Property< double > m_maxDeltaRTauCells
virtual StatusCode initialize() override
Tool initializer.
TauJet_v3 TauJet
Definition of the current "tau version".
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.