43 TH1* localHist = (TH1*) hist->Clone();
44 localHist->SetDirectory(0);
50 std::map< int, TH1*> inner;
51 inner.insert(std::make_pair(etaMin, localHist));
60 float randomHist = 0.;
69 if( etaMin_hists.find(inputParameters.at(1)) == etaMin_hists.end()) {
75 TH1* hist = etaMin_hists.at(inputParameters.at(1));
78 double randomShoot = CLHEP::RandFlat::shoot(rndmEngine);
82 for(
int iBin = 0; iBin < hist->GetNbinsX(); iBin ++){
84 if(hist->GetBinContent(iBin) > randomShoot){
90 randomHist = CLHEP::RandFlat::shoot(rndmEngine, hist->GetBinLowEdge(iBinSelect) , hist->GetBinLowEdge(iBinSelect+1));
double getRand(CLHEP::HepRandomEngine *rndmEngine, const std::vector< int > &inputParameters) const
get the random value with this method, by providing the input parameters