Draft specification of Run IIb L1 Calorimeter Trigger Resource programming by COOR P.Laurens, H.Evans, M.Mulhearn. 4-Oct-2005 0. General ========== The new syntax for Run IIb follows and adapts the Run IIa syntax. cf. http://www.pa.msu.edu/hep/d0/ftp/tcc/coor/coor_to_tcc_l1ct_message_syntax.txt All keywords are *not* case-sensitive with respect to TCC, and capitalization is used and encouraged to help the human reader. The Run IIb L1Cal will be controlled via a new computer called L1CAL TCC (d0tcc3.fnal.gov) which presents an ITC server port #52345 for COOR. L1CAL TCC will accept and acknowledge but ignore all the standard run control messages that COOR sends but are not relevant to L1Cal operation (e.g. Begin Store, Start Run, etc). The resources have been organized below around which card type they come from. There are 3 types of cards in the data path of the L1Cal system. The Analog and Digital Filter cards version 2 (ADF-2 or simply ADF) receive the BLS Energy signals, and compute for each beam crossing an EM and an HD Et value for each of the 1280 Trigger Towers (TT) in the L1 Cal coverage. The Trigger Algorithm Boards (TAB) apply the L1CAL algorithms locally and construct physics objects (e.g. jet energies). The Global Algorithm Board (GAB) puts it all together to perform final sums, counts, and topological cuts to produce And/Or Terms to be sent to the L1FW. I. Initialization ================= "L1CAL_Initialize" alias: "INIT" Initialize the L1CAL system. The goal is to write to all internal registers, and program all resources such that: - the system forgets how it may have been programmed earlier by COOR or temporary overridden by a L1Cal expert - the system forgets how it may have been mis-programmed earlier - L1Cal TCC can verify that all resources are currently responding - all programmable resources are initialized to their defined default. (The default state after initialization will be defined more specifically.) II. ADF-2 resources ==================== There are no truly run-dependent resources on the ADF-2 for COOR to program. II.1. Excluding Trigger Towers ----------------------------- This is probably part of initialization, like for IIa, but managed by the trigger experts, not by COOR . "L1CAL_Exclude EM_Tower TT_Eta(20) TT_Phi(23)" "L1CAL_Exclude HD_Tower TT_Eta(20) TT_Phi(23)" These commands are used to suppress the contribution of one or more Trigger Tower. The specified EM or HD Trigger Tower will be programmed so that it will always report 0 GeV of energy. 0 GeV is represented by a non zero value, defined as 8 ADC counts, which is called the zero energy response, and which is constant over all EM and HD Trigger Towers. TCC implements a related command for special tests requiring that the fixed value coming out of a tower be different than the standard zero energy response of 8 counts: "L1Cal_Simu_ADC EM_Tower TT_Eta(20) TT_Phi(23) Value 20" "L1Cal_Simu_ADC HD_Tower TT_Eta(20) TT_Phi(23) Value 20" III. TAB resources ================== All the resources in this section are programmable per TAB chip i.e. per 4x4 in eta,phi There are 7 Reference Sets available for each object type (EM, Jet, Tau) that we can number in the conventional zero-based way, i.e. #0:6. The result of these comparisons on the TAB is passed to the GAB and used to create And/Or Terms. However only the upper 6 thresholds (#1:6) are passed and the existence of the lowest threshold is only meaningful to the Cal-Track matching Trigger and readout to L2 and L3. For each Threshold Reference Set there is one value downloaded per TAB chip which corresponds to a range of 4x TT_Eta values and 4x TT_Phi values. Normal operation will probably desire constant values over the whole coverage, but special studies, special cases, or commissioning could make use of non-uniform thresholds. TCC already knows how to parse per-TT syntax, and TCC has to program the TAB chips one at a time anyway. The details of the TT_Eta/TT_Phi specifications is identical to Run IIa, and is repeated here. Trigger Tower Ranges: --------------------- Example : L1CAL_Ref_Set TT_Eta(-20:20) TT_Phi(1:32) Energy_Threshold The first keyword, "L1CAL_Ref_Set", introduces all Reference Set definitions. The second keyword, "", specifies the type of Reference Set. The "" is the ID number of the Reference Set. cf. III.1. A set of magnitudes of eta is specified by the keyword "TT_Eta"followed by a pair of parenthesis delimiting any combination of individual eta Trigger Tower indices and/or ranges of eta indices. TT_Eta values are the Trigger Tower pseudo-rapidity indices. TT_Eta values are signed integers between -20 and -1 and +1 and +20. The plus sign ("+") is NOT necessary but accepted. A range is specified by its upper and lower bounds separated by a colon character (":"). The lower (respectively upper) bound is the number appearing before (respectively after) the colon character. Extra space characters may appear before and after the colon character. When two eta magnitudes are separated by a colon to form a range, they are understood as representing the complete set of all integer values between and including the upper and lower bounds. There is no requirement in the order of upper and lower range bounds with respect to their sign or magnitude: (-4:+4), (+4:-4), (4:8), (8:4) are all legal range definitions. When an eta index is not separated by a colon character from either of its surrounding index values it will be understood as one more discrete values to be included in a set of magnitudes defined inside the parenthesis. (note: this is not very useful for run IIb). Multiple ranges and/or multiple discrete values may be specified within the same set of parenthesis, each separated by at least one space character. The specification of the eta indices may be omitted when all existing magnitudes are to be treated identically; it is equivalent to TT_Eta(-20:20). A pair of empty parenthesis following "TT_Eta" is equivalent to omitting the eta indices. The keyword "TT_Eta" must always be followed (after optional space characters) by a set of parenthesis including the Eta indices. A set of phi values is specified by the keyword "TT_Phi" followed by a pair of parenthesis including any combination of individual phi values and phi ranges. TT_Phi values are the Trigger Tower azimuthal indices. TT_Phi values are unsigned integers between 1 and 32. A plus sign ("+") is NOT necessary but accepted. The syntax rules for specifying TT_Phi values are identical to the syntax rules for the TT_Eta defined above. The specification of the phi values may be omitted when all existing phi values are to be treated identically; it is equivalent to TT_Phi(1:32). A pair of empty parenthesis following "TT_Phi" is equivalent to omitting the Phi indices. The keyword "TT_Phi" must always be followed (after optional space characters) by a set of parenthesis including the Phi indices. When both the Eta and Phi indices are omitted the Reference Set is programmed uniformly over all Trigger Tower. The Keyword "Energy_Threshold" must appear after the Trigger Tower specification. The Keyword "Energy_Threshold" is followed by the Energy Threshold Value specified as a floating point number in units of GeV of z-corrected Transverse Energies. The decimal point is not required in the specification of the Threshold Value. For thresholds below 1 GeV, a leading 0 must be explicitly specified before the decimal point. The Trigger Control Computer will perform the translation to the nearest quantified threshold value that will be inclusive of the requested value, as defined earlier. Only one Threshold value may be defined within a single message. Whenever a range of Trigger Tower appears in a message, the following threshold value is applied to the specified Reference Set and to all the Trigger Towers specified in the range. Trigger Towers outside of the specified range are not affected. When successive Trigger Tower ranges overlap for the same reference set the threshold value programmed for the overlapping tower(s) is the one specified for the last occurrence. This may be useful to first define a uniform reference set and subsequently modify it by adding singularities. The Keywords must always be specified in the order described except for the "TT_Eta" and "TT_Phi keywords which may be reversed. These two keywords may also appear zero or multiple times. Examples of range specification: -------------------------------- L1CAL_Ref_Set TT_Eta(-20:20) TT_Phi(1:32) Energy_Threshold 10.0 L1CAL_Ref_Set TT_Eta(-20:20) Energy_Threshold 10.0 L1CAL_Ref_Set Energy_Threshold 10.0 Either of these three messages specifies a uniform threshold of 10.0 GeV over all Trigger Tower eta indices within [-20,-1] and [1,20] and phi indices within [1,32] L1CAL_Ref_Set TT_Eta(-20:-13 13:20) Energy_Threshold 20 L1CAL_Ref_Set TT_Eta(-12:12) Energy_Threshold 10 These three messages taken together specify a Reference Set of 10.0 GeV over all Trigger Tower eta indices within [-12,-1] and [1,12], 20.0 GeV over all Trigger Tower eta indices within [-20,-13] and [13,20]. This Reference Set is uniform with respect to the phi index for all values [1,32]. L1CAL_Ref_Set TT_Eta(-1:-4) TT_Phi(5:8) Energy_Threshold 1000.0 This message specifies or modifies the Threshold value for the Trigger Towers with eta index [-1,-4] and phi index [5:8] to effectively exclude these Trigger Towers from contributing to the Reference Set. Reference Set Boundaries ------------------------ The eta,phi boundaries specified by COOR always need to follow the TAB chip granularity. These boundaries cannot cut accross the following ranges: -20:-17, -16:-13, -12:-9, -8:5, -4:1, 1:4, 5:8, 9:12, 13:16, 17:20 in eta 1:4, 5:8, 9:12, 13:16, 17:20, 21:24, 25:28, 29:32 in phi III.1. Threshold Reference Sets ------------------------------- III.1.a. Jet Reference Sets III.1.b. EM Reference Sets III.1.c. Tau Reference Sets (currently hardcoded) "L1CAL_Ref_Set Jet_Et_Ref_Set TT_Eta(-20:20) TT_Phi(1:32) Energy_Threshold " "L1CAL_Ref_Set EM_Et_Ref_Set TT_Eta(-20:20) TT_Phi(1:32) Energy_Threshold " "L1CAL_Ref_Set Tau_Et_Ref_Set TT_Eta(-20:20) TT_Phi(1:32) Energy_Threshold " This message programs the Jet_Et (or EM_Et, or Tau_Et) Reference Set #T to require that the Energy of the Jet (or electron, or Tau) object found within the specified TT_Eta x TT_Phi coverage are reconstructed to have an energy equal to or greater than the specified Et value. Any message defining part of, or all of, a given Reference Set will implicitely also mean that COOR has allocated the Reference Set and is now controlling its Threshold Value(s). cf below for Deallocation, and behavior of unallocated Reference Sets. Like in Run IIa, the Energy threshold value is inclusive, meaning that an object must have a reconstructed energy value equal to or greater than the specified threshold to be accepted. Since the comparators on the TABs operate as "strictly greater", TCC will simply substract one ADC count during translation from GeVs to ADC counts. For every Trigger Tower the eneregy threshold *must be monotonously* increasing with the Reference Set Number. This is *not* a temporary limitation, but is required by the design of the system. TCC can verify the thresold values as they are being specified by COOR. COOR will still need to manage this intrinsic limitation as well, in particular when it receives a new request after some of the resources have already been allocated. The energy threshold programmed into the TABs is a 12 bit number in units of ADC counts, i.e. the value specified by COOR has a granularity of 0.25 GeV (other values will be rounded down) a minimum value of 0.25 GeV (0.0 GeV is *not* allowed) a maximum value of 1024.0 GeV Setting the Reference Set thresholds is independent from the programming of the global thresholds acting on the total count carried over the whole detector for the number of objects found exceeding their individual threshold. The global thresholds are programmed with separate messages. cf. section IV. Default programming after initialization: All Thresholds are initialized to a safe don't pass value defined as 1024 GeV everywhere. Initial limitations: - Tau references are hardcoded, with values to be determined. III.1.d. Deallocate Jet Reference Sets III.1.e. Deallocate EM Reference Sets III.1.f. Deallocate Tau Reference Sets "L1CAL_Ref_Set Jet_Et_Ref_Set Deallocate "L1CAL_Ref_Set EM_Et_Ref_Set Deallocate "L1CAL_Ref_Set Tau_Et_Ref_Set Deallocate This message deallocates the Jet_Et (or EM_Et, or Tau_Et) Reference Set #T. The Reference Set will then be implicitely managed by TCC to maintain proper operation of the other allocated reference sets (cf below) Default programming after initialization: All Reference Sets are un-allocated after an initialization message. III.1.g. Reference Set Management COOR is required to comply with the monotonicity requirement so that all Reference Sets always be specified with energy thresholds monotonically increasing with Reference Set Index number for all *allocated* Reference Sets of each type. For each reference set message that it receives, TCC will verify that the monotonicity rule is always satisfied, and TCC will respond to the request with a "BAD" acknowledgement when an inconsistency is detected within the currently allocated Reference Sets. COOR does not need to always allocate and specify all 7 Reference Sets of each type. COOR may allocate and program any subset of zero, one or more Reference Set(s) at any given time. TCC will implicitely manage all un-allocated Reference Sets to maintain proper operation of the system at all times. At any given time, all Reference Sets of each type are maintained to follow the following rules: - If the lowest Reference Set allocated by COOR is #N, with N!=0, TCC will program all Reference Set #M, with 0 <= M < N to the same threshold as the one COOR defined for Reference Set #N. - If COOR defines two reference Sets #P and #R while leaving some Reference Set(s) #Q un-allocated, with P < Q < R, TCC will program #Q to the same threshold has the one COOR defined for Reference Set #R. - If the highest Reference Set allocated by COOR is #S, with S!=6, TCC will program all Reference Set #T, with S < T <= 6 to the default initial "don't pass threshold", i.e. 1000 GeV. - When all reference Sets are unallocated, they are all programmed by TCC to the default initial "don't pass threshold", i.e. 1000 GeV. Any time COOR allocates and programs (or modifies) a Reference Set, TCC will reprogram any unallocated Reference Set of lower index to satisfy the above rules, if necessary. Any time COOR explicitely deallocates a given Reference Set, TCC will reprogram this Reference Set to satisfy the above rules, as well as any other unallocated Reference Set of lower index, if necessary. III.2. Algorithm Parameters --------------------------- III.2.a. EM Isolation Ratio "L1CAL_Ref_Set EM_Isolation TT_Eta(-20:20) TT_Phi(1:32) Ratio " This message programs an EM Isolation ratio of X, meaning that an electron object will be tagged as Isolated if the ratio of the EM Et energy sum in the corresponding 1x2 (or 2x1) TT_Eta x TT_Phi cell over the EM Et energy sum in the two neighboring 1x2 (or 2x1) cell is greater or equal to the value X. The EM Isolation Ratio is only used for the computation of the EM Isolated Object Counts in the GAB and related And/Or Term (cf. IV.4) The Ratio X needs to be a power of 2. The ratio values allowed are 1, 2, 4, 8. This feature can be enabled or disabled. The value 0 will be used to request that the feature be disabled. Default programming after initialization: This feature is disabled Current firmware limitation: None III.2.b. EM/HD Fraction "L1CAL_Ref_Set EM_HD_Fraction TT_Eta(-20:20) TT_Phi(1:32) Ratio " This message programs an EM/HD fraction of X, meaning that an electron object will be tagged as Isolated if the ratio of the EM Et energy sum in the corresponding 1x2 (or 2x1) TT_Eta x TT_Phi cell over the HD Et energy sum in the same 1x2 (or 2x1) cell is greater or equal to the value X. The EM/HD Fraction is only used for the computation of the EM Isolated Object Counts in the GAB and related And/Or Term (cf. IV.4) The Ratio X needs to be a power of 2. The ratio values allowed are 1, 2, 4, 8. This feature can be enabled or disabled. The value 0 will be used to request that the feature be disabled. Default programming after initialization: This feature is disabled Current firmware limitation: None III.2.c. Tau Ratio or parameters (Are there a programmable resources for that?) To be defined III.3 L1 Cal-Track Match ------------------------ The TAB cards will send L1Cal information to the L1 Cal-Track system, which is a new system for Run IIb. No special resource needs to be programmed by COOR. L1CAL sends information about all the jets and EM objects found. IV. GAB resources ================== These resources control the overall Thresholds affecting the terms sent to the L1 Framework as And/Or Input Terms. Note that the GAB only sees the result of the upper 6 of the 7 Reference Sets defined in the TABs. The definition of "Central Calorimeter Coverage" used in the definitions below currently corresponds to the central trigger towers with |eta| <= 1.0, which corresponds to |TT_eta| <= 5, or |ieta|<=10. This definition is implemented in firmware on the TAB card, and may be changed in the future. IV.1. Jet Object Count ----------------------- IV.1.a. Jet Count over the Full Calorimeter Coverage "L1CAL_to_L1FW Jet_All_Term Use_Ref_Set Count_Threshold " This message programs the Jet_All Term #P to require N or more Jet objects having passed Jet Et Threshold Reference Set #T with no restriction on Eta,Phi. This corresponds to And/Or Term CSWJT(n,t,ALL) There are 16 such terms. Default programming after initialization: To be defined. Firmware limitations expected initially: The count thresholds for P=0:3 are fixed at N=1, P=4:7 at N=2, P=8:11 at N=3, and P=12:15 at N=4. We could either ask COOR to re-specify such fixed values, or make these the default values and ask COOR to ommit the Count_Threshold keyword/Value for now. IV.1.b. Jet Count over the Central Calorimeter Coverage "L1CAL_to_L1FW Jet_Central_Term Use_Ref_Set Count_Threshold " This message programs the Jet_Central Term #P to require N or more Jet objects having passed Jet Et Threshold Reference Set #T while only counting objects in the Eta range corresponding to the Central Calorimeter. This corresponds to And/Or Term CSWJT(n,t,C) There are 4 such terms available to COOR. Default programming after initialization: To be defined. Firmware limitations expected initially: Only the first two Terms P=0:1 are implemented The count thresholds for P=0 is fixed at N=1, P=1 at N=2 IV.2. EM Object Count ---------------------- IV.2.a. EM Count over the Full Calorimeter Coverage "L1CAL_to_L1FW EM_All_Term Use_Ref_Set Count_Threshold " This message programs the EM_All Term #P to require N or more EM Electron objects having passed Tau Et Threshold Reference Set #T with no restriction on Eta,Phi. This corresponds to And/Or Term CSWEM(n,t,ALL) There are 12 such terms available to COOR. Default programming after initialization: To be defined. Firmware limitations expected initially: Only the first 8 Terms P=0:7 are implemented. The count thresholds for P=0:3 are fixed at N=1, P=4:7 at N=2 IV.2.b. EM Count over the the Central Calorimeter Coverage "L1CAL_to_L1FW EM_Central_Term Use_Ref_Set Count_Threshold " This message programs the EM_Central Term #P to require N or more EM Electron objects having passed EM Et Threshold Reference Set #T while only counting objects in the Eta range corresponding to the Central Calorimeter. This corresponds to And/Or Term CSWEM(n,t,C) There are 4 such terms available to COOR. Default programming after initialization: To be defined. Firmware limitations expected initially: Only the first 2 Terms P=0:1 are implemented. The count Threshold for P=0 is fixed at N=1, P=1 at N=2 IV.3. Tau Object Count ----------------------- IV.3.a. Tau Count over the Full Calorimeter Coverage "L1CAL_to_L1FW Tau_All_Term Use_Ref_Set Count_Threshold " This message programs the Tau_All Term #P to require N or more Tau objects having passed EM Et Threshold Reference Set #T while only counting objects in the Eta range corresponding to the Central Calorimeter. This corresponds to And/Or Term CSWTA(n,t,ratio,ALL) There are 4 such terms available to COOR. Default programming after initialization: To be defined. Firmware limitations expected initially: The count thresholds for P=0:1 are fixed at N=1, P=2:3 at N=2 IV.4. EM Isolated Object Count ------------------------------- IV.4.a. EM Isolated Count over the Full Calorimeter Coverage "L1CAL_to_L1FW Isolated_EM_All_Term Use_Ref_Set Count_Threshold " This message programs the Isolated_EM_All Term #P to require at least N Electron objects having passed EM Et Threshold Reference Set #T and having been tagged as Isolated with no restriction on Eta,Phi. This corresponds to And/Or Term CSWEI(n,t,emi, emf, ALL) There are 2 such terms available to COOR. Default programming after initialization: To be defined. Firmware limitations expected initially: none IV.4.b. EM Isolated Count over the Central Calorimeter Coverage "L1CAL_to_L1FW Isolated_EM_Central_Term Use_Ref_Set Count_Threshold " This message programs the Isolated_EM_Central Term #P to require at least N Electron objects having passed EM Et Threshold Reference Set #T and having been tagged as Isolated while only counting objects in the Eta range corresponding to the Central Calorimeter. This corresponds to And/Or Term CSWEI(n,t,emi, emf, C) There are 2 such terms available to COOR. Default programming after initialization: To be defined. Firmware limitations expected initially: none IV.5. Missing Et Energy Cut ---------------------------- "L1CAL_to_L1FW Missing_Et_Term Energy_Threshold " This message programs the Missing_Et Term #P to require a Missing Et Energy Sum greater or equal to E GeV, with no restriction on Eta,Phi (while this may change in the future, as a design choice, i.e. not under COOR control). This corresponds to And/Or Term CSWMET(thr_adcsq, eta_sum,cut,icr) There are 4 such terms available to COOR. What actually gets programmed is the square of the threshold as a 14-bit number and in units of ADC counts. This translates to a 7-bit Missing Et from 0 to about 64 GeV (to be verified and specified with more precision) Default programming after initialization: To be defined. Firmware limitations expected initially: not implemented IV.6. Total Et Energy Cut ---------------------------- "L1CAL_to_L1FW Total_Et_Term Energy_Threshold " This message programs the Total_Et Term #P to require a total Et Energy Sum greater or equal to E GeV, with no restriction on Eta,Phi (while this may change in the future). This corresponds to And/Or Term CSWTET(thr_et, eta_sum, cut, icr) There are 4 such terms available to COOR. What gets programmed is a 14-bit number in units of ADC counts. This translates to some 4095.75 GeV (to be verified and specified with more precision) Default programming after initialization: To be defined. Firmware limitations expected initially: not implemented IV.6. Topological Acoplanar Jet Requirement ------------------------------------------- "L1CAL_to_L1FW Acoplanar_Jet_Term Use_Ref_Set Use_Ref_Set_Veto " This command programs Acoplanar_Jet Term #P to require that at least one pair of Jet objects passing Threshold #T_a also pass the Acoplanar topological requirement with respect to Threshold #T_v This corresponds to Andor Term CSWAJT(t_a,t_v, contig) There are 2 such terms available to COOR. This resource is not meant to be used alone in a Specific Trigger programming, but in addition to a requirement for 2 or more Jet Objects above the same threshold. Default programming after initialization: To be defined. Current firmware limitation: Reference Set indices T_a and T_v must be identical IV.7. Topological Back-to-Back EM Requirement --------------------------------------------- "L1CAL_to_L1FW Back_To_Back_EM_Term Use_Ref_Set " This command programs Back_To_Back_EM Term #P to require that at least one pair of electron objects passing Threshold #T also pass the Back-to-Back topological requirement. This corresponds to Andor Term CSWBBEM(t, contig) There are 2 such terms available to COOR. This resource is not meant to be used alone in a Specific Trigger programming, but in addition to a requirement for 2 or more EM Objects above the same threshold. Default programming after initialization: To be defined. Current firmware limitation: None