Trigger Rate In Housekeeping Packets

From stix
Revision as of 10:43, 25 June 2021 by Hualin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


  • Trigger rate in Housekeeping packets

In ASW, trigger rate is calculated in the function below:

  
 sid2->avgTrigAcc = 0;
   sid2->maxTrigAcc = 0;
   QLAccuDblBuffs_getAndResetTrigHK(&(sid2->avgTrigAcc), &(sid2->maxTrigAcc));
void QLAccuDblBuffs_getAndResetTrigHK(uint32_t* medTrig, uint32_t* maxTrig)
{
   ASSERT(medTrig);
   ASSERT(maxTrig);
 
   *medTrig = 0;
   *maxTrig = 0;
 
   if (QLAccuDblBuffs_co.hk.trigCounter != 0)
   {
       *medTrig = utils_median(NUMBER_OF_GROUPS, NUMBER_OF_GROUPS, (uint32_t*)QLAccuDblBuffs_co.hk.trigSum) / QLAccuDblBuffs_co.hk.trigCounter;
 
       //find maximum
       for (uint32_t i = 0; i < NUMBER_OF_GROUPS; i++)
           if (QLAccuDblBuffs_co.hk.trigSum[i] > * maxTrig)
               *maxTrig = QLAccuDblBuffs_co.hk.trigSum[i];
       *maxTrig /= QLAccuDblBuffs_co.hk.trigCounter;
   }
 
   //reset
   Volatile_memset(QLAccuDblBuffs_co.hk.trigSum, 0, sizeof(QLAccuDblBuffs_co.hk.trigSum));
   QLAccuDblBuffs_co.hk.trigCounter = 0;
}

MAX trigger rate of 16 detector pairs of the QL trigger accumulator ( 2 detector per group)

QL integration time = 4 s

Hence

trigger rate of each detector = HK2 max trigger rate / (4 * 2)  = 350 /8=35
  • Trigger rate in LC

4500 / (4 s *32) = 32 counts / detector