21 if (fDet.Contains(
"GEM")) {
22 Int_t idxZone = fZone.Contains(
"hot") ? 0 : fZone.Contains(
"big") ? 1 : -1;
24 cout <<
"Zone is not defined!!! Exiting ..." << endl;
27 ele = TString::Format(
"Detector# %s, Station# %d, Module# %d, Zone# %d", fDet.Data(), fStat, fMod, idxZone);
30 else if (fDet.Contains(
"SILICON"))
31 ele = TString::Format(
"Detector# %s, Station# %d, Module# %d", fDet.Data(), fStat, fMod);
33 hHisto = (TH1F*)fFile->Get(ele.Data());
35 if (TMath::Abs(hHisto->Integral() - 1.) > FLT_EPSILON)
38 Double_t x = -1., y = -1., content = -1.;
43 y = 1. * gRandom->Rndm();
48 Int_t bin = hHisto->FindBin(x);
50 content = hHisto->GetBinContent(bin);
52 }
while (y > content);