herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
TwoBodyAllOnCalculator.h
1 // -*- C++ -*-
2 //
3 // TwoBodyAllOnCalculator.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_TwoBodyAllOnCalculator_H
10 #define HERWIG_TwoBodyAllOnCalculator_H
11 // This is the declaration of the TwoBodyAllOnCalculator class.
12 
13 #include "WidthCalculatorBase.h"
14 #include "TwoBodyAllOnCalculator.fh"
15 #include "GenericWidthGenerator.h"
16 
17 namespace Herwig {
18 using namespace ThePEG;
19 
31 
32 public:
33 
38  friend class GenericWidthGenerator;
39 
40 public:
41 
49  TwoBodyAllOnCalculator(tGenericWidthGeneratorPtr inwidth,int imode,
50  Energy m1,Energy m2)
51  : _mode(imode),_mass1(m1),_mass2(m2),_widthgen(inwidth)
52  {}
53 
59  Energy partialWidth(Energy2 scale) const;
60 
68  void resetMass(int imass,Energy mass) {
69  if(imass==1) _mass1=mass;
70  else if(imass==2) _mass2=mass;
71  else throw Exception() << "Unknown particle in "
72  << "TwoBodyAllOnCalculator::resetMass()"
74  }
75 
82  Energy getMass(const int imass) const {
83  if(imass==1) return _mass1;
84  else if(imass==2) return _mass2;
85  else throw Exception() << "Unknown particle in "
86  << "TwoBodyAllOnCalculator::getMass()"
88  }
89 
96  Energy otherMass(const int imass) const {
97  if(imass==1) return _mass2;
98  else if(imass==2) return _mass1;
99  else throw Exception() << "Unknown particle in "
100  << "TwoBodyAllOnCalculator::otherMass()"
102  }
103 
104 private:
105 
109  TwoBodyAllOnCalculator & operator=(const TwoBodyAllOnCalculator &) = delete;
110 
111 private:
112 
116  int _mode;
117 
121  Energy _mass1;
122 
126  Energy _mass2;
127 
131  GenericWidthGeneratorPtr _widthgen;
132 
133 };
134 
135 }
136 
137 #endif /* HERWIG_TwoBodyAllOnCalculator_H */
The WidthCalculatorBase class is a base class to be used by classes which calculate partial widths fo...
GenericWidthGeneratorPtr _widthgen
the width generator
Energy _mass2
Mass of the second particle.
Energy _mass1
Mass of the first particle.
The GenericWidthGenerator class is designed to automatically calculate the running width for a given ...
Energy getMass(const int imass) const
Get the mass of one of the decay products.
Energy otherMass(const int imass) const
Get the masses of all bar the one specified.
-*- C++ -*-
The TwoBodyAllOnCalculator class is a wrapped around the the simple two body decay matrix elements in...
void resetMass(int imass, Energy mass)
Get the mass of one of the decay products.
TwoBodyAllOnCalculator(tGenericWidthGeneratorPtr inwidth, int imode, Energy m1, Energy m2)
Constructor.