b) B+EEMC common calib (Jan)

Under:

Common BEMC, EEMC calibration algos (do not abort)

  1. Goal: calibrates Barrel, Endcap towers, result is used by other L2-algo
  2. RTS params:
      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
  3. Class name: L2btowCalAlgo08::public L2VirtualAlgo2008 and similar for ETOW , 1 instance of each.
  4. Event processing uses method calibrateBtow(int token, int bemcIn, ushort *bemcData);+ similar for ETOW
    Not used: void computeUser(int token); bool decisionUser(int token)
  5. Hardcoded params: mxListSize: BTOW =500, ETOW=200
  6. Details of Algo:
     ------- 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;
     
  7. Execution time:
    L2-btowCal08  Compute   CPU/eve MPV 42 kTicks,  FWHM=6
    Reference:
    L2:jet06-algo  CPU/eve MPV 57 kTicks,  FWHM=11
    
  8. Output files:
    * ASCII logfile: run8.l2BtowCal08.log
    * binary histo: run8.l2BtowCal08.hist.bin
  9. QA info in log file:
    #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
    
  10. QA plots : PDF