herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
GeneralTwoBodyDecayer.h
1 // -*- C++ -*-
2 //
3 // GeneralTwoBodyDecayer.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 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_GeneralTwoBodyDecayer_H
10 #define HERWIG_GeneralTwoBodyDecayer_H
11 //
12 // This is the declaration of the GeneralTwoBodyDecayer class.
13 //
14 
15 #include "Herwig/Decay/DecayIntegrator.h"
16 #include "Herwig/Decay/DecayPhaseSpaceMode.h"
17 #include "ThePEG/Helicity/Vertex/VertexBase.h"
18 #include "GeneralTwoBodyDecayer.fh"
19 #include "Herwig/Shower/Core/Couplings/ShowerAlpha.h"
20 
21 namespace Herwig {
22 using namespace ThePEG;
23 using Helicity::VertexBasePtr;
24 
40 
41 public:
42 
44  typedef pair<tcPDPtr, Energy> PMPair;
45 
46 public:
47 
51  GeneralTwoBodyDecayer() : _maxweight(1.), mb_(ZERO), e_(0.), s_(0.), e2_(0.), s2_(0.),
52  pTmin_(GeV), pT_(ZERO), colour_(1,DVector(1,1.))
53 {}
54 
55 
64  virtual ParticleVector decay(const Particle & parent,
65  const tPDVector & children) const;
66 
73  virtual int modeNumber(bool & cc, tcPDPtr parent,const tPDVector & children) const;
74 
83  virtual double me2(const int , const Particle & part,
84  const ParticleVector & decay, MEOption meopt) const = 0;
85 
92  virtual Energy partialWidth(PMPair inpart, PMPair outa,
93  PMPair outb) const;
94 
105  virtual bool twoBodyMEcode(const DecayMode & dm, int & mecode,
106  double & coupling) const;
107 
115  virtual double brat(const DecayMode & dm, const Particle & p,
116  double oldbrat) const;
117 
121  virtual POWHEGType hasPOWHEGCorrection() {return No;}
122 
126  virtual RealEmissionProcessPtr generateHardest(RealEmissionProcessPtr);
127 
128 
132  virtual double threeBodyME(const int , const Particle & inpart,
133  const ParticleVector & decay, MEOption meopt);
135 
139  void setDecayInfo(PDPtr incoming,PDPair outgoing,
140  VertexBasePtr,VertexBasePtr,
141  const vector<VertexBasePtr> &,
142  VertexBasePtr);
143 
144 protected:
145 
148 
153  VertexBasePtr getVertex() const { return vertex_; }
154 
159  VertexBasePtr getIncomingVertex() const { return incomingVertex_; }
160 
165  vector<VertexBasePtr> getOutgoingVertices() const { return outgoingVertices_; }
166 
171  VertexBasePtr getFourPointVertex() const { return fourPointVertex_; }
172 
173 
178  void setWeight(double wgt) { _maxweight = wgt; }
179 
186  void colourConnections(const Particle & parent,
187  const ParticleVector & out) const;
188 
192  enum dipoleType {FFa, FFc, IFa, IFc, IFba, IFbc};
193 
197  double colourFactor(tcPDPtr in, tcPDPtr out1, tcPDPtr out2) const;
198 
202  double matrixElementRatio(const Particle & inpart, const ParticleVector & decay2,
203  const ParticleVector & decay3, MEOption meopt);
204 
208  bool calcMomenta(int j, Energy pT, double y, double phi, double& xg,
209  double& xs, double& xe, double& xe_z,
210  vector<Lorentz5Momentum>& particleMomenta);
211 
215  bool psCheck(const double xg, const double xs);
216 
220  vector<Lorentz5Momentum> hardMomenta(const PPtr &in,
221  const PPtr &emitter,
222  const PPtr &spectator,
223  const vector<dipoleType> &dipoles, int i);
224 
228  InvEnergy2 calculateDipole(const dipoleType & dipoleId, const Particle & inpart,
229  const ParticleVector & decay3, const dipoleType & emittingDipole);
230 
234  double dipoleSpinFactor(const PPtr & emitter, double z);
235 
239  bool identifyDipoles(vector<dipoleType> & dipoles,
240  PPtr & aProgenitor,
241  PPtr & bProgenitor,
242  PPtr & cProgenitor) const;
243 
247  void getColourLines(RealEmissionProcessPtr real);
248 
249 
253  double colourCoeff(const PDT::Colour emitter, const PDT::Colour spectator,
254  const PDT::Colour other);
255 
259  ShowerAlphaPtr coupling() {return coupling_;}
261 
262 public:
263 
270  void persistentOutput(PersistentOStream & os) const;
271 
277  void persistentInput(PersistentIStream & is, int version);
279 
286  static void Init();
287 
288 protected:
289 
297  virtual void doinit();
298 
303  virtual void doinitrun();
305 
306 protected:
307 
315  typedef vector<pair<int,double > > CFlowPairVec;
316  typedef vector<CFlowPairVec> CFlow;
317 
318  const vector<DVector> & getColourFactors(const Particle & inpart,
319  const ParticleVector & decay,
320  unsigned int & nflow);
321 
322  const CFlow & colourFlows(const Particle & inpart,
323  const ParticleVector & decay);
324 
326 
327 private:
328 
334 
339  GeneralTwoBodyDecayer & operator=(const GeneralTwoBodyDecayer &) = delete;
340 
341 private:
342 
347 
351  vector<PDPtr> _outgoing;
352 
356  VertexBasePtr vertex_;
357 
361  VertexBasePtr incomingVertex_;
362 
366  vector<VertexBasePtr> outgoingVertices_;
367 
371  VertexBasePtr fourPointVertex_;
372 
373 
377  double _maxweight;
378 
382  Energy mb_;
383 
387  double e_;
388 
392  double s_;
393 
397  double e2_;
398 
402  double s2_;
403 
407  Energy pTmin_;
408 
412  Energy pT_;
413 
417  ShowerAlphaPtr coupling_;
418 
422  vector<DVector> colour_;
423 
424 };
425 
426 }
427 
428 #include "ThePEG/Utilities/ClassTraits.h"
429 
430 namespace ThePEG {
431 
436 template <>
437 struct BaseClassTrait<Herwig::GeneralTwoBodyDecayer,1> {
439  typedef Herwig::DecayIntegrator NthBase;
440 };
441 
444 template <>
445 struct ClassTraits<Herwig::GeneralTwoBodyDecayer>
446  : public ClassTraitsBase<Herwig::GeneralTwoBodyDecayer> {
448  static string className() { return "Herwig::GeneralTwoBodyDecayer"; }
449 };
450 
453 }
454 
455 
456 #endif /* HERWIG_GeneralTwoBodyDecayer_H */
vector< VertexBasePtr > outgoingVertices_
Pointer to the vertices for radiation from the outgoing particles.
ThePEG::Ptr< Particle >::pointer PPtr
vector< VertexBasePtr > getOutgoingVertices() const
Get vertex pointer.
double s2_
Reduced mass of spectator child particle squared.
void setWeight(double wgt)
Set integration weight.
vector< PDPtr > _outgoing
Outgoing particles.
double s_
Reduced mass of spectator child particle.
GeneralTwoBodyDecayer()
The default constructor.
The GeneralTwoBodyDecayer class is designed to be the base class for 2 body decays for some general m...
pair< tcPDPtr, Energy > PMPair
A ParticleData ptr and (possible) mass pair.
virtual POWHEGType hasPOWHEGCorrection()
Has a POWHEG style correction.
vector< DVector > colour_
Store colour factors for ME calc.
double e2_
Reduced mass of emitter child particle squared.
VertexBasePtr getFourPointVertex() const
Get vertex pointer.
vector< double > DVector
MEOption
Enum for the matrix element option.
Energy mb_
Mass of decaying particle.
ShowerAlphaPtr coupling()
Coupling for the generation of hard radiation.
vector< tPDPtr > tPDVector
POWHEGType
Virtual members to be overridden by inheriting classes which implement hard corrections.
Definition: HwDecayerBase.h:78
double _maxweight
Maximum weight for integration.
VertexBasePtr incomingVertex_
Pointer to vertex for radiation from the incoming particle.
pair< PDPtr, PDPtr > PDPair
Main class for Decayers implementing multi-channel phase space integration.
ThePEG::Ptr< ParticleData >::transient_const_pointer tcPDPtr
ThePEG::Ptr< ParticleData >::pointer PDPtr
vector< pair< int, double > > CFlowPairVec
Member for the generation of additional hard radiation.
PDPtr _incoming
Store the incoming particle.
Energy pT_
Transverse momentum of the emission.
ShowerAlphaPtr coupling_
Coupling for the generation of hard radiation.
VertexBasePtr vertex_
Pointer to vertex.
VertexBasePtr getVertex() const
Get vertex pointer.
VertexBasePtr getIncomingVertex() const
Get vertex pointer.
-*- C++ -*-
VertexBasePtr fourPointVertex_
Pointer to vertex for radiation coming from 4 point vertex.
double e_
Reduced mass of emitter child particle.
vector< PPtr > ParticleVector
static AbstractClassDescription< GeneralTwoBodyDecayer > initGeneralTwoBodyDecayer
The static object used to initialize the description of this class.
constexpr ZeroUnit ZERO