ATLAS Offline Software
Loading...
Searching...
No Matches
IsolationWP.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4
6
7namespace CP {
8
9 const std::string& IsolationWP::name() const { return m_name; }
10 void IsolationWP::name(const std::string& name) { m_name = name; }
13 for (const auto& c : m_cuts) {
14 if (c->accept(p)) result.setCutResult(c->name(), true);
15 else{
16 result.clear();
17 return result;
18 }
19 }
20 return result;
21 }
22
25 for (const auto& c : m_cuts) {
26 if (c->accept(p)) { result.setCutResult(c->name(), true); }
27 else{
28 result.clear();
29 return result;
30 }
31 }
32 return result;
33 }
34
35 void IsolationWP::addCut(std::unique_ptr<IsolationCondition> i) {
36 m_acceptInfo.addCut(i->name(), i->name());
37 m_cuts.emplace_back(std::move(i));
38 }
40 const std::vector<std::unique_ptr<IsolationCondition>>& IsolationWP::conditions() const { return m_cuts; }
41
42 IsolationWP::IsolationWP(const std::string& name) : m_name(name) {}
43} // namespace CP
IsolationWP(const std::string &name)
const std::string & name() const
asg::AcceptInfo m_acceptInfo
Definition IsolationWP.h:33
std::vector< std::unique_ptr< IsolationCondition > > m_cuts
Definition IsolationWP.h:32
void addCut(std::unique_ptr< IsolationCondition > cut)
std::string m_name
Definition IsolationWP.h:31
asg::AcceptData accept(const xAOD::IParticle &p) const
const std::vector< std::unique_ptr< IsolationCondition > > & conditions() const
const asg::AcceptInfo & getAccept() const
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.