ATLAS Offline Software
Loading...
Searching...
No Matches
L1DataDef.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include <iostream>
8#include <stdexcept>
9#include <iomanip>
10
11
12#define registerTriggerType(TU, MAX) \
13 bool is##TU = TrigConf::L1DataDef::addConfig(TrigConf::L1DataDef::TU, #TU, MAX);
14
15#define registerInternalTriggerType(TU, MAX) \
16 bool is##TU = TrigConf::L1DataDef::addConfig(TrigConf::L1DataDef::TU, #TU, MAX, true);
17
32
33// internal
37
38
43registerTriggerType(CALREQ, 3)
45registerTriggerType(LUCID, 2)
49// zero bias
51// NEW: Topo
53registerTriggerType(ALFA, 64)
54
55
56void
58 std::cout << "L1 Version: " << g_l1Version << std::endl;
59 for(const auto & x: g_typeConfigs) {
60 std::cout << "Maximum number of thresholds for type " << std::setw(6) << x.second.name << " : " << x.second.max << std::endl;
61 }
62}
63
64void
66 // this has to come from L1Common/L1CommonVersion.h
67 if(l1version==0) {
68 typeConfig(EM).max = 16;
69 typeConfig(TAU).max = 8;
70 typeConfig(MUON).max = 6;
71 typeConfig(TH).max = 8;
72 typeConfig(JET).max = 8;
73 typeConfig(FJET).max = 0;
74 typeConfig(FJ).max = 8;
75 typeConfig(JF).max = 4;
76 typeConfig(JB).max = 4;
77 typeConfig(JE).max = 4;
78 typeConfig(M).max = 6;
79 typeConfig(TE).max = 8;
80 typeConfig(XE).max = 8;
81 typeConfig(XS).max = 8;
82 typeConfig(RNDM).max = 2;
83 typeConfig(PCLK).max = 2;
84 typeConfig(BGRP).max = 8;
85 typeConfig(MBTS).max = 2;
86 typeConfig(MBTSSI).max = 32;
87 typeConfig(NIM).max = 37;
90 typeConfig(BPTX).max = 2;
91 typeConfig(LUCID).max = 2;
92 typeConfig(TRT).max = 1;
93 typeConfig(BCM).max = 3;
94 typeConfig(ZDC).max = 3;
95 typeConfig(ZB).max = 10;
96 typeConfig(TOPO).max = 0;
97 typeConfig(ALFA).max = 0;
98 } else if (l1version==1) {
99 typeConfig(EM).max = 16;
100 typeConfig(TAU).max = 16;
101 typeConfig(MUON).max = 6;
102 typeConfig(TH).max = 8;
103 typeConfig(JET).max = 25;
104 typeConfig(FJET).max = 0;
105 typeConfig(FJ).max = 0;
106 typeConfig(JF).max = 0;
107 typeConfig(JB).max = 0;
108 typeConfig(JE).max = 0;
109 typeConfig(M).max = 6;
110 typeConfig(TE).max = 16;
111 typeConfig(XE).max = 16;
112 typeConfig(XS).max = 8;
113 typeConfig(RNDM).max = 4;
114 typeConfig(PCLK).max = 0;
115 typeConfig(BGRP).max = 16;
116 typeConfig(MBTS).max = 3;
117 typeConfig(MBTSSI).max = 32;
118 typeConfig(NIM).max = 37;
119 typeConfig(BCMCMB).max = 1;
120 typeConfig(CALREQ).max = 3;
121 typeConfig(BPTX).max = 2;
122 typeConfig(LUCID).max = 6;
123 typeConfig(TRT).max = 1;
124 typeConfig(BCM).max = 6;
125 typeConfig(ZDC).max = 3;
126 typeConfig(ZB).max = 10;
127 typeConfig(TOPO).max = 128;
128 typeConfig(ALFA).max = 64;
129 } else {
130 std::cerr << "ERROR TrigConf::L1DataDef::setMaxThresholdsFromL1Version() L1Version not known:" << l1version << std::endl;
131 throw(std::runtime_error("Unknown L1 Version"));
132 }
133
134 g_l1Version=l1version;
135
136}
137
138
141 TypeConfigMap_t::iterator c = g_typeConfigs.find(tt);
142 if( c==g_typeConfigs.end() ) {
143 std::cerr << "Trigger type " << tt << " is defined in L1DataDef.h but not registered in L1DataDef.cxx" << std::endl;
144 throw std::runtime_error("TriggerType not registered");
145 }
146 return c->second;
147}
148
149
150// can enable old JEP3 cabling (SLOT8, CON0): 4TE, 8XE
151void
153 typeConfig(TE).max = 4;
154 typeConfig(XE).max = 8;
155 typeConfig(XS).max = 0;
156}
157
158// new JEP3 cabling (SLOT8, CON0): 8TE, 8XE, 8XS
159void
161 typeConfig(TE).max = 8;
162 typeConfig(XE).max = 8;
163 typeConfig(XS).max = 8;
164}
165
static const int TAU
Definition AtlasPID.h:79
#define registerInternalTriggerType(TU, MAX)
Definition L1DataDef.cxx:15
#define registerTriggerType(TU, MAX)
Definition L1DataDef.cxx:12
xAOD::Muon MUON
D3PD INCLUDES.
#define x
static void setOldJEP3Cabling()
static void printMaxThresholds()
Definition L1DataDef.cxx:57
static TriggerTypeConfig & typeConfig(TriggerType tt)
static void setNewJEP3Cabling()
static void setMaxThresholdsFromL1Version(unsigned int l1version)
Definition L1DataDef.cxx:65
Definition HitInfo.h:33
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22