herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
SMHiggsMassGenerator.h
1 // -*- C++ -*-
2 //
3 // SMHiggsMassGenerator.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2019 The Herwig Collaboration
5 //
6 // Herwig is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef HERWIG_SMHiggsMassGenerator_H
10 #define HERWIG_SMHiggsMassGenerator_H
11 //
12 // This is the declaration of the SMHiggsMassGenerator class.
13 //
14 
15 #include "GenericMassGenerator.h"
16 #include "GenericWidthGenerator.h"
17 
18 namespace Herwig {
19 
20 using namespace ThePEG;
21 
30 
31 public:
32 
36  SMHiggsMassGenerator() : _shape(1) {}
37 
44  virtual double weight(Energy q, int shape) const {
45  Energy2 q2 = sqr(q);
46  Energy2 mass2 = sqr(nominalMass());
47  Energy2 mwidth= nominalMass()*nominalWidth();
48  return BreitWignerWeight(q,shape)*(sqr(mass2-q2)+sqr(mwidth))/mwidth;
49  }
50 
56  bool accept(const ParticleData & part) const;
57 
61  virtual void dataBaseOutput(ofstream &,bool);
62 
69  void persistentOutput(PersistentOStream & os) const;
70 
76  void persistentInput(PersistentIStream & is, int version);
78 
85  static void Init();
86 
87 protected:
88 
95  virtual InvEnergy2 BreitWignerWeight(Energy q,int shape) const {
96  useMe();
97  pair<Energy,Energy> widths = shape!=2 ? _hwidth->width(q,*particle()) :
98  make_pair(nominalWidth(),nominalWidth());
99  Energy2 q2 = sqr(q);
100  Energy4 sq=sqr(q2-sqr(nominalMass()));
101  Energy2 num = widths.first*q;
102  double fact = 1.;
103  if(_shape==1) fact *= pow<4,1>(nominalMass()/q);
104  if( shape==3) num=GeV2;
105  return num*fact/Constants::pi/(sq+sqr(widths.second*q)*fact);
106  }
107 
108 protected:
109 
116  virtual IBPtr clone() const { return new_ptr(*this); }
117 
122  virtual IBPtr fullclone() const { return new_ptr(*this); }
124 
125 protected:
126 
134  virtual void doinit();
136 
137 private:
138 
143  SMHiggsMassGenerator & operator=(const SMHiggsMassGenerator &) = delete;
144 
145 private:
146 
150  unsigned int _shape;
151 
155  GenericWidthGeneratorPtr _hwidth;
156 
157 };
158 
159 }
160 
161 #endif /* HERWIG_SMHiggsMassGenerator_H */
virtual InvEnergy2 BreitWignerWeight(Energy q, int shape) const
Weight for the factor for an off-shell mass.
virtual double weight(Energy q, int shape) const
Weight for the factor for an off-shell mass.
unsigned int _shape
Option for the line-shape.
ThePEG::Ptr< InterfacedBase >::pointer IBPtr
constexpr auto sqr(const T &x) -> decltype(x *x)
virtual IBPtr fullclone() const
Make a clone of this object, possibly modifying the cloned object to make it sane.
GenericWidthGeneratorPtr _hwidth
The width generator.
virtual IBPtr clone() const
Make a simple clone of this object.
-*- C++ -*-
SMHiggsMassGenerator()
The default constructor.
The SMHiggsMassGenerator class implements the generation of the Higgs boson mass according to the pre...
The GenericMassGenerator class is a simple class for the generation of particle masses in Herwig...