16 const float GeV = 1000.;
66 return StatusCode::SUCCESS;
74 const EventContext& ctx = Gaudi::Hive::currentContext();
77 if (!electrons.isValid()) {
79 return StatusCode::FAILURE;
86 return StatusCode::FAILURE;
91 if (!jets.isValid()) {
93 return StatusCode::FAILURE;
102 return StatusCode::FAILURE;
112 return StatusCode::FAILURE;
114 photons = readHandle.
cptr();
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();
151 if(msglvl >= MSG::VERBOSE){
159 return StatusCode::SUCCESS;
165 template<
class ContainerType>
177 template<
class ContainerType>
184 <<
" selected? " <<
int(selDec(*obj)));
188template<
class ObjType>
199 if(obj.pt() < m_ptCut*
GeV || std::abs(obj.eta()) > m_etaCut)
return false;
207 if(m_electronLabel.empty())
return true;
209 if(obj.pt() < m_ptCut*
GeV || std::abs(obj.eta()) > m_etaCut)
return false;
210 if(!acc_ElectronPass(obj))
return false;
218 if(m_photonLabel.empty())
return true;
220 if(obj.pt() < m_ptCut*
GeV || std::abs(obj.eta()) > m_etaCut)
return false;
221 if(!acc_PhotonPass(obj))
return false;
229 if(m_muonLabel.empty())
return true;
231 if(obj.pt() < m_ptCut*
GeV || std::abs(obj.eta()) > m_etaCut)
return false;
232 if(!acc_MuonPass(obj))
return false;
240 if(m_tauLabel.empty())
return true;
242 if(obj.pt() < m_ptCut*
GeV || std::abs(obj.eta()) > m_etaCut)
return false;
243 if(!acc_TauPass(obj))
return false;
252 const std::string&
type)
260 <<
" eta " << obj->eta() <<
" phi " << obj->phi()
261 <<
" overlaps " << overlaps);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
const ort::outputAccessor_t overlapAcc(outputLabel)
const ort::inputAccessor_t selectAcc(inputLabel)
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
OverlapRemovalGenUseAlg(const std::string &name, ISvcLocator *svcLoc)
Standard algorithm constructor.
DataKeyHandler< xAOD::PhotonContainer > m_photonKey
Gaudi::Property< std::string > m_electronLabel
SG::ReadHandleKey< xAOD::VertexContainer > m_vtxKey
DataKeyHandler< xAOD::MuonContainer > m_muonKey
DataKeyHandler< xAOD::ElectronContainer > m_electronKey
void applySelection(const ContainerType &container)
Simple object selection.
DataKeyHandler< xAOD::TauJetContainer > m_tauKey
Gaudi::Property< float > m_etaCut
Gaudi::Property< std::string > m_muonLabel
Gaudi::Property< bool > m_defaultValue
void printObjects(const xAOD::IParticleContainer &container, const std::string &type)
Print object info.
Gaudi::Property< float > m_ptCut
Gaudi::Property< std::string > m_selectionLabel
Label configuration --> Internal usage no data dependency needed.
Gaudi::Property< std::string > m_photonLabel
Gaudi::Property< std::string > m_bJetLabel
Gaudi::Property< std::string > m_overlapLabel
void setDefaultDecorations(const ContainerType &container)
virtual StatusCode execute()
Execute the algorithm.
Gaudi::Property< std::string > m_tauLabel
virtual StatusCode initialize()
Initialize the algorithm.
DataKeyHandler< xAOD::JetContainer > m_jetKey
bool selectObject(const ObjType &obj)
Simple object selection.
ToolHandle< ORUtils::IOverlapRemovalTool > m_orTool
Handle to the tool.
SG::ConstAccessor< T, ALLOC > ConstAccessor
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
SG::AuxElement::ConstAccessor< inputFlag_t > inputAccessor_t
Input object accessor.
SG::AuxElement::Decorator< inputFlag_t > inputDecorator_t
Input object decorator (for convenience if users want it)
SG::AuxElement::ConstAccessor< outputFlag_t > outputAccessor_t
Output object accessor (for convenience)
Jet_v1 Jet
Definition of the current "jet version".
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
Vertex_v1 Vertex
Define the latest version of the vertex class.
TauJet_v3 TauJet
Definition of the current "tau version".
Muon_v1 Muon
Reference the current persistent version:
Photon_v1 Photon
Definition of the current "egamma version".
TauJetContainer_v3 TauJetContainer
Definition of the current "taujet container version".
Electron_v1 Electron
Definition of the current "egamma version".
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.