ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Member Functions | List of all members
TrigGlobEffCorr::TriggerClass< object1_flag, object2_flag >::T_1_2sym Struct Reference

mixed-flavour trilepton trigger type x_2y (e12_lhloose_2mu10, ...) More...

#include <Trigger.h>

Inheritance diagram for TrigGlobEffCorr::TriggerClass< object1_flag, object2_flag >::T_1_2sym:
Collaboration diagram for TrigGlobEffCorr::TriggerClass< object1_flag, object2_flag >::T_1_2sym:

Public Member Functions

void setDefinition (const ImportData::TrigDef &def)
 
std::size_t operator() (void) const
 
std::size_t operator() (unsigned index) const
 
std::size_t operator< (const Trigger &rhs) const
 
 operator bool () const
 
bool operator== (const Trigger &rhs) const
 
constexpr auto cbegin () const
 
constexpr auto cend () const
 
auto hiddenBy (const Trig1L trig) const -> typename std::enable_if< Trig1L::is1L(), bool >::type
 
auto hiddenBy (const flat_set< Trig1L > &trigs) const -> typename std::enable_if< Trig1L::is1L(), bool >::type
 
auto side () const -> std::conditional_t< anti ^(CastType1::object()==obj), A::T_1, B::T_2sym >
 Returns a pseudo trigger built only from the legs of flavour 'obj' If anti==true, uses instead only legs with flavours other than 'obj'. More...
 
auto side () const -> decltype(side< TrigX::object()>())
 Returns a pseudo trigger built only from the legs of the same flavour as the trigger 'TrigX'. More...
 
auto antiside () const -> decltype(side< TrigX::object(), true >())
 Complement to the previous function. More...
 
A::T_1 side1 () const
 Returns a pseudo trigger of type CastType1/2. More...
 
B::T_2sym side2 () const
 
auto addTo (const flat_set< Trig1L > &trigs1L) const -> std::enable_if_t< Trig1L::is1L() &&nDistinctLegs(Trig1L::object())==1, flat_set< Trig1L >>
 
bool symmetric () const
 
A::T_1 to_symmetric () const
 
std::size_t asymLeg () const
 
std::size_t symLeg () const
 

Static Public Member Functions

static constexpr TriggerType type ()
 
static constexpr bool mixed ()
 
static constexpr unsigned nDistinctLegs ()
 
static constexpr unsigned nDistinctLegs (xAOD::Type::ObjectType obj)
 
static constexpr xAOD::Type::ObjectType object1 ()
 
static constexpr xAOD::Type::ObjectType object2 ()
 
static constexpr xAOD::Type::ObjectType object ()
 
static bool relevantFor (const Lepton &lepton)
 
static bool irrelevantFor (const Lepton &lepton)
 
static constexpr bool is1L ()
 
static constexpr bool is2Lnomix ()
 
static constexpr bool is2Lasym ()
 
static constexpr bool is2Lsym ()
 
static constexpr bool is3Lsym ()
 
static constexpr bool is3Lhalfsym ()
 
static constexpr bool is2Lmix ()
 
static constexpr bool is3Lmix ()
 
static constexpr bool is4Lsym ()
 
static auto anonymize (const flat_set< Trig1L > &triggers) -> std::enable_if_t< is1L() &&tt==Trig1L::type(), const flat_set< std::size_t > & >
 

Public Attributes

std::array< std::size_t, nDistinctLegs()> legs
 

Static Private Member Functions

static constexpr bool extraCheck (xAOD::Type::ObjectType obj)
 

Detailed Description

template<TriggerType object1_flag, TriggerType object2_flag>
struct TrigGlobEffCorr::TriggerClass< object1_flag, object2_flag >::T_1_2sym

mixed-flavour trilepton trigger type x_2y (e12_lhloose_2mu10, ...)

Definition at line 342 of file Trigger.h.

Member Function Documentation

◆ addTo()

auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::addTo ( const flat_set< Trig1L > &  trigs1L) const-> std::enable_if_t<Trig1L::is1L() && nDistinctLegs(Trig1L::object())==1, flat_set<Trig1L>>
inlineinherited

Definition at line 264 of file Trigger.h.

266  {
267  static_assert(mixed(), "this function is not meaningful for this type of trigger, hence should not be used.");
268  flat_set<Trig1L> trigs(trigs1L);
269  trigs.insert(side<Trig1L>());
270  return trigs;
271  }

◆ anonymize()

static auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::anonymize ( const flat_set< Trig1L > &  triggers) -> std::enable_if_t<is1L() && tt==Trig1L::type(), const flat_set<std::size_t>&>
inlinestaticinherited

Definition at line 273 of file Trigger.h.

275  {
276  static_assert(sizeof(Trig1L)==sizeof(std::size_t), "invalid cast if the key sizes differ");
277  return reinterpret_cast<const flat_set<std::size_t>&>(triggers);
278  }

◆ antiside()

auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::antiside
inlineinherited

Complement to the previous function.

Definition at line 259 of file Trigger.h.

259 { return side<TrigX::object(),true>(); }

◆ asymLeg()

std::size_t TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::asymLeg
inlineinherited

Definition at line 294 of file Trigger.h.

295  {
296  static_assert((tt&TT_MASK_SYMMETRY)==TT_HALFSYM, "this function is not meaningful for this type of trigger, hence should not be used.");
297  return legs[0];
298  }

◆ cbegin()

constexpr auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::cbegin
inlineconstexprinherited

Definition at line 219 of file Trigger.h.

220  {
221  return legs.cbegin() + TriggerProperties(tt).cbegin_offset(obj);
222  }

◆ cend()

constexpr auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::cend
inlineconstexprinherited

Definition at line 224 of file Trigger.h.

225  {
226  return legs.cend() + TriggerProperties(tt).cend_offset(obj);
227  }

◆ extraCheck()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::extraCheck ( xAOD::Type::ObjectType  obj)
inlinestaticconstexprprivateinherited

Definition at line 117 of file Trigger.h.

117 { return (object()==obj || obj==xAOD::Type::Other); }

◆ hiddenBy() [1/2]

auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::hiddenBy ( const flat_set< Trig1L > &  trigs) const-> typename std::enable_if<Trig1L::is1L(), bool>::type
inlineinherited

Definition at line 237 of file Trigger.h.

239  {
240  static_assert(Trig1L::is1L(), "this function is not meaningful for this type of trigger, hence should not be used.");
241  return std::any_of(trigs.cbegin(), trigs.cend(), [&](Trig1L t)->bool{ return hiddenBy(t); });
242  }

◆ hiddenBy() [2/2]

auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::hiddenBy ( const Trig1L  trig) const-> typename std::enable_if<Trig1L::is1L(), bool>::type
inlineinherited

Definition at line 229 of file Trigger.h.

231  {
232  static_assert(Trig1L::is1L(), "this function is not meaningful for this type of trigger, hence should not be used.");
233  constexpr auto obj = Trig1L::object();
234  return std::find(cbegin<obj>(), cend<obj>(), trig()) != cend<obj>();
235  }

◆ irrelevantFor()

static bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::irrelevantFor ( const Lepton lepton)
inlinestaticinherited

Definition at line 167 of file Trigger.h.

167 { return !relevantFor(lepton); }

◆ is1L()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is1L
inlinestaticconstexprinherited

Definition at line 169 of file Trigger.h.

169 { return (tt&TT_SINGLELEPTON_FLAG); }

◆ is2Lasym()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is2Lasym
inlinestaticconstexprinherited

Definition at line 171 of file Trigger.h.

171 { return ((tt&TT_MASK_TYPE)==TT_DILEPTON_ASYM); }

◆ is2Lmix()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is2Lmix
inlinestaticconstexprinherited

Definition at line 175 of file Trigger.h.

