1 #include "Pythia8/Pythia.h" 12 const Pythia8::PhaseSpace* phaseSpacePtr,
13 bool inEvent)
override {
15 if ((sigmaProcessPtr->nFinal() == 2)) {
16 selBias =
pow(phaseSpacePtr->pTHat() /
pt,
power);
30 if (tuneName ==
"CP5")
31 p = {7377.94700788, 8.38168461349, -4.70983112392, -0.0310148108446, -0.028798537937, 925.335472326};
34 p = {5.3571961909810e+13,
40 sigma = [
this](
double x) ->
double {
42 pow(1 - 2 *
x / (13000. +
p[5]),
p[1])) *
51 const Pythia8::PhaseSpace* phaseSpacePtr,
52 bool inEvent)
override {
54 if ((sigmaProcessPtr->nFinal() == 2)) {
55 selBias = 1.0 /
sigma(phaseSpacePtr->pTHat());
63 std::vector<double>
p;
64 std::function<double(double)>
sigma;
90 const Pythia8::PhaseSpace* phaseSpacePtr,
91 bool inEvent)
override {
93 if ((sigmaProcessPtr->nFinal() == 2)) {
94 double x1 = phaseSpacePtr->x1();
95 double x2 = phaseSpacePtr->x2();
96 double yLab = 0.5 *
log(
x1 /
x2);
97 double yCM = 0.5 *
log(phaseSpacePtr->tHat() / phaseSpacePtr->uHat());
98 double pTHat = phaseSpacePtr->pTHat();
100 double sigmaCM =
yCMsigma.Eval(pTHat);
143 const Pythia8::PhaseSpace* phaseSpacePtr,
144 bool inEvent)
override {
146 if ((sigmaProcessPtr->nFinal() == 2)) {
147 double x1 = phaseSpacePtr->x1();
148 double x2 = phaseSpacePtr->x2();
149 double yLab = 0.5 *
log(
x1 /
x2);
150 double yCM = 0.5 *
log(phaseSpacePtr->tHat() / phaseSpacePtr->uHat());
151 double pTHat = phaseSpacePtr->pTHat();
153 double sigmaCM =
yCMsigma.Eval(pTHat);
bool canBiasSelection() override
PtHatRapReweightUserHook(const std::string &_yLabsigma_func, double _yLab_power, const std::string &_yCMsigma_func, double _yCM_power, double _pTHatMin, double _pTHatMax, double _pt=15, double _power=4.5)
double biasSelectionBy(const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent) override
std::function< double(double)> sigma
PtHatReweightUserHook(double _pt=15, double _power=4.5)
~PtHatEmpReweightUserHook() override
~PtHatReweightUserHook() override
std::string yCMsigma_func
std::string yCMsigma_func
~PtHatRapReweightUserHook() override
std::string yLabsigma_func
std::string yLabsigma_func
bool canBiasSelection() override
bool canBiasSelection() override
~RapReweightUserHook() override
double biasSelectionBy(const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent) override
RapReweightUserHook(const std::string &_yLabsigma_func, double _yLab_power, const std::string &_yCMsigma_func, double _yCM_power, double _pTHatMin, double _pTHatMax)
double biasSelectionBy(const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent) override
double biasSelectionBy(const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent) override
bool canBiasSelection() override
Power< A, B >::type pow(const A &a, const B &b)
PtHatEmpReweightUserHook(const std::string &tuneName="")