Hall A analyzer

From Hall A Wiki
Jump to: navigation, search


THaDecData : trigger pattern

The trigger pattern word D.evtypbits uses the trigger latch TDC data to generate this data. A window has to be defined to have a hit counted as a trigger.


void THaDecData::TrigBits(UInt_t ibit, BdataLoc *dataloc) {

// Figure out which triggers got a hit. These are multihit TDCs, so we

// need to sort out which hit we want to take by applying cuts.

 if( ibit >= kBitsPerByte*sizeof(UInt_t) ) return; //Limit of evtypebits
 static const UInt_t cutlo = 400;
 static const UInt_t cuthi = 1200;
 for (int ihit = 0; ihit < dataloc->NumHits(); ihit++) {
   if (dataloc->Get(ihit) > cutlo && dataloc->Get(ihit) < cuthi) {
     evtypebits |= BIT(ibit);

} //_____________________________________________________________________________

so one has to look at the time distributions D.bit[n] and make sure those are withing the range of the cut. If they are not one should change the limits so that all triggers fit inside and recompile the class.