Newer
Older
// efficiencies. Register the counters in gHcParms so that the
// variables can be used in end of run reports.
delete [] fNChamHits; fNChamHits = new Int_t [fNChambers];
delete [] fPlaneEvents; fPlaneEvents = new Int_t [fNPlanes];
fTotEvents = 0;
for(Int_t i=0;i<fNChambers;i++) {
fNChamHits[i] = 0;
}
for(Int_t i=0;i<fNPlanes;i++) {
}
gHcParms->Define(Form("%sdc_tot_events",fPrefix),"Total DC Events",fTotEvents);
gHcParms->Define(Form("%sdc_cham_hits[%d]",fPrefix,fNChambers),"N events with hits per chamber",*fNChamHits);
gHcParms->Define(Form("%sdc_events[%d]",fPrefix,fNPlanes),"N events with hits per plane",*fPlaneEvents);
}
//_____________________________________________________________________________
void THcDC::Eff()
{
// Accumulate statistics for efficiency calculations
fTotEvents++;
for(Int_t i=0;i<fNChambers;i++) {
if(fChambers[i]->GetNHits()>0) fNChamHits[i]++;
}
for(Int_t i=0;i<fNPlanes;i++) {
if(fPlanes[i]->GetNHits() > 0) fPlaneEvents[i]++;
}
return;
}
ClassImp(THcDC)
////////////////////////////////////////////////////////////////////////////////