ATLAS Offline Software
Namespaces | Classes | Functions | Variables
NSWL1 Namespace Reference

PadEmulatorCoincidences. More...

Namespaces

 MM
 
 PAD
 

Classes

class  IMMTriggerTool
 
class  IPadEmulatorTool
 
class  ITriggerProcessorTool
 
class  MMTriggerTool
 
class  NSWL1Simulation
 NSW L1 simulation algorithm. More...
 
class  PadEmulatorTool
 
class  PadEmulatorTrigger
 
class  PadPattern
 
class  TriggerProcessorTool
 

Functions

bool trigger_1over4 (const bool in0, const bool in1, const bool in2, const bool in3)
 
bool trigger_2over4 (const bool in0, const bool in1, const bool in2, const bool in3)
 
bool trigger_specific2over4 (const bool in0, const bool in1, const bool in2, const bool in3)
 
bool trigger_3over4 (const bool in0, const bool in1, const bool in2, const bool in3)
 
bool trigger_4over4 (const bool in0, const bool in1, const bool in2, const bool in3)
 
bool trigger_3and1 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_2and2 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_4over8 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_specific4over8 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_5over8 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_specific5over8 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_superspecific5over8 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_6over8 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_2X_3over4 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
bool trigger_8over8 (const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
 
std::string sectorName (const std::string &wheel, const uint32_t sec)
 
int getSignedPhiID (const uint32_t phiid)
 
bool isA (const uint32_t sourceid)
 

Variables

const std::string SPACE {" "}
 
const std::string UNDERSCORE {"_"}
 
const std::string COMMA {","}
 
const std::string SEMICOLON {";"}
 
const std::string VHDLCOMMENT {"--"}
 
const std::vector< std::string > WHEELS {"A", "C"}
 
constexpr uint32_t NLAYERS {8}
 
constexpr uint32_t NSECTORS {16}
 

Detailed Description

PadEmulatorCoincidences.

TrigT1NSWSimExtras.

List of functions to evaluate sTGC Pad Trigger coincidences

A basic lists of booleand functions to check trigger coincidences, according to the chosen trigger logic

List of common functions, shared between sTGC and MM codes

A list of common functions, mainly used by sTGC Pad Trigger code. They will be extended to MicroMegas code and sTGC Strip Trigger, when available

Function Documentation

◆ getSignedPhiID()

int NSWL1::getSignedPhiID ( const uint32_t  phiid)
inline

Definition at line 59 of file TrigT1NSWSimExtras.h.

59  {
60  // 1 bit of sign (0 = positive) followed by 5 bits of phiid
61  constexpr size_t nbitsPhi{5};
62  constexpr size_t mask{(1 << nbitsPhi) - 1};
63  return std::pow(-1, phiid >> nbitsPhi) * (phiid & mask);
64  }

◆ isA()

bool NSWL1::isA ( const uint32_t  sourceid)
inline

Definition at line 307 of file TrigT1NSWSimExtras.h.

307  {
308  return ( ((sourceid >> 16) & 0xff) == PAD::MUON_STGC_ENDCAP_A_SIDE || ((sourceid >> 16) & 0xff) == MM::MUON_MM_ENDCAP_A_SIDE );
309  }

◆ sectorName()

std::string NSWL1::sectorName ( const std::string &  wheel,
const uint32_t  sec 
)
inline

Definition at line 51 of file TrigT1NSWSimExtras.h.

51  {
52  std::stringstream ss;
53  ss << wheel;
54  ss << std::setfill('0') << std::setw(2) << (sec + 1);
55  return ss.str();
56  }

◆ trigger_1over4()

bool NSWL1::trigger_1over4 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3 
)
inline

Definition at line 20 of file PadEmulatorCoincidences.h.

20  {
21  return (in0 or in1 or in2 or in3);
22  }

◆ trigger_2and2()

bool NSWL1::trigger_2and2 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 47 of file PadEmulatorCoincidences.h.

48  {
49  return (trigger_2over4(in0, in1, in2, in3) and trigger_2over4(in4, in5, in6, in7));
50  }

◆ trigger_2over4()

bool NSWL1::trigger_2over4 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3 
)
inline

Definition at line 24 of file PadEmulatorCoincidences.h.

24  {
25  return (in0 + in1 + in2 + in3 >= 2);
26  }

◆ trigger_2X_3over4()

bool NSWL1::trigger_2X_3over4 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 89 of file PadEmulatorCoincidences.h.

90  {
91  return trigger_3over4(in0, in1, in2, in3) and trigger_3over4(in4, in5, in6, in7);
92  }

◆ trigger_3and1()

bool NSWL1::trigger_3and1 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 40 of file PadEmulatorCoincidences.h.

41  {
42  if(trigger_1over4(in0, in1, in2, in3) and trigger_3over4(in4, in5, in6, in7)) return true;
43  if(trigger_3over4(in0, in1, in2, in3) and trigger_1over4(in4, in5, in6, in7)) return true;
44  return false;
45  }

◆ trigger_3over4()

bool NSWL1::trigger_3over4 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3 
)
inline

Definition at line 32 of file PadEmulatorCoincidences.h.

32  {
33  return (in0 + in1 + in2 + in3 >= 3);
34  }

◆ trigger_4over4()

bool NSWL1::trigger_4over4 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3 
)
inline

Definition at line 36 of file PadEmulatorCoincidences.h.

36  {
37  return (in0 and in1 and in2 and in3);
38  }

◆ trigger_4over8()

bool NSWL1::trigger_4over8 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 52 of file PadEmulatorCoincidences.h.