175 { return (tt&TT_DILEPTON_FLAG) && mixed(); }

◆ is2Lnomix()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is2Lnomix
inlinestaticconstexprinherited

Definition at line 170 of file Trigger.h.

170 { return (tt&TT_DILEPTON_FLAG) && !mixed(); }

◆ is2Lsym()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is2Lsym
inlinestaticconstexprinherited

Definition at line 172 of file Trigger.h.

172 { return ((tt&TT_MASK_TYPE)==TT_DILEPTON_SYM); }

◆ is3Lhalfsym()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is3Lhalfsym
inlinestaticconstexprinherited

Definition at line 174 of file Trigger.h.

174 { return ((tt&TT_MASK_TYPE)==TT_TRILEPTON_HALFSYM) && !mixed(); }

◆ is3Lmix()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is3Lmix
inlinestaticconstexprinherited

Definition at line 176 of file Trigger.h.

176 { return (tt&TT_TRILEPTON_FLAG) && mixed(); }

◆ is3Lsym()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is3Lsym
inlinestaticconstexprinherited

Definition at line 173 of file Trigger.h.

173 { return ((tt&TT_MASK_TYPE)==TT_TRILEPTON_SYM) && !mixed(); }

◆ is4Lsym()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::is4Lsym
inlinestaticconstexprinherited

Definition at line 177 of file Trigger.h.

177 { return ((tt&TT_MASK_TYPE) == TT_TETRALEPTON_SYM); }

◆ mixed()

static constexpr bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::mixed
inlinestaticconstexprinherited

Definition at line 123 of file Trigger.h.

124  {
125  return TriggerProperties(tt).mixed();
126  }

◆ nDistinctLegs() [1/2]

static constexpr unsigned TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::nDistinctLegs
inlinestaticconstexprinherited

Definition at line 128 of file Trigger.h.

128 { return TriggerProperties(tt).nDistinctLegs(); }

◆ nDistinctLegs() [2/2]

static constexpr unsigned TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::nDistinctLegs ( xAOD::Type::ObjectType  obj)
inlinestaticconstexprinherited

Definition at line 130 of file Trigger.h.

130 { return TriggerProperties(tt).nDistinctLegs(obj); }

◆ object()

static constexpr xAOD::Type::ObjectType TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::object
inlinestaticconstexprinherited

Definition at line 160 of file Trigger.h.

161  {
162  if(mixed()) return xAOD::Type::Other;
163  return object1();
164  }

◆ object1()

static constexpr xAOD::Type::ObjectType TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::object1
inlinestaticconstexprinherited

Definition at line 132 of file Trigger.h.

133  {
134  if(!is3Lmix())
135  {
137  if(tt&TT_MUON_FLAG) return xAOD::Type::Muon;
139  return xAOD::Type::Other;
140  }
143  return (tt&TT_MUON_FLAG)? xAOD::Type::Muon : xAOD::Type::Other;
144  }

◆ object2()

static constexpr xAOD::Type::ObjectType TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::object2
inlinestaticconstexprinherited

Definition at line 146 of file Trigger.h.

147  {
148  if(is2Lmix())
149  {
152  return xAOD::Type::Other;
153  }
154  else if(!is3Lmix()) return xAOD::Type::Other;
157  return (tt&TT_MUON_FLAG)? xAOD::Type::Muon : xAOD::Type::Other;
158  }

◆ operator bool()

TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::operator bool
inlineexplicitinherited

Definition at line 209 of file Trigger.h.

210  {
211  return std::all_of(legs.cbegin(), legs.cend(), [](std::size_t x)->bool{ return x; });
212  }

◆ operator()() [1/2]

std::size_t TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::operator() ( unsigned  index) const
inlineinherited

Definition at line 198 of file Trigger.h.

199  {
200  return legs[index];
201  }

◆ operator()() [2/2]

std::size_t TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::operator() ( void  ) const
inlineinherited

