simple-tof-analysis
 All Classes Namespaces Functions Variables Groups Pages
TOFPixelEfficiency.h
1 double GetTOFPixelEfficiency(int hitindex, TH1D * hist_TOF_pixel_counts)
2 {
3  double num = hist_TOF_pixel_counts->GetBinContent(hitindex+1, 2);
4  double den = hist_TOF_pixel_counts->GetBinContent(hitindex+1, 1);
5 
6  double weight = 0;
7  if (den != 0)
8  weight = num/den;
9  else
10  cerr<<"[WARNING] For TOF pixel "<<hitindex<<", num= "<<num<<", den= "<<den<<endl;
11 
12  return weight;
13 }