ATLAS Offline Software
L1TdrStgcTriggerLogic.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
13 
14 #include <fstream>
15 #include <functional>
16 #include <numeric>
17 
18 namespace {
19  const double padTimingEfficiency = 0.95; // set to -1 to disable
20 }
21 
22 namespace NSWL1{
24  AthMessaging(Athena::getMessageSvc(), "L1TdrStgcTriggerLogic") {}
25  //-------------------------------------
26 
27  bool L1TdrStgcTriggerLogic::hitPattern(const std::shared_ptr<PadOfflineData> &firstPad, const std::shared_ptr<PadOfflineData> &otherPad,
28  std::string &pattern) const {
29  return L1TdrStgcTriggerLogic::hitPattern(firstPad->padEtaId(), firstPad->padPhiId(), otherPad->padEtaId(), otherPad->padPhiId(), pattern);
30  }
31  //-------------------------------------
32  bool L1TdrStgcTriggerLogic::hitPattern(const int iEta0, const int iPhi0, const int iEta1, const int iPhi1, std::string &pattern) const {
33  pattern = "33";
34  if (iEta1 >= iEta0 + 2 || iEta1 <= iEta0 - 2)
35  return false;
36  if (iPhi1 >= iPhi0 + 2 || iPhi1 <= iPhi0 - 2)
37  return false;
38  // DeltaEta
39  if (iEta1 == iEta0 - 1)
40  pattern = "0";
41  else if (iEta1 == iEta0)
42  pattern = "1";
43  else if (iEta1 == iEta0 + 1)
44  pattern = "2";
45  // DeltaPhi
46  if (iPhi1 == iPhi0 - 1)
47  pattern.append("0");
48  else if (iPhi1 == iPhi0)
49  pattern.append("1");
50  else if (iPhi1 == iPhi0 + 1)
51  pattern.append("2");
52 
53  return true;
54  }
55  //-------------------------------------
56  //S.I : a method should not have so many arguments..
57  std::vector< SingleWedgePadTrigger > L1TdrStgcTriggerLogic::buildSingleWedgeTriggers(
58  const std::vector< std::shared_ptr<PadOfflineData> > &pads, const std::vector< size_t > &padIndicesLayer0,
59  const std::vector< size_t > &padIndicesLayer1, const std::vector< size_t > &padIndicesLayer2,
60  const std::vector< size_t > &padIndicesLayer3, bool isLayer1, bool isLayer2,
61  bool isLayer3, bool isLayer4) const {
62 
63  std::vector< SingleWedgePadTrigger > triggers;
64  size_t nHL1 = (isLayer1 ? padIndicesLayer0.size() : 1);
65  size_t nHL2 = (isLayer2 ? padIndicesLayer1.size() : 1);
66  size_t nHL3 = (isLayer3 ? padIndicesLayer2.size() : 1);
67  size_t nHL4 = (isLayer4 ? padIndicesLayer3.size() : 1);
68 
69  if (isLayer1 && nHL1 == 0)
70  return triggers;
71  if (isLayer2 && nHL2 == 0)
72  return triggers;
73  if (isLayer3 && nHL3 == 0)
74  return triggers;
75  if (isLayer4 && nHL4 == 0)
76  return triggers;
77 
78  const std::array<std::string_view, 10> PatternsEtaUp = sTGC_triggerPatternsEtaUp();
79  const std::array<std::string_view, 10> PatternsEtaDown = sTGC_triggerPatternsEtaDown();
80  const std::array<std::string_view, 16> PatternsPhiUp = sTGC_triggerPatternsPhiUp();
81  const std::array<std::string_view, 16> PatternsPhiDown = sTGC_triggerPatternsPhiDown();
82  const std::array<std::string_view, 10> PatternsPhiDownUp = sTGC_triggerPatternsPhiDownUp();
83  const std::array<std::string_view, 10> PatternsPhiUpDown = sTGC_triggerPatternsPhiUpDown();
84 
85  int iL1st = -1;
86  for (size_t il1 = 0; il1 < nHL1; il1++) {
87  int l1Idx = -1;
88  std::string sl1("33");
89  if (isLayer1) {
90  l1Idx = padIndicesLayer0.at(il1);
91  sl1 = "11";
92  iL1st = l1Idx;
93  }
94  for (size_t il2 = 0; il2 < nHL2; il2++) {
95  int l2Idx = -1;
96  std::string sl2("33");
97  if (isLayer2) {
98  l2Idx = padIndicesLayer1.at(il2);
99  if (iL1st == -1) {
100  sl2 = "11";
101  iL1st = l2Idx;
102  } // l1 was not considered, l2 gets the first indices
103  else if (!hitPattern(pads.at(iL1st), pads.at(l2Idx), sl2))
104  continue;
105  }
106 
107  for (size_t il3 = 0; il3 < nHL3; il3++) {
108  int l3Idx = -1;
109  std::string sl3("33");
110  if (isLayer3) {
111  l3Idx = padIndicesLayer2.at(il3);
112  if (!hitPattern(pads.at(iL1st), pads.at(l3Idx), sl3))
113  continue;
114  }
115  for (size_t il4 = 0; il4 < nHL4; il4++) {
116  int l4Idx = -1;
117  std::string sl4("33");
118  if (isLayer4) {
119  l4Idx = padIndicesLayer3.at(il4);
120  if (!hitPattern(pads.at(iL1st), pads.at(l4Idx), sl4))
121  continue;
122  }
123 
124  std::string pattern(sl4 + sl3 + sl2 + sl1);
125  // the above line is replaced by a normal order l1,l2,l3,l4 and
126  // separated in phi and eta but it remains the same for later usage in
127  // the trigger selection
128  // Hence the following is only for internal ease of calculation. The
129  // pattern to be passed is the "pattern" not "patternPhi" or
130  // "patternEta"
131  std::string patternPhi;
132  patternPhi.push_back(sl1.at(1));
133  patternPhi.push_back(sl2.at(1));
134  patternPhi.push_back(sl3.at(1));
135  patternPhi.push_back(sl4.at(1));
136 
137  std::string patternEta;
138  patternEta.push_back(sl1.at(0));
139  patternEta.push_back(sl2.at(0));
140  patternEta.push_back(sl3.at(0));
141  patternEta.push_back(sl4.at(0));
142 
143  int multipletid=-999;
144  int moduleid=-999;
145  int sectortype=-999;
146  //Please mind the indentation
147  if (sl1 == "11") {
148  multipletid = pads.at(l1Idx)->multipletId() ;
149  moduleid = pads.at(l1Idx)->moduleId();
150  sectortype = pads.at(l1Idx)->sectorType();
151  }
152  else if (sl2 == "11") {
153  multipletid = pads.at(l2Idx)->multipletId() ;
154  moduleid = pads.at(l2Idx)->moduleId();
155  sectortype = pads.at(l2Idx)->sectorType();
156  }
157  else continue;
158  std::string etamove, phimove;
159  if (sectortype == 1) {
160  if (multipletid == 1) {
161  etamove = "D";
162  phimove = "U";
163  if (moduleid == 2) {
164  etamove = "U";
165  phimove = "U";
166  }
167  }
168  else{ // multiplet = 2 15-7-18 YR - Confirm new geometry
169  etamove = "U";
170  phimove = "DU";
171  }
172  }
173 
174  if (sectortype == 0) {
175  if (multipletid == 1) { // 15-7-18 YR - Confirm new geometry
176  if (moduleid == 1) {
177  etamove = "U";
178  phimove = "DU";
179  }
180  if (moduleid == 2) {
181  etamove = "D";
182  phimove = "UD";
183  }
184  if (moduleid == 3) {
185  etamove = "U";
186  phimove = "UD";
187  }
188  }
189  else { // multiplet = 2
190  if (moduleid == 1) {
191  etamove = "U";
192  phimove = "D";
193  }
194  else{
195  etamove = "U";
196  phimove = "U";
197  }
198  }
199  }
200 
201  if (etamove == "D") {
202  if (find(PatternsEtaDown.begin(), PatternsEtaDown.end(),
203  patternEta) == PatternsEtaDown.end()) {
204  continue;
205  }
206  }
207 
208  if (etamove == "U") {
209  if (find(PatternsEtaUp.begin(), PatternsEtaUp.end(),
210  patternEta) == PatternsEtaUp.end()) {
211  continue;
212  }
213  }
214 
215  if (phimove == "U") {
216  if (find(PatternsPhiUp.begin(), PatternsPhiUp.end(),
217  patternPhi) == PatternsPhiUp.end()) {
218  continue;
219  }
220  }
221 
222  if (phimove == "D") {
223  if (find(PatternsPhiDown.begin(), PatternsPhiDown.end(),
224  patternPhi) == PatternsPhiDown.end()) {
225  continue;
226  }
227  }
228 
229  if (phimove == "UD") {
230  if (find(PatternsPhiUpDown.begin(), PatternsPhiUpDown.end(),
231  patternPhi) == PatternsPhiUpDown.end()) {
232  continue;
233  }
234  }
235 
236  if (phimove == "DU") {
237  if (find(PatternsPhiDownUp.begin(), PatternsPhiDownUp.end(),
238  patternPhi) == PatternsPhiDownUp.end()) {
239  continue;
240  }
241  }
242 
243  std::vector< size_t > padIndices;
244 
245  if (isLayer1) {
246  assert(l1Idx > -1);
247  padIndices.push_back(l1Idx);
248  }
249  if (isLayer2) {
250  assert(l2Idx > -1);
251  padIndices.push_back(l2Idx);
252  }
253 
254  if (isLayer3) {
255  assert(l3Idx > -1);
256  padIndices.push_back(l3Idx);
257  }
258 
259  if (isLayer4) {
260  assert(l4Idx > -1);
261  padIndices.push_back(l4Idx);
262  }
263 
264  triggers.push_back(SingleWedgePadTrigger(pattern, pads, padIndices));
265 
266  if (triggers.size() > 4) {
267  return triggers;
268  }
269  }
270  }
271  }
272  }
273 
274  return triggers;
275  }
276 
277  //-------------------------------------
278  std::vector< size_t > L1TdrStgcTriggerLogic::removeRandomPadIndices(const std::vector< size_t > &padIndices) const {
279  std::vector< size_t > out;
280  TRandom rand;
281  out.reserve(padIndices.size());
282  for (size_t i = 0; i < padIndices.size(); ++i) {
283  if (rand.Uniform(1) < padTimingEfficiency)
284  out.push_back(padIndices.at(i));
285  }
286  return out;
287  }
288  //-------------------------------------Inner:
289  std::vector< SingleWedgePadTrigger > L1TdrStgcTriggerLogic::build34swt(const std::vector< std::shared_ptr<PadOfflineData> > &pads,
290  const std::vector< size_t > &iL0,
291  const std::vector< size_t > &iL1,
292  const std::vector< size_t > &iL2,
293  const std::vector< size_t > &iL3) const {
294 
295  std::vector< SingleWedgePadTrigger > trigNoL0(buildSingleWedgeTriggers(pads, iL0, iL1, iL2, iL3, false,true, true, true));
296  std::vector< SingleWedgePadTrigger > trigNoL1(buildSingleWedgeTriggers(pads, iL0, iL1, iL2, iL3, true,false, true, true));
297  std::vector< SingleWedgePadTrigger > trigNoL2(buildSingleWedgeTriggers(pads, iL0, iL1, iL2, iL3, true,true, false, true));
298  std::vector< SingleWedgePadTrigger > trigNoL3(buildSingleWedgeTriggers(pads, iL0, iL1, iL2, iL3, true,true, true, false));
299  std::vector< SingleWedgePadTrigger > triggers;
300  triggers.insert(triggers.end(), trigNoL0.begin(), trigNoL0.end());
301  triggers.insert(triggers.end(), trigNoL1.begin(), trigNoL1.end());
302  triggers.insert(triggers.end(), trigNoL2.begin(), trigNoL2.end());
303  triggers.insert(triggers.end(), trigNoL3.begin(), trigNoL3.end());
304  return triggers;
305  }
306  std::vector< SingleWedgePadTrigger > L1TdrStgcTriggerLogic::build44swt(const std::vector< std::shared_ptr<PadOfflineData> > &pads,
307  const std::vector< size_t > &iL0,
308  const std::vector< size_t > &iL1,
309  const std::vector< size_t > &iL2,
310  const std::vector< size_t > &iL3) const {
311  return buildSingleWedgeTriggers(pads, iL0, iL1, iL2, iL3, true, true, true,true);
312  }
313 
314  //-------------------------------------
319  struct TrigIsSubsetOf {
320  std::vector< size_t > indices; // indices of the pads from the four layers
321  TrigIsSubsetOf(const SingleWedgePadTrigger &tr) : indices(tr.padIndices()) {
322  assert(indices.size() ==4); // we want to use it with the 4 out of 4 triggers
323  sort(indices.begin(), indices.end());
324  }
325  bool operator()(const SingleWedgePadTrigger &tr) const {
326  std::vector< size_t > idxes(tr.padIndices());
327  sort(idxes.begin(),idxes.end()); // need to be sorted for set_intersection to work
328  std::vector< size_t > commonIndices(indices.size() > idxes.size() ? indices.size(): idxes.size());
329  bool allIdsPresent(
330  std::distance(commonIndices.begin(),std::set_intersection(indices.begin(), indices.end(),idxes.begin(), idxes.end(),commonIndices.begin())) ==static_cast<int>(idxes.size())
331  );
332  return allIdsPresent;
333  }
334  };
335 
336  void remove3of4Redundant4of4(const std::vector< SingleWedgePadTrigger > &trigs4of4,std::vector< SingleWedgePadTrigger > &trigs3of4){//haha :)
337  for (std::vector< SingleWedgePadTrigger >::const_iterator t4 = trigs4of4.begin(); t4 != trigs4of4.end();++t4) {
338  trigs3of4.erase(std::remove_if(trigs3of4.begin(), trigs3of4.end(),TrigIsSubsetOf(*t4)),trigs3of4.end());
339  }
340  }
341  //-------------------------------------
342  std::vector<SectorTriggerCandidate> L1TdrStgcTriggerLogic::buildSectorTriggers(const std::vector< std::shared_ptr<PadOfflineData> > &pads, const std::pair<double,double>& Zratio) const {
343 
344  std::vector<SectorTriggerCandidate> secTrigCand;
345 
346  std::vector< size_t > indicesSecN(pads.size());
347  std::iota(indicesSecN.begin(),indicesSecN.end(),0);
348  const int innerMultiplet(1), outerMultiplet(2);
349  std::vector< size_t > indicesInner = filterByMultiplet(pads, indicesSecN, innerMultiplet);
350  std::vector< size_t > indicesOuter = filterByMultiplet(pads, indicesSecN, outerMultiplet);
351  std::vector< size_t > idxesI1(filterByLayer(pads, indicesInner, STGC_LAYER_1));
352  std::vector< size_t > idxesI2(filterByLayer(pads, indicesInner, STGC_LAYER_2));
353  std::vector< size_t > idxesI3(filterByLayer(pads, indicesInner, STGC_LAYER_3));
354  std::vector< size_t > idxesI4(filterByLayer(pads, indicesInner, STGC_LAYER_4));
355  std::vector< size_t > idxesO1(filterByLayer(pads, indicesOuter, STGC_LAYER_1));
356  std::vector< size_t > idxesO2(filterByLayer(pads, indicesOuter, STGC_LAYER_2));
357  std::vector< size_t > idxesO3(filterByLayer(pads, indicesOuter, STGC_LAYER_3));
358  std::vector< size_t > idxesO4(filterByLayer(pads, indicesOuter, STGC_LAYER_4));
359  std::vector< SingleWedgePadTrigger > i4of4trig(build44swt(pads, idxesI1, idxesI2, idxesI3, idxesI4));
360  std::vector< SingleWedgePadTrigger > i3of4trig(build34swt(pads, idxesI1, idxesI2, idxesI3, idxesI4));
361  std::vector< SingleWedgePadTrigger > o4of4trig(build44swt(pads, idxesO1, idxesO2, idxesO3, idxesO4));
362  std::vector< SingleWedgePadTrigger > o3of4trig(build34swt(pads, idxesO1, idxesO2, idxesO3, idxesO4));
363 
364  remove3of4Redundant4of4(i4of4trig, i3of4trig);
365  remove3of4Redundant4of4(o4of4trig, o3of4trig);
366 
367  ATH_MSG_DEBUG("SingleWedge triggers :"
368  << " inner : " << i3of4trig.size() << "(3/4) " << i4of4trig.size()
369  << "(4/4)"
370  << " outer : " << o3of4trig.size() << "(3/4) " << o4of4trig.size()
371  << "(4/4)" );
372 
373  std::vector< SingleWedgePadTrigger > innerTrigs, outerTrigs; // merge 4/4 and 3/4
374  innerTrigs.insert(innerTrigs.end(), i3of4trig.begin(), i3of4trig.end());
375  innerTrigs.insert(innerTrigs.end(), i4of4trig.begin(), i4of4trig.end());
376  outerTrigs.insert(outerTrigs.end(), o3of4trig.begin(), o3of4trig.end());
377  outerTrigs.insert(outerTrigs.end(), o4of4trig.begin(), o4of4trig.end());
378  bool acceptSingleWedgeInTransition = true;
379 
380  for (auto& it : innerTrigs) {
381  for (auto& ot: outerTrigs) {
382  // Inner-Outer matching based on area
385 
386  float Z1=ot.pads().at(0)->m_cornerXyz[1][2];
387  float Z0=it.pads().at(0)->m_cornerXyz[1][2];
388 
389  Polygon inoutovl=largestIntersection(innerArea,Project(outerArea,Z1,Z0));
390 
391  float overlap=area(inoutovl);
392 
393  if (overlap >0) {
394  ATH_MSG_DEBUG("OVERLAP "<<overlap<<" Inner "<<area(innerArea)<<" Outer "<<area(outerArea));
395  secTrigCand.emplace_back(it.setCombined(), ot.setCombined());
396  }
397  } // end for(ot)
398  } // end for(it)
399  //***** Transition Region *****
400 
401  if (acceptSingleWedgeInTransition) {
402  for ( auto& it : innerTrigs){
403  if (it.alreadyCombined()){
404  ATH_MSG_DEBUG("Inner SingleWedge trigger already combined, skipping");
405  continue;
406  }
407  else if ((it.is4outOf4Layers()||it.is3outOf4Layers()) && it.isInTransitionRegion(Zratio)){
408  secTrigCand.emplace_back(it.setCombined());
409  }
410  }
411  for ( auto& ot : outerTrigs) {
412  if (ot.alreadyCombined()){
413  ATH_MSG_DEBUG("Outer SingleWedge trigger already combined, skipping");
414  continue;
415  }
416  else if ((ot.is4outOf4Layers()||ot.is3outOf4Layers()) && ot.isInTransitionRegion(Zratio)){
417  secTrigCand.emplace_back(ot.setCombined());
418  }
419  }
420  } // end if(acceptSingleWedgeInTransition)
421 
422  if (msgLvl(MSG::DEBUG)) {
423  ATH_MSG_DEBUG("found " << secTrigCand.size() << " triggerCandidates from "<< pads.size() << " pads");
424  for (const auto& tc : secTrigCand) ATH_MSG_DEBUG("trigger region area : " << area(tc.triggerRegion3()));
425  }
426  return secTrigCand;
427  }
428 
436  std::array<std::string_view, 10> L1TdrStgcTriggerLogic::sTGC_triggerPatternsEtaUp() const {
437  constexpr static std::array<std::string_view, 10> patterns = {"1111", "1122", "3111", "3122", "1311", "1322", "1131", "1132", "1113", "1123"};
438  return patterns;
439  }
440 
441  std::array<std::string_view, 10> L1TdrStgcTriggerLogic::sTGC_triggerPatternsEtaDown() const {
442  constexpr static std::array<std::string_view, 10> patterns = {"1111", "1100", "3111", "3100", "1311", "1300", "1131", "1130", "1113", "1103"};
443  return patterns;
444  }
445 
446  std::array<std::string_view, 16> L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiUp() const {
447  constexpr static std::array<std::string_view, 16> patterns = {"1111", "1112", "1122", "1222", "1113", "1123", "1223", "1131", "1132", "1232",
448  "1311", "1312", "1322", "3111", "3112", "3122"};
449  return patterns;
450  }
451 
452  std::array<std::string_view, 16> L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiDown() const {
453  constexpr static std::array<std::string_view, 16> patterns = {"1111", "1110", "1100", "1000", "1113", "1103", "1003", "1131", "1130", "1230",
454  "1311", "1310", "1300", "3111", "3110", "3100"};
455  return patterns;
456  }
457 
458  std::array<std::string_view, 10> L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiUpDown() const {
459  constexpr static std::array<std::string_view, 10> patterns = {"1111", "1212", "1113", "1213", "1131", "1232", "1311", "1312", "3111", "3101"};
460  return patterns;
461  }
462 
463  std::array<std::string_view, 10> L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiDownUp() const {
464  constexpr static std::array<std::string_view, 10> patterns = {"1111", "1010", "1113", "1013", "1131", "1030", "1311", "1310", "3111", "3121"};
465  return patterns;
466  }
467 
468  //orphant functions .. mut be members TrigT1NSWSimTools or move into a separate file.
469  //-------------------------------------
470  std::vector<size_t> L1TdrStgcTriggerLogic::filterByLayer(const std::vector<std::shared_ptr<PadOfflineData>> &pads,
471  const std::vector<size_t> &padSelectedIndices,
472  int layer) const
473  {
474  std::vector<size_t> indices;
475  for(size_t i=0; i<padSelectedIndices.size(); i++){
476  const size_t idx=padSelectedIndices[i];
477  if(layer==pads[idx]->gasGapId()) indices.push_back(idx);
478  }
479  return indices;
480  }
481 
482  std::vector<size_t> L1TdrStgcTriggerLogic::filterByMultiplet(const std::vector<std::shared_ptr<PadOfflineData>> &pads,
483  const std::vector<size_t> &padSelectedIndices,
484  int multiplet) const
485  {
486  std::vector<size_t> indices;
487  for(size_t i=0; i<padSelectedIndices.size(); i++){
488  const size_t idx=padSelectedIndices[i];
489  if(multiplet==pads[idx]->multipletId()) indices.push_back(idx);
490  }
491  return indices;
492  }
493 }
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
NSWL1::L1TdrStgcTriggerLogic::build44swt
std::vector< SingleWedgePadTrigger > build44swt(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padIndicesLayer0, const std::vector< size_t > &padIndicesLayer1, const std::vector< size_t > &padIndicesLayer2, const std::vector< size_t > &padIndicesLayer3) const
Definition: L1TdrStgcTriggerLogic.cxx:306
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiUp
std::array< std::string_view, 16 > sTGC_triggerPatternsPhiUp() const
Definition: L1TdrStgcTriggerLogic.cxx:446
tdr_compat_enum.h
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
NSWL1::L1TdrStgcTriggerLogic::removeRandomPadIndices
std::vector< size_t > removeRandomPadIndices(const std::vector< size_t > &padIndices) const
simulate efficiency by dropping random pads (their indices)
Definition: L1TdrStgcTriggerLogic.cxx:278
SectorTriggerCandidate.h
NSWL1::SingleWedgePadTrigger
Definition: SingleWedgePadTrigger.h:28
NSWL1::L1TdrStgcTriggerLogic::buildSingleWedgeTriggers
std::vector< SingleWedgePadTrigger > buildSingleWedgeTriggers(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padIndicesLayer0, const std::vector< size_t > &padIndicesLayer1, const std::vector< size_t > &padIndicesLayer2, const std::vector< size_t > &padIndicesLayer3, bool isLayer1, bool isLayer2, bool isLayer3, bool isLayer4) const
Definition: L1TdrStgcTriggerLogic.cxx:57
patterns
std::vector< std::string > patterns
Definition: listroot.cxx:187
Trk::indices
std::pair< long int, long int > indices
Definition: AlSymMatBase.h:24
GeoUtils.h
NSWL1::STGC_LAYER_3
const int STGC_LAYER_3
Definition: tdr_compat_enum.h:14
ReadFromCoolCompare.ot
ot
Definition: ReadFromCoolCompare.py:229
NSWL1::Polygon
boost::geometry::model::polygon< Vertex > Polygon
Definition: GeoUtils.h:18
skel.it
it
Definition: skel.GENtoEVGEN.py:396
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
NSWL1::largestIntersection
Polygon largestIntersection(const Polygon &p1, const Polygon &p2)
Definition: GeoUtils.cxx:80
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiDown
std::array< std::string_view, 16 > sTGC_triggerPatternsPhiDown() const
Definition: L1TdrStgcTriggerLogic.cxx:452
NSWL1::TrigIsSubsetOf::operator()
bool operator()(const SingleWedgePadTrigger &tr) const
Definition: L1TdrStgcTriggerLogic.cxx:325
python.TrigTLAMonitorAlgorithm.triggers
triggers
Definition: TrigTLAMonitorAlgorithm.py:196
NSWL1::L1TdrStgcTriggerLogic::build34swt
std::vector< SingleWedgePadTrigger > build34swt(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padIndicesLayer0, const std::vector< size_t > &padIndicesLayer1, const std::vector< size_t > &padIndicesLayer2, const std::vector< size_t > &padIndicesLayer3) const
Definition: L1TdrStgcTriggerLogic.cxx:289
NSWL1::TrigIsSubsetOf
whether all pad indices of one trigger are a subset of another one A functor used to remove redundanc...
Definition: L1TdrStgcTriggerLogic.cxx:319
NSWL1::Project
Polygon Project(const Polygon &p, float Zinit, float Zfin)
Definition: GeoUtils.cxx:19
Trk::Z0
@ Z0
Definition: ParameterType.h:18
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiDownUp
std::array< std::string_view, 10 > sTGC_triggerPatternsPhiDownUp() const
Definition: L1TdrStgcTriggerLogic.cxx:463
NSWL1::SingleWedgePadTrigger::padIndices
const std::vector< size_t > & padIndices() const
Definition: SingleWedgePadTrigger.h:57
NSWL1::L1TdrStgcTriggerLogic::L1TdrStgcTriggerLogic
L1TdrStgcTriggerLogic()
Definition: L1TdrStgcTriggerLogic.cxx:23
NSWL1::area
float area(const Polygon &p)
Definition: GeoUtils.cxx:55
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
LArG4FSStartPointFilter.rand
rand
Definition: LArG4FSStartPointFilter.py:80
lumiFormat.i
int i
Definition: lumiFormat.py:85
Athena
Some weak symbol referencing magic...
Definition: AthLegacySequence.h:21
NSWL1::STGC_LAYER_4
const int STGC_LAYER_4
Definition: tdr_compat_enum.h:14
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
NSWL1::TrigIsSubsetOf::TrigIsSubsetOf
TrigIsSubsetOf(const SingleWedgePadTrigger &tr)
Definition: L1TdrStgcTriggerLogic.cxx:321
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsEtaUp
std::array< std::string_view, 10 > sTGC_triggerPatternsEtaUp() const
trigger patterns that will be stored in the lookup table
Definition: L1TdrStgcTriggerLogic.cxx:436
NSWL1::remove3of4Redundant4of4
void remove3of4Redundant4of4(const std::vector< SingleWedgePadTrigger > &trigs4of4, std::vector< SingleWedgePadTrigger > &trigs3of4)
Definition: L1TdrStgcTriggerLogic.cxx:336
LUCID_EventTPCnv_Dict::t4
std::vector< LUCID_RawDataContainer_p1 > t4
Definition: LUCID_EventTPCnvDict.h:29
NSWL1::L1TdrStgcTriggerLogic::hitPattern
bool hitPattern(const std::shared_ptr< PadOfflineData > &firstPad, const std::shared_ptr< PadOfflineData > &otherPad, std::string &pattern) const
Definition: L1TdrStgcTriggerLogic.cxx:27
PadOfflineData.h
NSWL1::TrigIsSubsetOf::indices
std::vector< size_t > indices
Definition: L1TdrStgcTriggerLogic.cxx:320
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsEtaDown
std::array< std::string_view, 10 > sTGC_triggerPatternsEtaDown() const
Definition: L1TdrStgcTriggerLogic.cxx:441
NSWL1::L1TdrStgcTriggerLogic::buildSectorTriggers
std::vector< SectorTriggerCandidate > buildSectorTriggers(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::pair< double, double > &Zratio) const
main function to compute trigger candidates
Definition: L1TdrStgcTriggerLogic.cxx:342
DEBUG
#define DEBUG
Definition: page_access.h:11
NSWL1::L1TdrStgcTriggerLogic::filterByMultiplet
std::vector< size_t > filterByMultiplet(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padSelectedIndices, int multiplet) const
Definition: L1TdrStgcTriggerLogic.cxx:482
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
NSWL1::STGC_LAYER_2
const int STGC_LAYER_2
Definition: tdr_compat_enum.h:14
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
NSWL1::SingleWedgePadTrigger::padOverlap3
static Polygon padOverlap3(const std::vector< std::shared_ptr< PadOfflineData >> &pads)
area that is overlapping between the pads that cause the trigger (pads are staggered)
Definition: SingleWedgePadTrigger.cxx:113
SingleWedgePadTrigger.h
NSWL1::L1TdrStgcTriggerLogic::sTGC_triggerPatternsPhiUpDown
std::array< std::string_view, 10 > sTGC_triggerPatternsPhiUpDown() const
Definition: L1TdrStgcTriggerLogic.cxx:458
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
NSWL1::STGC_LAYER_1
const int STGC_LAYER_1
Definition: tdr_compat_enum.h:14
NSWL1
A trigger trigger candidate for a stgc sector.
Definition: NSWL1Simulation.cxx:9
L1TdrStgcTriggerLogic.h
NSWL1::L1TdrStgcTriggerLogic::filterByLayer
std::vector< size_t > filterByLayer(const std::vector< std::shared_ptr< PadOfflineData >> &pads, const std::vector< size_t > &padSelectedIndices, int layer) const
Definition: L1TdrStgcTriggerLogic.cxx:470