ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloClusterCorrection
src
CaloClusterRemoveBad.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// include header files
6
#include "
CaloClusterRemoveBad.h
"
7
#include "
CaloEvent/CaloCell.h
"
8
#include "CaloEvent/CaloClusterContainer.h"
9
#include "GaudiKernel/MsgStream.h"
10
#include "
AthContainers/DataVector.h
"
11
12
/********************************************************************
13
14
NAME: CaloClusterRemoveBad.cxx
15
16
AUTHORS: H. Ma
17
CREATED: July 2010
18
19
PURPOSE: Remove bad cluster after corrections.
20
21
********************************************************************/
22
23
30
CaloClusterRemoveBad::CaloClusterRemoveBad
(
const
std::string&
type
,
31
const
std::string& name,
32
const
IInterface* parent)
33
:
CaloClusterProcessor
(
type
, name, parent)
34
{
35
}
36
37
47
StatusCode
CaloClusterRemoveBad::execute
(
const
EventContext&
/*ctx*/
,
48
xAOD::CaloCluster
*
/*cluster*/
)
const
49
{
50
return
StatusCode::SUCCESS;
51
}
52
53
59
StatusCode
60
CaloClusterRemoveBad::execute
(
const
EventContext&
/*ctx*/
,
61
xAOD::CaloClusterContainer
* clusColl)
const
62
{
63
64
ATH_MSG_DEBUG
(
"Executing CaloClusterRemoveBad"
<<
endmsg
);
65
66
using
clus_iterator =
xAOD::CaloClusterContainer::iterator
;
67
clus_iterator iter1 = clusColl->
begin
();
68
69
ATH_MSG_DEBUG
(
"Collection has before dup rem size: "
<< clusColl->
size
() <<
endmsg
);
70
for
( ;iter1!=clusColl->
end
(); ) {
71
ATH_MSG_DEBUG
(
" cluster energy "
<< (*iter1)->e() <<
endmsg
);
72
if
((*iter1)->e()<=
m_eThreshold
){
73
ATH_MSG_DEBUG
(
" Removed cluster with energy below threshold, "
<< (*iter1)->e() <<
endmsg
);
74
iter1 = clusColl->
erase
(iter1);
75
continue ;
76
}
77
78
++iter1;
79
80
}
81
ATH_MSG_DEBUG
(
"Collection has after dup rem size: "
<< clusColl->
size
() <<
endmsg
);
82
83
return
StatusCode::SUCCESS;
84
}
85
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
CaloCell.h
CaloClusterRemoveBad.h
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
CaloClusterProcessor::CaloClusterProcessor
CaloClusterProcessor(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition
CaloClusterProcessor.cxx:26
CaloClusterRemoveBad::CaloClusterRemoveBad
CaloClusterRemoveBad(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition
CaloClusterRemoveBad.cxx:30
CaloClusterRemoveBad::m_eThreshold
Gaudi::Property< float > m_eThreshold
Definition
CaloClusterRemoveBad.h:66
CaloClusterRemoveBad::execute
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *cluster) const override
Execute on a single cluster.
Definition
CaloClusterRemoveBad.cxx:47
DataVector< CaloCluster_v1 >::iterator
DataModel_detail::iterator< DataVector > iterator
Definition
DataVector.h:842
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::erase
iterator erase(iterator position)
Remove element at a given position.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
xAOD::CaloClusterContainer
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterContainer.h:17
type
Generated on
for ATLAS Offline Software by
1.17.0