Definition at line 192 of file Trigger.h.

193  {
194  static_assert(nDistinctLegs()==1, "this function is not meaningful for this type of trigger, hence should not be used.");
195  return legs[0];
196  }

◆ operator<()

std::size_t TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::operator< ( const Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym > &  rhs) const
inlineinherited

Definition at line 203 of file Trigger.h.

204  {
205  static_assert(is1L(), "this function is not meaningful for this type of trigger, hence should not be used.");
206  return legs[0] < rhs.legs[0];
207  }

◆ operator==()

bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::operator== ( const Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym > &  rhs) const
inlineinherited

Definition at line 214 of file Trigger.h.

215  {
216  return legs == rhs.legs;
217  }

◆ relevantFor()

static bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::relevantFor ( const Lepton lepton)
inlinestaticinherited

Definition at line 166 of file Trigger.h.

166 { return lepton.type()==object(); }

◆ setDefinition()

void TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::setDefinition ( const ImportData::TrigDef def)
inlineinherited

Definition at line 187 of file Trigger.h.

188  {
189  TriggerProperties(tt).loadLegs(def, legs);
190  }

◆ side() [1/2]

auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::side
inlineinherited

Returns a pseudo trigger built only from the legs of the same flavour as the trigger 'TrigX'.

Definition at line 257 of file Trigger.h.

257 { return side<TrigX::object()>(); }

◆ side() [2/2]

auto TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::side
inlineinherited

Returns a pseudo trigger built only from the legs of flavour 'obj' If anti==true, uses instead only legs with flavours other than 'obj'.

Definition at line 246 of file Trigger.h.

248  {
249  static_assert(mixed(), "this function is not meaningful for this type of trigger, hence should not be used.");
250  static_assert(obj != xAOD::Type::Other, "implementation incomplete");
251  using CastType = decltype(side<obj, anti>());
252  CastType trig;
253  std::copy_n(this->cbegin<CastType::object()>(), nDistinctLegs(CastType::object()), trig.legs.begin());
254  return trig;
255  }

◆ side1()

A::T_1 TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::side1
inlineinherited

Returns a pseudo trigger of type CastType1/2.

Definition at line 261 of file Trigger.h.

261 { return side<CastType1::object()>(); }

◆ side2()

B::T_2sym TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::side2
inlineinherited

Definition at line 262 of file Trigger.h.

262 { return side<CastType2::object()>(); }

◆ symLeg()

std::size_t TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::symLeg
inlineinherited

Definition at line 300 of file Trigger.h.

301  {
302  static_assert((tt&TT_MASK_SYMMETRY)==TT_HALFSYM, "this function is not meaningful for this type of trigger, hence should not be used.");
303  return legs[1];
304  }

◆ symmetric()

bool TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::symmetric
inlineinherited

Definition at line 280 of file Trigger.h.

281  {
282  static_assert(!std::is_same<CastType1, UnusedArg>::value, "this function is not meaningful for this type of trigger, hence should not be used.");
283  return std::all_of(legs.cbegin()+1, legs.cend(), [&](std::size_t l)->bool{ return l==legs[0]; });
284  }

◆ to_symmetric()

A::T_1 TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::to_symmetric
inlineinherited

Definition at line 286 of file Trigger.h.

287  {
288  static_assert(!std::is_same<CastType1, UnusedArg>::value, "this function is not meaningful for this type of trigger, hence should not be used.");
289  CastType1 trig;
290  trig.legs[0] = this->legs[0];
291  return trig;
292  }

◆ type()

static constexpr TriggerType TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::type
inlinestaticconstexprinherited

Definition at line 121 of file Trigger.h.

121 { return tt; }

Member Data Documentation

◆ legs

std::array<std::size_t, nDistinctLegs()> TrigGlobEffCorr::Trigger< tt, A::T_1 , B::T_2sym >::legs
inherited

Definition at line 180 of file Trigger.h.


