Hall A analyzer

From Hall A Wiki
Revision as of 15:30, 6 February 2007 by 129.57.120.28 (Talk) (FAQ)

Jump to: navigation, search

FAQ

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
 bits.ResetBitNumber(ibit);
 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) {
     bits.SetBitNumber(ibit);
     evtypebits |= BIT(ibit);
   }
 }

} //_____________________________________________________________________________ </nowiki>