CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PtHatEmpReweightUserHook Class Reference

#include <ReweightUserHooks.h>

Inheritance diagram for PtHatEmpReweightUserHook:

Public Member Functions

double biasSelectionBy (const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent) override
 
bool canBiasSelection () override
 
 PtHatEmpReweightUserHook (const std::string &tuneName="")
 
 ~PtHatEmpReweightUserHook () override
 

Private Attributes

std::vector< double > p
 
std::function< double(double)> sigma
 

Detailed Description

Definition at line 27 of file ReweightUserHooks.h.

Constructor & Destructor Documentation

◆ PtHatEmpReweightUserHook()

PtHatEmpReweightUserHook::PtHatEmpReweightUserHook ( const std::string &  tuneName = "")
inline

Definition at line 29 of file ReweightUserHooks.h.

References dqm-mbProfile::log, p, funct::pow(), sigma, and x.

29  {
30  if (tuneName == "CP5" || tuneName == "CP5Run3")
31  p = {7377.94700788, 8.38168461349, -4.70983112392, -0.0310148108446, -0.028798537937, 925.335472326};
32  //Default reweighting - works good for tune CUEPT8M1
33  else
34  p = {5.3571961909810e+13,
35  1.0907678218282e+01,
36  -2.5898069229451e+00,
37  -5.1575514014931e-01,
38  5.5951279807561e-02,
39  3.5e+02};
40  const double ecms = (tuneName == "CP5Run3" ? 13600. : 13000.);
41  sigma = [this, ecms](double x) -> double {
42  return (p[0] * pow(x, p[2] + p[3] * log(0.01 * x) + p[4] * pow(log(0.01 * x), 2)) *
43  pow(1 - 2 * x / (ecms + p[5]), p[1])) *
44  x;
45  };
46  }
std::function< double(double)> sigma
std::vector< double > p
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ ~PtHatEmpReweightUserHook()

PtHatEmpReweightUserHook::~PtHatEmpReweightUserHook ( )
inlineoverride

Definition at line 47 of file ReweightUserHooks.h.

47 {}

Member Function Documentation

◆ biasSelectionBy()

double PtHatEmpReweightUserHook::biasSelectionBy ( const Pythia8::SigmaProcess *  sigmaProcessPtr,
const Pythia8::PhaseSpace *  phaseSpacePtr,
bool  inEvent 
)
inlineoverride

Definition at line 51 of file ReweightUserHooks.h.

References sigma.

53  {
54  //the variable selBias of the base class should be used;
55  if ((sigmaProcessPtr->nFinal() == 2)) {
56  selBias = 1.0 / sigma(phaseSpacePtr->pTHat());
57  return selBias;
58  }
59  selBias = 1.;
60  return selBias;
61  }
std::function< double(double)> sigma

◆ canBiasSelection()

bool PtHatEmpReweightUserHook::canBiasSelection ( )
inlineoverride

Definition at line 49 of file ReweightUserHooks.h.

49 { return true; }

Member Data Documentation

◆ p

std::vector<double> PtHatEmpReweightUserHook::p
private

Definition at line 64 of file ReweightUserHooks.h.

Referenced by Electron.Electron::ptErr(), and PtHatEmpReweightUserHook().

◆ sigma

std::function<double(double)> PtHatEmpReweightUserHook::sigma
private

Definition at line 65 of file ReweightUserHooks.h.

Referenced by biasSelectionBy(), and PtHatEmpReweightUserHook().