void EventWeightProvider::generate_weights() { pileUpWeights = generateWeights(Moriond2017, estimatedPileUp); pileUpWeights_up = generateWeights(Moriond2017, estimatedPileUp_up); pileUpWeights_down = generateWeights(Moriond2017, estimatedPileUp_down); // cout << "Pile up weights" << endl; // for (unsigned int index = 0; index < pileUpWeights.size(); ++index){ // cout << index << ": " << pileUpWeights.at(index) << endl; // } }
TrapezoidalIntegrator::NodesAndWeights TrapezoidalIntegrator::getNodesAndWeights(int amount) const { NodesAndWeights returnParam; const double factor = 1./((double)amount +1.); generateWeights(returnParam, factor, amount); generateNodes(returnParam, factor, amount); return returnParam; }
QMCMultiIntegrator::NodesAndWeights QMCMultiIntegrator::getNodesAndWeights(int l, int d) const { const int amount = pow(pow(2, l) - 1,d); QMCMultiIntegrator::NodesAndWeights nodesAndWeights; nodesAndWeights.Nodes = std::move(generateHaltonSequence(d, amount)); nodesAndWeights.Weights = std::move(generateWeights(amount)); return nodesAndWeights; }
void EventWeightProvider::generate_weights() { /* * TODO: * Summer11 PU_S3 and PU_S4 in-time PU only: PoissonOneXDist * if Summer11 OOT average PU, use PoissonIntDist * If Spring11 or Summer11 3D reweighting, use probdistFlat10 (compare to true) * Fall11, use Fall2011 */ //Needs a flag for 2011 MC tried energyInTeV? if(Globals::energyInTeV == 8) pileUpWeights = generateWeights(Summer2012); else pileUpWeights = generateWeights(Fall2011); // cout << "Pile up weights" << endl; // // for (unsigned int index = 0; index < pileUpWeights.size(); ++index){ // cout << index << ": " << pileUpWeights.at(index) << endl; // } }