Details of L2-algos (triggers) as implemented for pp run in February of 2008
Mapping used during data taking is in attachment 1)
Graph illustrates the key changes in L2 processing scheme allowing for fast event abortion. Jan
Common BEMC, EEMC calibration algos (do not abort)
int par_dbg; // use 0 for real event processing int par_gainType; enum {kGainZero=0, kGainIdeal=1, kGainOffline=2}; int par_nSigPed; // ADC, filters towers float par_twEneThres; // GeV, filters towers float par_hotEtThres; // GeV, only monitoring histos
------- tower threshold definition------ float adcThres=x- > ped+par_nSigPed* fabs(x- > sigPed); float otherThr=x-> ped+par_twEneThres*x-> gain; if(adcThres < otherThr) adcThres=otherThr; -------- computing ideal gains ------- for(i=0;i<BtowGeom::mxEtaBin;i++ ){ float avrEta=-0.975 +i*0.05; /* assume BTOW has fixed eta bin size */ if(i==0) avrEta=-0.970;// first & lost towers are smaller if(i==39) avrEta=0.970; btow.cosh[i]=cosh(avrEta); btow.idealGain2Ene[i]=par_maxADC/par_maxET/btow.cosh[i]; } ---------- peds,gains, masking bad towers by threshold -------- if (par_gainType!=kGainIdeal) return -102; geom->btow.gain2Ene_rdo[x->rdo]=geom->btow.idealGain2Ene[ietaTw]; geom->btow.gain2ET_rdo[x->rdo]=geom->getIdealAdc2ET(); geom->btow.thr_rdo[x->rdo]=(int) (adcThres); geom->btow.ped_rdo[x->rdo]=(int) (x->ped); geom->btow.ped_shifted_rdo[x->rdo]=(unsigned short)(par_pedOff - x->ped); -------- event loop------- for(rdo=0; rdo < BtowGeom::mxRdo; rdo++){ if(rawAdc[rdo] < thr[rdo])continue; if(nTower > =mxListSize) break; // overflow protection adc=rawAdc[rdo]-ped[rdo]; //do NOT correct for common pedestal noise et=adc/gain2ET[rdo]; hit-> rdo=rdo; hit-> adc=adc; hit-> et=et; hit-> ene=adc/gain2Ene[rdo]; hit++; nTower++; } btowCalibData.hitSize=nTower;
L2-btowCal08 Compute CPU/eve MPV 42 kTicks, FWHM=6 Reference: L2:jet06-algo CPU/eve MPV 57 kTicks, FWHM=11
#BTOW_hot tower _candidate_ (bHotSum=67 of 50000 eve) :, softID 1397 , crate 21 , chan 156 , name 07tj37 #BTOW_token_QA: _candidate_ hot token=2 used 13 for 50000 events, token range [1, 4095], used 4095 tokens
L2-pedestal monitor-Algo ( 100% accept)
par_pedSubtr =rc_ints[0]!=0; par_speedFact =rc_ints[1]; par_saveBinary=rc_ints[2]!=0; par_dbg =rc_ints[3]; par_prescAccept=rc_ints[4];
time spent in L2-ped is proportional to # of towers processed per event. speed=1 means for every event process all 4800+720 towers, takes 1mSec speed=2 means for the first event process tower 1,2, 5,6, 9,10,...., takes 500 uSec for the second event process tower 3,4, 7,8, 11,12,...., takes 500 uSec repeat So L2ped runs 2x faster but effectively you get 1/2 of stats for all towers. speed=4 means : 1st eve works with towers: 1,2,3,4, 17,18,19,20,... takes 250 uSec 2nd eve works with towers: 5,6,7,8, 21,22,23,24,... 3rd ... 4th eve ... repeat You got the pattern. Allowed 'speeds' are common divider of 4800 & 768. Allowed speed values: 1,2,4,8,16,32,64,192 But even if you type sth absurd L2ped will correct it to the closest correct value.
RTS params
2 int dbg, prescaleAccept 4 float seedEtThres, clusterEtThres, eventEtThres,solationEtThres two sets for B & E. ======== ALGO ======= 1. Get list of towers provided by the L2 main shell 2. Sort the list in descending E_T 3. Loop over list until tower below seed threshold is found a. Find the highest group of 2x2 clusters adjacent to seed tower b. Form a cluster c. Save to list of clusters d. Mark all towers in 2x2 cluster as "used" 4. Repeat loop until all seed towers are exhausted 5. Loop over all clusters a. Find highest E_T cluster b. If ( cluster E_T > cluster threshold ) i. Accept event ii. Store information in the L2Result array - mean eta-bin - mean phi-bin - tower ID for seed tower - a relative ID specifying which of the 4 possible tower clusters was chosen - ET of cluster - number of nonzero towers in cluster - an isolation E_T sum (placeholder for later, set = 0).
Params:
// unpack params from run control GUI par_cutTag = rc_ints[0]; par_useBtowEast= (rc_ints[1]&1 )>0; par_useBtowWest= (rc_ints[1]&2)>0; par_useEndcap = rc_ints[2]&1; int par_adcThr = rc_ints[3]; // needed only in initRun() par_minPhiBinDiff=rc_ints[4]; par_oneJetThr = rc_floats[0]; par_diJetThrHigh= rc_floats[1]; par_diJetThrLow = rc_floats[2]; par_rndAccProb = rc_floats[3]; par_dbg =(int)rc_floats[4];