53  {
54  if(trigger_2and2(in0, in1, in2, in3, in4, in5, in6, in7)) return true;
55  if(trigger_3and1(in0, in1, in2, in3, in4, in5, in6, in7)) return true;
56  return false;
57  }

◆ trigger_5over8()

bool NSWL1::trigger_5over8 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 64 of file PadEmulatorCoincidences.h.

65  {
66  return (in0 + in1 + in2 + in3 + in4 + in5 + in6 + in7 >= 5);
67  }

◆ trigger_6over8()

bool NSWL1::trigger_6over8 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 84 of file PadEmulatorCoincidences.h.

85  {
86  return (in0 + in1 + in2 + in3 + in4 + in5 + in6 + in7 >= 6);
87  }

◆ trigger_8over8()

bool NSWL1::trigger_8over8 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 94 of file PadEmulatorCoincidences.h.

95  {
96  return trigger_4over4(in0, in1, in2, in3) and trigger_4over4(in4, in5, in6, in7);
97  }

◆ trigger_specific2over4()

bool NSWL1::trigger_specific2over4 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3 
)
inline

Definition at line 28 of file PadEmulatorCoincidences.h.

28  {
29  return (in0 or in1) and (in2 or in3);
30  }

◆ trigger_specific4over8()

bool NSWL1::trigger_specific4over8 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 59 of file PadEmulatorCoincidences.h.

60  {
61  return trigger_specific2over4(in0, in1, in2, in3) and trigger_specific2over4(in4, in5, in6, in7);
62  }

◆ trigger_specific5over8()

bool NSWL1::trigger_specific5over8 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 69 of file PadEmulatorCoincidences.h.

70  {
71  if(not trigger_3over4(in0, in1, in2, in3) and not trigger_3over4(in4, in5, in6, in7)) return false;
72 
73  return (in0 + in1 + in2 + in3 >= 2) and (in4 + in5 + in6 + in7 >= 2) and ((in0 + in1 + in2 + in3 >= 3) or (in4 + in5 + in6 + in7 >= 3));
74  }

◆ trigger_superspecific5over8()

bool NSWL1::trigger_superspecific5over8 ( const bool  in0,
const bool  in1,
const bool  in2,
const bool  in3,
const bool  in4,
const bool  in5,
const bool  in6,
const bool  in7 
)
inline

Definition at line 76 of file PadEmulatorCoincidences.h.

77  {
78  bool IP3over4 = trigger_3over4(in0, in1, in2, in3);
79  bool HO3over4 = trigger_3over4(in4, in5, in6, in7);
80  if(not IP3over4 and not HO3over4) return false;
81  return ((IP3over4 and trigger_specific2over4(in4, in5, in6, in7)) or (HO3over4 and trigger_specific2over4(in0, in1, in2, in3)));
82  }

Variable Documentation

◆ COMMA

const std::string NSWL1::COMMA {","}

Definition at line 35 of file TrigT1NSWSimExtras.h.

◆ NLAYERS

constexpr uint32_t NSWL1::NLAYERS {8}
constexpr

Definition at line 47 of file TrigT1NSWSimExtras.h.

◆ NSECTORS

constexpr uint32_t NSWL1::NSECTORS {16}
constexpr

Definition at line 48 of file TrigT1NSWSimExtras.h.

◆ SEMICOLON

const std::string NSWL1::SEMICOLON {";"}

Definition at line 38 of file TrigT1NSWSimExtras.h.

◆ SPACE

const std::string NSWL1::SPACE {" "}

Definition at line 29 of file TrigT1NSWSimExtras.h.

◆ UNDERSCORE

const std::string NSWL1::UNDERSCORE {"_"}

Definition at line 32 of file TrigT1NSWSimExtras.h.

◆ VHDLCOMMENT

const std::string NSWL1::VHDLCOMMENT {"--"}

Definition at line 41 of file TrigT1NSWSimExtras.h.

◆ WHEELS

const std::vector<std::string> NSWL1::WHEELS {"A", "C"}

Definition at line 44 of file TrigT1NSWSimExtras.h.

PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
NSWL1::trigger_3and1
bool trigger_3and1(const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
Definition: PadEmulatorCoincidences.h:40
NSWL1::trigger_specific2over4
bool trigger_specific2over4(const bool in0, const bool in1, const bool in2, const bool in3)
Definition: PadEmulatorCoincidences.h:28
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:459
NSWL1::PAD::MUON_STGC_ENDCAP_A_SIDE
constexpr uint32_t MUON_STGC_ENDCAP_A_SIDE
Definition: TrigT1NSWSimExtras.h:186
NSWL1::trigger_4over4
bool trigger_4over4(const bool in0, const bool in1, const bool in2, const bool in3)
Definition: PadEmulatorCoincidences.h:36
NSWL1::trigger_2and2
bool trigger_2and2(const bool in0, const bool in1, const bool in2, const bool in3, const bool in4, const bool in5, const bool in6, const bool in7)
Definition: PadEmulatorCoincidences.h:47
NSWL1::trigger_2over4
bool trigger_2over4(const bool in0, const bool in1, const bool in2, const bool in3)
Definition: PadEmulatorCoincidences.h:24
NSWL1::MM::MUON_MM_ENDCAP_A_SIDE
constexpr uint32_t MUON_MM_ENDCAP_A_SIDE
Definition: TrigT1NSWSimExtras.h:302
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
NSWL1::trigger_1over4
bool trigger_1over4(const bool in0, const bool in1, const bool in2, const bool in3)
Definition: PadEmulatorCoincidences.h:20
NSWL1::trigger_3over4
bool trigger_3over4(const bool in0, const bool in1, const bool in2, const bool in3)
Definition: PadEmulatorCoincidences.h:32