ATLAS Offline Software
Loading...
Searching...
No Matches
IsolationCondition.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef ISOLATIONSELECTION_ISOLATIONCONDITION_H
6#define ISOLATIONSELECTION_ISOLATIONCONDITION_H
7
12
13#include <map>
14#include <memory>
15#include <vector>
16
19
20
21
22namespace CP {
23 struct strObj {
24 float pt{0.f};
25 float eta{0.f};
26 std::vector<float> isolationValues;
28 };
29
31 public:
32 IsolationCondition(const std::string& name, xAOD::Iso::IsolationType isoType, const std::string& isoDecSuffix = "");
33 IsolationCondition(const std::string& name, const std::vector<xAOD::Iso::IsolationType>& isoTypes, const std::string& isoDecSuffix = "");
34 IsolationCondition(const std::string& name, const std::string& isoType, const std::string& isoDecSuffix = "");
35 IsolationCondition(const std::string& name, const std::vector<std::string>& isoTypes, const std::string& isoDecSuffix = "");
36
39 virtual ~IsolationCondition() = default;
40
41 const std::string& name() const;
42
43 unsigned int num_types() const;
44 xAOD::Iso::IsolationType type(unsigned int n = 0) const;
45 const FloatAccessor& accessor(unsigned int n = 0) const;
46 const FloatAccessor& accessor_noCloseBy(unsigned int n = 0) const;
47
48 virtual bool accept(const xAOD::IParticle& x) const = 0;
49 virtual bool accept(const strObj& x) const = 0;
50
51 private:
52 std::string m_name;
53 std::vector<xAOD::Iso::IsolationType> m_isolationType;
54 std::vector<FloatAccessor> m_acc;
55 std::vector<FloatAccessor> m_acc_noCloseBy;
56
57 protected:
58 std::string m_isoDecSuffix{};
59 };
60} // namespace CP
61#endif
Base class for elements of a container that can have aux data.
#define x
IsolationCondition(const std::string &name, xAOD::Iso::IsolationType isoType, const std::string &isoDecSuffix="")
std::vector< FloatAccessor > m_acc
std::vector< FloatAccessor > m_acc_noCloseBy
IsolationCondition(const IsolationCondition &rhs)=delete
const FloatAccessor & accessor_noCloseBy(unsigned int n=0) const
virtual bool accept(const strObj &x) const =0
const std::string & name() const
unsigned int num_types() const
virtual bool accept(const xAOD::IParticle &x) const =0
xAOD::Iso::IsolationType type(unsigned int n=0) const
std::vector< xAOD::Iso::IsolationType > m_isolationType
IsolationCondition & operator=(const IsolationCondition &rhs)=delete
virtual ~IsolationCondition()=default
const FloatAccessor & accessor(unsigned int n=0) const
Class mimicking the AthMessaging class from the offline software.
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition ObjectType.h:32
@ EventInfo
The object is an event information one.
Definition ObjectType.h:91
IsolationType
Overall enumeration for isolation types in xAOD files.
std::vector< float > isolationValues
xAOD::Type::ObjectType type