Note on StTriggerSimuMaker usage 2015-04-24

Motivation:
StTriggerSimuMaker is used to tell whether bemc or eemc tower should be fired for given trigger.  
Here is some notes I took when try to figure out how to use it.

Caution: 
The class varies from year to year. The function used in the old runs may not be applicable to new runs although the function is still listed on page www.star.bnl.gov/webdata/dox/html/classStTriggerSimuMaker.html . This is particular true to those fancy functions or handy functions which is unfortunate.

Related Header files:
#include "StTriggerUtilities/StTriggerSimuMaker.h"
#include "StTriggerUtilities/StTriggerSimuResult.h"
#include "StTriggerUtilities/Bemc/StBemcTriggerSimu.h"
#include "StTriggerUtilities/L2Emulator/StL2TriggerSimu.h"

Example code:
  StTriggerSimuMaker* trigsim = new StTriggerSimuMaker();
  trigsim->setMC(false);
  trigsim->useBemc();
  trigsim->useEemc();
  trigsim->useBbc();
  trigsim->useOnlineDB();              // looks like trigger information has not been propagated to the offline database yet. 2015.04.24. Use online database for now. See post www.star.bnl.gov/HyperNews-star/protected/get/emc2/4278/2/1/1/1/1.html
  trigsim->bemc->setConfig(StBemcTriggerSimu::kOffline);  // here is offline again. Not idea why?

trigsim->isTrigger(trigid);             // whether the event should be triggered
trigsim->emc->triggerDecision(trigid); // same as isTrigger, but return 2 for kDontCare if detector is not involved in trigger
trigsim->bemc->triggerDecision(trigid); // not in use for run 11, 12
trigsim->eemc->triggerDecision(trigid); // not in use for run 11, 12
trigsim->bbc->triggerDecision(trigid);
trigsim->bemc->barrelHighTowerTh(th_i); // the trigger ADC highest 6-bit threshold for th_i = 0, 1, 2, 3 for ht0, ht1, ht2, ht3
// for example, NPE15 trigger for run11 Au+Au 200GeV, trigger definition page: online.star.bnl.gov/RTS/2011/triggerApp.php
// under Condition column, it says BemcHiTwr-th1(49). --> th_i = 1
trigsim->bemc->getHT6bitAdc(itwd);  // highest 6 bit of the tower ADC after some pedestal consideration

Test whether a tower should be fired:
If ( trigsim->bemc->getHT6bitAdc(itwd) > trigsim->bemc->barrelHighTowerTh(th_i) ) cout<<"towerid "<<itwd<<" should be fired for ht"<<th_i<<endl;

Update from Zilong's email:
http://www.star.bnl.gov/HyperNews-star/protected/get/emc2/4417.html

Zilong discussed offline and online usage. The above example of offline online settings were obtained from Kevin's BEMC caliberation code. That seems to be some difference..