Yes. (but you know I can't hold myself to a single word reply!) The prescales are always the same for the jp0 triggers except for one strange run (Very early testing - janppProduction configuration file) mysql> select a.idx_rn, a.eff_ps - b.eff_ps d from triggers a, triggers b where a.idx_rn=b.idx_rn and a.name like '%bemc%L2jet%' and b.name like 'eemc%L2jet' group by d having d!=0; +---------+-----------------+ | idx_rn | d | +---------+-----------------+ | 7078106 | -32766.00000000 | +---------+-----------------+ 1 row in set (0.52 sec) However, I assume that a similar analysis is planned for the L2gamma triggers - but the prescales are not always the same there: mysql> select count(*), a.eff_ps - b.eff_ps d from triggers a, triggers b where a.idx_rn=b.idx_rn and a.name like '%bemc%L2gamma%' and b.name like 'eemc%L2gamma' group by d; +----------+-------------+ | count(*) | d | +----------+-------------+ | 243 | 0.00000000 | | 253 | 11.00000000 | | 49 | 15.00000000 | +----------+-------------+ 3 rows in set (0.41 sec) -jeff Jan Balewski wrote: > Jeff, > Wow, > this is complex - as I was expecting. I'll preserve this mail for the record. > For the moment I'm content to observe the prescale for L1-bemc-jp0 & L1-eemc-jp0 were identical > (either both =2 or both =10). > So I'm concluding I can ignore all this matter and simply process all recorded events satisfying > off-line trigger 127652.OR.127622. > This will give me natural composition of events when L0-jp0 was satisfied in BTOW.or.ETOW > prescaled by the overall factor of 2 (or 10). > > If you agree please respond with just one word 'yes' > Thanks for this details > Jan > > > Jeff Landgraf wrote: > >> Hi Jan, >> >> I see what you are asking now, I think my earlier response was correct - but only because the prescales on the two triggers is identical. >> >> What you have is an unbiased set of btow dijets, and another unbiased set of etow dijets. The easiest thing to do is to cast your analysis in such a way that these are the natural divisions. >> >> If you attempt to construct an unbiased set of dijets, however, you have to be very careful. You have to do the analysis based on L0 trigger words, rather than trigger id's. For your jets, examine each region: >> >> b = number presented for the barrel >> e = number presented for the endcap >> o = number presented for both barrel + endcap >> >> Barrel only: >> >> n_presented = b-o >> n_recorded = (b-o) * live / ps_b >> >> Endcap only: >> >> n_presented = e-o >> n_recorded = (e-o) * live / ps_e >> >> Barrel + Endcap: >> >> n_presented = o >> n_recorded_as_b = o * live / ps_b >> n_recorded_as_e = o * live / ps_e >> n_recorded_as_b&e = o*live / min(ps_b, ps_e) = min(n_recorded_as_b, n_recorded_as_e) >> n_recorded_total = max(n_recorded_as_b, n_recorded_as_e) >> >> The "Natural" ratios are the ratios of the presented, so if you want to construct a unbiased set of dijets you want to ensure that the ratios of recorded events are the same as the natural ratios. (Additionally, if you have to throw out events to get these ratios to work, you need to throw them out without any prejudice) >> >> What you see quite easily, by looking at the table is that if ps_b = ps_e then you have no difficulty whatsoever. I think this is your case, but I want to go through and answer this question once and for all for the general case. >> >> If ps_b != ps_e you would have to throw out events. You have to do the following: >> >> 1. Choose the bigger prescale (For the rest of the analysis, I'll assume it is say it is ps_b) >> >> 2. You need to run through the endcap only region, throwing events away if they don't sataisfy an aditional prescale of ps_b/ps_e. (The final set now has an effective prescale of ps_b) >> >> 3. You need to run through the Barrel+Endcap region and throw away every event that does not have the barrel trigger id marked. (The presented events in this region all have the physics for Barrel+Endcap. If the barrel is not marked, it is because the prescale for barrel wasn't satisfied. Every event from this region should have the barrel in it because the barrels prescale was higher) >> >> So, this analysis is not too hard - but unfortunately, it is based on knowing the L0 trigger word region each event belongs to, and parsing the L0 trigger words is complex. This is VERY DIFFERENT from simply looking at which offline trigger id's the event satisfies because the offline trigger id's are after prescales. You can, of course go back to the lastDSM values to determine the three catagories rather easily based on the physics and this is the route I'd suggest. >> >> I've tried to look for an algorithm based only on the trigger ids satisfied, but I don't think it is possible. The reason is that the prescription amounts to throwing away a certain number of endcap only events (because the prescale wasn't high enough to do its full job) However, the number of endcap events to throw away depends on whether the physics satisified the barrel or not. (If so, throw out 100%, if not throw ps_e in ps_b.) >> >> -jeff >> >> Jan Balewski wrote: >> >>> Jeff, >>> thanks for reading this. Can we talk about specific example I'm working on now? >>> >>> Run 7097009. I'd like to work on events which fired off-line trigger 127652.OR.127622, >>> since I do not care if the L0-jp0 condition was meet in BTOW or ETOW. >>> >>> Are you saying I can simply require: >>> ---------------------- >>> StTriggerIdCollection *ticA=mEvent->triggerIdCollection(); >>> const StTriggerId *L1=ticA->nominal(); >>> if( !L1->isTrigger(127662) && ! L1->isTrigger(127622) ) skipEvent >>> // process event >>> ..... >>> -------------------- >>> And this will preserve the natural ratio of this 3 idependent event sets >>> 127652.and.not.127622, >>> .not.127652.and.127622 >>> 127652.and.127622 >>> >>> even if prescale=2 was applied to both 127652 anf to 127622 ? >>> >>> Jan >>> >>> >>> >>> >>> runNumber daqTrgId offlineTrgId >>> 7097009 6 127652 >>> 7097009 7 127622 >>> >>> Jeff Landgraf wrote: >>> >>>> Hi Jan, >>>> >>>> There is no double counting. If any one of your three "disjoint" conditions are true, the event is taken and marked as a dijet. The prescale is applied to this final criteria, not to some strange combination. >>>> >>>> -jeff >>>> >>>> Jan Balewski wrote: >>>> >>>>> Hi Jeff, >>>>> we have now a sort of vacation, right? What a life. All started to work so smooth. >>>>> >>>>> I'm writing code for the off-line analysis of L2 di-jets. >>>>> We have this 3 disjoint subset of events accepted by _L0_ *-jp0-etot-mb: >>>>> a) bemc and NOT eemc >>>>> b) eemc and NOT bemc >>>>> c) bemc and eemc >>>>> >>>>> For my analysis I do not care which of the 3 L0 condition happened (a,b,c) as long as L2 di-jet accept was issued. >>>>> How should I add events 'c' for the transverse run, knowing the l0 prescale was 2 for both >>>>> bemc-jp0-etot-mb and eemc-jp0-etot-mb ? >>>>> >>>>> Am I right assuming sample 'c' is enhanced by a factor of 2 in the daq files, so I should throw away every other event >>>>> matching 'c' ? >>>>> In short should I use: 'a' or 'b' or every other 'c' ? >>>>> >>>>> And for the longitudinal run (L0 prescale set to 10) should I use only every 10th 'c' : >>>>> In short should I use: 'a' or 'b' or 10% of 'c' ? >>>>> >>>>> Jan >>>>> >>>>>