CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UserHooks.h
Go to the documentation of this file.
1 #include <Pythia.h>
2 
3 class PtHatReweightUserHook : public Pythia8::UserHooks
4 {
5 public:
6  PtHatReweightUserHook(double _pt = 15, double _power = 4.5) :
7  pt(_pt), power(_power) {}
8  virtual ~PtHatReweightUserHook() {}
9 
10  virtual bool canModifySigma() { return true; }
11 
12  virtual double multiplySigmaBy(const Pythia8::SigmaProcess* sigmaProcessPtr,
13  const Pythia8::PhaseSpace* phaseSpacePtr, bool inEvent)
14  {
15  if ((sigmaProcessPtr->nFinal() == 2) && inEvent)
16  return pow(phaseSpacePtr->pTHat() / pt, power);
17  return 1;
18  }
19 private:
20  double pt, power;
21 };
virtual ~PtHatReweightUserHook()
Definition: UserHooks.h:8
PtHatReweightUserHook(double _pt=15, double _power=4.5)
Definition: UserHooks.h:6
virtual double multiplySigmaBy(const Pythia8::SigmaProcess *sigmaProcessPtr, const Pythia8::PhaseSpace *phaseSpacePtr, bool inEvent)
Definition: UserHooks.h:12
virtual bool canModifySigma()
Definition: UserHooks.h:10
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40