8 #ifndef Vincia_VinciaWeights_H
9 #define Vincia_VinciaWeights_H
11 #include "Pythia8/Info.h"
12 #include "Pythia8/Settings.h"
13 #include "Pythia8/VinciaCommon.h"
38 bool existsWeight(
int iWeightIn = 0) {
39 if (iWeightIn >= 0 && iWeightIn < nWeightsSav)
return true;
44 double weight(
int iWeightIn = 0) {
45 if (existsWeight(iWeightIn))
return weightsSav[iWeightIn];
49 string weightLabel(
int iWeightIn = 0) {
50 if (iWeightIn == 0)
return "no variation";
51 if (existsWeight(iWeightIn) && iWeightIn-1 < (
int)varLabels.size())
52 return varLabels[iWeightIn-1];
56 int nWeights() {
return nWeightsSav;}
57 bool reweightingOccurred() {
return didReweight;}
60 void resetWeights(
int nAccepted);
63 void scaleWeightAll(
double scaleFacIn);
66 void scaleWeight(
double scaleFacIn,
int iWeightIn = 0);
69 void scaleWeightVar(vector<double> pAccept,
bool accept,
bool isHard);
72 void scaleWeightVarAccept(vector<double> pAccept);
75 void scaleWeightVarReject(vector<double> pAccept);
78 void scaleWeightEnhanceAccept(
double enhanceFac = 1.);
81 void scaleWeightEnhanceReject(
double pAcceptUnenhanced,
82 double enhanceFac = 1.);
85 int doVarNow(
string keyIn,
int iAntPhys,
string type) ;
88 double ant(
double antIn,
double cNSIn) {
return (antIn+cNSIn);}
107 static const double TINYANT, PACCEPTVARMAX, MINVARWEIGHT;
110 bool uncertaintyBands;
111 vector<string> varLabels;
112 vector< vector<string> > varKeys;
113 vector< vector<double> > varVals;
116 vector<string> allKeywords;
117 map<int,string> iAntToKeyFSR, iAntToKeyISR;
119 int nReportWeight, nReportedWeight;
120 bool doAlphaSvar, doFiniteVar;
123 vector<double> weightsSav;
124 vector<double> weightsOld;
125 vector<double> weightsMax, weightsMin;
127 vector<double> weightSum, weightSum2;
129 vector<double> contribSum, contribSum2;
134 int nNonunityWeight, nNegativeWeight,
135 nNonunityInitialWeight, nNegativeInitialWeight;
137 int nNonunityWeightNow, nNegativeWeightNow,
138 nNonunityInitialWeightNow, nNegativeInitialWeightNow;
152 #endif // end Pythia8_VinciaWeights_H