31 TH1* localHist = (TH1*) hist->Clone();
32 localHist->SetDirectory(0);
38 std::map< int, TH1*> inner;
39 inner.insert(std::make_pair(etaMin, localHist));
48 float randomHist = 0.;
57 if( etaMin_hists.find(inputParameters.at(1)) == etaMin_hists.end()) {
63 TH1* hist = etaMin_hists.at(inputParameters.at(1));
66 double randomShoot = CLHEP::RandFlat::shoot(rndmEngine);
70 for(
int iBin = 0; iBin < hist->GetNbinsX(); iBin ++){
72 if(hist->GetBinContent(iBin) > randomShoot){
78 randomHist = CLHEP::RandFlat::shoot(rndmEngine, hist->GetBinLowEdge(iBinSelect) , hist->GetBinLowEdge(iBinSelect+1));