The documentation for this struct was generated from the following file:
TrigGlobEffCorr::TT_HALFSYM
@ TT_HALFSYM
Definition: ImportData.h:31
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::nDistinctLegs
static constexpr unsigned nDistinctLegs()
Definition: Trigger.h:128
TrigGlobEffCorr::TT_DILEPTON_ASYM
@ TT_DILEPTON_ASYM
Definition: ImportData.h:43
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::is2Lmix
static constexpr bool is2Lmix()
Definition: Trigger.h:175
TrigGlobEffCorr::TT_SINGLELEPTON_FLAG
@ TT_SINGLELEPTON_FLAG
Definition: ImportData.h:36
athena.value
value
Definition: athena.py:122
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
python.TrigTLAMonitorAlgorithm.triggers
triggers
Definition: TrigTLAMonitorAlgorithm.py:196
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::is1L
static constexpr bool is1L()
Definition: Trigger.h:169
TrigGlobEffCorr::TT_TETRALEPTON_SYM
@ TT_TETRALEPTON_SYM
Definition: ImportData.h:81
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::object
static constexpr xAOD::Type::ObjectType object()
Definition: Trigger.h:160
x
#define x
TrigGlobEffCorr::TT_MUON_FLAG
@ TT_MUON_FLAG
Definition: ImportData.h:27
flat_set
boost::container::flat_set< Key > flat_set
Definition: CheckConfig.cxx:11
TrigGlobEffCorr::TT_ELECTRON_FLAG
@ TT_ELECTRON_FLAG
Definition: ImportData.h:26
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::relevantFor
static bool relevantFor(const Lepton &lepton)
Definition: Trigger.h:166
TrigGlobEffCorr::TT_X2Y_FLAG
@ TT_X2Y_FLAG
Definition: ImportData.h:25
TrigGlobEffCorr::TT_PHOTON_FLAG
@ TT_PHOTON_FLAG
Definition: ImportData.h:28
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::is3Lmix
static constexpr bool is3Lmix()
Definition: Trigger.h:176
TrigGlobEffCorr::TT_TRILEPTON_HALFSYM
@ TT_TRILEPTON_HALFSYM
Definition: ImportData.h:56
TrigGlobEffCorr::TT_DILEPTON_SYM
@ TT_DILEPTON_SYM
Definition: ImportData.h:42
TrigGlobEffCorr::TT_MASK_TYPE
@ TT_MASK_TYPE
Definition: ImportData.h:34
TrigGlobEffCorr::TT_TRILEPTON_FLAG
@ TT_TRILEPTON_FLAG
Definition: ImportData.h:54
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::cbegin
constexpr auto cbegin() const
Definition: Trigger.h:219
TrigGlobEffCorr::TT_MASK_SYMMETRY
@ TT_MASK_SYMMETRY
Definition: ImportData.h:33
TrigGlobEffCorr::Lepton::type
xAOD::Type::ObjectType type() const
Definition: Lepton.h:28
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Muon
struct TBPatternUnitContext Muon
DeMoScan.index
string index
Definition: DeMoScan.py:362
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::legs
std::array< std::size_t, nDistinctLegs()> legs
Definition: Trigger.h:180
TrigGlobEffCorr::TT_DILEPTON_FLAG
@ TT_DILEPTON_FLAG
Definition: ImportData.h:41
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::mixed
static constexpr bool mixed()
Definition: Trigger.h:123
pickleTool.object
object
Definition: pickleTool.py:30
TrigGlobEffCorr::Trigger< addObjFlags(TT_TRILEPTON_SYM|TT_X2Y_FLAG), A::T_1, B::T_2sym >::object1
static constexpr xAOD::Type::ObjectType object1()
Definition: Trigger.h:132
python.PyAthena.obj
obj
Definition: PyAthena.py:135
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
TrigGlobEffCorr::TT_TRILEPTON_SYM
@ TT_TRILEPTON_SYM
Definition: ImportData.h:55