|
ATLAS Offline Software
|
Go to the documentation of this file.
16 const float GeV = 1000.;
25 :
EL::AnaAlgorithm(
name, svcLoc) { }
66 return StatusCode::SUCCESS;
74 const EventContext& ctx = Gaudi::Hive::currentContext();
79 return StatusCode::FAILURE;
84 if (!muons.isValid()) {
86 return StatusCode::FAILURE;
91 if (!
jets.isValid()) {
93 return StatusCode::FAILURE;
100 if (!readHandle.isValid()) {
102 return StatusCode::FAILURE;
104 taus = readHandle.cptr();
110 if (!readHandle.isValid()) {
112 return StatusCode::FAILURE;
114 photons = readHandle.cptr();
120 if (!vertices.isValid()) {
122 return StatusCode::FAILURE;
124 bool checkVtx =
false;
136 ATH_MSG_DEBUG(
"No primary vertices found, cannot do overlap removal! Will return all fails.");
146 #ifdef XAOD_STANDALONE
147 auto msglvl =
msg().level();
149 auto msglvl = msgLevel();
159 return StatusCode::SUCCESS;
165 template<
class ContainerType>
168 for(
auto obj : container){
177 template<
class ContainerType>
181 for(
auto obj : container){
184 <<
" selected? " <<
int(selDec(*
obj)));
188 template<
class ObjType>
196 bool OverlapRemovalGenUseAlg::selectObject<xAOD::Jet>(
const xAOD::Jet&
obj)
203 if(
obj.pt() < m_ptCut*
GeV || std::abs(
obj.eta()) > m_etaCut)
return false;
211 if(m_electronLabel.empty())
return true;
213 if(
obj.pt() < m_ptCut*
GeV || std::abs(
obj.eta()) > m_etaCut)
return false;
214 if(!acc_ElectronPass(
obj))
return false;
222 if(m_photonLabel.empty())
return true;
224 if(
obj.pt() < m_ptCut*
GeV || std::abs(
obj.eta()) > m_etaCut)
return false;
225 if(!acc_PhotonPass(
obj))
return false;
231 bool OverlapRemovalGenUseAlg::selectObject<xAOD::Muon>(
const xAOD::Muon&
obj)
233 if(m_muonLabel.empty())
return true;
235 if(
obj.pt() < m_ptCut*
GeV || std::abs(
obj.eta()) > m_etaCut)
return false;
236 if(!acc_MuonPass(
obj))
return false;
244 if(m_tauLabel.empty())
return true;
246 if(
obj.pt() < m_ptCut*
GeV || std::abs(
obj.eta()) > m_etaCut)
return false;
247 if(!acc_TauPass(
obj))
return false;
256 const std::string&
type)
260 for(
auto obj : container){
264 <<
" eta " <<
obj->eta() <<
" phi " <<
obj->phi()
265 <<
" overlaps " << overlaps);
Gaudi::Property< float > m_etaCut
DataKeyHandler< xAOD::JetContainer > m_jetKey
Gaudi::Property< std::string > m_muonLabel
virtual StatusCode initialize()
Initialize the algorithm.
DataKeyHandler< xAOD::PhotonContainer > m_photonKey
ToolHandle< ORUtils::IOverlapRemovalTool > m_orTool
Handle to the tool.
Gaudi::Property< float > m_ptCut
Helper class to provide constant type-safe access to aux data.
#define ATH_MSG_VERBOSE(x)
Gaudi::Property< std::string > m_tauLabel
const ort::inputAccessor_t selectAcc(inputLabel)
Gaudi::Property< std::string > m_selectionLabel
Label configuration --> Internal usage no data dependency needed.
DataKeyHandler< xAOD::ElectronContainer > m_electronKey
Gaudi::Property< std::string > m_overlapLabel
Helper class to provide type-safe access to aux data.
Gaudi::Property< std::string > m_photonLabel
::StatusCode StatusCode
StatusCode definition for legacy code.
OverlapRemovalGenUseAlg(const std::string &name, ISvcLocator *svcLoc)
Standard algorithm constructor.
Class describing a tau jet.
Gaudi::Property< bool > m_defaultValue
This module defines the arguments passed from the BATCH driver to the BATCH worker.
void printObjects(const xAOD::IParticleContainer &container, const std::string &type)
Print object info.
bool selectObject(const ObjType &obj)
Simple object selection.
void setDefaultDecorations(const ContainerType &container)
DataKeyHandler< xAOD::TauJetContainer > m_tauKey
DataKeyHandler< xAOD::MuonContainer > m_muonKey
Class describing a Vertex.
void applySelection(const ContainerType &container)
Simple object selection.
SG::ReadHandleKey< xAOD::VertexContainer > m_vtxKey
virtual StatusCode execute()
Execute the algorithm.
Gaudi::Property< std::string > m_electronLabel
Gaudi::Property< std::string > m_bJetLabel
const ort::outputAccessor_t overlapAcc(outputLabel)