Difference between revisions of "Hall A analyzer"
From Hall A Wiki
(→FAQ) |
(→FAQ) |
||
Line 28: | Line 28: | ||
} | } | ||
//_____________________________________________________________________________ | //_____________________________________________________________________________ | ||
− |
Revision as of 15:30, 6 February 2007
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); } }
} //_____________________________________________________________________________