dsmAdc issue from the trigger simulator

Dataset: p+p 500 GeV, 2011, BHT1 trigger (id: 320501, dsmAdc > 18)
Library: SL11d

Issue: dsmAdc values obtained from the trigger simulator seem to be incorrect for some BEMC towers (additional bands in dsmAdc vs Adc0 distribution with incorrect slope), it looks as if for some towers dsmAdc = Adc0 >> 2, instead of >> 4.
Issue 2: offline DB is outdated, so the online one should be used, but on PDSF only the offline DB is available, which might be a problem in embeddings (depending what information is taken by the trigger simulator for the DB).
-> not sure about all the implications - for sure trigger thresholds are taken from DB, so if using offline DB for the trigger simulator, the list of triggered towers migh be incorrect (if a threshold changed from 2009, which is the case for 2011) - but, I make the decision if a tower fired the trigger by myself, by comparing dsmAdc in a tower with the threshold (provided by myself to the code).
Issue 3? - additional bands due to dsmAdc overflow - but not really sure if it is a big issue for the analysis since the trigger threshold is below 32.
Issue 4 - the other thing is if the Adc0 itself is correct, so if dsmAdc cut can be simply replaced by an equivalent cut on Adc0 ? Adc0 distributions look reasonable to me (see below), but don't have good idea how to check this, to be sure.

dsmAdc obtained from the trigger simulator in the following way:
  StTriggerSimuMaker * trigSimu = new StTriggerSimuMaker;
        trigSimu->setMC(false);
        trigSimu->useBemc();
        trigSimu->useEemc();
        trigSimu->bemc->setConfig(StBemcTriggerSimu::kOnline);
        trigSimu->bemc->barrelHighTowerAdc(towerId);
CANNOT DO IN SL11d:
        trigSimu->useOnlineDB();

In this case the online DB is used for Bemc, but for the Eemc by default the offline DB is (most probably) used. And so trigger thresholds taken from DB would be wrong.

SOLUTION:  drupal.star.bnl.gov/STAR/blog/trzeciak/dsmadc-issue-trigger-simulator-solution

  1.  Below are plots showing the issue. Trigger code: SL11d

I cross-checked this using different code, to avoid a potential bug in my code, and the distributions I've got look the same.
CANNOT DO IN SL11d:
        trigSimu->useOnlineDB();


  •  distributions for bad towers (with incorrect dsmaAdc vs Adc0 dependence) and good towers (correct dependence)





  1.  Below are plots showing the issue. Trigger code: SL12d

With a newer library (SL12d) the online DB can be set: 
trigSimu->useOnlineDB();
With SL12d there is no dsmAdc overflow, dsmAdc values go to high ones, but the issue with the incorrect band still exists.




  • distributions for bad towers (with incorrect dsmaAdc vs Adc0 dependence) and good towers (correct dependence)