Combining triggers in Run 10 and later with the new TCU

For Run 10, there is a new Trigger Control Unit, which deals with prescales independently, rather than the past methods which introduced correlations.  This changes the way that triggers need to be combined.  In addition, the starting point for every trigger id prescale counting is randomized separately.  This randomization should make the overlaps below act as multiplicitave factors when averaged over different runs, though in principle this can be violated in a given run.  The overlaps between triggers in principle range from least common multiple of the two prescales to the simple multiple; e.g. if trigger 1 has prescale 5 and trigger 2 has prescale 20, the two triggers in principle can overlap 1/20 of presented events or 1/100 of presented events.   In most cases randomization will make them overlap 1/100.

In the actual run 10 dataset, there is a set of four cascading high tower triggers, each a subset of each other.  There is the vpd-mb, which contains the NPE_11, which contains the NPE_15, which contains the NPE_18.  Each is prescaled independently.  This means that if, say, the prescales are 30, 50 , 11, and 2, there are quite a few events with the highest tower  of 11 < HT <= 15 which are not labeled as NPE_11, but are labeled as vpd-mb.  In order to make maximal use of the luminosity, you can take the or of a number of triggers and multiply them with a single factor.   One needs to know the highest tower in an event, i.e. COULD the event have satisfied a given trigger id.

One can always look at each trigger separately and get an unbiased distribution, but the issue comes in when one wants to add the results of two triggers; since a given event can satisfy two triggers at once, you don't want to double count.  But, you do want to make maximal use of the recorded data sample, and use all events labeled with a certain trigger type, so you need an algorithm to get back to the distribution as it would have been before prescales.

This algorithm is due to Carl Gagliardi, and I have tested it in a simple Monte Carlo.  We should probably do this test in real data.

Call trigger 1 the vpd-mb, 2 NPE_11, 3 NPE_15, and 4 NPE_18, and their associated prescales ps1,ps2,ps3,ps4

If the highest tower in an event is 11<HT<=15, then there are 2 options for triggers and 3 combinations.

NPE_11 takes 1/ps2 of these events. vpd-mb takes 1/ps1 of the remaining, or (1-1/ps2)*ps2.

So, if you take every event that is labeled either 1 or 2, then you recover the actual number presented by taking N_{1||2} * 1./(1./ps1 + 1./ps2 -1./(ps1*ps2)); this last term is the effective prescale.

If the highest tower in an event is 15 < HT <= 18, then there are 3 options for triggers, and 7 combinations of passing these options.  The number presented is

N_{presented} = N_{1||2||3} * 1. / (1./ps1 + 1./ps2 + 1./ps3 - 1./(ps1*ps2) - 1./(ps2*ps3) - 1./(ps1*ps3) + 1./(ps1*ps2*ps3))

If the highest tower in an event is 18 < HT, then there are 4 options for triggers and 15 combinations.  The number presented is

N_{presented} = N_{1||2||3||4} * 1./(1./ps1 + 1./ps2 + 1./ps3 + 1./ps4 - 1./(ps1*ps2) - 1./(ps1*ps3) - 1./(ps1*ps4) - 1./(ps2*ps3) - 1./(ps2*ps4) - 1./(ps3*ps4) + 1./(ps1*ps2*ps3)+1./(ps1*ps2*ps4)+1./(ps1*ps3*ps4)+1./(ps2*ps3*ps4) -1./(ps1*ps2*ps3*ps4))

 Some complications:

1) In run 10, we ran the HLT as an additional prescale for some portion of the 200 GeV, 62 GeV, and 39 GeV runs, for some portion of the minbias and central triggers  The prescale value does not show up in the online runlog in any easy way to find, but has been propagated into the offline databases.  As always, the most reliable way to get the total prescale is with the StDetectorDbTriggerID::getTotalPrescaleByTrgId(trgid) method.  Also available in the various plots subdirectories of http://www.star.bnl.gov/protected/common/common2010/trigger2010, e.g. http://www.star.bnl.gov/protected/common/common2010/trigger2010/plots_200gev/vpd-mb_260031_byrun.txt as the last column.

2) The above discussion is on the event level.  If you're looking at electrons, say, in order for this to work correctly for an inclusive distribution you have to only count those electrons that COULD have triggered the event, i.e. look at the EMC tower to which the electron points, classify the electron into whether that tower passes the thresholds and multiply it by the corresponding effective prescale.  For example, if you have a min-bias and one high tower, then form the spectrum on

N(electron <= threshold && event passed min-bias) * Prescale_{min-bias}

+

N(electron > threshold && event passed (min-bias||high tower) ) * Prescale_eff

where Prescale_eff = 1/(1/ps1 + 1/ps2 - 1/(ps1*ps2)), as derived above.

For multiple thresholds, just divide the electrons into their respective classes, cascading upwards in complexity as above.

3) In general, we have targeted some subset of high tower triggers to an st_ht stream, while other triggers to the st_physics stream, see e.g. http://www.star.bnl.gov/protected/common/common2010/trigger2010/streams.html.  One needs to only look at the right combination of trigger, stream.  For example, at 39 GeV, ht_11_mb is targeted to the st_ht stream, while min-bias is targeted to the st_physics stream.  If you want to combine ht_11_mb and min-bias, you will need to combine these across streams.  What you want for the case in (2) above is:

N(electron <= threshold && event passed min-bias) * Prescale_{min-bias} (scanning the st_physics stream)

+

N(electron > threshold && event passed (min-bias && high tower) ) * Prescale_{eff} (scanning either the st_physics stream or the st_ht stream, but not both)

+

N(electron > threshold && event passed (!min-bias && high tower) ) * Prescale_{eff} (scanning the st_ht stream)