ATLAS Offline Software
Menu_AllCTPIn_run3_v1.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 #
3 # Run this file in order to print out the empty slots
4 
5 from TriggerMenuMT.L1.Base.L1MenuFlags import L1MenuFlags
6 from TriggerMenuMT.L1.Base.Limits import Limits
7 
9  import logging
10  defineMenu()
11  available = list(set(range(Limits.MaxTrigItems-3)) - set(L1MenuFlags.CtpIdMap.value.values()) - set([508]))
12  freeItems = Limits.MaxTrigItems - len(L1MenuFlags.items.value) # correct for ZB and CALREQ items
13  floatingItems = sorted(list(set(L1MenuFlags.items.value) - set(L1MenuFlags.CtpIdMap.value.keys()))) # these items get their CTPID assigned automatically
14  unusedItemsWithCTPID = set(L1MenuFlags.CtpIdMap.value.keys()) - set(L1MenuFlags.items.value) # this should be empty, otherwise remove the items from the CtpIdMap
15  available.sort()
16  logging.info("There are %d available CTP IDs: %s", len(available), ",".join(map(str,available)))
17  logging.info("There are %d free items", freeItems)
18  logging.info("There are %d floating items: %s", len(floatingItems), ",".join(map(str,floatingItems)))
19  logging.info("There are %d unused items with CTP ID: %s", len(unusedItemsWithCTPID), ",".join(map(str,unusedItemsWithCTPID)))
20 
21 
22 def defineMenu():
23 
24  L1MenuFlags.CTPVersion = 4 # new CTP
25 
26  L1MenuFlags.BunchGroupPartitioning = [1, 15, 15] # partition 1: 1-10, partition 2: empty (was 14), partition 3: 15 (note that BGRP0 is used by all items)
27 
28  # Define one item per CTP connector
29  L1MenuFlags.items = [
30  # Direct CTP inputs
31  'L1_CTPCAL_Thresholds',
32  'L1_NIM1_Thresholds',
33  'L1_NIM2_Thresholds',
34 
35  # Legacy connectors
36  'L1_EM1_Thresholds',
37  'L1_EM2_Thresholds',
38  #
39  'L1_TAU1_Thresholds',
40  'L1_TAU2_Thresholds',
41  #
42  'L1_JET1_Thresholds',
43  'L1_JET2_Thresholds',
44  #
45  'L1_EN1_Thresholds',
46  'L1_EN2_Thresholds',
47 
48  ]
49 
50 
51 if __name__ == "__main__": print_available()
52 
53 
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
python.L1.Menu.Menu_AllCTPIn_run3_v1.defineMenu
def defineMenu()
Definition: Menu_AllCTPIn_run3_v1.py:22
python.L1.Menu.Menu_AllCTPIn_run3_v1.print_available
def print_available()
Definition: Menu_AllCTPIn_run3_v1.py:8