Documentation provided by Renee Fatemi

  1. Apply online trigger algorithm to simulated data
  2. Apply "software trigger" to triggered data
  3. Ensure that the same code is used for case 1. and 2.

How the Code Works:
StEmcTriggerMaker is the class that provides the user access functions to the trigger decisions. The workhorse is the StBemcTrigger class. StEmcTriggerMaker passes a StEvent pointer from either StEmcADCtoEMaker (real data) or StEmcSimulatorMaker (simulated data). The code accesses all offline status/ped/calibrations from StBemcTables, which are set in the macro used to run the code (ideal status/gain/ped can also be set). Code uses StEmcCollection to access ADC for all WEST BEMC channels which are not masked out with the status code and perform FPGA+L0 trigger on 12 bit ADC and 12 bit PED.

Access Function Examples:
// if event fulfills trigger return 1 else return 0 problems return -1
int is2005HT1() {return mIs2005HT1;}
int is2005JP1() {return mIs2005JP1;}

// The ID of the candidate HT (JP)
int get2005HT1_ID() {return HT1_ID_2005;}
int get2005JP1_ID() {return JP1_ID_2005;}

// The DSM ADC of the candidate HT (JP)
int get2005HT1_ADC() {return HT1_DSM_2005;}
int get2005JP1_ADC() {return JP1_DSM_2005;}

// The number of towers(patches) and the id’s which fulfill the trigger
void get2005HT1_TOWS(int, int*);//array of tow ids passing HT1_2005 trig
int get2005HT1_NTOWS() {return numHT1_2005;}//# tows passing HT1_2005 trig
void get2005JP1_PATCHES(int, int*);//array of patches passing JP1_2005
int get2005JP1_NPATCHES() {return numJP1_2005;}//# patches passing JP1_2005

These access functions exist for 2003 HT1, 2004 HT1+JP1, 2005 HT1+HT2+JP1+JP2

//get trigger info
for (int i=0;i<numHT1_2005;i++){
int towerid=-1;

Conceptually this code was designed from a software/analysis user point of view. Consequently I do not explicitly calculate and store all levels of DSM logic (it is unnecessary). From my understanding this is precisely what the StEmcTriggerDetector class was written to do -- return all DSM levels. It propagates all of the trigger information to the MuDst. BUT the problem is that this class is not propagated to the simulation (as far as I can tell). Even if it was propagated we probably wouldn’t want to take this option because it limits the usefulness of the simulation, whereas the StEmcTriggerMaker allows flexibility in applying the trigger algo to any simulation set. It is certainly possible code up the 2006 part of StEmcTriggerMaker to return all BEMC and EEMC trigger patch information at all levels of DSM, but it doesn’t exist in the current code.