ATLAS Offline Software
Trigger.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 // contact: jmaurer@cern.ch
6 
7 #ifndef TRIGGLOBALEFFICIENCYCORRECTION_TRIGGER_H
8 #define TRIGGLOBALEFFICIENCYCORRECTION_TRIGGER_H 1
9 
10 #include <algorithm>
11 #include <array>
12 #include <boost/container/flat_set.hpp>
13 #include <type_traits>
14 
16 #include "xAODBase/ObjectType.h"
17 template <typename Key>
18 using flat_set = boost::container::flat_set<Key>;
19 
20 namespace TrigGlobEffCorr {
21 
22 class UnusedArg {
23  public:
24  static constexpr xAOD::Type::ObjectType object() { return xAOD::Type::Other; }
25 };
26 
28  public:
29  explicit constexpr TriggerProperties(TriggerType tt) : m_type(tt), m_legs{} {}
31  : m_type(def.type) {
32  loadLegs(def, m_legs);
33  }
34  constexpr TriggerType type() const { return m_type; }
35  constexpr bool valid() const {
36  return !((m_type & TT_MASK_FLAVOUR) &
38  TT_PHOTON_FLAG));
39  }
40  constexpr bool mixed() const {
41  auto x = m_type & TT_MASK_FLAVOUR;
42  return (x != TT_ELECTRON_FLAG) && (x != TT_MUON_FLAG) &&
43  (x != TT_PHOTON_FLAG);
44  }
45  constexpr unsigned nDistinctLegs() const {
46  auto x = m_type & TT_MASK_SYMMETRY;
48  return 1;
49  else if (m_type & TT_DILEPTON_FLAG)
50  return 2 - 1 * (x == TT_SYM);
51  else if (m_type & TT_TRILEPTON_FLAG)
52  return (x == TT_ASYM) ? 3 : 1 + 1 * (mixed() || (x != TT_SYM));
53  else if ((m_type & TT_TETRALEPTON_FLAG) && x == TT_SYM)
54  return 1;
55  return 0;
56  }
57  constexpr unsigned nDistinctLegs(xAOD::Type::ObjectType obj) const {
58  bool firstPos = true;
59  switch (obj) {
61  if (!(m_type & TT_ELECTRON_FLAG))
62  return 0;
63  break;
64  case xAOD::Type::Muon:
65  if (!(m_type & TT_MUON_FLAG))
66  return 0;
67  firstPos = (m_type & TT_PHOTON_FLAG);
68  break;
69  case xAOD::Type::Photon:
70  if (!(m_type & TT_PHOTON_FLAG))
71  return 0;
72  firstPos = false;
73  break;
74  default:
75  return 0;
76  }
77  if (!mixed())
78  return nDistinctLegs();
79  return (firstPos == (m_type & TT_X2Y_FLAG)) ? 1 : nDistinctLegs() - 1;
80  }
81  template <typename Array>
82  void loadLegs(const ImportData::TrigDef& src, Array& dest) {
83  if (src.type != m_type)
84  throw std::runtime_error(
85  "Calculator bug");
86  std::fill(dest.begin(), dest.end(), 0);
88  if (m_type == TT_2E_MU_SYM || m_type == TT_2E_G_SYM ||
89  m_type == TT_2MU_G_SYM)
90  {
92  dest[0] = src.leg[0];
93  dest[1] = src.leg[2];
94  } else
95  {
97  std::copy_n(src.leg.cbegin(), nDistinctLegs(), dest.begin());
98  }
99  }
100 
101  constexpr int cbegin_offset(xAOD::Type::ObjectType obj) const {
102  return (obj != xAOD::Type::Electron) *
105  }
106 
107  constexpr auto cbegin(xAOD::Type::ObjectType obj) const {
108  return m_legs.cbegin() + cbegin_offset(obj);
109  }
110 
111  constexpr int cend_offset(xAOD::Type::ObjectType obj) const {
112  return -((obj != xAOD::Type::Photon) *
115  }
116 
117  constexpr auto cend(xAOD::Type::ObjectType obj) const {
118  return m_legs.cbegin() + nDistinctLegs() + cend_offset(obj);
119  }
120 
121  protected:
123  std::array<std::size_t, 4> m_legs;
124 };
125 
126 template <TriggerType tt, typename CastType1 = UnusedArg,
127  typename CastType2 = UnusedArg>
128 class Trigger {
129  static_assert(TriggerProperties(tt).valid(), "trigger type not supported");
130 
131  private:
132  static constexpr bool extraCheck(xAOD::Type::ObjectType obj) {
133  return (object() == obj || obj == xAOD::Type::Other);
134  }
135  template <typename T>
136  struct Optional {};
137 
138  public:
139  static constexpr TriggerType type() { return tt; }
140 
141  static constexpr bool mixed() { return TriggerProperties(tt).mixed(); }
142 
143  static constexpr unsigned nDistinctLegs() {
145  }
146 
147  static constexpr unsigned nDistinctLegs(xAOD::Type::ObjectType obj) {
149  }
150 
151  static constexpr xAOD::Type::ObjectType object1() {
152  if (!is3Lmix()) {
153  if (tt & TT_ELECTRON_FLAG)
154  return xAOD::Type::Electron;
155  if (tt & TT_MUON_FLAG)
156  return xAOD::Type::Muon;
157  if (tt & TT_PHOTON_FLAG)
158  return xAOD::Type::Photon;
159  return xAOD::Type::Other;
160  }
161  if ((tt & TT_ELECTRON_FLAG) && !(tt & TT_X2Y_FLAG))
162  return xAOD::Type::Electron;
163  if ((tt & TT_PHOTON_FLAG) && (tt & TT_X2Y_FLAG))
164  return xAOD::Type::Photon;
165  return (tt & TT_MUON_FLAG) ? xAOD::Type::Muon : xAOD::Type::Other;
166  }
167 
168  static constexpr xAOD::Type::ObjectType object2() {
169  if (is2Lmix()) {
170  if ((tt & TT_ELECTRON_FLAG) && (tt & TT_MUON_FLAG))
171  return xAOD::Type::Muon;
172  if ((tt & (TT_ELECTRON_FLAG | TT_MUON_FLAG)) && (tt & TT_PHOTON_FLAG))
173  return xAOD::Type::Photon;
174  return xAOD::Type::Other;
175  } else if (!is3Lmix())
176  return xAOD::Type::Other;
177  if ((tt & TT_ELECTRON_FLAG) && (tt & TT_X2Y_FLAG))
178  return xAOD::Type::Electron;
179  if ((tt & TT_PHOTON_FLAG) && !(tt & TT_X2Y_FLAG))
180  return xAOD::Type::Photon;
181  return (tt & TT_MUON_FLAG) ? xAOD::Type::Muon : xAOD::Type::Other;
182  }
183 
184  static constexpr xAOD::Type::ObjectType object() {
185  if (mixed())
186  return xAOD::Type::Other;
187  return object1();
188  }
189 
190  static bool relevantFor(const Lepton& lepton) {
191  return lepton.type() == object();
192  }
193  static bool irrelevantFor(const Lepton& lepton) {
194  return !relevantFor(lepton);
195  }
196 
197  static constexpr bool is1L() { return (tt & TT_SINGLELEPTON_FLAG); }
198  static constexpr bool is2Lnomix() {
199  return (tt & TT_DILEPTON_FLAG) && !mixed();
200  }
201  static constexpr bool is2Lasym() {
202  return ((tt & TT_MASK_TYPE) == TT_DILEPTON_ASYM);
203  }
204  static constexpr bool is2Lsym() {
205  return ((tt & TT_MASK_TYPE) == TT_DILEPTON_SYM);
206  }
207  static constexpr bool is3Lsym() {
208  return ((tt & TT_MASK_TYPE) == TT_TRILEPTON_SYM) && !mixed();
209  }
210  static constexpr bool is3Lhalfsym() {
211  return ((tt & TT_MASK_TYPE) == TT_TRILEPTON_HALFSYM) && !mixed();
212  }
213  static constexpr bool is2Lmix() { return (tt & TT_DILEPTON_FLAG) && mixed(); }
214  static constexpr bool is3Lmix() {
215  return (tt & TT_TRILEPTON_FLAG) && mixed();
216  }
217  static constexpr bool is4Lsym() {
218  return ((tt & TT_MASK_TYPE) == TT_TETRALEPTON_SYM);
219  }
220 
221  std::array<std::size_t, nDistinctLegs()> legs;
222 
223  explicit Trigger() { std::fill(legs.begin(), legs.end(), 0); }
224 
227  }
228 
229  template <bool = true>
230  std::size_t operator()(void) const {
231  static_assert(nDistinctLegs() == 1,
232  "this function is not meaningful for this type of trigger, "
233  "hence should not be used.");
234  return legs[0];
235  }
236 
237  std::size_t operator()(unsigned index) const { return legs[index]; }
238 
239  template <bool = true>
240  std::size_t operator<(const Trigger& rhs) const {
241  static_assert(is1L(),
242  "this function is not meaningful for this type of trigger, "
243  "hence should not be used.");
244  return legs[0] < rhs.legs[0];
245  }
246 
247  explicit operator bool() const {
248  return std::all_of(legs.cbegin(), legs.cend(),
249  [](std::size_t x) -> bool { return x; });
250  }
251 
252  bool operator==(const Trigger& rhs) const { return legs == rhs.legs; }
253 
254  template <xAOD::Type::ObjectType obj = object()>
255  constexpr auto cbegin() const {
256  return legs.cbegin() + TriggerProperties(tt).cbegin_offset(obj);
257  }
258 
259  template <xAOD::Type::ObjectType obj = object()>
260  constexpr auto cend() const {
261  return legs.cend() + TriggerProperties(tt).cend_offset(obj);
262  }
263 
264  template <typename Trig1L>
265  auto hiddenBy(const Trig1L trig) const ->
266  typename std::enable_if<Trig1L::is1L(), bool>::type {
267  static_assert(Trig1L::is1L(),
268  "this function is not meaningful for this type of trigger, "
269  "hence should not be used.");
270  constexpr auto obj = Trig1L::object();
271  return std::find(cbegin<obj>(), cend<obj>(), trig()) != cend<obj>();
272  }
273 
274  template <typename Trig1L>
275  auto hiddenBy(const flat_set<Trig1L>& trigs) const ->
276  typename std::enable_if<Trig1L::is1L(), bool>::type {
277  static_assert(Trig1L::is1L(),
278  "this function is not meaningful for this type of trigger, "
279  "hence should not be used.");
280  return std::any_of(trigs.cbegin(), trigs.cend(),
281  [&](Trig1L t) -> bool { return hiddenBy(t); });
282  }
283 
286  template <xAOD::Type::ObjectType obj, bool anti = false>
287  auto side() const -> std::conditional_t<anti ^ (CastType1::object() == obj),
288  CastType1, CastType2> {
289  static_assert(mixed(),
290  "this function is not meaningful for this type of trigger, "
291  "hence should not be used.");
292  static_assert(obj != xAOD::Type::Other, "implementation incomplete");
293  using CastType = decltype(side<obj, anti>());
294  CastType trig;
295  std::copy_n(this->cbegin<CastType::object()>(),
296  nDistinctLegs(CastType::object()), trig.legs.begin());
297  return trig;
298  }
301  template <typename TrigX>
302  auto side() const -> decltype(side<TrigX::object()>()) {
303  return side<TrigX::object()>();
304  }
306  template <typename TrigX>
307  auto antiside() const -> decltype(side<TrigX::object(), true>()) {
308  return side<TrigX::object(), true>();
309  }
311  CastType1 side1() const { return side<CastType1::object()>(); }
312  CastType2 side2() const { return side<CastType2::object()>(); }
313 
314  template <typename Trig1L>
315  auto addTo(const flat_set<Trig1L>& trigs1L) const
316  -> std::enable_if_t<Trig1L::is1L() &&
319  static_assert(mixed(),
320  "this function is not meaningful for this type of trigger, "
321  "hence should not be used.");
322  flat_set<Trig1L> trigs(trigs1L);
323  trigs.insert(side<Trig1L>());
324  return trigs;
325  }
326 
327  template <typename Trig1L>
328  static auto anonymize(const flat_set<Trig1L>& triggers)
329  -> std::enable_if_t<is1L() && tt == Trig1L::type(),
330  const flat_set<std::size_t>&> {
331  static_assert(sizeof(Trig1L) == sizeof(std::size_t),
332  "invalid cast if the key sizes differ");
333  return reinterpret_cast<const flat_set<std::size_t>&>(triggers);
334  }
335 
336  template <bool = true>
337  bool symmetric() const {
339  "this function is not meaningful for this type of trigger, "
340  "hence should not be used.");
341  return std::all_of(legs.cbegin() + 1, legs.cend(),
342  [&](std::size_t l) -> bool { return l == legs[0]; });
343  }
344 
345  template <bool = true>
346  CastType1 to_symmetric() const {
348  "this function is not meaningful for this type of trigger, "
349  "hence should not be used.");
350  CastType1 trig;
351  trig.legs[0] = this->legs[0];
352  return trig;
353  }
354 
355  template <bool = true>
356  std::size_t asymLeg() const {
357  static_assert((tt & TT_MASK_SYMMETRY) == TT_HALFSYM,
358  "this function is not meaningful for this type of trigger, "
359  "hence should not be used.");
360  return legs[0];
361  }
362 
363  template <bool = true>
364  std::size_t symLeg() const {
365  static_assert((tt & TT_MASK_SYMMETRY) == TT_HALFSYM,
366  "this function is not meaningful for this type of trigger, "
367  "hence should not be used.");
368  return legs[1];
369  }
370 };
371 
372 template <TriggerType, TriggerType = TT_UNKNOWN>
374 
375 template <TriggerType object_flag>
376 struct TriggerClass<object_flag, TT_UNKNOWN> {
377  static constexpr auto addObjFlag(int tt) {
378  return static_cast<TriggerType>(tt | object_flag);
379  }
380 
382  struct T_1 : public Trigger<addObjFlag(TT_SINGLELEPTON_FLAG)> {};
384  struct T_2sym : public Trigger<addObjFlag(TT_DILEPTON_SYM)> {};
386  struct T_2asym : public Trigger<addObjFlag(TT_DILEPTON_ASYM), T_2sym> {};
388  struct T_3sym : public Trigger<addObjFlag(TT_TRILEPTON_SYM)> {};
390  struct T_3halfsym : public Trigger<addObjFlag(TT_TRILEPTON_HALFSYM), T_3sym> {
391  };
393  struct T_4sym : public Trigger<addObjFlag(TT_TETRALEPTON_SYM)> {};
394 };
395 
396 template <TriggerType object1_flag, TriggerType object2_flag>
397 struct TriggerClass {
400  static constexpr auto addObjFlags(int tt) {
401  return static_cast<TriggerType>(tt | object1_flag | object2_flag);
402  }
403 
406  struct T_1_1 : public Trigger<addObjFlags(TT_DILEPTON_FLAG), typename A::T_1,
407  typename B::T_1> {};
409  struct T_2sym_1 : public Trigger<addObjFlags(TT_TRILEPTON_SYM),
410  typename A::T_2sym, typename B::T_1> {};
412  struct T_2asym_1 : public Trigger<addObjFlags(TT_TRILEPTON_ASYM),
413  typename A::T_2asym, typename B::T_1> {};
415  struct T_1_2sym : public Trigger<addObjFlags(TT_TRILEPTON_SYM | TT_X2Y_FLAG),
416  typename A::T_1, typename B::T_2sym> {};
418  struct T_1_2asym : public Trigger<addObjFlags(TT_TRILEPTON_SYM | TT_X2Y_FLAG),
419  typename A::T_1, typename B::T_2asym> {};
420 };
421 
422 } // namespace TrigGlobEffCorr
423 
424 #endif
TrigGlobEffCorr::TriggerProperties::cend_offset
constexpr int cend_offset(xAOD::Type::ObjectType obj) const
Definition: Trigger.h:111
TrigGlobEffCorr::Trigger::addTo
auto addTo(const flat_set< Trig1L > &trigs1L) const -> std::enable_if_t< Trig1L::is1L() &&nDistinctLegs(Trig1L::object())==1, flat_set< Trig1L >>
Definition: Trigger.h:315
TrigGlobEffCorr::Trigger::cend
constexpr auto cend() const
Definition: Trigger.h:260
TrigGlobEffCorr::Trigger::Trigger
Trigger()
Definition: Trigger.h:223
TrigGlobEffCorr::TT_HALFSYM
@ TT_HALFSYM
Definition: ImportData.h:30
TrigGlobEffCorr::TT_2E_MU_SYM
@ TT_2E_MU_SYM
Definition: ImportData.h:63
TrigGlobEffCorr::TriggerProperties::m_legs
std::array< std::size_t, 4 > m_legs
Definition: Trigger.h:123
TrigGlobEffCorr::Trigger::type
static constexpr TriggerType type()
Definition: Trigger.h:139
TrigGlobEffCorr::UnusedArg::object
static constexpr xAOD::Type::ObjectType object()
Definition: Trigger.h:24
TrigGlobEffCorr::TriggerProperties::mixed
constexpr bool mixed() const
Definition: Trigger.h:40
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
TrigGlobEffCorr::Trigger::hiddenBy
auto hiddenBy(const Trig1L trig) const -> typename std::enable_if< Trig1L::is1L(), bool >::type
Definition: Trigger.h:265
TrigGlobEffCorr::Trigger::to_symmetric
CastType1 to_symmetric() const
Definition: Trigger.h:346
TrigGlobEffCorr::Trigger::is2Lasym
static constexpr bool is2Lasym()
Definition: Trigger.h:201
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
TrigGlobEffCorr::TriggerProperties::nDistinctLegs
constexpr unsigned nDistinctLegs(xAOD::Type::ObjectType obj) const
Definition: Trigger.h:57
TrigGlobEffCorr::TT_ASYM
@ TT_ASYM
Definition: ImportData.h:31
ObjectType
ObjectType
Definition: BaseObject.h:11
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
index
Definition: index.py:1
TrigGlobEffCorr
the template specializations below must be enclosed in this namespace
Definition: Calculator.cxx:1596
TrigGlobEffCorr::Trigger::nDistinctLegs
static constexpr unsigned nDistinctLegs()
Definition: Trigger.h:143
TrigGlobEffCorr::Trigger::object2
static constexpr xAOD::Type::ObjectType object2()
Definition: Trigger.h:168
TrigGlobEffCorr::TT_DILEPTON_ASYM
@ TT_DILEPTON_ASYM
Definition: ImportData.h:42
TrigGlobEffCorr::Trigger::symLeg
std::size_t symLeg() const
Definition: Trigger.h:364
TrigGlobEffCorr::Trigger::side2
CastType2 side2() const
Definition: Trigger.h:312
TrigGlobEffCorr::TriggerProperties::nDistinctLegs
constexpr unsigned nDistinctLegs() const
Definition: Trigger.h:45
TrigGlobEffCorr::Trigger::is2Lmix
static constexpr bool is2Lmix()
Definition: Trigger.h:213
TrigGlobEffCorr::TT_SINGLELEPTON_FLAG
@ TT_SINGLELEPTON_FLAG
Definition: ImportData.h:35
athena.value
value
Definition: athena.py:124
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:157
perfmonmt-printer.dest
dest
Definition: perfmonmt-printer.py:189
TrigGlobEffCorr::Trigger::operator()
std::size_t operator()(void) const
Definition: Trigger.h:230
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.TrigTLAMonitorAlgorithm.triggers
triggers
Definition: TrigTLAMonitorAlgorithm.py:196
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
TrigGlobEffCorr::Trigger::is1L
static constexpr bool is1L()
Definition: Trigger.h:197
TrigGlobEffCorr::TT_TETRALEPTON_SYM
@ TT_TETRALEPTON_SYM
Definition: ImportData.h:80
TrigGlobEffCorr::Trigger::anonymize
static auto anonymize(const flat_set< Trig1L > &triggers) -> std::enable_if_t< is1L() &&tt==Trig1L::type(), const flat_set< std::size_t > & >
Definition: Trigger.h:328
TrigGlobEffCorr::TriggerProperties::loadLegs
void loadLegs(const ImportData::TrigDef &src, Array &dest)
Definition: Trigger.h:82
TrigGlobEffCorr::Trigger::object
static constexpr xAOD::Type::ObjectType object()
Definition: Trigger.h:184
x
#define x
TrigGlobEffCorr::TT_MUON_FLAG
@ TT_MUON_FLAG
Definition: ImportData.h:26
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
flat_set
boost::container::flat_set< Key > flat_set
Definition: CheckConfig.cxx:14
TrigGlobEffCorr::TriggerProperties::m_type
TriggerType m_type
Definition: Trigger.h:122
TrigGlobEffCorr::TT_SYM
@ TT_SYM
Definition: ImportData.h:29
TrigGlobEffCorr::Trigger::operator()
std::size_t operator()(unsigned index) const
Definition: Trigger.h:237
TrigGlobEffCorr::Trigger::side1
CastType1 side1() const
Returns a pseudo trigger of type CastType1/2.
Definition: Trigger.h:311
TrigGlobEffCorr::TT_ELECTRON_FLAG
@ TT_ELECTRON_FLAG
Definition: ImportData.h:25
TrigGlobEffCorr::Trigger::is4Lsym
static constexpr bool is4Lsym()
Definition: Trigger.h:217
ImportData.h
TrigGlobEffCorr::TT_2MU_G_SYM
@ TT_2MU_G_SYM
Definition: ImportData.h:74
TrigGlobEffCorr::Trigger::irrelevantFor
static bool irrelevantFor(const Lepton &lepton)
Definition: Trigger.h:193
TrigGlobEffCorr::Trigger::is3Lsym
static constexpr bool is3Lsym()
Definition: Trigger.h:207
TrigGlobEffCorr::Trigger::relevantFor
static bool relevantFor(const Lepton &lepton)
Definition: Trigger.h:190
calibdata.valid
list valid
Definition: calibdata.py:44
TrigGlobEffCorr::Trigger::asymLeg
std::size_t asymLeg() const
Definition: Trigger.h:356
TrigGlobEffCorr::TT_X2Y_FLAG
@ TT_X2Y_FLAG
Definition: ImportData.h:24
ObjectType.h
TrigGlobEffCorr::TT_PHOTON_FLAG
@ TT_PHOTON_FLAG
Definition: ImportData.h:27
TrigGlobEffCorr::Trigger::is3Lmix
static constexpr bool is3Lmix()
Definition: Trigger.h:214
TrigGlobEffCorr::Trigger::extraCheck
static constexpr bool extraCheck(xAOD::Type::ObjectType obj)
Definition: Trigger.h:132
TrigGlobEffCorr::Trigger::antiside
auto antiside() const -> decltype(side< TrigX::object(), true >())
Complement to the previous function.
Definition: Trigger.h:307
TrigGlobEffCorr::Trigger::symmetric
bool symmetric() const
Definition: Trigger.h:337
TrigGlobEffCorr::TT_TRILEPTON_HALFSYM
@ TT_TRILEPTON_HALFSYM
Definition: ImportData.h:55
TrigGlobEffCorr::Trigger::is3Lhalfsym
static constexpr bool is3Lhalfsym()
Definition: Trigger.h:210
TrigGlobEffCorr::TT_DILEPTON_SYM
@ TT_DILEPTON_SYM
Definition: ImportData.h:41
TrigGlobEffCorr::TriggerProperties::TriggerProperties
constexpr TriggerProperties(TriggerType tt)
Definition: Trigger.h:29
TrigGlobEffCorr::TT_TETRALEPTON_FLAG
@ TT_TETRALEPTON_FLAG
Definition: ImportData.h:79
TrigGlobEffCorr::TriggerProperties::type
constexpr TriggerType type() const
Definition: Trigger.h:34
TrigGlobEffCorr::TriggerProperties::TriggerProperties
TriggerProperties(const ImportData::TrigDef &def)
Definition: Trigger.h:30
TrigGlobEffCorr::Trigger::operator<
std::size_t operator<(const Trigger &rhs) const
Definition: Trigger.h:240
TrigGlobEffCorr::TriggerClass::T_1_2asym
mixed-flavour trilepton trigger type x_y_y
Definition: Trigger.h:419
TrigGlobEffCorr::Trigger::is2Lsym
static constexpr bool is2Lsym()
Definition: Trigger.h:204
TrigGlobEffCorr::TT_MASK_TYPE
@ TT_MASK_TYPE
Definition: ImportData.h:33
TrigGlobEffCorr::TriggerClass::addObjFlags
static constexpr auto addObjFlags(int tt)
Definition: Trigger.h:400
TrigGlobEffCorr::Trigger::setDefinition
void setDefinition(const ImportData::TrigDef &def)
Definition: Trigger.h:225
TrigGlobEffCorr::TT_TRILEPTON_FLAG
@ TT_TRILEPTON_FLAG
Definition: ImportData.h:53
TrigGlobEffCorr::Trigger::operator==
bool operator==(const Trigger &rhs) const
Definition: Trigger.h:252
lumiFormat.array
array
Definition: lumiFormat.py:91
TrigGlobEffCorr::TriggerClass::T_2asym_1
mixed-flavour trilepton trigger type x_x_y
Definition: Trigger.h:413
TrigGlobEffCorr::TriggerClass< object_flag, TT_UNKNOWN >::addObjFlag
static constexpr auto addObjFlag(int tt)
Definition: Trigger.h:377
TrigGlobEffCorr::TriggerClass::T_2sym_1
mixed-flavour trilepton trigger type 2x_y (2e12_lhloose_mu10, ...)
Definition: Trigger.h:410
TrigGlobEffCorr::Trigger::side
auto side() const -> std::conditional_t< anti ^(CastType1::object()==obj), CastType1, CastType2 >
Returns a pseudo trigger built only from the legs of flavour 'obj' If anti==true, uses instead only l...
Definition: Trigger.h:287
TrigGlobEffCorr::Trigger::Optional
Definition: Trigger.h:136
TrigGlobEffCorr::TriggerProperties::cend
constexpr auto cend(xAOD::Type::ObjectType obj) const
Definition: Trigger.h:117
TrigGlobEffCorr::TriggerType
TriggerType
Definition: ImportData.h:22
TrigGlobEffCorr::Lepton
Definition: Lepton.h:16
TrigGlobEffCorr::Trigger::cbegin
constexpr auto cbegin() const
Definition: Trigger.h:255
TrigGlobEffCorr::UnusedArg
Definition: Trigger.h:22
TrigGlobEffCorr::TT_MASK_SYMMETRY
@ TT_MASK_SYMMETRY
Definition: ImportData.h:32
TrigGlobEffCorr::Lepton::type
xAOD::Type::ObjectType type() const
Definition: Lepton.h:29
TrigGlobEffCorr::ImportData::TrigDef
Definition: ImportData.h:90
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Muon
struct TBPatternUnitContext Muon
TrigGlobEffCorr::TriggerClass::T_1_2sym
mixed-flavour trilepton trigger type x_2y (e12_lhloose_2mu10, ...)
Definition: Trigger.h:416
DeMoScan.index
string index
Definition: DeMoScan.py:362
TrigGlobEffCorr::TT_MASK_FLAVOUR
@ TT_MASK_FLAVOUR
Definition: ImportData.h:28
TrigGlobEffCorr::Trigger::legs
std::array< std::size_t, nDistinctLegs()> legs
Definition: Trigger.h:221
lumiFormat.fill
fill
Definition: lumiFormat.py:104
TrigGlobEffCorr::TT_UNKNOWN
@ TT_UNKNOWN
Definition: ImportData.h:23
TrigGlobEffCorr::TriggerProperties::valid
constexpr bool valid() const
Definition: Trigger.h:35
TrigGlobEffCorr::TriggerProperties::cbegin_offset
constexpr int cbegin_offset(xAOD::Type::ObjectType obj) const
Definition: Trigger.h:101
TrigGlobEffCorr::TT_DILEPTON_FLAG
@ TT_DILEPTON_FLAG
Definition: ImportData.h:40
TrigGlobEffCorr::TriggerProperties
Definition: Trigger.h:27
TrigGlobEffCorr::Trigger::mixed
static constexpr bool mixed()
Definition: Trigger.h:141
TrigGlobEffCorr::Trigger::hiddenBy
auto hiddenBy(const flat_set< Trig1L > &trigs) const -> typename std::enable_if< Trig1L::is1L(), bool >::type
Definition: Trigger.h:275
pickleTool.object
object
Definition: pickleTool.py:29
TrigGlobEffCorr::Trigger::object1
static constexpr xAOD::Type::ObjectType object1()
Definition: Trigger.h:151
TrigGlobEffCorr::TriggerClass::T_1_1
mixed-flavour dilepton trigger (e17_lhloose_nod0_mu14, e7_lhmedium_mu24, ...):
Definition: Trigger.h:407
TrigGlobEffCorr::Trigger::side
auto side() const -> decltype(side< TrigX::object()>())
Returns a pseudo trigger built only from the legs of the same flavour as the trigger 'TrigX'.
Definition: Trigger.h:302
TrigGlobEffCorr::TT_2E_G_SYM
@ TT_2E_G_SYM
Definition: ImportData.h:70
python.PyAthena.obj
obj
Definition: PyAthena.py:132
TrigGlobEffCorr::TriggerClass
Definition: Trigger.h:373
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
TrigGlobEffCorr::TriggerProperties::cbegin
constexpr auto cbegin(xAOD::Type::ObjectType obj) const
Definition: Trigger.h:107
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:876
TrigGlobEffCorr::Trigger::nDistinctLegs
static constexpr unsigned nDistinctLegs(xAOD::Type::ObjectType obj)
Definition: Trigger.h:147
TrigGlobEffCorr::Trigger::is2Lnomix
static constexpr bool is2Lnomix()
Definition: Trigger.h:198
TrigGlobEffCorr::TT_TRILEPTON_SYM
@ TT_TRILEPTON_SYM
Definition: ImportData.h:54
TrigGlobEffCorr::Trigger
Definition: Trigger.h:128